advanced computer networks - cs716 spring 2009 assignment 02 solution (1)

9
VUSR Virtual University of Pakistan Spring 09 Solution Assignment No. 2 Question No. 1 Describe the Hidden Node and Exposed Node problems in 802.11 Standard? Answer: Hidden Node Problem: Consider the figure below. [Larry L. Peterson] B can exchange frames with A and C but it cannot reach D, while C can reach B and D but not A. [Larry L. Peterson] (A and D’s reach is not shown in the figure.) Suppose both A and C want to communicate with B and so they each send it a frame. A and C are unaware of each other since their signals do not carry that far. These two frames collide with each other at B, but unlike an Ethernet, neither A nor C is aware of this collision. A and C are said to be hidden nodes with respect to each other. [Larry L. Peterson] Exposed Node Problem: Consider the figure above. Suppose B is sending to A. Node C is aware of this communication because it hears B’s transmission. It would be a mistake for C to conclude that it cannot transmit to anyone just because it can hear B’s transmission. For example, suppose C wants to transmit to node D. This is not a problem since C’s transmission to D will not interfere with A’s ability to receive from B. (It would interfere with A sending to B, but B is transmitting in our example.) [Larry L. Peterson] Question No. 2 (10 Marks) Suppose you are designing a sliding window protocol for a 1-Mbps point to point link from Lahore to Karachi, which has a one-way latency of 1.25 seconds. Assuming that each frame carries 1KB of data, what is the minimum number of bits you need for the sequence number? 1 www.VUSR.net http://lms.vusr.net

Upload: binu

Post on 25-Dec-2015

7 views

Category:

Documents


2 download

DESCRIPTION

Computer Networks

TRANSCRIPT

Page 1: Advanced Computer Networks - CS716 Spring 2009 Assignment 02 Solution (1)

VUSR

Virtual University of Pakistan Spring 09

Solution Assignment No. 2 Question No. 1 Describe the Hidden Node and Exposed Node problems in 802.11 Standard? Answer: Hidden Node Problem: Consider the figure below.

[Larry L. Peterson]

B can exchange frames with A and C but it cannot reach D, while C can reach B and D but not A. [Larry L. Peterson] (A and D’s reach is not shown in the figure.) Suppose both A and C want to communicate with B and so they each send it a frame. A and C are unaware of each other since their signals do not carry that far. These two frames collide with each other at B, but unlike an Ethernet, neither A nor C is aware of this collision. A and C are said to be hidden nodes with respect to each other. [Larry L. Peterson] Exposed Node Problem: Consider the figure above. Suppose B is sending to A. Node C is aware of this communication because it hears B’s transmission. It would be a mistake for C to conclude that it cannot transmit to anyone just because it can hear B’s transmission. For example, suppose C wants to transmit to node D. This is not a problem since C’s transmission to D will not interfere with A’s ability to receive from B. (It would interfere with A sending to B, but B is transmitting in our example.) [Larry L. Peterson] Question No. 2 (10 Marks) Suppose you are designing a sliding window protocol for a 1-Mbps point to point link from Lahore to Karachi, which has a one-way latency of 1.25 seconds. Assuming that each frame carries 1KB of data, what is the minimum number of bits you need for the sequence number?

1

www.VUSR.net

http://lms.vusr.net

Page 2: Advanced Computer Networks - CS716 Spring 2009 Assignment 02 Solution (1)

VUSR

Virtual University of Pakistan Spring 09

Answer: One way latency = 1.25 seconds Hence, RTT = 2 * 1.25 = 2.5 seconds Transmit time for one frame (1 KB) = 8000 / 1 Mbps = 0.008 seconds Hence to keep the pipe full for complete RTT time, no of frames that can be sent = 2.50 / 0.008 = 312.5 = 313 To keep tract of 313 packets at least nine bit sequence number is required (as 29 = 512). Question No. 3 (20 Marks) Using the example network shown in figure below, give the virtual circuit tables for all the switches after each of the following connections is established. Assume that the sequence of connections is cumulative; that is, the first connection is still up when the second connection is established, and so on. Also assume that the VCI assignment always picks the lowest unused VCI on each link, starting with 0.

Answer:

a) Host A connects to host B VC table at Switch 1: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

2

www.VUSR.net

http://lms.vusr.net

Page 3: Advanced Computer Networks - CS716 Spring 2009 Assignment 02 Solution (1)

VUSR

Virtual University of Pakistan Spring 09

2 0 1 0 VC table at Switch 2: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

3 0 0 0 VC table at Switch 3: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

0 0 3 0 VC table at Switch 4: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

- - - -

b) Host C connects to host G VC table at Switch 1: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

2 0 1 0 3 0 1 1

VC table at Switch 2: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

3 0 0 0 3 1 1 0

VC table at Switch 3: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

0 0 3 0 VC table at Switch 4: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

3 0 1 0

c) Host E connects to host I VC table at Switch 1:

3

www.VUSR.net

http://lms.vusr.net

Page 4: Advanced Computer Networks - CS716 Spring 2009 Assignment 02 Solution (1)

VUSR

Virtual University of Pakistan Spring 09

Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

2 0 1 0 3 0 1 1

VC table at Switch 2: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

3 0 0 0 3 1 1 0 2 0 0 1

VC table at Switch 3: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

0 0 3 0 0 1 2 0

VC table at Switch 4: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

3 0 1 0

d) Host D connects to host B VC table at Switch 1: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

2 0 1 0 3 0 1 1 0 0 1 2

VC table at Switch 2: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

3 0 0 0 3 1 1 0 2 0 0 1 3 2 0 2

VC table at Switch 3: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

0 0 3 0

4

www.VUSR.net

http://lms.vusr.net

Page 5: Advanced Computer Networks - CS716 Spring 2009 Assignment 02 Solution (1)

VUSR

Virtual University of Pakistan Spring 09

0 1 2 0 0 2 3 1

VC table at Switch 4: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

3 0 1 0

e) Host F connects to host J VC table at Switch 1: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

2 0 1 0 3 0 1 1 0 0 1 2

VC table at Switch 2: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

3 0 0 0 3 1 1 0 2 0 0 1 3 2 0 2 1 0 0 3

VC table at Switch 3: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

0 0 3 0 0 1 2 0 0 2 3 1 0 3 1 0

VC table at Switch 4: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

3 0 1 0 2 0 3 0

f) Host H connects to host A VC table at Switch 1:

5

www.VUSR.net

http://lms.vusr.net

Page 6: Advanced Computer Networks - CS716 Spring 2009 Assignment 02 Solution (1)

VUSR

Virtual University of Pakistan Spring 09

Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

2 0 1 0 3 0 1 1 0 0 1 2 1 0 2 0

VC table at Switch 2: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

3 0 0 0 3 1 1 0 2 0 0 1 3 2 0 2 1 0 0 3 1 1 3 0

VC table at Switch 3: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

0 0 3 0 0 1 2 0 0 2 3 1 0 3 1 0

VC table at Switch 4: Incoming Interface

Incoming VCI Outgoing Interface Outgoing VCI

3 0 1 0 2 0 3 0 0 0 3 1

Question No. 4 (10 Marks) Given the extended LAN shown is Figure below, indicate which ports are not selected by the spanning tree algorithm?

6

www.VUSR.net

http://lms.vusr.net

Page 7: Advanced Computer Networks - CS716 Spring 2009 Assignment 02 Solution (1)

VUSR

Virtual University of Pakistan Spring 09

Answer: After the completion of spanning tree algorithm, B1 becomes the root. Following ports are not selected:

1. The port which connects B2 with LAN A, because B7 has a shorter distance to the root than B2.

2. Both ports of B5, because B3 has a shorter distance to the root and B2 has an equal distance but smaller id.

3. The port which connects B6 with LAN I, because B4 has an equal distance but smaller id than B6.

Question No. 5 (5 + 5 Marks)

a) What kinds of problems can arise when two hosts on the same Ethernet share the same hardware address? Describe what happens and why that behavior is a problem?

If two hosts on the same Ethernet share the same hardware address, it would result in the following: • data destined at this address would be fetched by two nodes, one of which is not

the intended destination. • data sent by one of the sources with this address would not be recognized; that

from which source it came. The source would have doubt on its own data and a non-source would take it as its own data. There can be many other complications.

b. Explain why AAL3/4 will not detect the loss of 16 consecutive cells of a single

PDU?

7

www.VUSR.net

http://lms.vusr.net

Page 8: Advanced Computer Networks - CS716 Spring 2009 Assignment 02 Solution (1)

VUSR

Virtual University of Pakistan Spring 09

In AAL3/4 header, there is a 4-bit sequence number (SEQ), which detects cell loss or misordering. If consecutive 16 cells are lost AAL3/4 would not detect that loss as SEQ field would give the same value as in the correct operation of the network.

Question No. 6 (10 Marks) Why is duration field present in 802.11 frame? Answer: In 802.11 frame, the duration field tell how long the sender wants to hold the medium (i.e., it specifies the length of the data frame to be transmitted). The receiver then replies with CTS (clear to send) frame; this frame echoes this length field back to the sender. Any node that sees the CTS frame knows that it is close to the receiver, and therefore cannot transmit for the period of time it takes to send a frame of the specified length. [Larry L. Peterson] Question No. 7 (10 Marks) Why does wireless LAN only take measures to avoid collision and not to detect it? Answer: Collision detection mechanism works only in environments where every node can hear the traffic from every other node. In wireless LAN, all the nodes are not in the radio range of each other, usually majority of the nodes are out of the radio range of the sender. So, in wireless LAN collision avoidance measures are taken rather than collision detection as a collision at the receiver might not be detected at the sender. Question No. 8 (10 Marks) Consider hosts X, Y, Z, W and learning bridges B1, B2, B3, with initially empty forwarding tables, as in the figure below.

a) Suppose X send to Z. Which bridges learn where X is? Does Y’s network interface see this packet?

The bridges, that learn where X is, are: B1, B2 and B3.

8

www.VUSR.net

http://lms.vusr.net

Page 9: Advanced Computer Networks - CS716 Spring 2009 Assignment 02 Solution (1)

VUSR

Virtual University of Pakistan Spring 09

Yes, Y’s network interface sees this packet as Y is connected with bridge B2 and B2 had initially empty forwarding table. b) Suppose Z now sends to X. Which bridges learn where Z is? Does Y’s network

interface see this packet?

The bridges, that learn where Z is, are: B1, B2 and B3. No, Y’s network interface does not see this packet as the packet is destined to X and all bridges have previously learned where X is. Therefore, B2 would simply unicast the packet towards B1.

c) Suppose Y send to X. Which bridges learn where Y is? Does Z’s network interface see this packet?

The bridges, that learn where Y is, are: B1, B2. No, Z’s network interface does not see this packet as B2 (which has previously learned about X) would unicast this packet towards B1.

d) Finally, suppose Z send to Y. Which bridges learn where Z is? Does W’s network interface see this packet?

All bridges already know where Z is. Yes, W’s network interface sees this packet as W is connected with bridge B3, and B3 does not know where Y is so it broadcasts on all interfaces.

Question No. 9 (10 Marks) Suppose a bridge has two of its ports on the same network. How might the bridge detect and correct this? Answer: If a bridge has two of its ports on the same network, then every message sent by the bridge to that network would be received at the other port of the bridge, that’s how it would detect that two of its ports are connected to the same network. As soon as the bridge detects that two of its ports are on the same network, it can stop sending and listening on one of the ports.

9

www.VUSR.net

http://lms.vusr.net