Transcript
com nets Kommunikationsnetze
Advanced Lab in Communications Engineering Wireless Local Networks Supervisor: Andreas K¨onsgen (
[email protected]) Authors: Lars Schuster, J¨org Br¨ uggemann, Andreas K¨onsgen English version: Andreas K¨onsgen
SS 2016
2
Contents 1 Introduction 1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Preparation and evaluation of the experiment . . . . . . . . . . . 2 Theoretical Basics 2.1 Standards . . . . . . . . . . . . . . . . . . . . . 2.2 Network structure . . . . . . . . . . . . . . . . 2.3 ISO/OSI reference model . . . . . . . . . . . . 2.3.1 Physical layer . . . . . . . . . . . . . . . 2.3.2 Data link layer . . . . . . . . . . . . . . 2.3.3 Network layer . . . . . . . . . . . . . . . 2.3.4 Transport layer . . . . . . . . . . . . . . 2.3.5 Application oriented layers . . . . . . . 2.4 The IEEE 802.11 standards series . . . . . . . . 2.4.1 Physical layer . . . . . . . . . . . . . . . 2.4.2 MAC layer . . . . . . . . . . . . . . . . 2.5 Parameters to describe the WLAN performance 3 Preparatory Problems
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
5 5 6 7 7 8 8 9 9 10 11 12 12 13 15 17 19
4 Design of the Experiment 21 4.1 Experimental setup . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.2 Measurement software . . . . . . . . . . . . . . . . . . . . . . . . 21 4.3 Simulation software . . . . . . . . . . . . . . . . . . . . . . . . . . 22 5 Executing the Experiment 24 5.1 Properties of a wireless LAN connection . . . . . . . . . . . . . . 24 5.2 Simulative analysis of the WLAN transmission . . . . . . . . . . 25 6 Evaluation Problems
27
A Abbreviations
29
B References
31
4
CONTENTS
Chapter 1
Introduction 1.1
Motivation
In recent years, the demand for wireless local networks (WLAN) has rapidly increased. The development of the 802.11 standards series by the Institute of Electrical and Electronics Engineers (IEEE) enabled the dissemination of wireless WLAN products in the mass market by ensuring interoperability between wireless devices of different vendors. The University of Bremen is one of the first German universities which has been equipped with wireless LAN. The latter have the following advantages: • easy integration of laptops, smartphones and other portable devices in the local network • extension of existing LANs without modifying walls in buildings • wireless nodes can be connected with each other directly, without infrastructure, i. e. switches. However, there are also disadvantages: • higher cost, • lower bandwidth, • interference by other radio applications in the same frequency band (e. g., microwave ovens, Bluetooth, ZigBee, HomeRF). Considering the pros and cons shows that wireless networks cannot replace wired networks, they can only be a supplement. In this student’s lab, the behaviour of a WLAN shall be investigated in a real-life experiment and in a simulation. A major focus is the reduction of the throughput due to a degradation of the reception quality. 5
6
1.2
CHAPTER 1. INTRODUCTION
Preparation and evaluation of the experiment
As a preparation for this experiment, the lab script should be read entirely and the preparatory problems should be solved. When doing the experiment, please keep a USB memory stick ready to store the measurement values obtained during the experiment. After attending the lab, a protocol must be written which should include the answers for the preparatory problems and for the questions regarding the evaluation of the experiment. Furthermore, a short description in own words of the experimental setup and execution must be included. Each group must submit one lab report within two weeks after the lab in electronic form by sending an e-mail to the supervisor (
[email protected]). Each group should elaborate and write the report on their own, copying from other groups is not permitted. We appreciate suggestions on the improvement or correction of the script!
Chapter 2
Theoretical Basics 2.1
Standards
When the first wireless LANs appeared, only proprietary solutions were available. Later, new standards were developed by the IEEE (Institute of Electrical and Electronics Engineers) and the European ETSI (European Telecommunications Standards Institute). While the ETSI Hiperlan standard only was theoretically defined, the 802.11 standard of the IEEE was available in commercial products. Both standards support data rates of 2 Mbit/s and work in the 2.4 GHz band. The IEEE 802.11 standard was updated some years later: IEEE 802.11b, which is considered in this experiment, supports data rates up to 11 Mbit/s in the 2.4 GHz band. Further versions of the standard based on OFDM (Orthogonal Frequency Division Multiplex) provide 54 Mbit/s on 2.4 GHz (802.11g) and on 5 GHz (802.11a), as well as 600 Mbit/s (802.11n) and several Gbit/s (802.11ac and ad). Since 802.11g and 802.11b work on the same frequency band, hardware which supports both 802.11g and 802.11b can be easily manufactured so that compatibility with older devices which only support 802.11b is provided. In 2009, another enhanced version called 802.11n has been released which achieves gross speeds up to 600 Mbit/s using, among other measurements, multiple antennas at the sender and the receiver. In this way, there is more than one transmission path between the sender and the receiver available so that the capacity of the transmission link is increased. Further, the channel access scheme is also improved by aggregating multiple frames and thus reducing transmission overhead caused by waiting periods and packet headers. Finally, the newly released standards 802.11ac and 802.11ad provide speeds in the Gbit/s range. While the 802.11 extensions described up to now define best-effort networks which do not provide any guarantee for Quality-of-Service (QoS) parameters such as a minimum thoughput or a maximum delay, another IEEE 802.11 extension called IEEE 802.11e was defined which supports QoS. 7
8
2.2
CHAPTER 2. THEORETICAL BASICS
Network structure
Wireless networks can be used in ad-hoc mode or in infrastructure mode. In ad-hoc mode, a group of neighboured WLAN equipped devices spontaneously form a network without any infrastructure. Any device can send data directly to any other device inside its range of radio coverage. In the infrastructure mode which is considered in this experiment, a central instance called access point connects the wireless nodes together. In this case, data cannot be sent directly from one node to another. Instead, the originating node sends the data to the access point which will forward it to the destination node. Furthermore, the access point provides a link between the WLAN radio network and the wired backbone network. The structure of an infrastructure network is shown in figure 2.1. The access point covers a radio cell with a limited range (Basic Service Set, BSS) and is connected to an existing wired network via a portal. Inside a BSS, there can be several terminal devices (stations, STA) who have to share the available channel capacity. To cover larger areas with a radio network, neighbouring access points are run on different frequencies (cluster structure). Several BSSes form a ESS (Extended Service Set), in which the user can move freely. In this case, roaming from one access point to another is provided.
Figure 2.1: Network topology: 802.11 example
2.3
ISO/OSI reference model
The ISO/OSI reference model describes the communication architecture in open systems. Open system means that the system provides standardised protocols to the environment, whereas the inner structure is not defined. In the ISO reference model, the communication system is divided into 7 layers (Fig. 2.2, to which particular functions are assigned. The idea is that lower layers provide
2.3. ISO/OSI REFERENCE MODEL
9
services to higher layers. For this, a communication between two layers n and n + 1 is needed. Moreover, one layer of a particular entity can communicate with the layer of another entity by a so-called peer-to-peer protocol.
Figure 2.2: ISO/OSI reference model In the following paragraphs, the tasks of the individual layers are described using a data transfer by the TCP/IP protocol.
2.3.1
Physical layer
The aim of the physical layer is the transmission of the data bits over the physical channel. This includes the transmission medium, the signal level, the modulation scheme and, optionally, forward error correction. For instance, Ethernet which is widely used in wired local networks is defined as follows on the physical layer: • bitwise modulation with Manchester coding (constant bit values will not result in a constant sending signal); voltage level between −2.2 and 0 V, • twisted pair copper wire, • max. cable length 100 m, • physical topology: star, logical topology: bus.
2.3.2
Data link layer
The data link layer, DLL is often divided into the sublayers multiple access (Medium Access Control, MAC) and error detection/correction (Logical Link Control, LLC). In Ethernet, the MAC layer is standardised by IEEE 802.3, the LLC layer by 802.2.
10
CHAPTER 2. THEORETICAL BASICS
Multiple access methods. In Ethernet, CSMA/CD (Carrier Sense Multiple Access with Collision Detection) is applied as the multiple access method. This is a contention method which monitors the channel before the transmission can be started. However, problems will arise due to the signal propagation time between the particular stations. Due to this, a simultaneous start of transmission of two stations for which the channel apparently is free cannot be avoided. By the permanent monitoring of the channel, even during a transmission, a collision can be detected and the transmission can be aborted. For the multiple access method, a data frame (figure 2.3) is applied, which contains, among others, the MAC address (6 byte, uniquely identifies the network card) of the transmitter and the receiver), the packet length and a checksum (frame check sequence, FCS).
Figure 2.3: MAC frame according to IEEE 802.3
Error correction. In the OSI reference model, the LLC layer maintains the error detection and correction by ARQ (automatic repeat request). Errors are detected at the receiver, using checksums. In case of an error, the damaged packet is retransmitted. In contrast to this, in the IEEE 802 protocol stack, the error detection and ARQ is maintained by the MAC sublayer.
2.3.3
Network layer
In the TCP/IP protocol family, IP (Internet Protocol) is used as the network layer protocol. The network layer maintains the routing and end-to-end transmission of data packets. The IP version 4 addresses used nowadays consist of 4 bytes, which uniquely identify a network element (terminal device like PC/PDA, or router). The IPv4 address space is divided into classes. The class A provides 7 bit for the network ID (identifies a particular network) and 24 bit for the host ID (identifies a particular host), i. e. there are 27 = 128 possible class A networks (network IDs) and 224 = 16777216 possible addresses (host IDs). A
2.3. ISO/OSI REFERENCE MODEL
11
class B network like the one of University of Bremen (134.102.xxx.xxx) supplies 216 = 65536 possible addresses. Since a major part of the addresses has already been assigned and the address space is going to exhaust, an enhanced version of IP (Version 6) has been introduced with an address size of 16 Byte = 128 bit.
Figure 2.4: classes of IP addresses (IPv4)
2.3.4
Transport layer
The transport layer has two tasks: Providing a reliable end-to-end connection for the user and providing flow control. An end-to-end connection can be unreliable because packets can be dropped due to congestions or transmission errors. To prevent congestion, a flow control is needed which controls the traffic load according to the transmission capacity of the channel and the processing speed of the receiver. Lost packets must be resent (retransmissions). Another two problems are the duplication of packets due to errors in the routers along the path between the originating and the destination node, and the change of the order of the packets. To explain the latter problem, one must consider that in packet-switched networks each single packet can take another route, it can even happen that the order of packets is exchanged. If packet 1 is sent via a particular route and packet 2 is sent after packet 1 via a faster route, it can overtake packet 1 and thus arrive at the receiver earlier than packet 1. The transport layer has to reorder the packets arriving at the receiver. In the TCP/IP protocol family, there are two transport protocols: TCP and UDP (User Datagram Protocol). TCP is connection-oriented, UDP (User is connectionless. TCP establishes a connection before transferring payload packets, by which an error-free data transmission is provided. The receiver has to acknowledge correctly received data packets within a certain time. If there is no acknowledgement, the data packet is retransmitted. TCP contains a flow control mechanism which assumes that packet loss will only occur due to congestions: In this case, the sending data rate is reduced by a relatively large amount and then increased again slowly. Since the flow control cannot distinguish packet losses due to bad
12
CHAPTER 2. THEORETICAL BASICS
radio channels from losses due to congestion, the reaction is the same in both cases. In case of a packet loss due to a bad channel, this behaviour, however, will result in an unnecessary reduction of the throughout. Since there is no connection setup or flow control in case of the connectionless UDP, a higher throughput can be achieved. Since packets can be lost when using UDP, this protocol is only suitable for simple applications based on a request/response scheme.
2.3.5
Application oriented layers
The layers 1 to 4 provide the network connection, thus they are called network oriented protocols. In contrast to this, the layers 5 to 7 manage the data exchange of a particular application, so they are called application oriented. The layer 5 (session layer) is for instance responsible for starting a file download from a server or resuming the download after the connection was interrupted. Layer 6, the presentation layer, is required to provide a common data format for several applications. This can be the encoding of text characters (e. g., codes like ASCII or UTF-8) or the type of compression for a digital speech transmission (source coding). In the layer 7, basic services for certain applications are provided. For instance, the protocol to connect to a Web server (Hypertext Transfer Protocol, HTTP), provides services to download a web page, while SMTP (Simple Mail Transfer Protocol) provides services to send e-mail.
2.4
The IEEE 802.11 standards series
When data shall be transferred over a wireless network, TCP/IP and the application oriented protocol layers can still be used. The necessary changes will only apply to the physical and the data link layer. The reference model of IEEE 802.11 is shown in Fig. 2.5. The LLC sublayer is also standardised by the IEEE, but not part of the 802.11 series.
Figure 2.5: IEEE 802.11 reference model
2.4. THE IEEE 802.11 STANDARDS SERIES
2.4.1
13
Physical layer
In the legacy 802.11 standard, besides the radio transmission in the 2.4 GHz band, an infrared transmission is also defined, which was not widely used in practice and thus will not be further mentioned here. The 2.4 GHz frequency band is an ISM band (Industrial, Scientific and Medical), which was originally intended for radio frequency generating devices which cannot be shielded properly, for example, microwave ovens or medical microwave therapy devices. Later, the usage of the band was extended for communication purposes. The band is unlicensed, which on the one hand reduces the cost in contrast to, for instance, UMTS frequency bands. On the other hand, a Wireless LAN system operating on this frequency band will face interference from both competing communication systems (Bluetooth or analogue home video transmission systems) and from the “traditional” ISM devices mentioned at the beginning of this section. For 802.11 and 802.11b ased Wireless LANs, spread spectrum transmission methods are used. The legacy 802.11 standard defines a frequency hopping (FHSS) and a direct sequence (DSSS) method. In 802.11b, only the latter is further supported. A spread spectrum transmission spreads a data signal to a higher bandwith, which will improve the robustness against frequency-selective interference. FHSS. The frequency hopping method changes the carrier frequency at constant time intervals between a number of subchannels, according to a predefined hopping sequence. The hopping sequence must be synchronised between the sender and the receiver. Even though this method is no longer supported in the current WLAN standards, it is used for example in Bluetooth. DSSS. The direct sequence spread spectrum method is used in the radio network which is used in the experiment. The spreading can for example be done by a XOR calculation between the user data bit sequence and a random data sequence.
1
0
1 bit
1 bit
0100100011110110111000 1011011100010110111000
11 chips
11 chips
11 bit Barker code (PRN) Figure 2.6: Frequency spreading for DSSS The random data sequences are not true random, but PN (pseudo random numerical) sequences which can be restored at the receiver. To achieve spreading,
14
CHAPTER 2. THEORETICAL BASICS
the PN sequences must have a higher clock rate than the data sequences. The spreading sequence in figure 2.6 has 11 signals inside a data bit; this is referred to as 11 chips per bit. This data stream (11 Mchips/s at a user data rate of 1 Mbit/s) is modulated with a DBPSK (Differential Binary Phase Shift Keying) and despread with the same sequence at the receiver after the demodulation. For the transmission of this data sequence a RF bandwidth of 22 MHz is required. To implement higher data rates, other modulation schemes such as DQPSK (Differential Quadrature Phase Shift Keying) are used. In this modulation scheme, the chiprate is constant, however, the data rate is doubled, since the chips can be allocated in the complex-valued symbol space, in contrast to the real-valued symbol space used for DBPSK. The further modulation schemes are given in table 2.1. Bit rate Mbit/s 1 2 5.5 11
Modulation scheme
chips/bit
DBPSK DQPSK CCK CCK
11 real 5.5 complex 2 complex 1 complex
chip rate Mchips/s 11 11 11 11
RF bandwidth MHz 22 22 22 22
Table 2.1: Transmission modes For the transmission with 5.5 and 11 Mbit/s, a modulation scheme called Complementary Coded Keying (CCK) is used. The basic idea is that so called complementary sequences are stored in a table and particular user data sequences are related to one of these chip sequences. In the second step, two further sending data bits are used for the rotation of the complex signal space. In figure 2.7, this principle is depicted using the example of a 11 Mbit/s transmission.
Figure 2.7: Complementary Coded Keying at 11 Mbit/s When using a higher-rate modulation scheme, it must be considered that the requirements for the channel increase with the data rate. Thus, a WLAN system
2.4. THE IEEE 802.11 STANDARDS SERIES
15
will switch down to a modulation scheme with a lower data rate, but a higher robustness, if the conditions of the channel become poor. In figure 2.8 it is shown that a narrowband noise on the transmission channel becomes broader after the despreading. Most of the noise can be filtered.
Figure 2.8: Narrowband noise in DSSS In the ISM band from 2400 to 2483.5 MHz, exactly three channels can be used without overlapping. The DSSS method also allows an overlapping of channels, so that 13 channels are provided in the standard (figure 2.9).
Figure 2.9: Frequency bands for DSSS Another important feature of the physical layer is link adaptation. This means that the device automatically selects the modulation scheme according to the channel conditions. The better the C/I on the channel is, the faster can be the modulation scheme.
2.4.2
MAC layer
The channel access for the wireless LAN is similar to the one used for the wired LAN. A carrier sense method, namely CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance) is used.
16
CHAPTER 2. THEORETICAL BASICS
Interframe space. If, in case of the free channel, all stations which are ready to send would start to send at once, the probability for a collision would be high. To prevent this, the stations must not start the transmission before a prioritydependent waiting period (IFS, Interframe Space) has expired. Transmission requests with a high priority, i. e. management data like an acknowledgement, use a SIFS (Short Interframe Space); transmission requests with lower priority (normal data frames) wait for the duration of a DIFS (Distributed Coordination Function Interframe Space) before they start the transmission. After the DIFS has expired, a backoff process is started, where each terminal determines an equally distributed random number between 0 and a contention window (CW). The backoff time results from the multiplication of this random number with the time slot interval. If the channel is idle, the backoff time is reduced by one slot interval. When the backoff timer has expired, the transmission is started. This method (see also fig. 2.10) cannot entirely prevent collisions, however, the collision probability can be reduced. After a correct transmission the receiver sends an acknowledgement to the sender. If there is no acknowledgement, the backoff process is restarted. For collision avoidance, after each transmission error, the contention window size is doubled.
Figure 2.10: Channel assignment for DCF
Virtual carrier sense with RTS and CTS. For performance reasons, collision detection would be the preferred method in contrast to collision avoidance, as it is the case for wired LANs. However, in case of wireless LANs, it cannot
2.5. PARAMETERS TO DESCRIBE THE WLAN PERFORMANCE
17
Figure 2.11: Hidden Terminals be assumed that each station can hear each other station. Hence, it cannot be guaranteed that each of the stations in a network can detect a collision. Moreover, simultaneous sending and receiving is not possible in radio networks, which would be another requirement for a collision detection. Consider fig. 2.11: When station A sends a packet to station B, station C does not note this event and will as well send a packet to B, which will result in a collision. Hence, a virtual carrier sense has been introduced, which works as follows: first, station A sends a short RTS frame (Ready To Send) to station B. B responds with a CTS (Clear To Send). All other stations (including C) now know that the channel is busy. Besides the information about the busy state of the channel, all stations not participating in the current communication are also informed for what time duration the channel will presumably be busy. Since no transmissions are allowed during this time, collisions of the data packets can be excluded. When transferring the RTS frames, collisions still can appear. In this case, the RTS/CTS procedure is restarted after the backoff. The disadvantage of this handshake method is the additional overhead which will take effect particularly in case of small data packets. Therefore, the RTS/CTS mechanism will only be applied for packets whose length exceed a predefined threshold. In the experiment, the RTS/CTS is deactivated, because each student’s lab group works on an own frequency band and thus collisions are avoided.
2.5
Parameters to describe the WLAN performance
During the experiment, certain properties of a WLAN shall be investigated. They are described in the following section:
• Signal-to-noise ratio (SNR): logarithm of the ratio between signal and noise power Psignal SN R = 10 log Pnoise The noise power can be assumed being independent of the distance to the sender, whereas the signal power will decay at the square of the distance. The signal-to-noise ratio is only welldefined under laboratory conditions. In buildings, a multipath channel has to be assumed on which constructive
18
CHAPTER 2. THEORETICAL BASICS and destructive interference can occur. This can result in a high shortterm variation of the received signal level. • Throughput: data rate at the receiver, usually specified in kbit/s or Mbit/s. • Packet loss rate: lost packets in relation to the number of transmitted packets; from the view of the application, the packet loss rate can only be 6= 0 if the underlying transport protocol is UDP, since for a TCP connection, lost packets are resent. • Latency time: the time which elapses between the beginning of the sending of a data packet and the reception of the acknowledgement.
Chapter 3
Preparatory Problems Problem 1 Why is in general no collision detection possible in a radio network? Problem 2 Will, in case of poor reception, the deviation of the throughput and the latency time be the worse or equal in comparison to the situation of good reception? Give reasons. Problem 3 Will, in case of poor reception, the absolute value and the deviation of the latency time be higher for a TCP or a UDP connection? Give reasons. Problem 4 Why is it useless to measure the packet loss rate of a TCP connection? Give reasons. Problem 5 Why is it useful to assign different, non-overlapping frequency channels to neighboring radio cells? Problem 6 Determine the average theoretical throughput of payload (in kbyte/s) for a Wireless LAN connection between an access point and a mobile station. Data packets are sent from the access point to the mobile station which responds to each data packet with an acknowledgement. The data packets have a 24-byte PHY header which is transmitted with a physical bitrate of 1 Mbit/s; after that, the MAC header (34 bytes) and the user payload (1500 bytes) are transmitted with a bitrate of 11 Mbit/s. After receiving the data packet, the mobile station waits for a fixed-length break of 10 microseconds before sending the acknowledgement packet. The acknowledgement includes a 20-byte PHY header which 19
20
CHAPTER 3. PREPARATORY PROBLEMS
is transmitted at 1 Mbit/s and a MAC header of 14 bytes which is transmitted at 11 Mbit/s. Once the access point has received the acknowledgement, it waits for a fixed amount of time (50 microseconds). After that, before sending the next data packet, it waits for a randomly chosen, uniformly distributed amount of time slots ranging between 0 and 15, where the length of one time slot is 10 microseconds. What is the throughput which can be achieved considering the above-mentioned transmission? In practice, the value calculated in this way cannot be achieved. Due to which factors will the available rate for the payload data be reduced? Problem 7 How does an incorrectly selected PN sequence affect the decoding at the receiver? Illustrate the effect in a graphical way by spreading a data sequence {1 0 1} with the spreading sequence {1 0 0 1 0 1 1 0 1 1 0} and despreading with the sequence {0 0 1 1 1 1 0 1 0 0 1}. Moreover, determine the RF bandwith of the modulated signal at a data rate of 1 Mbit/s. A DBPSK is used as the modulation scheme. Specify the chip rate and the number of chips per bit.
Problem 8 Given are 20 measurement values in floating-point format in a 20-element array values. Write program lines in a programming language of your choice which calculate the mean value and the standard deviation of the 20 values and store the results in the floating-point variables meanval and stddev. Some languages provide predefined commands to calculate the mean value and standard deviation; these commands must not be used.
Chapter 4
Design of the Experiment This section describes the measurement equipment and the software used for measurement and simulation.
4.1
Experimental setup
The transmission line for the real experiment consists of a wireless LAN connection between a laptop and a Linux server in the wired network. Each group is provided with a laptop equipped with a WLAN interface which communicates with the wired network by an access point (Fig. 4.1). The access point is separate for each group. The frequency channels are adjusted in a way that the channels do not overlap.
Figure 4.1: WLAN Access point Along the corridor, a measuring tape with a length of 30 m is laid out. The laptop is moved along the tape on a cart. In this way, several properties of the wireless LAN connection dependent on the distance to the access points shall be examined.
4.2
Measurement software
In the following, the handling of the measurement software called traffic is described. This program is based on a client/server principle: The laptop works 21
22
CHAPTER 4. DESIGN OF THE EXPERIMENT
as a client on which the measurements are performed. In the wired network, a Linux server responds to the measurement requests. Each group is provided an access point whose frequency channel covers a frequency range which does not overlap with the channels of other access points (see also fig. 2.9). For some of the measurements, the measurement software utilises the open source tool netperf1 by Hewlett-Packard. At each point of measurement, the measurement process has to be performed like this: A single traffic call executes a set of several measurements. In this experiment, 20 measurements shall be executed at each point of measurement. The result of the measurement set is the mean value and the standard deviation of the measurements and can upon successful completion be stored in a file. TCP measurements are stored in the file results.tcp, UDP measurements in the file results.udp. The options for the traffic program used in the experiment are: --server
With this option, the name of the server in the fixed network is specified who shall serve the measurement requests. Alternatively, an IP number can be specified instead of the name. This option is mandatory. --[tcp | udp] By default, both a TCP and a UDP measurement are executed. If, however, a measurement shall only be executed for one of the transport protocols, this option can be specified. --dispvals This option causes the program to show the results of the individual measurements to be shown on the screen. By default, only the results of the total measurements are shown.
4.3
Simulation software
For the simulation of wireless LAN scenarios which is done in the second part of this lab, a simulation tool named OPNET is available, which allows to model and analyse network scenarios using a graphical user interface. 1
more information about netperf on http://www.netperf.org/
4.3. SIMULATION SOFTWARE
23
For the creation of simulation models, the OPNET tool includes the following functions: • a load generator which generates data packets to be transmitted; • a user-configurable number of stations; • a channel over which the packets are transferred between the stations; • a statistical evaluation with which the throughput and the latency can be measured. A number of wireless stations (access points or mobile terminals) can be modeled. A number of parameters can be specified for each station, such as the position, transmission power, physical bitrate, traffic load, receiver sensitivity etc. In this way, large scenarios can be modeled which is difficult with real setups. Moreover, the results achieved with a simulation can be exactly reproduced at each repetition of the experiment, which is not possible in real experiments.
Chapter 5
Executing the Experiment 5.1
Properties of a wireless LAN connection
At first, the properties of a wireless LAN connection are investigated. Before beginning with the measurements, print the files in the working directory with the command ls. If there are output files of the traffic program named results.tcp and results.udp, delete them with the command rm ./results.* Measure the following values using the traffic program: • for a TCP connection, mean value and standard deviation of the values signal/noise ratio, packet throughput and latency time. • for a UDP connection, in addition, mean value and standard deviation of the packet loss rate. Start with the measurements at the zero mark of the measuring tape and use the following command to take 20 measurements at each measuring point. ./traffic --server --samples 20 --dispvals Notice: The name of the server is provided to you by the lab supervisor. The program should now begin with the TCP measurement. Once it is finished, the measurement results can be stored in the file results.tcp. To do so, press y and finally . If the measurement result is not satisfactory, saving can be abandoned by pressing n and . After that, the programme executes the UDP measurements in the same way, whose results are stored in the file results.udp. Important: When storing the measurement results, the measurement programme prints a number of the measurement series, with which the measured 24
5.2. SIMULATIVE ANALYSIS OF THE WLAN TRANSMISSION
25
values are stored in the file. Write down the numbers of the measurement series and the corresponding distance from the zero mark of the measuring tape, since in the evaluation some values shall be displayed depending on the distance! Important: During an ongoing measurement, the cart and the laptop must not be moved, because this would falsify the measurement results significantly. Repeat the measurements along the measuring tape in distances of 3 m and 6 m; for the further measurements, increase the distance in steps of 2 m. When measuring at 10 m distance from the zero mark, write down the first 10 individual measurements of the TCP delay which are displayed on the computer screen. These values are needed for the later evaluation of the experiment. After that, continue with the experiment as described above. The higher the distance from the access point becomes, the worse the transmission quality becomes. At large distances, the measurements will take increasingly more time until finally the measurement software ‘hangs’, because the connection between laptop and server broke down and can no longer be established. In this case, the ongoing measurement can be aborted by pressing the keys . Do not save the results, but repeat the measurement instead. If this also does not succeed, the measurement series can be ended at this point. Notice: It can happen that the measurement will succeed for one of the protocols, but not for the other. In this case, only repeat the failed measurement by appending the option --tcp or --udp to the call of the traffic program. Then, the measurement will only be executed for the specified protocol. After finishing the measurements, do not forget to copy the measurement data files to your memory stick so that you have them available for further analysis when preparing your report.
5.2
Simulative analysis of the WLAN transmission
In the second part of the experiment, the data transmission between a single access point and a mobile node shall be compared with simulative results. To do so, a scenario similar to the one which was investigated in the physical experiment is modelled in the OPNET tool: • Two stations are equipped with IEEE 802.11b wireless LAN. One of them remains in a fixed position. The second station is at a fixed position in the first part of the experiment and moving with constant speed away from the first station in the second part. • There is a unidirectional data flow from the first station to the second one. • The transmitting station always has a packet which is ready to send. Concerning the simulation configuration this means that the offered traffic
26
CHAPTER 5. EXECUTING THE EXPERIMENT load of the load generator has to be configured to a value which is greater or equal than the capacity of the transmission channel.
For the fixed-station scenario, the results, i. e. the throughput, the delay and the respective standard deviations, can be displayed as numerical values. For the mobility scenario, graphs can be plotted which show the throughput and delay as a function of the time. Considering constant speed, this can easily be interpreted as a function of distance. For each group, a computer with the OPNET simulator is provided. Details how to work with OPNET and how to implement, run and evaluate the scenario described above are given in a separate documentation file opnet-tutorial-2016.pdf which can be found on the ComNets webpage at the URL http://www.comnets.uni-bremen.de/studies/lectures-laboratories/ communications-lab. After the scenario has been configured and tested, the simulation is first run for a small fixed distance between the two stations. Determine the mean value and the standard deviation of the throughput and the delay as described in the OPNET tutorial and write down the values. In the second part, run the simulation with the receiving station moving away from the transmitting station at constant speed. Save the file with the results graph as described in the tutorial. Do not forget to take the file home for later analysis in your lab report.
Chapter 6
Evaluation Problems Problems about the Real Experiment Problem 1.1 List 10 individual measurement values of the TCP throughput measurement at the distance of 10 m. Calculate the mean value and the standard deviation of the 10 individual measurement results and specify the formulas which are used to do so. Draw a histogram (bar diagram) in which the frequency of occurrence of the signal-to-noise ratios are shown as a function of the signal-to-noise ratio. Problem 1.2 Show the mean value and standard deviation of the measured values dependent on the distance in a table: • For the TCP measurement: signal-to-noise ratio, packet throughput and latency; • for the UDP measurement: signal-to-noise ratio, packet throughput, latency and packet loss rate.
Problem 1.3 Consider the packet loss rates measured for the UDP transmission. What effect not typical for UDP transmissions will occur? Give a reason!
Problem 1.4 Show the measured results graphically while displaying the standard deviation as error bars. TCP and UDP measurements shall be entered in the same diagram for a better overview. The diagrams have to be supplied with a complete legend. TCP and UDP curves and the respective error bars have to be identified by different colours or line styles. Draw the following diagrams: • signal-noise ratio as a function of the distance, 27
28
CHAPTER 6. EVALUATION PROBLEMS • throughput as a function of the distance, • throughput as a function of the signal/noise ratio, • latency time as a function of the distance.
Important: Before plotting the graph which shows the throughput as a function of the signal-to-noise ratio, sort the entries of the measurement logfile in ascending order of the signal-to-noise ratios. Which effects can be observed concerning the shape of the curves and the standard deviation? Which different or common properties can be observed between the two transport protocols? Give a reason!
Problem 1.5 Are there “runaways” in your curves, i. e. values which deviate largely from the ideal shape of the curve? Explain these runaways considering the experimental setup and the physical environment of the experiments.
Problems about the Simulation Problem 2.1 Should the simulation setup be compared with the TCP or with the UDP measurement of the real experiment? Give a reason! Problem 2.2 Compare the values measured in the simulated fixed-distance scenario against the values of the physical measurement at the distance of 3 meters. Problem 2.3 Show the curves for the throughput and the delay which you measured for the mobility scenario simulation. What is the maximum range of the connection? Do the curves have another shape than those which you got for the physical measurement? If yes, what might be the reason? Does the simulation model reflect the real behaviour of the WLAN transmission well?
Appendix A
Abbreviations ACK AP ARQ BSS CCK CSMA/CA CSMA/CD CTS CW DCF DIFS DLL DBPSK DQPSK DSSS ESS ETSI FCS FTP FHSS GSM HIPERLAN HTTP IEEE IFS IP ISM ISO LAN LLC MAC
Acknowledge Access Point Automatic Repeat Request Basic Service Set Complementary Coded Keying Carrier Sense Multiple Access with Collision Avoidance Carrier Sense Multiple Access with Collision Detection Clear To Send Contention Window Distributed Coordination Function Distributed Coordination Function Interframe Space Data Link Layer Differential Binary Phase Shift Keying Differential Quadrature Phase Shift Keying Direct Sequence Spread Spectrum Extended Service Set European Telecommunications Standards Institute Frame Check Sequence File Transfer Protocol Frequency Hopping Spread Spectrum Global System Mobile HIgh PErformace Local Area Network Hyper Text Transfer Protocol Institute of Electrical and Electronics Engineers Interframe Space Internet Protocol Industrial, Scientific and Medical International Standardization Organization Lacal Area Network Logical Link Control Medium Access Control
29
30
APPENDIX A. ABBREVIATIONS
OFDM OSI PCF PIFS PLCP PMD PN QoS RTS SIFS SNR STA TCP TELNET UDP UMTS WLAN
Orthogonal Frequency Division Multiplexing Open Systems Interconnection Point Coordination Function Point Coordination Function Interframe Space Physical Layer Convergence Protocol Physical Medium Dependant Pseudo Noise Quality of Service Ready To Send Short Interframe Space Signal-to-Noise-Ratio Station Transport Control Protocol Terminal Emulation Protocol User Datagram Protocol Universal Mobile Telecommunication System Wireless Local Area Network
Appendix B
References • A. B. Hettich, Leistungsvergleich der Standards HIPERLAN/2 und IEEE 802.11 f¨ ur drahtlose lokale Netze (Performance Comparison of the Standards Hiperlan/2 and IEEE 802.11 for Wireless Local Networks). Ph. D. thesis, Aachen University of Technology, 2000. • T. Karl, Seminar Rechnernetze I – Drahtlose Hochleistungskommunikation (Seminar on Computer Networks I – Wireless High-Performance Communication) • A. K¨ onsgen, Drahtlose lokale Netze (Wireless Local Networks). Presentation Slides, University of Bremen, 2001. • Matthew S. Gast, 802.11 Wireless Networks: The Definitive Guide. O’Reilly, Sebastopol, CA, USA, 2005. • http://www.lanline.de • http://www.tecchannel.de • http://www.opnet.com
31