Ad hoc networking

How the network with the funny name can make your life easier

By Gloria Boyer

When someone says "ad hoc network" do you say gesundheit? I was always reaching for a tissue before I learned what an ad hoc network can do.

The truth is, the network with the funny name is actually a pretty cool invention. In a wireless ad hoc network (also called a computer-to-computer network) computers and devices connect directly to each other, rather than to a server, hub, or router. Why does this matter? Because it means you can quickly set up a temporary network anywhere. And because using an ad hoc network can save you time and can even help you handle stress.

Here are a few ways you might use an ad hoc network:

  • Quickly connect several computers so that you can share files and printers. Need to share the latest sales figures with a co-worker when you’re both away from the office? Using an ad hoc network is one great way to do it. Since an ad hoc network is temporary, unless you choose to save it, you don’t have to worry about being connected to your co-worker’s computer forever.

  • Share an Internet connection with a group of people. Let’s say you and a few colleagues are in a conference room and your computer has an Internet connection but the others don't. You can set up an ad hoc network to share that connection with your colleagues, saving the hassle of setting up separate Internet connections for each person.

  • Play multiplayer computer games. Remember what I said about handling stress? A Counterstrike session now and then can do wonders for your mood—not to mention your score.

The nitty-gritty details

A while back, we had a rare snowstorm here in Seattle. I wanted to share pictures of my cat romping in the snow. I selected the pictures and copied them to my Public folder. Because I have an ad hoc network set up, my friends can connect to my ad hoc network and my Public folder to see these pictures. (Okay, I admit it—I am one of those wacky cat people.)

Here’s what I did, and what you can do too. It only takes a few minutes. Remember those network games you want to play?


  • Before you begin: your computer—and the ones you’re connecting to—should have a wireless adapter.

  1. Click the Start button Picture of the Start button and then type Network and Sharing Center in the Search box.
  2. In the left pane, click Set up a connection or network.

    Picture of Network and Sharing Center
    Network and Sharing Center
  3. Click Set up a wireless ad hoc (computer-to-computer) network, and then click Next.

    Picture of the "Set up a connection or network" dialog box
    Choose "Set up a wireless ad hoc (computer-to-computer) network"
  4. On the Give your network a name and choose security options page:

    • Network name. Make up something short, sweet, and memorable (for example, “MyTempNet”).

    • Security type. For your computer’s security, choose WPA2 Personal. (We don't recommend using WEP. WPA2 is more secure. If you try WPA2 and it doesn’t work, we recommend that you upgrade your network adapter to one that works with WPA2.)

    • Security key/Passphrase. Ignore the fancy names; security keys and passphrases are basically just passwords.

      Now here are some crazy rules (you knew there had to be some, right?):

      • The passphrase should be 8 to 63 characters long. For example: jAmn5xlw!

      • Make up something that contains numbers, uppercase and lowercase letters, and symbols. For the best security, the security key or passphrase should not contain words that are in the dictionary. Make sure you either select the Display characters check box or remember the password, because you have to give it to the other people you want to join your network. (Right. Like I’m gonna remember a 63-character password.)

    • You can select the Save this network check box so that you can use the network over and over. Otherwise, ad hoc networks just disappear into the ether when you’re done using them.

      Picture of the "Give your network a name and choose security options" page
      Give your network an easy-to-remember name
  5. When you’re all done, click Next. The network name and security key or passphrase are listed on the next page. Pay attention to these because people will need them to connect to your network. If you want to share your Internet connection, click Turn on Internet connection sharing.

    Picture of "The network is ready to use" page
    Remember your wireless network name and security key

A few last steps…

If you want to share files with others on your ad hoc network, first open Network and Sharing Center. Under Sharing and Discovery, make sure file sharing and network discovery are on. If not, click the arrow beside each one to expand that section, click the option to turn it on, and then click Apply. If you want to share files by using the Public folder on your computer, turn on public folder sharing as well. And, if you want to require other people to have a user account on your computer in order to share files with you, turn on password protected sharing (this option is only available for workgroups, not for domains).

Picture of the "Sharing and Discovery" section in Network and Sharing Center
Turn on the sharing options you want to use


  • If you use password protected sharing, or if your computer is joined to a domain, other people will need to have a user account on your computer to see or access your shared files.

Don’t be selfish—share your printer!

You can also share your printer with others on an ad hoc network. Here’s how:

  1. Click the Start button Picture of the Start button , click Control Panel, and then, under Hardware and Sound, click Printer.
  2. Right-click the printer you want to share, click Sharing, click the Share this printer check box, and then click OK. (If the Share this printer check box is unavailable, click Change sharing options first.)

    Picture of the Sharing tab on the printer property sheet
    Share your printer with others


  • To tell your friends how to connect to the shared printer, see Share a printer.

Tell your friends

If you saved your ad hoc network and you want your friends to connect to it (to play those games!), here’s how they can do it:

  1. Click the Start button Picture of the Start button , click Connect To, click the network you want to join, and then click Connect.
  2. On the Successfully connected to <network name> page, if you want to connect to this network again later, click the Save this network check box, and then click Close. (Ad hoc networks normally disappear after you disconnect from them.)

  3. On the Select a location for the <network name> network page, click Home or Work. This will automatically turn on network discovery and file sharing.

  4. On the Successfully set network settings page, click View computers and devices on the network.

  5. To find a file that is shared on another computer, double-click that computer’s name in the list, double-click the Public folder, and then double-click Public documents. Depending on the file permissions, you can read, edit, copy, or print the file.

  6. When you’re done using the ad hoc network, just disconnect and it will disappear (unless you selected the Save this network check box previously).


  • If you’re trying to view files on a computer that is joined to a domain, you must have either a domain user account on that computer or a local account on that computer.

Get ready for Counterstrike

Now you try it! Go ahead, work off some stress by playing a few network games. If you’re at work, don’t worry. Just tell your boss you’re improving your computer skills.

Time for lunch?

What did I tell you? Your ad hoc network has made you twice as productive while reducing your stress. Now go have that tofu burger with sprouts that you’ve been thinking about. To your health!

About the author

Picture of columnist Gloria Boyer

Gloria Boyer es escritora en el equipo Windows en Microsoft. Anteriormente fue administradora de red, ahora escribe sobre funciones de red Windows. También es poeta, artista, bailarina, malabarista, amante de la jardinería y los gatos, y tiene una estatura intermedia.

¿Tiene algún comentario para este columnista? Introduzca su comentario usando la herramienta que encontrará a continuación. (Verá el cuadro de comentarios después de hacer clic en uno de los botones.) Tenga en cuenta que, si bien el columnista leerá sus comentarios, no son posibles las respuestas personales debido al volumen de comentarios recibidos.