Modeling and Simulation of MAC For QoS in IEEE
Modeling and Simulation of MAC For QoS in IEEE
11e Using
OPNET Modeler
Weihua Helen Xi, Toby Whitley, Alistair Munro, Michael Barton
Networks & Protocols Group, CCR, Department of Electrical & Electronic Engineering, University of Bristol
Bristol, UK BS8 1UB
email: [email protected]
This paper is organized as follows: Section 2 provides a brief RTS/CTS: Because of the limited radio range, the transmitting
introduction to the legacy MAC defined in 802.11 and 802.11b; station may be unaware of stations that can interfere with the
the MAC enhancements in the 802.11e draft follow in Section 3; receiving station. The Request to Send (RTS) and Clear to Send
Section 4 presents the implementation of the MAC (CTS) mechanism is used to mitigate this hidden station
1
problem. The RTS/CTS frames transmitted prior to the actual
data frame contain the Network Allocation Vector (NAV) field,
which defines the period of time that the medium is to be
reserved until the end of the Acknowledgement (ACK) to the
following data frame. All STAs within the reception range of
either the originating STA (which transmits the RTS) or the
destination STA (which transmits the CTS) will keep quiet. The
header of the data frame also contains the NAV.
PCF: The PCF provides the contention free frame transfer. This
mode only works in infrastructure networks with the Access
Point (AP) working as a Point Coordinator (PC), which performs
the role of the polling master. The PCF distributes information
within Beacon management frames to gain control of the
medium by setting the NAV in STAs.
2
CWmin, CWmax and PF are each replaced by a relative vector
of four elements.
INIT state: Acquire the MAC parameter values set by the user
Figure 3: 802.11e WLAN Node model and calculate the contention periods. The contention periods
including the backoff window size are not real timers which will
count down with every tick of the clock; they work as the
The PHY in the 802.11a model is used, in which the eight sets of weights of the subqueue and will be updated every time this
transmitters and receivers employ the OFDM modulation QSTA transmits the previous packet successfully.
scheme. In the MAC process, changes are made to the variables
representing the contention parameters such as AIFS and CW, IDLE state: The machine enters an Idle state and waits for an
and three existing functions corresponding with the virtual incoming event. The event can be either an incoming packet
contention in the higher layer are modified. Additionally the from the 4 bursty source modules, a feedback interrupt from the
RTS/CTS function is corrected to behave as required by the MAC process to inform it of a successful transmission, or ready
standard. Another important contribution is to implement to send the next packet to the MAC layer to contend with other
functions of the virtual contention as shown in Figure 1 and thus stations for the radio channel.
the simple bursty source as used in the standard model
wlan_station_adv is replaced. RECEIVE state: Packets arriving from any of the four bursty
sources will trigger the ARRIVAL event. The state machine then
In the dotted box, each of the four bursty sources named as ac0 goes into the RECEIVE state and will insert the packet into the
to ac3 has an attribute Traffic Category with an integer value corresponding subqueue with the same AC. If no packets stay in
from 0 to 3. The On-Off Process model of the bursty source is the MAC layer to contend with other stations, an interrupt will
easy to configure as both Constant Bit Rate (CBR) and Variable be sent to trigger the SEND state.
Bit Rate (VBR) traffic. Each source will generate packets with a
TC_Packet format that has a field also called Traffic Category, UPDATE state: After MAC transmits a packet successfully to
which inherits its process models Traffic Category attribute the destination or the transmission attempt retry counter reaches
value at the initial state. Packets generated with different AC its limit, the MAC process will send the queue module a remote
values flow into the queue module vc, then the queue module interrupt to inform it that MAC is ready to acquire the next
inserts the packets into its subqueues indexed from 0 to 3. The packet. This remote interrupt triggers the UPDATE_CP event in
queue module is responsible for extracting the head packet of the order to update the CW sizes of the four subqueues. The CW of
subqueue with the highest priority, this having the shortest the three deferred subqueues will deduct the immediate past
contention period. winning subqueues last CW, while the past winner is reset to its
CWmin value.
The Finite State Machine (FSM) of the queue module is depicted
in Figure 4. It works as the virtual contention within the QSTA SEND state: Updating of the CW triggers the SEND_PKT event
shown in Figure 1. It can insert and extract packets from the and the state machine enters the SEND state. It compares the
corresponding subqueue, calculate the weights of each subqueue non-empty subqueues to find the smallest weight of the
and send the packet from the subqueue with the smallest weight subqueue. The selected subqueue extracts its head packet and
to the MAC layer. We extend the MAC access parameters to the sends it to the MAC layer. In the case where there is light traffic
modules attributes, so the user of the 802.11e model can easily and when all the four subqueues are empty, a flag is set. Thus
set different values to evaluate the impact of MAC parameters when the next packet is generated, it is sent to MAC
on the network performance of different traffic types. The AIFS, immediately.
3
5. Simulation Results statistics of the whole network and catalogued according to the
The goal of the simulation is to verify the expected operation of packet's AC.
this model. The simulation environments are described as
follows: Two sets of simulation are executed. The first scenario is to test
the performance of the different priorities in an Ad hoc network
Each network configuration in the simulations has the same with 10 QSTAs. The simulation is run over each of the eight
WLAN parameter settings (Table 2). The MAC address of each PHY modes of 802.11a. The second scenario runs at 24Mbps
station is automatically assigned by the OPNET Modeler. The speed in an Ad hoc network with 3, 5 and 10 QSTAs,
randomly selected destination address makes it possible for each respectively. The network structure is as shown in Figure 5, with
station to receive traffic equally. The RTS/CTS mechanism is each scale representing 12.5 meters.
used to mitigate the hidden station problem, although it adds
overhead and decreases throughout. Since the packet size is
below the 2034-byte limit, fragmentation is not needed.
Table 2: WLAN Parameters Setting
Date Rate (Mbps) 6, 9, 12, 18, 24, 36, 48, 54
RTS threshold (bytes) 256
Fragmentation Threshold None
Modulation Scheme OFDM
MAC Address Auto Assigned Figure 5: Network Structures
Destination Address Random
5.1. Simulations in an Ad hoc network with 10 QSTAs over 8
Each QSTA in our simulation has the same traffic generation PHY modes
pattern (Table 3). Packets of each AC have a size of 1500 bytes Figure 6 and Figure 7 illustrate the different Throughput and
and arrive every 5ms. Each station has four ACs and the data Delay of each AC in the Ad hoc network with 10 QSTAs. The
rate is 9.6Mbps. A simple and high traffic mode [8] [9] is used to figure of Load is very similar with that of Throughput, and the
make sure that the throughput and delay performance of each trend of Medium Access Delay is similar to Delay. Throughput
AC will be independent of the characteristics of the traffic and Delay statistics are used in this paper. The Throughput of
streams. For example, the starvation of the traffic or the AC3 is observed to be higher than the others at every PHY mode
correlated packet arrival of realistic voice traffic would influence and the Delay is lower as expected, this also agrees with
the throughput results [10]. simulation results in [7] [10]. AC0 suffers a significantly larger
Table 3: Packet Generation for every AC delay than AC1, AC2 and AC3, and the throughput is
significantly impacted owing to the low priority of achieving
Packet Size (bytes) constant (1500) transmission opportunities. The delay of the audio and video
Interarrival Time (seconds) constant (0.005) services (AC3 and AC2) is lower than 0.2ms, which is negligible
Data Rate (Kbps) 2400 for users in real audio and video transmission. From the PHY
mode point of view, the higher the PHY modes used, the shorter
Table 4 lists the MAC access parameters for each traffic type. the transmission time, so the shorter the delay and the higher the
Each station generates traffic for all the four ACs equally. throughput [11].
Table 4: MAC Access Parameters used for Simulations
Type AIFSD CWmin CWmax PF
AC3 1 7 15 1.2
AC2 2 10 31 2.0
AC1 3 15 255 2.6
AC0 4 31 1023 3.0