Ad-Hoc Wireless Network Setup

Build a Computer-to-Computer, P2P Network

Cloud computing
Henrik Jonsson / Getty Images

A Wi-Fi network in ad-hoc mode (also called computer-to-computer or peer mode) lets two or more devices communicate with each other directly instead of through a central wireless router or access point (which is what infrastructure mode is).

Setting up an ad-hoc network is useful if there isn't a wireless structure built, like if there aren't any access points or routers within range. The devices don't need a central server for file shares, printers, etc.

Instead, they can access each other's resources directly through a simple point-to-point wireless connection.

How to Set Up an Ad-Hoc Network

The devices that are going to take part in the ad-hoc network have to have a wireless network adapter installed. They also have to support a hosted network.

To see if your wireless adapter has hosted network support, look for it in Command Prompt after running the netsh wlan show drivers command. You might need to open Command Prompt as an administrator for that command to work.

Note: See What Version of Windows Do I Have? if you're not sure which set of instructions to follow.

Windows 10 and Windows 8

These versions of Windows make it a little tougher to make an ad-hoc network when you compare the procedure to earlier Windows operating systems. If you want to set up the ad-hoc network manually without using any other software but what Windows has available, follow along with these steps:

  1. Open Command Prompt and enter this command, replacing the italicized works with your own network name and password for the wireless network:
    netsh wlan set hostednetwork mode=allow ssid=network name key=password
  2. Start the hosted network:
    netsh wlan start hostednetwork
  3. In Control Panel, navigate to \Network and Internet\Network Connections\ and go into the Sharing tab of the network connection's Properties (right-click to find Properties) to check the box that says Allow other network users to connect through this computer's Internet connection.
  1. Select the ad-hoc network connection from the drop down menu and OK out of any open prompts.

Windows 7

  1. Access the Network and Sharing Center section of Control Panel. Do this by opening Control Panel and then selecting that option. Or, if you're in Category view, first choose Network and Internet.
  2. Choose the link called Setup a new connection or network.
  3. Select the option called Set Up a Wireless Ad Hoc (Computer-to-Computer) Network.
  4. In that Set Up an Ad Hoc Network window, enter the network name, security type and security key (password) that the network should have.
  5. Put a check in the box next to Save this network so that it will be available later as well.
  6. Hit Next and close out of any unnecessary windows.

Windows Vista

  1. From the Windows Vista start menu, choose Connect To.
  2. Click the link called Setup a connection or network.
  3. From the Choose a connection option page, choose Set up a wireless ad-hoc (computer-to-computer) network.
  4. Click Next until you see the window for entering the network name, etc.
  5. Fill in the spaces provided to choose the network details that the ad-hoc network should have, like the authentication and password information.
  6. Click Next and close out of any open windows once it says the network has been created.

    Windows XP

    1. Open Control Panel from the Start menu.
    2. Navigate to Network and Internet Connections.
    3. Choose Network Connections.
    4. Right-click the wireless network connection and click Properties.
    5. Choose the Wireless Networks tab.
    6. Under the Preferred networks section, click Add.
    7. From the Association tab, enter the name that the ad-hoc network should be identified by.
    8. Choose This is a Computer-to-computer (ad hoc) network but uncheck the box next to This key is provided for me automatically.
    9. Choose an option in Network Authentication. Open can be used if you don't want to set a password.
    10. Choose a data encryption method in that area of the options.
    1. Enter the Wi-Fi password for the ad-hoc network in the Network key section. Type it again when asked.
    2. Click OK out of any open windows to save the changes.

    macOS

    1. Choose the Create Network... menu option from AirPort (usually accessible from the main menu bar).
    2. Select the Create a Computer-to-Computer Network option and follow the instructions provided.

    Tips

    • When using ad-hoc mode, be aware of several security issues and performance limitations of ad-hoc Wi-Fi networks
    • The most common sources of trouble in ad-hoc mode networking are incorrect configuration and insufficient signal strength. Ensure your devices are located close enough to each other and that the configuration settings are made identically on each device
    Was this page helpful?