Situations where you need to quickly transfer gigabytes of data or launch a game over a local network arise unexpectedly. Often, there's no router handy, and the internet cable is lost somewhere. Fortunately, modern technology allows Connect laptops via Wi-Fi without a router, creating a direct wireless connection between devices. This solution is ideal for temporary work, gaming sessions, or emergency information exchange.
This technology is called Ad-Hoc or "computer-to-computer" mode. Unlike a traditional infrastructure, where all devices communicate through a central point, here each laptop becomes an equal participant in the network. Direct connection It works reliably if you configure security and IP settings correctly. You don't need any special hardware; the built-in wireless modules are sufficient.
The setup process may seem complicated only at first glance. Modern operating systems, such as Windows 10 And Windows 11We've significantly simplified creating such connections, although we've hidden some settings deeper in the menu. The key is to understand the logic behind network protocols and follow the configuration steps consistently. In this article, we'll cover all the nuances of creating a direct connection to ensure you don't encounter any issues with device visibility.
How a Direct Wireless Network Works
When you connect devices without a router, you essentially turn one of the laptops into an access point. In mode Ad-Hoc Each device can initiate a connection. However, in modern Windows implementations, the "Computer-to-Network" mode is more commonly used, where one laptop broadcasts the signal and others connect to it. This ensures better compatibility and data transfer stability.
The key is to use common SSID (network name) and password. Both devices must support the same encryption standard, usually WPA2-PersonalSecurity protocols ensure that no one else can connect to your temporary network, as the Wi-Fi range allows you to intercept the signal even from the next room.
⚠️ Attention: When creating an open network without a password, all transmitted data can be intercepted. Always use WPA2 encryption, even if you're in an isolated room.
The connection speed in this mode is theoretically no worse than using a router, but in practice it may be slower due to driver issues and interference. 5 GHz provide cleaner air and higher speed, but have a smaller wall penetration radius compared to 2.4 GHz.
Preparing the operating system for setup
Before creating a network, you need to ensure that network services are working properly. First, check that Wi-Fi is enabled on both laptops. Users often forget that Airplane Mode may be enabled or the physical switch may be off on one of the devices.
The second important step is checking the network type. Windows assigns the "Public" profile to new connections by default, which prevents others from discovering your device. Change profile Setting the network to "Private" is mandatory for laptops to be visible in the network. Without this step, you can connect successfully, but you won't see shared folders.
It's also worth updating your wireless adapter drivers. Manufacturers often release patches to improve compatibility in direct mode. Go to Device Manager and check the status of your Wi-Fi adapterIf the icon has a yellow exclamation mark, network setup will be impossible until the driver error is resolved.
Creating a network on the first laptop (Host)
To establish a connection, one laptop must act as the network organizer. In Windows 10 and 11, this is done via a mobile hotspot or the command line, as the graphical interface for creating classic ad-hoc networks has been deprecated. Using the command line provides more flexible control over the parameters of the network being created.
Open Command Prompt as administrator. To do this, click Win + X and select the appropriate option. We need to create a virtual adapter and configure its settings. Enter the command to create the network: netsh wlan set hostednetwork mode=allow ssid=MyDirectNet key=Password123. Here MyDirectNet — this is the name of your network, and Password123 — the password you came up with.
☑️ Check before launching the network
After successfully creating the network, you need to start it with the command netsh wlan start hostednetworkIf the system responds that the network is running, the name you created will appear in the list of available Wi-Fi networks on the first laptop. This laptop is now ready to accept connections, but it doesn't yet have internet access or file sharing configured.
⚠️ Attention: Some antivirus programs may block the creation of virtual adapters. If the command fails, temporarily disable your third-party firewall or add an exception rule.
Connecting a second laptop (Client)
On the second device, the process looks like a normal Wi-Fi connection. Open the list of available networks and find the name you created (in our example, MyDirectNet) and click "Connect." The system will ask for a security key—enter the password you set when creating the network on the host.
Once connected, Windows will ask if the computer is visible on the network. Be sure to answer "Yes" or select the "Private Network" profile. This is critical: if you select "Public," the system will block public ports, and the laptops won't be able to see each other, despite a successful Wi-Fi connection.
You can check the connection status via the command line by entering ipconfig. Make sure that both devices have received IP addresses from the same subnet (usually this is a range 192.168.137.x for Microsoft virtual adapters). If the addresses begin with 169.254..., this means that automatic address assignment did not work and manual configuration will be required.
Setting up IP addresses and sharing
Static IP address assignments are often required for stable local network operation. This eliminates issues with devices losing connection after reboots. Go to the adapter settings and select Properties. IPv4 and manually set the addresses. For example, for the first laptop: IP 192.168.137.1, mask 255.255.255.0For the second: IP 192.168.137.2, the mask is the same, the gateway is the address of the first laptop.
The next step is to open the public access. Go to Control Panel → Network and Sharing Center → Change advanced sharing settingsIn the "Private" profile, enable network discovery and file sharing. Also, in the "All Networks" section, we recommend disabling password protection if you trust connected devices to avoid having to enter your username and password each time.
| Parameter | Laptop 1 (Host) | Laptop 2 (Client) | Comment |
|---|---|---|---|
| IP address | 192.168.137.1 | 192.168.137.2 | Must be in the same subnet |
| Subnet mask | 255.255.255.0 | 255.255.255.0 | Standard Class C mask |
| Main gateway | 192.168.137.1 | 192.168.137.1 | Host computer address |
| DNS | 8.8.8.8 | 8.8.8.8 | You can leave the car or tell Google |
After applying the settings, try pinging the second computer from the first. Open the command prompt and enter ping 192.168.137.2If you see responses from the node, the physical and logical connection is established correctly. If you are experiencing timeouts, check your Windows firewall settings.
Why isn't the ping working?
If ping fails but the connection is still there, the firewall is 90% of the time. Try temporarily disabling Windows Firewall on both devices to diagnose the issue. If that works, create an allow rule for the ICMP protocol.
Advanced Features: Internet Sharing
One of the most useful features of this connection is the ability to share internet from one laptop to another. For example, if the first laptop has a wired connection or a 4G modem, it can broadcast internet via the created Wi-Fi network. To do this, open the "Access" tab in the properties of the active internet adapter (the one that connects to the network).
Check the "Allow other network users to connect through my internet connection" box and select the virtual adapter created for our direct network from the drop-down list (usually called "Local Area Connection" with a number). This will redirect traffic through the Wi-Fi module.
It's worth remembering that the Internet speed on the client device will depend on the speed of the Wi-Fi connection and the performance of the host. Dual-band mode here again it gives an advantage, allowing you not to “cut” the channel speed.
Solving typical problems and errors
Despite the simplicity of the concept, users often encounter problems with laptops not seeing shared folders. The most common cause is the service SSDP Discovery or UPnP are not running. Check their status in Windows Services (services.msc) and set the startup type to "Automatic".
Another issue is different versions of the SMB protocol. If you connect a very old laptop (for example, running Windows XP) to a new one (Windows 11), security conflicts may arise. In this case, you'll have to enable SMB 1.0 support on the new PC, although this reduces overall system security.
⚠️ Attention: Operating system interfaces are being updated. The layout of menu items in Windows 11 may differ from that described for Windows 10. If you don't find an option, use the search in system settings.
If nothing helps, try resetting your network settings. The command netsh winsock reset from the command line followed by a reboot often works wonders, clearing the network socket cache and resetting erroneous configurations.
Frequently Asked Questions (FAQ)
Is it possible to connect a laptop and a smartphone this way?
Yes, this is possible. Your smartphone will see the created network as a regular Wi-Fi router. However, to fully share files (SMB) on your phone, you'll need a file manager that supports network protocols, such as Solid Explorer or CX File Explorer.
What is the maximum range of such a connection?
The range depends on the laptop's antenna strength and the presence of obstacles. In open spaces, it can reach 30-50 meters, but in an apartment with concrete walls, a strong signal usually lasts within one or two rooms.
Does this connection affect the speed of the main internet?
If you don't use the Internet Sharing (ICS) feature, the direct channel operates independently. However, if you share the internet through this channel, the client's speed will be limited by the Wi-Fi module's speed and encryption processes.
Do I need to create the network again every time?
No. Saved network profiles remain in the system. Simply start the network with the command netsh wlan start hostednetwork on the host, and the client laptop will connect automatically if auto-connection is enabled.