An ad hoc wireless network is two or more devices connected in a self-organizing wireless network, for example, via WLAN or Bluetooth. Data exchange occurs directly and without a central access point. Networks of this kind find application mainly among cell phones, PDAs and laptops.

Ad-hoc networks provide mobile data transmission. Using them, you can exchange entire files wirelessly.

Wireless ad hoc network is...

Any devices equipped with a wireless network adapter or Bluetooth interface and within range of a radio signal can be connected to each other via an Ad hoc network. An ad-hoc network is therefore optimally suited for spontaneous data exchange between cell phones, PDAs or laptops that need to be connected to each other locally and only temporarily.

Simple ad-hoc networks via mobile phones

Some cell phone owners have probably already used an ad hoc wireless network - for example, to send a ringtone to a friend. To do this, both participants simply activate the Bluetooth function, create a connection between phones through it and exchange files - “ad hoc”, “for a given case”, i.e. directly and without any intermediate link. The so-called peer-to-peer, or peer-to-peer, communication does not require a local network infrastructure or other “distributors” and is configured independently.

Ad hoc networks for PCs and laptops

If connecting two cell phones into an ad hoc network via Bluetooth is very simple, then creating a network of two computers will require some settings. The main condition is the presence of an appropriate interface, i.e. WLAN network card or USB wireless adapter.

In your computer's network settings, you must first select the mode: "802.11 Ad Hoc" or "Ad Hoc". The same mode must be selected at all stations in the ad hoc wireless network. The channel number and SSID (Service Set Identifier) ​​of each station must also match, and channel search is usually automatic.
After creating a connection, all computers on the network receive the same rights and have access to each other. Thus, you can share databases and catalogs, or, for example, a printer equipped with an appropriate interface.
In the Windows operating network, starting from version 95, no additional program is required to configure an ad hoc network. On Apple computers running OS X, an ad hoc network is also simply created through the network settings. You can even use your iPhone as a remote control for your Mac.

Professional types of ad hoc networks

In professional wireless ad hoc networks, they are used to combine several end devices into one information system over long distances. Thus, position-based routing protocols can use, for example, GPS technology to determine the best route to a node based on the actual location of devices.

There are fundamental differences between proactive, reactive and hybrid routing protocols for professional ad-hoc networks. Proactive protocols calculate information before receiving a request and provide it in the form of a data packet, while reactive protocols provide information only upon request. Proactive protocols are thus faster, but require more data to be transferred and therefore more energy compared to slower reactive protocols. Hybrid protocols allow you to use features of both types of routing, depending on the purpose of the application.

Introduction

The vast majority of laptops and other mobile devices available on the market are equipped with Wi-Fi adapters for accessing wireless networks. These can be home networks, networks in public places, corporate and many other networks. How to connect to such a network and how to configure it correctly is described in this article.

Before you start setting up a network, you need to have a basic understanding of how it generally works. Let's start with this.

The operation of Wi-Fi networks is in many ways reminiscent of the operation of conventional Ethernet networks, with the only difference being that instead of a copper cable, radio waves are used.

Note: changing the transmission medium required changing the medium access method from CSMA/CD to CSMA/CA. Wireless networks are half-duplex, that is, only one station can be transmitted at a time on the same channel (radio frequency). There are several standards that describe Wi-Fi networks: 802.11, 802.11b, 802.11g, 802.11n and 802.11a. The first 4 operate at frequencies around 2.4 GHz, 802.11a - in the 5 GHz range. Each range is divided into channels - frequency intervals on which transmission is directly carried out.

The question about the maximum distance between two stations is initially incorrect. The maximum distance depends primarily on the presence of obstacles in the path of the radio signal, as well as transmitter power, receiver sensitivity, antenna design, their location and other facts orov.

In some cases, the placement of wireless networks should be agreed upon with the relevant government supervision authorities. Small home networks can be hosted and used without permission, but for larger networks such permission should be obtained.

The standards provide for two main types of organization of Wi-Fi networks:

— Infrastructure. With this kind of network organization, all hosts (I will call a host a device that connects to the network) are connected to an access point (Access Point). Simply put, this is a box with an antenna and a socket for connecting a network cable, which costs from $30. A router, computer or other device with Wi-Fi adapter.
The access point acts as a kind of intermediary in the exchange of data between hosts. In other words, if one device wants to transfer something to another, then first there is a transfer from the first device to the access point, and then from the access point to the second device.
The second important function of an access point is to combine a wireless and wired network. In addition to this function, the access point provides device authentication and implements network security policies. This will be discussed in more detail below.

—Ad-Hoc. With this method of organizing a network, devices are connected directly without an access point. This method is often used when you need to connect two laptops or computers to each other.

I recommend building home networks using an access point. I will briefly describe the advantages Infrastructure before Ad-Hoc:

By and large, Ad-Hoc-networks are used for occasional data transfer from one device to another when there is no access point.

Before proceeding directly to the description of network setup, it is necessary to say a few words about the security of wireless networks.

Wi-Fi Security

WEP protocol

Initially, the 802.11 standard assumed the use of the protocol WEP to ensure the security of data exchange between devices on the network. This protocol allows you to encrypt the transmitted data stream using the RC4 algorithm using a key of 40 or 104 bits (a password of 5 or 13 characters). Another 24 bits were added to this key, which change dynamically. These 24 bits are called the Initialization Vector. As a result, the data is encrypted using a 64 or 128-bit key.

The WEP protocol provides two ways to authenticate users when connecting to a network:

—Open System(open network, in this case you do not need to enter a password to connect to the network)

- Shared Key(network with a shared key, when connecting to the network you need to enter a password of 5 or 13 characters)

Now using the protocol WEP not recommended due to its low reliability. Hacking a WEP network takes just a few minutes and does not require special knowledge. First, packets are intercepted on the network, and then they are analyzed.

In order to somehow protect networks from unauthorized access, the WEP protocol was replaced by the WPA and WPA2 protocols

WPA protocol

In this case, the network is protected much better due to the dynamic generation of encryption keys, as well as using more strong encryption algorithms. This can significantly improve network security.

Pre-Shared Key or Personal, when a password is specified on the access point and in order to connect to the network you need to enter that password.
Using a RADIUS server. This method is used mainly in corporate networks. It is not used on home networks. When connecting to a wireless network, the password is sent to the access point, which transmits it to the RADIUS server; if the password is correct, the RADIUS server allows the connection. The exchange of information between the access point and the server occurs using encryption. Hacking such a network is very difficult and takes a lot of time. It is much easier to find other ways to gain access to the information you need.

Note: if you really want to protect your network, use WPA or WPA2; WEP, like MAC filtering, disabling SSID-broadcasting is more “foolproof” than an obstacle for an attacker. In this case, it is better to create an open network. Fewer setup problems

A few words about passwords

Using the WPA protocol does not guarantee that your network will not be hacked. Now passwords are cracked using dictionaries. This should be taken into account when choosing a password. Here are a couple of recommendations for choosing a password not only for WPA networks, but also for other tasks (e-mail, ICQ...)

1) Do not use ordinary words, dates, etc. in your password. In this case, choosing the right password will not be difficult.

2) Try to use special characters, large and small letters in your password. For example: A!C@E#R$F%a^n&s.ru. Cracking such a password can take several years. Naturally, during this time the information will lose its relevance and direct hacking will lose its meaning.

3) Don't use the same passwords everywhere and change them as often as possible

4) To store passwords, use the appropriate utilities. I am using the utility KeepPass. It can also generate a random password and allows you to set a password to access your passwords.

5) Please do not write passwords on pieces of paper or stick them on your monitor.

Security is a complex thing. This must not be forgotten

Now let's look at how to create networks Ad-Hoc And Infrastructure

Setting up Wi-Fi networks with an access point (Infrastructure)

Setting up such a network should begin with setting up an access point. The setup procedure and the configurable parameters themselves are similar for most access points. Almost all access points have at least one connector for connecting to a wired network. To set up an access point, you must first connect it using a network cable to a laptop or PC. Most access points are configured via a WEB interface (that is, via a browser). Let's get started:

We connect the access point using a cable to a laptop or PC, configure the connection as described here: and launch the browser. In the address box, enter the IP address of the access point. You can find it in the instructions for the access point


In my case it is 192.168.0.50. It is worth paying attention that the interface to which the access point is connected must be in the same subnet as the access point itself, otherwise you will not be able to access the settings. Described in more detail here:
Now you need to enter your username and password to access the settings. They must be indicated in the instructions for the access point. As a rule, the login is admin, and the password is either admin, or empty.

Go to the Wi-Fi network settings tab:


On other access points this tab will have a similar appearance. Let's look at the basic settings:

SSID is the network identifier. All devices on the same wireless network must have the same ID

Channel— channel number. Essentially, this indicates the frequency range in which the wireless network will operate

WPA2-PSK— enable WPA2 authentication.

Passphrase- key phrase. Can have from 8 to 63 characters. This is the network access key. To connect to this access point, you need to enter it.

You can also configure its IP address in the access point settings:


Now let's look at how to connect to this wireless network. First using the example of Windows XP, and then using the example of Windows Vista

Windows XP

Opening Network connections and right-click on the wireless connection. Select from the menu Properties:


By analogy with Ethernet connections, we configure the IP address of the wireless interface:

What, where and why to register is described in this article: . I recommend reading it

Click OK and go to the tab Wireless network:

Click on the button Wireless network. A window similar to this should appear:


To search for available networks, click on Update network list. After some time we get the search result:


As we can see, our network Home With WPA2 successfully found.

Note: if your network is not found, you can try to add it manually by clicking on Set up a wireless network. It may be that SSID broadcasting is simply disabled on the access point and such a network is invisible when searching. WPA2 support appeared in Windows XP starting with Service PAck 2. This is also worth considering

Select the desired network and click To plug. In the window, enter the password that you entered when setting up the access point twice:


When entered, press To plug. After a moment we get something like this:

As you can see, we have successfully connected to the network Home. Now I’ll say a few words about this window. There may be several wireless networks to which the laptop connects. To add new networks, click on the button Add... When a network is added, it appears in the list. Now I’ll explain why those buttons are Top And Down. If there are, for example, two networks in that list: Home 1 And Home 2, then if they are both available, the laptop will connect to the one that is higher in the list. If only one network is available, the laptop will connect to it.

That's it, the connection to the wireless network is complete.

Windows Vista

To connect to the network you need to run Network and Sharing Center. Then click on Connect to the network:


The window will display a list of available networks. You can press the button Update top right:


Click on Connect. Enter the network key that you entered when setting up the access point:


Click To plug


and close the window. Then we indicate the location. In my case it's At home. Here is the result:


That's all. We have now successfully connected to the wireless network using WPA2 authentication.

Setting up Wi-Fi networks without an access point (Ad-Hoc)

Before describing the actual procedure for setting up such a network, I will describe it in a nutshell. This procedure consists of two stages:

1) one device (laptop, PC, etc.) creates a network

2) the second device connects to this network

This material will show you how to create open Ad-Hoc networks.

Windows XP

Network creation

Let's launch Network connections and go to Properties wireless connection:


We configure IP addresses as described here:, go to the tab Wireless network and press the button Additionally:


We indicate Computer-to-computer network... and click Close

Click on the button Add..

A window like this should appear:

Up in the field SSID indicate the name of the network and set encryption parameters

Note: This network is assumed to be created temporarily and will be deleted after the data is transferred. If you plan to use it constantly, then you need to uncheck Connect if the network is not broadcasting. If you leave that checkbox, it may help an attacker gain unauthorized access to your laptop!

Click OK:

As you can see, the network has been successfully created. Now consider the question of connecting to such a network from Windows XP

Connecting to an Ad-Hoc network

First go to the page Network connections and double-click on connecting to a wireless network (you can also use Properties, as described above).

Wireless ad hoc networks.

The IEEE 802.11 standard defines two modes of operation of a wireless local area network (WLAN): Ad hoc mode and Infrastructure mode.

Infrastructure mode is used to connect wireless clients to an existing wired network using a special device called a wireless access point.

Figure 1. Infrastructure regime

Ad hoc mode is used to build peer-to-peer wireless networks without using an access point. A peer-to-peer wireless network can contain up to 9 computers, each of which communicates directly with the other computers.

Figure 2. Ad hoc mode

In Ad Hoc mode, subscriber stations communicate directly with each other without using an access point or Wi-Fi router. This mode is also called IBSS (Independent Basic Service Set) or Peer to Peer mode. With this configuration, no network infrastructure is required. This creates only one service area that does not have an interface for connecting to a wired local network. Any devices equipped with a wireless network adapter or Bluetooth interface and within range of a radio signal can be connected to each other via an Ad hoc network. It is ideal for quickly exchanging data between several computers, cell phones, PDAs or laptops that need to be connected locally and only temporarily.

An ad hoc network is a dynamically changing network with an arbitrary structure. Each network node forwards data intended for other nodes. In this case, the determination of which node to transmit data to is made dynamically, based on the network connectivity. This is their main difference from wired networks and managed wireless networks, in which routers or access points perform the task of controlling data flows.

Each subscriber device, depending on its power, has its own range of action. If a subscriber, being “on the periphery,” sends a packet to a subscriber located in the center of the network, the so-called multi-hop process of transmitting the packet occurs through nodes located along the path of a predetermined route. Thus, each new subscriber, using its resources, increases the range of the network. Therefore, the power of each individual device can be minimal. And this implies both lower costs of subscriber devices and better safety and electromagnetic compatibility indicators.

Figure 3. Approximate view of an Ad hoc network

Features of wireless Ad hoc networks:

General data transmission medium;

All network nodes are initially equal;

The network is self-organizing;

Each node acts as a router;

The network topology can change freely;

New nodes can freely enter the network and old nodes can leave.

Let's consider the conditions for successfully building a wireless network in Ad-Hoc mode:

Direct visibility between connected computers.

When connecting in Ad-Hoc mode, a very important factor affecting the speed of the network is the location of the computers within line of sight. This is due to the fact that the transmitter power of wireless adapters is slightly lower than the power of access points. Accordingly, the range of such a network is approximately half that of a network built using infrastructure mode (using an access point).

You can increase the range of the Ad-Hoc network by using more powerful antennas. If there are barriers between computers, such as office walls, then the network radius and speed will be sharply reduced.

Wireless adapter standard.

As you know, the speed of data transfer on the network depends on the standard in which network adapters operate. If one computer has a device installed whose standard supports a lower data transfer rate, then the speed of the entire network will be equal to the speed of this adapter. Therefore, it is recommended to use adapters of a single standard.

Number of connected computers.

This is primarily due to the peculiarities of the process of information exchange between computers. For wireless networks, especially when using Ad-Hoc mode, this factor is especially important. Therefore, for the network to operate successfully in Ad-Hoc mode, the number of connections should be limited (from two to nine). If their number exceeds the recommended one, then a more advantageous solution in this situation would be to use an access point and infrastructure mode.

Currently, there are several “basic” technologies for building ad hoc networks:

The maximum data transfer rate is 2.1 Mbit/s, the range of one subscriber device is 1 - 100 m.

Bluetooth-based networks are applicable only in a small area (for example, in city centers, small offices, shops). Thus, such a network can be used to organize video surveillance at a small facility.

In areas where power consumption and cost are the main criteria, ZigBee technology can be used. This is an inexpensive way to organize communication in industrial systems that do not require high data transfer rates. Data rates range from 20 to 250 kbps.

It is the core technology for self-organizing networks. In WiFi networks, the transmission speed is 11 - 108 Mbit/s, which allows you to transmit large amounts of information in real time (for example, a video signal).

To build an ad hoc network, adapters are used that connect through the PCI, PCMCI, CompactFlash expansion slot. There are also adapters that connect via a USB 2.0 port. A Wi-Fi adapter performs the same function as a network card in a wired network. It is used to connect the user's computer to a wireless network. Thanks to the Centrino platform, all modern laptops have built-in Wi-Fi adapters that are compatible with many modern standards. PDAs (personal digital assistants) are usually equipped with Wi-Fi adapters, which also allows them to be connected to wireless networks.

Figure 4. Wi-Fi adapters.

The main advantages of the Ad hoc mode are rapid network deployment and ease of organization (no access point required).

The disadvantages of this network construction option include short range and low noise immunity.

The ad hoc mode is mainly used to create temporary data networks, for example, transport, office networks, military communications.

Materials used:

http://www.acorn.net.au/telecoms/adhocnetworks/adhocnetworks.cfm

http://ntrg.cs.tcd.ie/undergrad/4ba2.05/group11/index.html

http://wireless09.livejournal.com/334.html

Proletarsky A.V., Baskakov I.V., Chirkov D.N. “Wi-Fi wireless networks”