Creating a local area network (LAN) between devices is one of the most effective ways to exchange large amounts of data without the use of external storage devices. When a LAN cable or router is not readily available, this technology WiFi Transforms regular laptops into full-fledged workstations with shared storage. This solution is ideal for offices where complex projects need to be quickly transferred, or for home use to organize a media library.
Many users mistakenly believe that a router acting as an intermediary is required to establish network communication. However, modern operating systems, such as Windows 10 And Windows 11, have built-in tools for creating a computer-to-computer (Ad-Hoc) network. In this article, we'll cover in detail how to set up such a connection, ensuring stable data transfer and resource sharing.
Before moving on to technical settings, it's important to understand that the speed of such a network will directly depend on the power of your laptops' wireless adapters. If one of your computers is equipped with an outdated wireless module, 802.11n, and the other supports WiFi 6, the speed will be limited by a weaker device. However, even at average speeds, this method is significantly faster than data transfer via Bluetooth or cloud services with data limits.
Preparing equipment and checking drivers
The first step to successfully creating a LAN is ensuring physical connectivity. You need to ensure that the wireless modules on all laptops you plan to connect to the network are working properly. Drivers are often installed incorrectly, or the adapter is simply disabled by software, making it impossible to detect nearby devices.
Open Device Manager and find the "Network Adapters" section. Make sure your WiFi adapter displays without any yellow exclamation marks. If the device is flagged with an error, you should update the firmware from the official website of your motherboard or laptop manufacturer. Also, check if the adapter itself is enabled: in Windows 10 and 11, this can be done through the Action Center or a keyboard shortcut. Win + A.
- 📡 Make sure that wireless mode is enabled in BIOS/UEFI if the adapter is not detected in the system.
- 🔄 Check that all laptops have up-to-date drivers for network cards.
- 🔋 Disable power saving for your WiFi adapter in the device properties to prevent it from turning off to save power.
⚠️ Attention: Antivirus programs and third-party firewalls often block detection of local networks, considering them public. During setup, it is recommended to temporarily disable protection or add your network to the trusted list.
Setting up a static IP address for devices
For stable operation of a local network without a router, it is highly recommended to assign a static IP address to each network member. In automatic mode (DHCP), addresses can change when reconnecting, which can lead to connection interruptions and loss of access to shared folders. Manual configuration ensures that laptop "A" will always know where to find laptop "B."
Access your network settings through the Control Panel. Find your active wireless connection and go to the protocol properties. IPv4Here we'll be entering the addresses manually. It's important to follow the logic: the first three numbers in the address must be the same for all devices, but the last number must be different.
For example, if you decide that your network address will start with 192.168.10., then you will assign the first laptop .1, and the second one - .2We leave the subnet mask as default. 255.255.255.0In this configuration, the gateway and DNS can be left blank, or the IP address of the main computer can be duplicated if you plan to access the Internet through it.
After entering the data, be sure to click "OK" and close all windows. Repeat the process on the second laptop, changing only the last digit of the IP address. If the addresses are identical, a conflict will occur, and one of the devices will be unable to connect to the network.
Creating a wireless computer-to-computer network
In Windows operating systems, the process for creating an access point for a local network has changed. In Windows 10 and 11, the classic method of creating an ad-hoc network via the command line remains the most reliable, as the graphical interface often hides these options. We'll use a built-in utility. netsh.
Launch the Command Prompt as administrator. This is critical, as creating a network requires top-level privileges. Enter the command to create a new network, specifying the desired name (SSID) and password. The password should be complex enough to prevent neighbors from connecting to your local network and accessing your files.
netsh wlan set hostednetwork mode=allow ssid=MyLocalNet key=Password123
After the command has successfully completed, the network must be started. To do this, enter the command netsh wlan start hostednetworkOn the second laptop, simply find the created network in the list of available WiFi connections and enter the password. The devices are now connected directly.
☑️ Checking network settings
Setting up sharing and visibility
Even if the laptops are connected via WiFi, Windows hides files from other users by default for security reasons. To start sharing data, you need to enable the sharing feature. This is done through the Network and Sharing Center in Control Panel.
In the "Change advanced sharing settings" section, find your current network profile (usually listed as "Private" or "Guest"). Here, you should enable network discovery and file and printer sharing. Without this step, the computers will be able to see each other but won't be able to access folders.
| Setting parameter | Private Network (Recommended) | Guest network | All networks |
|---|---|---|---|
| Network discovery | Turn on | Disable | Turn on |
| File sharing | Turn on | Disable | Turn on |
| Password-protected access | Enable (for security) | Turn on | Disable (for simplicity) |
| Data encryption | 128-bit | 40-bit | Depends on the profile |
Pay special attention to the "Password-protected sharing" option. If you disable it, anyone who connects to your WiFi network will be able to access your files without entering their username and password. This is acceptable at home, but in the office, it's best to leave it enabled.
Extending capabilities via PowerShell
For more advanced users and system administrators, tersedia offers network configuration options via PowerShell. This tool provides more flexible control over security settings and allows for automating the process of creating a local network on multiple computers.
Using cmdlet New-NetFirewallRule You can create an exception in Windows Firewall to allow incoming connections only for specific ports or applications. This improves security because you don't open all ports at once, but only allow access to necessary services, such as FTP or SMB.
PowerShell is also a convenient way to reset network settings in case of errors. The command Reset-NetAdapter It can reboot the network adapter programmatically, which often helps if the connection is frozen and does not want to be broken or re-established.
⚠️ Attention: The PowerShell interface is updated along with Windows versions. Some older commands may not work in Windows 11, so always check the syntax in the official Microsoft documentation before running scripts.
Solving common connection problems
Despite the apparent simplicity, users often encounter errors when creating a local network via WiFi. The most common one is "Windows cannot access..." This message usually indicates access rights issues or ports being blocked by an antivirus program.
If the computers can't see each other, check the "Function Discovery Resource Publishing" service. It should be running and in automatic mode. Also, make sure the network type in the Network and Sharing Center is set to "Private" and not "Public," as many features are blocked in the public profile.
- 🚫 The "No access" error is often resolved by disabling password protection in the advanced settings.
- 🔍 Make sure computer names are unique and do not contain Cyrillic or special characters.
- 🛡️ Check if your antivirus is blocking the SMB protocol (port 445).
What should I do if the yellow triangle on the network icon is lit?
This means the network is online, but there's no internet access. This is normal in local network mode without a router. If you can't access folders either, try temporarily disabling Windows Firewall for diagnostics.
Security and speed optimization
By setting up a local area network, you create a potential entry point for attackers if you're in the wrong place. Therefore, using a complex password when creating a network through netsh is a mandatory requirement. The default WPA2-Personal encryption protocol provides a sufficient level of security for home use.
To optimize the speed of large file transfers, ensure both laptops are operating on the same frequency. If one is operating on 2.4 GHz and the other on 5 GHz, they may not be able to see each other or the speed will be slow. Ideally, both devices should be connected to the 5 GHz band, which has less interference and higher throughput.
The file transfer protocol is also worth mentioning. The standard SMBv1 is outdated and insecure; modern systems use SMBv2 or SMBv3. Ensure all computers support the latest protocol versions for maximum transfer speed.
⚠️ Attention: Don't leave the shared network running all the time if you're in a cafe or at the airport. After you're finished working with files, stop the hosted network with the command
netsh wlan stop hostednetwork.
Frequently Asked Questions (FAQ)
Is it possible to create a local network if the laptops have different versions of Windows?
Yes, this is possible. Windows 7, 8, 10, and 11 can all operate on the same local network. However, on newer systems (10 and 11), the SMBv1 protocol, which is required for communication with Windows 7, is disabled by default. We recommend enabling SMB 1.0 support in Windows components on newer machines or updating the protocols on older machines.
What is the maximum range of such a network?
The range depends on the laptop's antenna power and the presence of obstacles. In open spaces, the range can reach 50-100 meters. Indoors with concrete walls, the range is reduced to 10-20 meters. To increase the range, you can use USB WiFi adapters with an external antenna.
Will the internet work on the second laptop through this network?
Ad hoc mode by itself doesn't provide internet access. However, if one of the laptops has internet access (via cable or another WiFi adapter), you can set up connection sharing (ICS). Then the second laptop will be able to access the internet through the first.
Why does file transfer speed drop?
Speed may drop due to interference, use of the 2.4 GHz band, background Windows updates, or an antivirus program that scans every transferred file in real time. To diagnose the issue, try temporarily disabling your antivirus.