Professional Documents
Culture Documents
Wimax Module For The Ns-2 Simulator: October 2007
Wimax Module For The Ns-2 Simulator: October 2007
net/publication/224294935
CITATIONS READS
27 267
2 authors:
Some of the authors of this publication are also working on these related projects:
Developing Next Generation Smart Services and Applications for Smart Cities View project
All content following this page was uploaded by Nelson Fonseca on 16 May 2014.
1-4244-1144-0/07/$25.002007
c IEEE
The 18th Annual IEEE International Symposium on Personal, Indoor and Mobile Radio Communications (PIMRC’07)
To support a wide variety of multimedia applications, the from the upper layer, it is classified to a service flow and a 6
IEEE 802.16 standard defines five types of service flows, each bytes MAC header [1] is added to the packet. When a packet
with different QoS requirements. Each connection between the arrives from the channel, it is classified either as a management
SS and the BS is associated to one service flow. message or as a data PDU and the payload is handled accord-
The Unsolicited Grant Service (UGS) receives fixed size ingly. The service flows, associated to a connection, are config-
data grants periodically. The real-time Polling Service (rtPS) ured by the user which, among other information, define QoS
receives unicast polls to allow the SSs to specify the size of requirements. Each node has an uplink and a downlink default
the desired grant. QoS guarantees are given as bounded de- connection to carry management messages and all traffic that
lay and assurance of minimum bandwidth. The extended real- cannot be classified to any other service flow. When the sim-
time Polling Service (ertPS) uses a grant mechanism similar ulation starts, every SS registers itself to the BS by simulating
to the one for UGS connections. Moreover, periodic allocated the registration phase. The BS allocates a CID to each connec-
grants can be used to send bandwidth requests to inform the re- tion and stores the service flow parameters in a table. The main
quired grant size. For the non-real-time Polling Service (nrtPS) flow parameters include service type, QoS requirements, and
the BS provides timely unicast request opportunities, besides fragmentation/concatenation/piggybacking capability.
that, the SS is also allowed to use contention request oppor- The BS has an uplink scheduler and a downlink scheduler.
tunities. Minimum bandwidth guarantees are also provided to The downlink scheduler decides which packets coming from
nrtPS connections. The Best Effort service (BE) request band- the upper layer will be transmitted in the next downlink sub-
width through contention request opportunities as well as uni- frame. This decision is based on the QoS requirements and
cast request opportunities. on the queue status of the downlink connections. The uplink
III T HE W I MAX M ODULE scheduler decides which SSs can transmit in the next uplink
subframe as well as the number of slots these SSs can use. This
The WiMAX module was developed for the ns-2 simulator, decision is based on the QoS requirements of the uplink con-
release 2.28. It is based on the specifications of the IEEE nections and on the bandwidth requests sent by the SSs.
802.16 [1] standard for PMP topology and TDD duplexing Each SS has a scheduler to decide which packets will be sent
mode. The implementation was carried out in C++ using object in the data grants allocated by the BS. Scheduling is based on
oriented programming. the information about allocated slots available in the UL-MAP,
The module design was based on a module [9] designed to as well as on QoS requirements and on the queue status of the
simulate the DOCSIS standard [10] in the ns-2 simulator. Al- uplink connections.
though code reuse was possible, several modifications in the The scheduling mechanisms implemented in the SS sched-
DOCSIS module code were necessary to make it compliant to uler and in the BS downlink scheduler follow the Strict Priority
the IEEE 802.16 standard. The main changes were: i) imple- discipline. The BS uplink scheduler is implemented according
mentation of nrtPS and ertPS services for the uplink traffic, ii) to the scheduling police proposed in [3].
implementation of the five types of service for the downlink Each service flow has four major components:
traffic, iii) changes in the interface between the MAC and the • Classifier: the classifier uses the source IP address, the
PHY layers to make the WiMAX module to use the wireless destination IP address, and the packet type to classify a
PHY implementation of the ns-2, iv) implementation of frames packet into a certain service flow.
and subframes, v) aggregate requests, and vi) addition of max- • Queue: all packets classified into a certain service flow are
imum delay and minimum bandwidth QoS parameters for the enqueued when they cannot be sent immediately.
rtPS service. • Allocation Table: the allocation table maintains the cur-
rent and future grants for a service flow. This table is up-
traffic traffic
upper layer upper layer dated whenever a Map message is received.
traffic uplink downlink traffic • Finite state machine: a finite state machine (FSM) con-
classifier
connections connections
classifier
trols all the interactions of the service flow for transmis-
connection 1 connection 1 sions. The FSMs are implemented using a procedure-
driven approach, i.e., one function for each input state.
... ...
BW
request
MAC The definitions of the FSMs for the UGS, for the rtPS, and
connection n connection n Mgmt for the BE uplink service flows are based on the FSMs pro-
msgs
default default
posed by Shrivastav [11] for the DOCSIS module. The nrtPS
MAC connection connection
Mgmt uplink service flow uses the same model as the BE FSM since
msgs both service flows use unicast polling and contention polling.
downlink The difference between these two services is that the BS allo-
UL-MAP uplink scheduler
scheduler
scheduler
cates unicast grants for the nrtPS service frequently, while the
SS BS BE service receives unicast grants only when there is available
Figure 1: Structure of the WiMAX module bandwidth. The FSM for the ertPS uplink service is defined in
order to allow the transmission of both data PDUs and band-
Figure 1 shows the module structure. When a packet arrives width requests in the periodic grants allocated by the BS.
The 18th Annual IEEE International Symposium on Personal, Indoor and Mobile Radio Communications (PIMRC’07)
Similarly to the UGS uplink service, the downlink service current packet is sent over the channel. If the queue is empty,
flows do not need to send bandwidth requests. Their task con- the FSM goes to the Idle state. Otherwise, a packet is de-
sists on sending data PDUs in the grants allocated by the BS queued, stored in current packet, the FSM goes to the De-
downlink scheduler. Therefore, the FSMs for the five downlink cision state and an event Packet occurs.
service types have the same model as the UGS uplink service When a packet arrives and the FSM is in the state To-Send, a
FSM. MAC header is added and the packet is enqueued. When there
Note that the QoS provided for each service flow does not is a Map arrival, the allocation table for the flow is updated.
depend on the FSM model, it depends on the admission control
and on the scheduling mechanisms implemented in the BS as B rtPS FSM
well as on those implemented in the SSs. The FSMs control PACKET MAP PACKET MAP SENDTIMER
1a 1b 4d 4b
the transmissions according to the information stored in the al- 4c
4b
location table. IDLE TO-SEND
In the following subsections, we present the finite state ma- 1a 4b
chines for UGS, rtPS, ertPS, and BE uplink service flows. 2a, 4a 3a, 4a
DECISION 2a
data grant, as well as a packet can be fragmented in order to fit Figure 5 shows the BE FSM. Besides the states and events in
into a grant. the previous FSMs, the Contention state, which implements the
backoff algorithm, is defined as well as the following events:
C ertPS FSM
• UnicastReq: a unicast request opportunity is available for
PACKET MAP PACKET MAP SENDTIMER the service flow.
4b
1a 1b
4c
4d
• ContentionReq: a contention request opportunity is avail-
4b
IDLE TO-SEND able for the service flow.
1a 4b • ContentionOn: the contention phase should be entered.
DECISION 2a, 4a
3a, 4a
• ContentionSlots: the service flow is in the contention
2a
phase.
2a, 5a 3a, 5a WAIT-FOR-MAP
• ContentionBkoff: backoff is required as the request sent
TO-SEND-REQUEST
5b
3b 3a in the contention opportunity was lost.
5d 5b PACKET MAP
5c
PACKET
When the FSM enters the Decision state with event Packet,
MAP REQTIMER
it searches the allocation table for available grants. Whenever
Figure 4: Finite state machine for the ertPS service. there is a data grant, the FSM goes to the To-Send state and
an event SendPacket occurs. Otherwise, if there is a unicast
The ertPS FSM (Figure 4) has the same states, except for
request opportunity, there is a transition to To-Send-Request
the Req-Sent state, and events of the rtPS finite state machine.
state and an event UnicastReq occurs. For both situations, the
However, the actions taken in some states and the state transi-
contention resolution process is interrupted. In case there is
tions are quite different.
a contention request opportunity and the service flow has not
If the FSM is in the Decision state and the allocation table
entered the contention process, the FSM goes to the Contention
for the service flow has a data grant smaller than the size of
state and an event ContentionOn occurs. In case the contention
the packet stored in current pkt, the FSM goes to the To-
process has started, the FSM goes to the Contention state and
Send-Request state and an event SendReq occurs. However,
an event ContentionBkoff occurs.
if the data grant is greater or equal to the packet size, there is
When a Map arrives and the FSM is in state Wait-For-Map,
a transition to To-Send state and an event SendPacket occurs.
the actions are the same taken for the Decision state, except for
The same actions are taken when a Map arrives and the state is
the case when the Map has a contention request opportunity
Wait-For-Map.
and the contention process has already started. In this case, the
In the To-Send-Request state, the data grant is used to re-
FSM transitions to Contention state and an event Contention-
quest a new grant size to the BS. After sending the bandwidth
Slots occurs.
request, the FSM goes to Wait-For-Map state.
In the To-Send state, packets can be concatenated or frag-
When in the To-Send state, before sending the packet, the mented. If the data grant is not sufficient to send all the packets
FSM compares the packet size (with all the overhead) to the stored in the queue and there is no data grant pending in the al-
grant size. If they are of the same size, the packet is sent. How- location table, the service flow sends a piggyback request, and
ever, if the grant size is greater than the packet size, a piggy- the FSM goes to state Req-Sent. If the request is not sent and
back request is sent with the data packet in order to announce there is a packet in the queue, there is a transition to the Deci-
the new packet size to the BS. sion state and an event Packet occurs. If the piggyback request
D BE FSM is not sent and the queue is empty, there is a transition to the
Idle state.
PACKET MAP MAP
SENDTIMER
In the To-Send-Request state, either a unicast request or a
PACKET
1a 1b 4c
4d 4b contention request is sent when the request timer expires, and
4b there is a transition to the Req-Sent state. When a Map arrives
IDLE TO-SEND
7a, 7c
4b
with a data grant for the service flow in the Req-Sent state,
1a the contention resolution process stops, the FSM enters the To-
3a, 4a Send state, and an event SendPacket occurs. If the Map has no
7a, 7c 2a, 4a 4b
DECISION 6a, 4a
5c, 4a data grant for the service flow and the T161 timer expired, the
backoff window is increased by a factor of two and the FSM
2a
WAIT-FOR-MAP enters the Decision state and an event Packet occurs. In all
TO-SEND-REQUEST
3a
3b 3a
3a
other cases, there is no state transition.
5d 5b
5c PACKET MAP The transition to Contention state with the occurrence of
PACKET
MAP
7a, 7b
REQTIMER
REQ-SENT event ContentionOn happens when the service flow enters the
2a, 7a 5b contention process. In this case, a random number r within the
6c 6a, 6b
CONTENTION backoff window is selected. If the number of slots allocated for
PACKET MAP
contention is greater than r, the request timer is set to expire in
3a, 7a, 7c
7a, 7b 1 If an SS has sent a request in a contention request opportunity and no data
Figure 5: Finite state machine for the BE service. [11] grant has been given within T16, the SS shall consider the transmission lost [1].
The 18th Annual IEEE International Symposium on Personal, Indoor and Mobile Radio Communications (PIMRC’07)
the contention slot (r + 1) and the FSM goes to the To-Send- Downlink
Uplink
Request state. Otherwise, a variable called skipped is set to
(r − number of contention slots) and the FSM goes to the
Wait-For-Map state. 1.999 2 2.001 2.002 2.003 2.004 2.005 2.006 2.007
tempo (s)
When the FSM goes to the Contention state and an event
ContentionSlots occurs, it means that the contention process Figure 6: Frame division into downlink and uplink subframes
is ongoing and a contention request opportunity has been allo-
cated to the service flow. In this case, if the number of slots al- the x axis represents the beginning of a new frame), transmis-
located to contention is greater than skipped, the request timer sion happens on the downlink direction, while in the second
is set to expire in the contention slot (skipped + 1) and the half of the frame, transmission occurs in the uplink direction.
FSM goes to the To-Send-Request state. Otherwise, skipped Moreover, the time elapsed between two downlink transmis-
is set to (skipped − number of contention slots) and there sions is always 1 ms, indicating that the frames duration is in
is a transition to the Wait-For-Map state. conformance with the configured value.
In case an event ContentionBkoff occurs in the Contention These results indicate that the WiMAX module is compliant
state, and the maximum number of request retries has been to the framed format defined by the 802.16 for the TDD mode.
reached, the packet stored in current pkt is discarded and the
B UGS uplink service
contention process stops. If the queue is empty, the FSM goes
to the Idle state; otherwise, a packet is dequeued and stored in To verify whether or not an uplink UGS connection receives
current pkt, there is a transition to the Decision state and an periodic grants for data transmission, we simulate a network
event Packet occurs. If the maximum number of request retries with 1 BS and 2 SSs. One of the SSs has an uplink UGS flow
has not been reached, the machine executes the same actions which transmission starts at time 0.5 s. The grant interval is
defined for the event ContentionOn. set to 15 ms and the data rate is set to 500 Kbps. The other SS
has an uplink BE flow which transmission starts at time 1.0 s.
IV VALIDATION Traffic is generated with data rate of 2 Mbps.
The simulation experiments presented in this section were de-
signed to check the compliance of the developed WiMAX mod- UGS
BE
ule to the IEEE 802.16 standard for the PMP topology and
TDD duplexing mode. Specially, we check the division of time
in frames, and the division of frames into downlink and uplink 0.9600 0.9700 0.9800 0.9900 1.0000 1.0100 1.0200 1.0300 1.0400 1.0500
tempo (s)
subframes. Moreover, we check whether or not grant allocation
for the transmission of both bandwidth requests and data pack- Figure 7: Validation of the UGS uplink service.
ets follows the rules specified for the five types of service flow. Figure 7 shows the transmission of data packets in an interval
Due to space limitation, we do not show results for the down- of the whole simulation. In spite of the entrance of the BE flow,
link service flows. We show results for the validation of the up- the BS allocates data grants to the UGS flow within the defined
link service flows since their implementation is more complex interval. We observed the same behavior in a scenario in which
than the downlink one given the bandwidth request mechanism. the channel is overloaded by 10 BE flows, each generating 4
The topology of the simulated network consisted of a BS Mbps CBR traffic.
with the SSs uniformly distributed around it. The frame dura-
tion was 1 ms and the capacity of the channel was 40 Mbps. C rtPS uplink service
The scenarios were not intended to be representative of oper- The simulation scenario to test the rtPS service consists of 1
ational networks. The goal is to analyze the medium access BS and 1 SS. The SS has an uplink rtPS flow with packets
mechanisms and the slots allocation for different offered loads, generated at a CBR rate of 1 Mbps. The interval for unicast
i.e., for both underloaded and overloaded conditions [12]. We polling is set to 15 ms.
used CBR sources to simulate the traffic of the five types of ser-
vice flow. This is important at this stage since it facilitates the
Bandwidth requests
analysis of results obtained [12]. More realistic traffic models Data packets
anism, we vary the packet size. The initial packet size is 200
Figure 11: Validation of the BE uplink service.
bytes. At time 5 s the packet size changes to 500 bytes, and at
time 5.06 s the packet size is changed back to the initial value. V C ONCLUSION
This paper presents the design and validation of a module based
grant size (bytes)