Você está na página 1de 21

1. This tutorial will show you how to connect two computers using a Wi-Fi connection.

. We will refer the two computers as


PC 1 and PC 2. You will have to configure both the computers as given below:-

PC 1:

1. Right-click My Computer and select Properties.

2. Click on the Computer Name tab and then click on the Change button. Type the computer name to whatever you
want, here we will name it PC 1 and you will also have to change the workgroup to WG. (The workgroup name should
be the same in both the computers) Now click Apply and close it.

3. Goto Network Connections and right-click on your wireless adapter and select Properties. Now goto the Wireless
Network Tab and click on the Advanced button. Select Computer to Computer (Ad hoc) networking option. If you get a
window with an SSID box, you can specify the network name in it, in our example we will use Wi-Fi as the SSID. Now
close the window and click on Add Preferred Networks.

Enter the settings as follows:

Network name (SSID) : Wi-Fi
Network Authentication : Open
Data Encryption : Disabled

4. Tick the This is a computer-to-computer (ad hoc) network, wireless access points are not used option if it isnt
already ticked. To automatically connect to the network, goto the Connection tab and tick on the Connect automatically
when in range option. Now, to configure the TCP/IP connection settings, goto the General tab and select Internet
Protocol (TCP/IP) and click the Properties button. Set the Values as:-

IP Address - 192.168.0.1
Subnet Mask - 255.255.255.0
Default Gateway - 192.168.0.2



5. Click OK and you have finished the steps for PC 1.

PC 2:

1. Right-click My Computer and click Properties.

2. Click on the Computer Name tab and then click on the Change button. Type the computer name to whatever you
want, here we will name it PC 2 and you will also have to change the workgroup to WG. (The workgroup name should
be the same in both the computers) Now click Apply and close it.

3. Goto Network Connections and right-click on your wireless adapter and select Properties. Now goto the Wireless
Network Tab and click on the Advanced button. Select Computer to Computer (Ad hoc) networking option. If you get a
window with an SSID box, you can specify the network name in it, in our example we will use Wi-Fi as the SSID. Now
close the window and click on Add Preferred Networks.

Enter the settings as follows:

Network name (SSID) : Wi-Fi
Network Authentication : Open
Data Encryption : Disabled

4. Tick the This is a computer-to-computer (ad hoc) network, wireless access points are not used option if it isnt
already ticked. To automatically connect to the network, goto the Connection tab and tick on the Connect automatically
when in range option. Now, to configure the TCP/IP connection settings, goto the General tab and select Internet
Protocol (TCP/IP) and click the Properties button. Set the Values as:-

IP Address - 192.168.0.2
Subnet Mask - 255.255.255.0
Default Gateway - 192.168.0.1



5. Click OK and you have finished the steps for PC 2.

Now open the Wireless network settings and click on View Available Wireless Networks. Select your network and you
are connected.

Note : The settings mentioned may vary in case of different adapters. But most of them should be similar to the above
settings.

Wi-Fi or wireless fidelity refers to a wireless LAN technology that is developed based on IEEE
802.11a/b/g or the recently ratified IEEE 802.11n. Wi-Fi is commonly used in a star
configuration with a wireless access point or wireless router as a central connection point
that connects all computers (palmtop, laptop, desktop) or other Wi-Fi enabled devices
together, connects the wireless network to a wired network, and connects the wireless
network to the Internet. A wireless network that connects via a wireless access point or a
wireless router works in infrastructure mode.
On the other hand, a wireless network in which computers link directly to one another
without an access point works in ad hoc mode. A Wi-Fi ad hoc network typically consists of
two Wi-Fi-enabled computers. However, some Wi-Fi network adapters allow more than two
computers to be connected in an ad hoc network.
A Wi-Fi ad hoc network functions just like Wi-Fi network in infrastructure mode. It can be
used to share files, folders, drives, printer, etc. It can also be used for sharing an Internet
connection or play a networked game.

How to set up a direct Wi-Fi connection in Windows XP? (Page 1 of 6)
Overview
Preparation
Ad hoc setup on the first computer (1)
Ad hoc setup on the first computer (2)
Ad hoc setup on the second computer
Internet Connection Sharing (ICS) setup
Disconnecting and reconnecting, and
troubleshooting
Ad hoc setup in Windows Vista and Windows 7
(coming ...)

Overview
Wi-Fi or wireless fidelity refers to a wireless LAN technology that is developed based
on IEEE 802.11a/b/g or the recently ratified IEEE 802.11n. Wi-Fi is commonly used in
a star configuration with a wireless access point or wireless router as a central
connection point that connects all computers (palmtop, laptop, desktop) or other Wi-Fi
enabled devices together, connects the wireless network to a wired network, and
connects the wireless network to the Internet. A wireless network that connects via a
wireless access point or a wireless router works in infrastructure mode.
On the other hand, a wireless network in which computers link directly to one another
without an access point works in ad hoc mode. A Wi-Fi ad hoc network typically
consists of two Wi-Fi-enabled computers. However, some Wi-Fi network adapters
allow more than two computers to be connected in an ad hoc network.
A Wi-Fi ad hoc network functions just like Wi-Fi network in infrastructure mode. It can
be used to share files, folders, drives, printer, etc. It can also be used for sharing an
Internet connection or play a networked game.
What should I prepare?
1. Check your Wi-Fi network adapter standards: 802.11a adapter can only work with
another 802.11a adapter, while 802.11b adapter is compatible with 802.11g adapter
and 802.11n is backward compatible with all previous versions. When connecting two
computers with different adapter version, the connection speed will fall to the slowest
of both.
2. If your computer uses an external Wi-Fi adapter (USB dongle or PC Card), plug or
insert the adapter into each computer. Before you plug or insert a new adapter/dongle
for the first time, you'll have to install your wireless network adapter driver, usually
came in a CD or stored in the dongle (since today USB dongle also functions as a flash
drive). If your computer has a built-in Wi-Fi radio, you must activate it by switching
an on/off button or via the software utility that came with it.
3. Depending on whether you'll connect at a private room or in a public space and the
confidentiality of your communication, determine a suitable encryption scheme: no
encryption at all (not recommended), WEP, WPA, or WPA2. Both network adapters
must support the same encryption system and be configured with the same
encryption key accordingly for this ad hoc connection.
4. Place your computers within range of the wireless signal. Typically, less than 50
meters indoor. Check your network adapter documentation to find your wireless
adapter coverage or view the signal strength of a detected wireless signal during
setup.
5. For maximum transmission, avoid placing your computers near metal barriers or
other possible sources of interference (e.g. cordless phone, microwave oven, active
Bluetooth devices).
6. You must make sure that both wireless network adapters support ad hoc (peer-to-
peer) networking and Windows XP's Wireless Zero Configuration (WZC) service. If
WZC is not allowed on your adapters, you can't do the step-by-step instructions in the
following pages. But you have to use the utility (software) that came with your
adapters to create an ad-hoc network.
7. To allow file/folder/drive and printer sharing, you must allow file/printer sharing in
Windows Firewall or open the relevant ports in other firewall software. Also name each
computer with a unique name and give both the same workgroup name. To do this,
right-click on My Computer icon, click Properties to open System Properties. On
Computer name tab, click Change. You will be asked to restart your computer after
making the change.

Ad-hoc setup on the first computer (1)
1. Go to Control Panel and open Network Connections folder. If you have installed your Wi-
Fi adapter correctly, you will find a Wireless Network Connection icon on the right pane
under LAN or High-Speed Internet.

Figure: starting a connection from Wireless Network Connection icon.
2. Locate the Wireless Network Connection icon on the right pane. Right-click on it and click
Properties to open Wireless Network Connection properties window.
3. On the Wireless Networks tab of the Wireless Network Connection properties window,
click Add under Preferred networks. The Wireless Networks tab only appears if your wireless
network adapter supports Windows XP's Wireless Zero Configuration (WZC) service and
you have enabled it according to your adapter manufacturer directions or if it is possible
simply uninstall the utility (software) that comes with your adapter but do not remove the
driver.

Figure: Creating a wireless (Wi-Fi) ad hoc (peer-to-peer) network
via Wireless Network Connection properties window.
4. On the Association tab, type the name of your ad-hoc wireless network in Network name
(SSID).

Figure: input the wireless ad hoc network name (SSID), authentication, and encryption
on the Association tab of Wireless network properties window.
5. Check "This is a computer-to-computer (ad hoc) network" and clear "The key is provided
for me automatically" if you want to input your network key manually.
Ad-hoc setup on the first computer (2)
6. In Network Authentication, select from Open, Shared, and WPA-None. In infrastructure
mode, WPA-PSK and WPA options are available in the drop-down selection. In Windows XP
SP1, you will only find Open and Shared, unless you have installed Windows Update for
WPA.

Figure: Selecting the suitable wireless (Wi-Fi) Network Authentication
(Open or Shared (WEP) and WPA-None) on the Wireless network properties window.
7. In Data encryption, select one that is suitable for your situation. Assess your security
risk. For example, you have to be more cautious and opt for the strongest encryption if you
create your ad-hoc at a public place.
If you chose Open or Shared in Network Authentication, you will find Disabled and WEP in
Data encryption. Choose WEP if you want your data transfer to be encrypted. If you chose
WPA-None in Network Authentication, you will find TKIP and AES in Data encryption. Choose
either TKIP or AES. AES is the strongest encryption standard typically used if one wants to
connect to a corporate network with a RADIUS server handling user authentication.


Figure: selecting the suitable Data encryption (Disabled, WEP, TKIP, or AES)
on the Wireless network properties window.
8. In Network key, type your encryption key as ASCII or hexadecimal characters. ASCII
characters may contain letters, numbers, and symbols, while hexadecimal characters can
only include numbers from 0 to 9 and letters from A to F.
If you select WEP, the network key must be 5 ASCII or 10 hexadecimal characters for 64-bit
encryption and 13 ASCII or 26 hexadecimal characters for 128-bit encryption. If you select
WPA, the network key must be 8 to 63 ASCII or 64 hexadecimal characters. Example of a
valid network key: AD083BC1A5 for 64-bit WEP encryption.
9. In Confirm network key, retype your key.
10. Click OK on the Wireless network properties window to save changes to your wireless
network.
11. Click OK on the Wireless Network Connection properties window to save changes to your
wireless network adapter.

Figure: the ad hoc network name appears on the Preferred networks list
on Wireless Network Connection properties window.
Ad-hoc setup on the second computer
1. Open Network Connections folder.
2. Locate the Wireless Network Connection icon and click "View Available Wireless
Networks".

Figure. Viewing available wireless networks from Wireless Network Connection icon.
3. You will be prompted with Wireless Network Connection dialog box. It will show a list of
all detected wireless networks within range.

Figure. Starting a wireless connection in one easy step via the Wireless Network Connection window.
For networks to appear on the list, the WZC service on Windows XP must be enabled.
4. Select the name of the newly created ad-hoc network. Click Connect.
5. Type the same network key as on the first computer when prompted. Click Connect. If
you did not uncheck "The key is provided for me automatically" during setup on the first
computer, leave the network key input box blank.

Figure. Type the same network key on the prompt window to start a wireless connection.
Now the Wi-Fi ad hoc network between the two computers is connected. A message balloon
appears on the wireless LAN notification icon on the taskbar.

Figure. Wireless network status message on Windows taskbar (system tray) icon.
Internet Connection Sharing (ICS) setup
On the computer that is connected directly to the Internet. Do these steps to share
an Internet connection. (You are assumed to have configured your Internet connection
before. If not, use the New Connection Wizard then.)
1. Open Network Connections folder.
2. On the right pane, find the Internet connection that you want to share. Right-click on it
and select Properties. While the most likely case is sharing a wireline broadband
(DSL/cable) service, basically you can share any type of Internet connection (including
PSTN dial-up, GPRS, 3G, FTTH, WiMAX, etc) using the same procedure.
If your broadband connection is using login (PPPoE) and you log in from Network
Connections folder, you'll find the Internet connection under Broadband. If your broadband
connection is always on, your Internet connection must be under LAN or High-Speed
Internet. Find the Local Area Connection that corresponds with the Ethernet card which
connects the host computer to the broadband modem. Rename it to a name that easily
identifies your Internet connection. Follow the same procedure to enable ICS.

Figure. Opening an Internet connection properties window from Network Connections
to create Internet connection sharing (ICS). Select the relevant Internet connection.
3. On the Advanced tab, check "Allow other network users to connect through this
computer's Internet connection" and select "Wireless Network Connection" from the drop-
down box. The drop-down box only appears if there are more than one network adapters
installed in your computer.
If you don't find ICS options on Properties window, the most likely case is your Wi-Fi ad hoc
network hasn't been connected. Try to reconfigure it.

Figure. Configuring Internet Connection Sharing (ICS) for the Wi-Fi ad hoc network
via the Internet connection Properties window.
4. Click OK. You can verify whether your wireless LAN (ad hoc) and ICS have been working
from the IP addresses of your Wi-Fi adapters. If the IP addresses are APIPA addresses in
this format 169.254.x.y (where x and y are any integer from 0 to 254) with the same
subnet (i.e. 255.255.0.0), then your ad hoc network has been active. Browse your network
configuration from My Network Places. If you have configured your personal firewall to allow
file and printer sharing (which is the default setting in Windows Firewall), you will see both
your computers in My Network Places>Microsoft Windows Network>your workgroup name.
Meanwhile, for the ICS to work your Wi-Fi network adapter on the ICS host computer
(which connects directly to the broadband modem) must have been assigned this private
gateway IP address 192.168.0.1 and the ICS client (which will connect to the Internet via
the ICS host) must have another IP address in this format 192.168.0.z where z is any
integer from 2 to 254.
To have IP addresses assigned automatically by Windows, you just need to make sure that
your Wi-Fi adapters are set to obtain IP address and DNS server address automatically
(DHCP) which is the default configuration. To verify, right click your Wireless Network
Connection, and select Properties. On the General tab, select Internet Protocol (TCP/IP)
Properties.
Now you have finished the Wi-Fi ad-hoc network setup and enabled Internet connection
sharing. To access another computer resources (i.e. files, folders, drives, printer,
peripherals), you must enable sharing with other network users for each resource.

Figure. Viewing details of a Wireless Network Connection via the status window
You can see among others: number of transferred packets, duration, signal strength, and IP address.
Disconnecting and Reconnecting
To disconnect from the ad hoc network, right-click the Wireless Network Connection icon on
Network Connections folder and click "View available wireless networks". Select the ad hoc
network name, and click Disconnect.

Figure: To disconnect from an ad hoc network from the Wireless Network Connection window.
By default, your computer will reconnect automatically if both computers are within range
and the ad hoc network has been set as the first network on the Preferred network list. To
change this automatic connection especially for security purpose, open Wireless Network
Connection properties window. On Wireless Networks tab, under Preferred networks select
the ad hoc network name and click Properties to open the ad hoc network properties
window. On Connection tab, uncheck "Connect when this network is in range".

Figure: To disable automatic connection via the ad hoc network name properties.
Known problems for troubleshooting
- Wireless Networks tab does not appear on Wireless Network Connection properties
window. You must enable Wireless Zero Configuration (WZC) service on Windows XP from
the wireless utility (configuration software) that came with your Wi-Fi adapter. But if your
adapter can not work with WZC, use the wireless utility to set up an ad-hoc connection. On
both computers, set the same channel number, SSID, and encryption type. Also enable
peer-to-peer networking or ad hoc mode for each Wi-Fi adapters.
- Can not connect from the second computer to the first computer during ad hoc network
setup. This may be caused by problems in your wireless network adapters. Check whether
the adapter is working properly from the Device Manager. If you use a USB Wi-Fi adapter,
attach the adapter firmly to a USB connector or cradle.
- The ad hoc network has been connected, but you can't access the shared resources. This
might happen because both computers need more time to refresh IP addresses and other
setup details. Wait for a couple of minutes. Check the status details from Network
Connections folder on both computers. To speed up the process, you can click "Repair this
connection" under Network Tasks on Network Connections folder. You can also ping the
other computer through Command Prompt. Another possible cause is program blocking by
Windows Firewall or other personal firewall software installed in your computer. Here is the
solution.
- Common situations that might hinder your ad hoc network setup: non-compatible Wi-Fi
adapters, physical obstructions, range, and interference from other wireless devices or
networks. And although most Wi-Fi adapters support peer-to-peer (ad hoc) networking,
some Wi-Fi adapters were not designed for ad-hoc networking.

Você também pode gostar