📜 ⬆️ ⬇️

Modeling in ns-2. Approximate 802.11b wireless network bandwidth to real

Before releasing a new standard for wireless data transmission, it is necessary to evaluate its effectiveness. Easier, cheaper and faster to do it with the help of a computer model. Ns-2 is one of the software packages with which researchers and large research laboratories run around these very models (for example, NEC Labs, Mercedes-Benz Research and Development North America). I had a chance to play with him very tightly.

As it turned out, ns-2 is not so simple. The simplest model of a network of two computers working on the standard 802.11b showed an unusually low bandwidth. By bandwidth is meant bandwidth at the network level, without MAC headers, but with IP headers. In fact, two physical computers exchange data very quickly.

The model, topology, and basic parameters of a wireless network are described in the tcl language. After a long walk through the Internet and studying the documentation, the parameters that need to be taken into account in order to obtain quantitative characteristics comparable with the experiment in experiment are outlined.

Options


')
1. When simulating wireless networks with a single access point (BSS), ad-hoc routing should be disabled. Otherwise, periodic route service messages may interfere with the data packets.

set val(rp) DumbAgent

2. Before transmitting data, the nodes exchange ARP messages, which is difficult in view of possible losses in wireless networks. As long as the ARP protocol does not work correctly, messages continue to flow into the channel throughout the experiment, which leads to interference (loss) with data packets. To solve this problem in our experiments, the first 10 seconds can be designated as the initialization period. Suppose also that during this period the nodes are close enough to each other to build ARP tables. At a subsequent point in time, the nodes are moved to the experimental locations, and data exchange begins.

3. Change the baud rate. 802.11 equipment supports data transfer rates of 1, 2, 5.5, 11 Mbps. The speed selection is automatically based on errors. If there are many errors, the equipment abruptly lowers the speed. It is not enough errors - raises. Therefore, it is necessary to change the data transfer rate on the radio interfaces by 11 Mb. To do this, add a line to the beginning of the simulation script:

Mac/802_11 set dataRate_ 11Mb

4. Change the preamble to short - 72 bits. Why change the ambus? Each packet is sent along with the preamble, which is in turn a specific set of bits at the beginning of the packet, so that the receiver is ready to receive real data. This preamble in accordance with official standards should be sent at base speed (1 Mbit / s). There are two types of preambles: short and long according to the length of the synchronization field. The long preamble has a field size of 128 bits, and a short one 56 bits. The short preamble appeared, probably due to the evolution of transceivers. NS is by default configured to use a long preamble. There are certain difficulties in determining the length of the preamble. Add this line to the beginning of the script:

Mac/802_11 set PreambleLength_ 72

Note: for a long preamble, this value is 144

5. Disable RTS / CTS. In most 802.11b network cards, RTS / CTS is disabled by default. In most cases, the infrastructure of wireless home networks is quite simple, and therefore RTS / CTS becomes a useless load. This feature in ns-2 is enabled by default. Add this line to the beginning of the script (means that the RTS will only be sent when the packet size exceeds 3000 bytes, and this will never happen):

Mac/802_11 set RTSThreshold_ 3000

6. Package size. In many ns versions, the default packet value is 1000 bytes. Resize UDP packets to 1500 bytes. The size of the packets can be found in the trace files.

Agent/UDP set packetSize_ 1500

7. Do not forget the channel. In the simulator, the power of the received signal depends only on the distance between the receiver and the transmitter. In reality, there are many other factors that affect the power of the received signal.

Conclusion


Used in ns-2 models of wireless interfaces are based on the specifications of Lucent 914 MHz WaveLan cards. In particular, the default transfer rate is 2 Mbps. However, most modern wireless 802.11b cards have a number of differences. The above are factors that need to be considered when modeling wireless 802.11b networks. The analysis showed that after taking these factors into account in the simulated experiments, we obtain a throughput that is close to real.

Source: https://habr.com/ru/post/111237/


All Articles