How to create a Wi-Fi network between two computers: step-by-step instructions

Creating a local network between two computers is a basic but extremely useful task for any user who wants to share files without flash drives or play online games. In today's world, where wired connections are becoming a thing of the past, Wi-Fi wireless technology has become the standard for setting up a home office or multimedia center. Many users mistakenly believe that connecting two laptops requires cables or complex router settings, but the Windows operating system has built-in tools that make this process as simple as possible.

There are two main scenarios for implementing such a connection: using existing infrastructure (a router) or directly connecting devices to each other (Ad-Hoc mode). The choice of a specific method depends on your situation: whether you have a working router on hand or need to quickly transfer gigabytes of data in the field. TCP/IP protocol, on which the interaction is based, works stably in both cases, requiring only the correct configuration of security and naming parameters.

In this article, we'll examine both methods in detail, focusing on setting access rights and troubleshooting common errors when computers simply don't "see" each other. Understanding the principles of operation local area network (LAN) This will allow you to not only connect two PCs, but also set up printer sharing or create a home server for data storage.

Selecting a connection method: via a router or directly

The first step should always be determining the topology of your future network. If both computers are within range of the Wi-Fi router, it's logical and easiest to use it as the central hub. In this mode (Infrastructure), the router takes over the function. DHCP servers, automatically distributing IP addresses to each connected device, which significantly simplifies the setup process.

However, if a router isn't readily available, or if you need to create a temporary network in a location without infrastructure (such as a park or hotel), ad hoc mode is used. In Microsoft terminology, this is often referred to as a "Mobile Hotspot" or creating a new network. Here, one computer acts as an access point, while the other connects to it as if it were a regular Wi-Fi router.

📊 Which connection method do you plan to use?
Via a Wi-Fi router
Direct connection (Ad-Hoc)
Via Ethernet cable
I only need it for games

It is worth noting that the data transfer speed during a direct connection may be limited by the capabilities of Wi-Fi adapters, especially if they operate in an older standard. 802.11nWhen using a modern router with support 5 GHz and standard Wi-Fi 6, the file exchange speed will be significantly higher and more stable, approaching the performance of a wired gigabit connection.

⚠️ Caution: When creating an Ad-Hoc network, one of the computers may lose internet access if it can't simultaneously receive and broadcast Wi-Fi, or if traffic forwarding isn't configured correctly. It's best to use a router to connect both computers to the internet.

Preparing the Windows operating system for network communication

Before proceeding with technical settings, you need to ensure that the operating system is ready to detect other devices. Windows may block external connections by default for security purposes if the network profile is set to "Public." You need to change this status to "Private" for both computers.

To do this, go to Settings → Network and Internet → Wi-Fi and click on your network name. In the menu that opens, select the "Private" profile. This will make your computer visible to other devices and open the necessary ports for data exchange. Without this step, computers may ignore connection requests even with the correct IP addresses.

Next, you should check the network services. Make sure the discovery and sharing services are running on both PCs. Click Win + R, enter services.msc and find "Function Discovery Resource Publishing" and "Discovery Provider Host" in the list. They should be running and running automatically.

An important aspect is having the same workgroup name. Although this requirement has become less stringent in modern versions of Windows 10 and 11, to ensure visibility in the Network Places, it's best to have both computers have the same workgroup name, for example, WORKGROUPYou can change it through System → Advanced system settings → Computer name.

Setting up a network via a Wi-Fi router (Infrastructure mode)

This is the most common and reliable method. Both computers connect to the same Wi-Fi network broadcast by your router. The main requirement is that they must be on the same subnet. Routers typically assign addresses like 192.168.0.x or 192.168.1.x automatically.

Check the IP addresses of both devices. Open the command prompt (cmd) and enter the command ipconfig. Find the line "IPv4 address". If the address on the first computer 192.168.1.15, and on the second 192.168.1.20, then they are on the same network and can see each other. If the addresses begin differently (for example, 192.168.0.x and 192.168.1.x), communication between them is impossible without changing the router settings.

After confirming the connection, you need to set up folder sharing. Select the folder you want to share, right-click, and select Properties → Access → Advanced settingsCheck the "Share this folder" box and click the "Permissions" button, where you should set full access (read and write) for the "Everyone" group.

Parameter Computer 1 (Server) Computer 2 (Client) Meaning
Connection type Wi-Fi Wi-Fi Same network
IP address 192.168.1.10 (example) 192.168.1.11 (example) In the same subnet
Working group WORKGROUP WORKGROUP Identically
Network profile Private Private Necessarily

To access a shared folder from another computer, open File Explorer and enter in the address bar IP address of the first computer (For example, \\192.168.1.10). If the system prompts for a username and password, enter the credentials of the user on the first computer. This is necessary for authorization in the file system of the remote machine.

Establishing a direct computer-to-computer (Ad-Hoc) connection

If you don't have a router, Windows 10 and 11 allow you to create a virtual access point. On the first computer, go to Settings → Network & Internet → Mobile HotspotEnable the feature and select "Internet Connection Sharing" (if needed) or simply create a network. Remember the network name and password that the system generates or that you enter manually.

The second computer should find the created network in the list of available Wi-Fi connections and connect to it using the specified password. After a successful connection, Windows may ask if you want to make this computer discoverable. Answer "Yes." A direct connection is now established between the devices.

Problems with the 5 GHz band

Some older adapters may not detect a network created in the 5 GHz band. If the second PC doesn't find the network, try switching the band to 2.4 GHz (band=1) in the mobile hotspot settings (via the registry or the netsh command line).

For more advanced configuration, you can use the command line. Launch Terminal as administrator and enter the following command to create the network: netsh wlan set hostednetwork mode=allow ssid=MyNetwork key=Password123Then start the network with the command netsh wlan start hostednetworkThis will create a virtual adapter that will be visible to other devices.

⚠️ Caution: When connecting directly, Windows Firewall may block ICMP requests (pings). If you can't see the computers, try temporarily disabling the firewall to test, then create an exception rule for the private network.

Setting up sharing and troubleshooting visibility issues

A common problem is that computers are on the network, but folders won't open or require a password that doesn't work. This is due to security settings. Go to Control Panel → Network and Sharing Center → Change advanced sharing settingsHere you need to enable network discovery and file and printer sharing.

It's also crucial to disable password-protected access if you don't want to enter your credentials every time. In the same menu, find "All Networks" and select "Turn off password-protected sharing." This will allow any device on the local network to access shared resources without authorization.

  • 🔍 Check services: Make sure the service SSDP Discovery launched.
  • 📁 NTFS Permissions: In addition to access rights, check the "Security" tab in the folder properties - there should also be a "Everyone" user with read permissions.
  • 🔄 SMB 1.0 Protocol: For older devices (printers, TVs), you may need to enable SMB 1.0 support in Windows components, but for PC-to-PC communication, it is better to use SMB 2/3.

If you're using static IP addresses, make sure they don't conflict. It's best to leave the address set to automatic (DHCP) unless you have specific addressing requirements. IP address conflicts will cause the connection to be lost on one of the devices.

☑️ Network Diagnostic Checklist

Completed: 0 / 5

Using the Command Line for Diagnostics and Management

For experienced users, the graphical interface may be too slow. The command line provides powerful tools for network management. The main tool is the utility net And pingFirst, check the availability of the second computer with the command ping 192.168.1.X, where X is the address of the target PC.

If the ping works but the folders are not visible, use the command net view \\192.168.1.Xto see a list of shared resources on a remote computer. This helps determine whether the system can see the machine itself and what services are available on it.

net use Z: \\192.168.1.10\SharedFolder /user:UserName Password

This command allows you to map a remote folder as a network drive (in this case, drive Z:), which is very convenient for regular file management. Enter the remote PC username and password if authentication is required. The folder will then be accessible in "My Computer" as a regular drive.

Frequently Asked Questions (FAQ)

Why can't computers see each other on the network even though Wi-Fi is connected?

Most likely, the network profile is set to "Public," which is blocking detection. Also, check that the "Feature Discovery Resource Publishing" service is enabled and that a third-party antivirus or firewall isn't blocking the connection.

How to transfer files faster than Wi-Fi?

Wireless networks have speed and stability limitations. For transferring very large amounts of data (hundreds of gigabytes), it's faster and more reliable to use a direct Ethernet cable (LAN), connecting the computer ports directly or through a switch.

Is it possible to play online games via a created Wi-Fi network?

Yes, if the game supports LAN Play. Make sure your firewall allows the application to access the network and that both computers are on the same subnet.

Do you need internet to create a network between two PCs?

No, internet access is not required. The local network operates autonomously. However, if you use a mobile hotspot to share internet from one PC to another, the sharing device must have internet access.

How to remove the password when entering a shared folder?

In the Network and Sharing Center, under All Networks, select "Turn off password-protected sharing." Also, make sure the "Everyone" user is added to the folder's permissions.