Assignment 1 WiMo Solved
Assignment 1 WiMo Solved
1. Consider the scenario given in Figure.1. Node A and B are in transmission range of AP1
whereas node C is in range of AP3. All three APs and Router R are connected via a layer-2
switch supporting IEEE 802.3. Assume that ARP caches at all the devices (Node A, B, C, APs,
and router R) are flushed. In this question, you have to explain the packet transfer process in
different cases asked. Special attention should be given to the values of ToDS and FromDS
fields and discovery of address1, address2, address3 and address4 in all the cases.
(c) Packet transfer from Node A to B when node B has moved from transmission range of AP1 to
transmission range of AP2.
Ans.
- A has MAC(B) in ARP cache (If not AP1 has it in cache)
- A sends packet to AP1
To DS From DS Address1 Address2 Address3 Address4
1 0 MAC(AP1)-BSSID MAC(A) MAC(B) -
- AP1 sends packet to L2 switch
- L2 switch will already have ports remapped
- L2 switch forwards packet to AP2
- AP2 sends packet to B
To DS From DS Address1 Address2 Address3 Address4
0 1 MAC(B) MAC(AP1)-BSSID MAC(A) -
(d) HTTP request from node B (when it is under AP1) and reply from a server on Internet (when node B is
under AP2). Will the movement of node B make any effect? Explain.
Ans.
- B sends ARP request to get MAC(default gateway)
To DS From DS Address1 Address2 Address3 Address4
1 0 MAC(AP1)-BSSID MAC(B) FFFF*3 -
- AP1 forwards to L2 switch.
- L2 switch broadcasts to router and APs and gets MAC(default gateway)
- Response forwarded to AP1 which is sent to B
To DS From DS Address1 Address2 Address3 Address4
0 1 MAC(B) MAC(AP1)-BSSID MAC(AP1)-BSSID -
- B has MAC(default gateway) = MAC(R)
- B sends HTTP request packet to AP1
To DS From DS Address1 Address2 Address3 Address4
1 0 MAC(AP1)-BSSID MAC(A) MAC(R) -
- AP1 sends packet to L2 switch
- L2 switch forwards packet to R
- R sends packet to server and gets response
- R sends response to L2 switch
- L2 switch will learn changes and ports will be remapped
- L2 switch forwards response to AP2
- AP2 sends packet B
To DS From DS Address1 Address2 Address3 Address4
0 1 MAC(B) MAC(AP2)-BSSID MAC(R) -
2. Consider the wireless topology of 6 nodes given in Figure below. Circles around each node illustrate
their transmission range. Assume that the transmissions of two nodes collide if and only if they
transmit at the same time in overlapping transmission areas. Further, assume that losses occur only
due to collisions.
(a) When node A transmits to node B, list the potential hidden and exposed terminals.
Ans.
- Hidden terminals: C, F
- Exposed terminals: E
(b) What about when node B transmits to node C?
Ans.
- Hidden terminals: D
- Exposed terminals: A, F
(c) Taking help from above cases, explain how (RTS/CTS) can solve the problem of hidden and exposed
terminals.
Ans.
Case I:
Case II:
3. Explain DCF in 802.11. State the relationship among SIFS, PIFS and DIFS. If contention window (CW)
size is large for lighter load, how would it effect bandwidth utilization? Consider number of nodes to
be three and contention window (CW) size to be sixty three to explain your answer.
Ans.
DCF (Distributed Coordination Function) is the fundamental medium access control (MAC) mechanism
used in the IEEE 802.11 wireless networking standard. It is a contention-based protocol that governs
how devices in a Wi-Fi network access the shared wireless medium, such as when they want to transmit
data.
DCF in 802.11:
In DCF, devices contend for access to the wireless medium by following these steps:
1. DIFS (Distributed Inter-Frame Space): Before transmitting, a device listens to the medium to
ensure it's idle for a period equal to the DIFS. DIFS is a predefined time interval, typically set to
34 microseconds. If the medium is busy, the device waits until it becomes idle for at least a DIFS
period.
2. Backoff Stage: Once the medium is idle for a DIFS, the device starts a backoff timer. The backoff
timer is a random value selected from a contention window (CW). CW is a range of time slots,
and its size depends on network conditions.
3. Contention Window (CW): Initially, the CW is set to a minimum value, usually CWmin. Devices
start with a CWmin value and double it after each unsuccessful transmission attempt. CWmax is
the maximum value that CW can reach. CWmin and CWmax are defined by the standard.
4. Transmitting: When the backoff timer reaches zero, the device can transmit its frame. If the
medium remains idle during the backoff period, the device can transmit immediately.
5. SIFS (Short Inter-Frame Space): After a successful transmission, the device uses SIFS, a shorter
time interval, to listen for acknowledgment (ACK) frames. If an ACK is received, it confirms the
successful transmission.
6. PIFS (Point Coordination Function Inter-Frame Space): PIFS is shorter than DIFS and is used by
devices in the PCF (Point Coordination Function) mode. DCF devices can't access the medium
during PIFS, but PCF devices can.
Relationship among SIFS, PIFS, and DIFS:
DIFS > PIFS > SIFS: These time intervals are defined in a hierarchy. DIFS is the longest, followed
by PIFS, and then SIFS. This hierarchy ensures that devices with higher priority (e.g., for
acknowledgments or PCF) can access the medium faster.
Impact of a Large Contention Window (CW) for Lighter Load:
A larger CW means that devices will have to wait longer before attempting to transmit data. In your
scenario where CW is set to 63, which is relatively large, for a network with only three nodes and lighter
traffic load, it can have several implications:
1. Higher Contention and Delay: With a larger CW, the contention for the medium becomes higher
because devices will randomly select backoff values from a larger range. This can lead to
increased delays in transmitting data, especially if there are only a few devices contending for
the medium.
2. Lower Bandwidth Utilization: The larger CW increases the likelihood of idle periods between
transmissions, which can result in lower overall bandwidth utilization. In a lightly loaded
network with only three nodes, a smaller CW would allow devices to access the medium more
frequently and utilize the available bandwidth more efficiently.
3. Unnecessary Wait Times: A larger CW may lead to devices waiting longer even when the
medium is available, which can lead to underutilization of the wireless channel.
In summary, a larger CW is more suitable for networks with high contention and heavy traffic, where it
helps prevent collisions and efficiently shares the medium among many devices. However, in a scenario
with a small number of nodes and lighter traffic, a smaller CW would lead to more efficient bandwidth
utilization and lower delays.
4. In 802.11 suppose A, B, and C all makes their first carrier sense, as part of an attempt to transmit,
while a fourth station D is transmitting. Draw a timeline showing one possible sequence of
transmissions and exponential back off choices. Your timeline should also meet the criteria that initial
transmission attempts should be in the order A, B, and C but successful transmission should be in the
order C, B, and A. Consider following:
i) Station A, B and C sense channel at t=0,1,2 respectively and channel was busy. At t=3 D finishes
transmission. CW = 7 initially. If C do transmission for 7 unit time, B do transmission for 8 unit time and A
do for 10 unit time. State at what time C, B and A will finish transmission.
ii) In i) if E comes when B is transmitting, and E do transmission for 10 unit time, is it possible that E can
start transmission before A? if yes explain when E will finish and when A will finish transmission, if no
why?
iii) In i) if E comes when B has just finished transmission, is it possible that E can start transmission
before A? Give reason for your answer.
Ans. Depends on your BO times. Diagram
5. Consider figure:
A----AP1----S----AP2
Node A has moved from AP1 to AP2. Show how table of switch can be updated to support mobility at
link layer.
Ans.
Port MAC
1 MAC(AP1), MAC(A)
2 MAC(AP2)
Port MAC
1 MAC(AP1)
2 MAC(AP2) , MAC(A)