Connecting two laptops to a local network via Wi-Fi is a task faced by both novice users and experienced IT professionals. This connection allows for quick file sharing, online gaming, data synchronization, or even internet sharing between devices. However, many people mistakenly believe that this requires a router or additional hardware. In fact, modern operating systems provide all the necessary tools for creating a network. direct Wi-Fi connection (ad-hoc) or the use of technologies like Wi-Fi Direct.
In this article, we will look at three main ways to connect laptops to a network: through access point (one laptop distributes Wi-Fi), with the help of computer-to-computer networks (ad-hoc) and through connecting to an existing routerEach method has its own nuances, so we will go into detail about the settings for Windows 10/11 And macOSWe'll also cover common errors and troubleshooting steps. If you plan to use the connection for transferring large files or gaming, please refer to the section on speed and stability settings.
Before you begin, make sure both laptops support Wi-Fi (most models after 2010 come with adapters). 802.11n/ac/ax). Also, check if Wi-Fi is enabled on both devices—sometimes the problem lies in trivial things, such as a disabled adapter. Device Manager.
Method 1: Creating an access point on one laptop
The most versatile method is to turn one of the laptops into Wi-Fi hotspot, to which the second one will connect. This method is suitable if you need to not only network devices but also share the internet (for example, from a laptop connected to the network via cable). Setup takes no more than 5 minutes and requires no additional equipment.
On Windows 10/11 This can be done via the command line or the graphical interface. Let's look at both options:
1.1. Configuration via the command line (universal method)
Open Command prompt as administrator (click Win + X and select the appropriate item). Enter the following command, replacing SSID to the network name, and PASSWORD for password (minimum 8 characters):
netsh wlan set hostednetwork mode=allow ssid=MyNetwork key=12345678 keyUsage=persistent
Then activate the network:
netsh wlan start hostednetwork
If a message appears "The hosted network has started.", then the access point has been created. Now you need to allow it. Internet access sharing (if required). To do this:
- Go to
Control Panel → Network and Sharing Center. - Click
Changing adapter settings. - Find the connection through which the laptop receives the Internet (for example,
Ethernet), right-click and selectProperties. - Go to the tab
Accessand check the boxAllow other network users to share your Internet connection. - In the drop-down list, select the connection you created (usually it is called
Local Area Connection* X).
⚠️ Attention: If the second laptop does not connect after activating the network, check whether your Wi-Fi adapter supports the mode hostednetworkSome older models (for example, with chips) Broadcom) may not work. In this case, use third-party programs like Connectify or mHotspot.
Make sure Wi-Fi is turned on on both laptops|
The network password must be at least 8 characters long|
Airplane mode is disabled on the sharing laptop.
Antivirus does not block network connections
-->
1.2. Setting up via Mobile Hotspot (Windows 10/11)
An easier way is to use the built-in function Mobile hotspot:
- Open
Settings → Network & Internet → Mobile Hotspot. - In the field
Sharing an Internet connectionselect a source (egEthernetorWi-Fi, if the laptop is connected to another network). - Click
Changeand set the network name (SSID) and password. - Enable the option
Mobile hotspot.
On macOS a similar function is called Internet access sharing:
- Open
System Preferences → Sharing. - Select
Internet access sharingin the left menu. - In the field
General connectionPlease provide the source (eg.Ethernet). - In the section
For computers usingmarkWi-Fi. - Click
Wi-Fi settingsand set the network name, channel and password. - Enable sharing by checking the box on the left.
After this, the second laptop will be able to connect to the created network as if it were a regular router. The connection speed will depend on the Wi-Fi standard (802.11n gives up to 150 Mbps, 802.11ac — up to 867 Mbit/s).
2. Method: Computer-to-computer network (Ad-Hoc)
If you don't need to distribute the Internet, but only need a local connection between two laptops, then ad-hoc networkThis method works without a router and doesn't require one of the devices to be connected to the internet. However, it is less stable than a hotspot and may not be supported by some modern devices (such as smartphones).
2.1. Setting up an ad-hoc network in Windows
IN Windows 10/11 Creation of an ad-hoc network is carried out via the command line:
netsh wlan set hostednetwork mode=allow ssid=AdHocNetwork key=password123 keyUsage=persistent
netsh wlan start hostednetwork
However, by default such a network is created in the mode infrastructure (as an access point), not ad-hocTo force the mode, use third-party utilities, for example, Virtual Router Plus or MyPublicWiFi, where you can explicitly select the network type.
On Windows 7 The ad-hoc network is configured through a graphical interface:
- Open
Network and Sharing Center. - Click
Setting up a new connection or network. - Select
Setting up a wireless computer-to-computer network. - Set the network name, security type (
WPA2-Personal(recommended) and password. - Check the box
Save settings for this network.
Once the network is created, the second laptop will be able to connect to it via a standard Wi-Fi search. However, keep in mind that ad-hoc networks typically offer slower speeds than infrastructure networks.802.11n in ad-hoc mode it operates at speeds up to 54 Mbps).
⚠️ Attention: Some antiviruses (for example, Kaspersky Internet Security) may block ad-hoc connections, considering them potentially dangerous. In this case, temporarily disable the firewall or add an exception for the local network.
2.2. Setting up ad-hoc on macOS
On Mac Ad-hoc network creation is done through the terminal. Open Terminal and run:
sudo ifconfig awdl0 downsudo ifconfig en0 down
sudo networksetup -setairportnetwork en0 "AdHocNetwork" password123
Where en0 - Wi-Fi interface (check its name via ifconfig), A AdHocNetwork And password123 — the network name and password. After this, the second Mac will be able to connect to it via the Wi-Fi menu.
To exchange files between laptops in an ad-hoc network, it is convenient to use built-in tools:
- 📁 Windows: turn on
File and Printer SharingVNetwork and Control Centerand open access to the required folders throughProperties → Access. - 🖥️ macOS: activate
File sharingVSystem Preferences → Sharingand add folders to the allowed list.
Method 3: Connecting via an existing router
If both laptops are connected to the same Wi-Fi router, they are automatically on the same local network. However, file sharing or gaming requires additional configuration. network environmentThis method is the most reliable, as the router provides a stable connection and high speed (up to 1 Gbps when using 802.11ac or Wi-Fi 6).
3.1. Checking the connection to one network
Make sure both laptops are connected to the same Wi-Fi network. To do this:
- 📶 On Windows open
Command lineand enteripconfig /allFind the lineMain gateway— The IP address must match on both devices. - 🍎 On macOS perform in
Terminalteamnetstat -nr | grep defaultThe gateway address must also be the same.
If the gateways are different, but the networks are the same, check if the router is in the "Unattended mode" mode. AP Isolation (Client Isolation) - it blocks communication between devices on the local network. Disable it in the router settings (usually in the Wireless Settings or Advanced).
3.2. Setting up file sharing
To make laptops "see" each other on the network:
For Windows:
- Open
Control Panel → Network Settings → Sharing Options. - Turn on
Network discoveryAndFile and Printer Sharingfor profilePrivate. - Turn it off
Password-protected sharing(unless additional security is required). - Right click on the folder you want to share, select
Properties → Access → Share.
For macOS:
- Open
System Preferences → Sharing. - Turn on
File sharingand add folders to the list. - IN
ParametersselectAFPorSMBas a protocol. - Click
Parametersand turn it onGeneral access for guest users(if necessary).
After this, the folders will become available via network paths:
- 🖥️ In Windows open
Conductorand enter in the address barIP address of the second laptop(For example,\\192.168.1.100). - 🍏 On Mac V
FinderclickGo → Connect to serverand entersmb://IP address.
⚠️ Attention: If the laptops can't see each other, check that they are on the same subnet. For example, if they have the same IP address192.168.1.100, and the other one192.168.0.101, they won't be able to communicate. Correct this in the router settings (DHCP) or manually assign IP addresses from the same subnet.
4. Checking the connection and troubleshooting
After setting up the network, it's important to test its functionality. Let's start with basic diagnostics:
4.1. Commands for checking the connection
Open Command line (Windows) or Terminal (macOS) and run:
ping the IP address of the second laptop
For example:
ping 192.168.1.101
If the packets pass without loss (0% loss), the connection works. If not, check:
- 🔌 Firewall: temporarily disable it on both laptops.
- 📡 Wi-Fi adapters: update drivers via
device Manager. - 🔄 Network mode: Make sure the network is marked as
Private(NotPublic).
If ping It doesn't work, but the laptops are connected to the same network. Check the settings. IPv4:
- On Windows open
Propertiesnetwork adapter and selectInternet Protocol version 4 (TCP/IPv4). - Check the box
Obtain an IP address automatically(if the router distributes DHCP). - If the IP is set manually, make sure the subnet mask is the same (usually
255.255.255.0).
4.2. Typical errors and solutions
| Error | Possible cause | Solution |
|---|---|---|
| "Unable to connect to this network" | Incorrect password or security type | Check your password and select WPA2-Personal (AES) |
| Laptops can't see each other on the network. | Disabled Network discovery or different working groups |
Turn on discovery and check the workgroup name (WORKGROUP by default) |
| Slow file transfer speed | Interference on the Wi-Fi channel or an outdated standard (802.11g) |
Change the channel in the router or access point settings to 5 GHz (802.11ac) |
| "Limited access" to the network | DHCP issues or IP address conflicts | Set IP addresses manually (e.g. 192.168.1.100 And 192.168.1.101) |
If the problem is not solved, try reset network settings:
- 🪟 Windows:
Settings → Network & Internet → Network reset. - 🍎 macOS: delete the file
/Library/Preferences/SystemConfiguration/NetworkInterfaces.plistand restart your laptop.
What should I do if folder sharing isn't working?
If folders do not open despite correct settings, check:
1. Access rights: on Windows V Properties → Security add a user Everyone with rights Read/Write.
2. Protocols: on macOS V Public access turn on SMB (for compatibility with Windows).
3. Antivirus: some programs (for example, Avast) block network folders. Add them to the exceptions.
5. Optimizing connection speed and stability
If your network is working but your file transfer speed is slow, try the following optimization methods:
5.1. Selecting the right Wi-Fi channel and standard
Connection speed directly depends on:
- 📶 Wi-Fi standard:
802.11ac(5 GHz) faster802.11n(2.4 GHz). - 🎯 Channel: In the 2.4 GHz range, select channels 1, 6 or 11 (they do not overlap).
- 📡 Signal strength: The closer the laptops are, the more stable the connection.
To change the channel on the access point (Windows):
- Open
device Managerand find the Wi-Fi adapter. - IN
Propertiesgo to the tabAdditionally. - Find the parameter
ChannelorChanneland set the value manually.
On the router, the channel is changed in the web interface (usually 192.168.1.1 or 192.168.0.1) in the section Wireless Settings.
5.2 Using 5 GHz for high speed
Range 5 GHz provides higher throughput but shorter range. If your laptops support 802.11ac or Wi-Fi 6, switch to this range:
- 🪟 On Windows When creating an access point, specify a channel in the range 36-165.
- 📡 Enable a separate network for 5 GHz in the Wi-Fi settings on your router.
Important: Some older devices (such as laptops built before 2012) do not support 5 GHz. In this case, use 2.4 GHz, but choose the least crowded channel.
5.3. Configuring QoS for traffic prioritization
If you use the network for gaming or video streaming, turn on QoS (Quality of Service) on the router. This feature allows you to prioritize traffic, reducing latency. The setting is located in the QoS or Traffic Control router web interface.
For access points on Windows QoS is configured via Group policy (gpedit.msc), but this is only relevant for corporate editions of the OS.
6. Local Wi-Fi network security
A local network between laptops can become vulnerable if security measures aren't taken. This is especially true when sharing internet via an access point.
6.1 Password protection and encryption selection
Always use WPA2-Personal (AES) or WPA3 To protect your network, avoid outdated protocols:
- ❌
WEP- can be easily hacked in a few minutes. - ❌
WPA-TKIP- vulnerable to attacks. - ✅
WPA2-AES— the optimal choice for most devices. - ✅
WPA3— the most secure, but not supported by all older devices.
The password must be complex (at least 12 characters, with numbers and special characters). Avoid obvious combinations like 12345678 or qwerty.
6.2. Hiding the network (SSID)
Hiding the network name (SSID) doesn't provide complete protection, but it reduces the chance of an accidental connection. To hide a network:
- 🪟 On Windows When creating an access point, add the parameter
ssid=hidden=1(not all adapters support it). - 📡 Disable the option on your router
Broadcast SSID.
To connect to a hidden network on the second laptop, enter its name and password manually in the Wi-Fi settings.
6.3. MAC address filtering
This method allows you to allow connections only to specific devices. Find MAC addresses Wi-Fi adapters of both laptops:
- 🪟 Windows:
ipconfig /all(look forPhysical addressin the sectionWireless adapter). - 🍏 macOS:
ifconfig en0 | grep ether(Whereen0— Wi-Fi interface).
Then add these addresses to the whitelist on your router or in your access point settings (if supported).
⚠️ Attention: MAC addresses can be spoofed, so this method isn't 100% secure. Use it in conjunction with a strong password and encryption. WPA2/WPA3.
7. Alternative ways to connect laptops
If your Wi-Fi connection is unstable or unavailable, consider these alternatives:
7.1 Connection via Ethernet (LAN)
The most reliable and fastest way is to use network cableTo do this:
- Connect the laptops with a cable
Ethernet(direct or crossover if ports do not supportAuto-MDI/MDIX). - Configure IP addresses manually (e.g.
192.168.1.1And192.168.1.2with a mask255.255.255.0). - Share files as described in section 3.2.
The speed via cable reaches 1 Gbps (For Gigabit Ethernet), which is 10 times faster than Wi-Fi.
7.2. Bluetooth connection
If Wi-Fi is not available, you can use Bluetooth for file transfer or remote control. However, the speed will be low (up to 3 Mbps For Bluetooth 4.0).
To connect:
- Turn on Bluetooth on both laptops.
- Make devices discoverable.
- On one of the laptops, send a pairing request.
- Confirm the code on both devices.
To transfer files, use:
- 🪟 Windows:
Settings → Devices → Send files via Bluetooth. - 🍏 macOS: Drag and drop files onto the Bluetooth icon in
Finder.
7.3. Remote control programs
If the goal is not file transfer, but remote control, use specialized programs:
- 🖥️ TeamViewer — for remote desktop.
- 📁 Resilio Sync — to synchronize files over a local network.
- 🎮 Parsec - for streaming games.
These programs automatically configure the network and encrypt traffic, which simplifies the process.
FAQ: Frequently Asked Questions
Is it possible to connect a Windows laptop and a Mac to the same network?
Yes, but there are some nuances. To exchange files between Windows And macOS:
- On Mac turn on
File sharingwith the protocolSMB(V