How to Create an Ad Hoc Network

Set up an ad hoc network and connect on the fly

What to Know

  • In Command Prompt, select Run as Administrator. Enter the commands below. In Network and Sharing Center, choose an adapter.
  • Go to Properties > Sharing. Enable other users to connect. Choose an interface from the ad hoc network. Verify through the other interface.
  • Windows 7/Vista: In Network and Sharing Center, select Set up a connection or network > Set up a new network. Follow instructions.

Ad hoc wireless networks, or computer-to-computer wireless networks, are useful for internet connection sharing and other direct wireless networking without a router. Learn how to set up a Wi-Fi network to connect two or more computers using Windows 10, Windows 8.1, Windows 7, and Windows Vista.

Set Up an Ad Hoc Network on Windows 10 and 8.1

Windows 10 doesn't have a proper ad hoc network feature. You can, however, create something that looks and behaves like the ad hoc network feature on previous versions of Windows.

Before setting up an ad hoc network on Windows 10 and 8.1, you'll need Windows and client computers with wireless network adapters.

  1. Go to the Windows desktop search and enter Command Prompt.

    Command Prompt in Start menu
  2. Right-click the Command Prompt result, then select Run as Administrator.

    Windows 10 Admin Command Prompt
  3. Enter the following command in the command line. For the ssid= variable, replace AdHocNetwork with the name for your network. For the key= variable, replace yourpassword with the password for your network.

    netsh wlan set hostednetwork mode=allow ssid=AdHocNetwork key=yourpassword
    netsh command in Command Prompt
  4. Enter the following command to start the new network.

    netsh wlan start hostednetwork
    netsh command in Command Prompt
  5. Minimize or close the command prompt window, then open Control Panel.

  6. In the Control Panel, select Network and Internet.

    Network and Internet in Control Panel
  7. Select Network and Sharing Center.

    Network and Sharing Center
  8. Select Change adapter settings.

    Change adapter settings link in Network and Sharing Center
  9. In the list of network adapters on the computer, right-click the adapter that you're connected with, then choose Properties.

  10. Go to the Sharing tab.

  11. Select the Allow other network users to connect through this computer's Internet connection check box. Then, select the Home networking connection drop-down arrow and choose the interface from the ad hoc network.

    Allow other network users to connect through this computer's internet connection
  12. Select OK to save the changes.

  13. Return to the Network and Sharing Center to verify that the ad hoc network is connected to the internet through the other interface.

    Windows 10 network sharing center with ad hoc
  14. You can now connect to your computer's ad hoc network.

Windows 7, and Vista

To create an ad hoc network in older versions of Windows:

  1. Select Start > Control Panel > Network and Internet to go to the Network and Sharing Center.

  2. Select Set up a connection or network.

  3. Select Set up a new network, then select Next.

  4. Choose a name for the ad hoc network, enable encryption, and check the box to save the network. The wireless network will be created and the wireless adapter will start broadcasting.

  5. On the client computers, locate the new network and connect to it.

Limitations of Ad Hoc Wireless Networks

There are limitations of ad hoc wireless networking:

  • Ad hoc wireless networking only includes WEP-only security.
  • In this type of network, computers need to be within 300 feet.
  • When the host computer disconnects from the network, other users are disconnected and the ad hoc network is deleted.

After your ad hoc network is set up and running, learn how to share a single internet connection on your ad hoc network.

Was this page helpful?