Uploaded by Austone Banda

midtermExam1.soln

advertisement
Midterm Exam
EcPE/CS 5516: 03/24/2000
Name:
______________________
ID Number: __________________
This is a closed-book closed-notes examination. You may not discuss (in any form:
written, oral, electronic, smoke signals etc) the content of this examination with any
student who has not taken it. Failure to comply with these restrictions is an honor code
violation.
Pledge: On my honor, I have neither given nor received unauthorized aid on this
examination
Signature: ______________________
Short Questions
a) List one advantage of Token Ring networks over Ethernet networks
The maximum latency on an Ethernet can grow without bound. This occurs if the
offered load of stations is high, in which case continual retransmissions occur. In
contrast, the token on a token ring rotates at a bounded rate; therefore the
amount of time a station waits until the token arrives is bounded.
b) List one disadvantage of Token Ring networks over Ethernet networks
When utilization is near zero, the latency to insert a frame onto Ethernet is zero;
a station begins broadcasting immediately. In token ring, the latency is non-zero:
the token must first rotate to the sending station.
c) Why does Ethernet have a minimum frame size of 64 bytes?
Since Ethernet uses CSMA/CD, the source needs to hear a collision before it has
completely transmitted the packet. Given the maximum segment length
supported by Ethernet viz. 2500 m and that you need 4 repeaters to support this
length, the maximum round trip time is 51.2us. At 10Mbps, this translates to 512
bits or 64 bytes. So you need to send a frame >=64 bytes for the collision to be
heard before the entire packet is transmitted.
d) Is distance vector routing scalable? Justify your answer
No. The distance vector algorithm has two problems: (a) routers exchange entire
routing tables with their neighbors, which in the case of a large network can be
very large. (b) Distance vector routing faces the count-to-infinity problem on
certain kinds of link/switch failures. Solutions to this problem restrict the value
used for infinity to converge to a solution faster. The infinity restriction directly
restricts the diameter of the network.
e) Is link state routing scalable? Justify your answer
No. The link state routing algorithm uses broadcast to flood the routing table to all
routers. In a large network, the broadcasts will consume all available bandwidth.
f)
What is the head-of-line blocking problem? When does it occur?
In an input buffered crossbar switch, if the first packet in the input buffer cannot
get to its desired output port, it blocks all packets behind it even if their desired
output ports are available. This is called head-of-line blocking
g) Give two reasons why a frame or datagram can be lost over the Internet
 Congestion can cause routers to drop packets
 Data link errors may corrupt packets causing them to be dropped (e.g.,
the frame boundary could be lost, and two packets could be interpreted
as one)
 There may be transient routing loops that cause packets to be misdirected. They will be dropped at the destination
Long Problems
1. Suppose you attach a network monitor to observe the sequence of packets that
travel over a link from sender node A to receiver node B. The problem is to
deduce what protocols, if any, could have generated the observed sequence.
The following diagrams depict a contiguous flow of sequence numbers from the
sender (node A) starting from the left of the diagram. There may be traffic from
node B to node A, which is not depicted in the diagram.
Repeat (a) through (d) for each diagram. A gap between adjacent sequence
numbers implies passage of time with no transmissions from the sender.
(a) Can the stop and wait protocol generate the diagram? Justify your answer
(b) Can the go back n protocol generate the diagram? Justify your answer
(c) Can the selective acknowledgement protocol generate the diagram?
Justify your answer
(d) If you answered yes to either (b) or (c), what is the strongest conclusion
you can draw for the value of the sending window size (SWS)? Justify
your answer
1
1
0
A
Time
5
0
1
A
2
Time
3
A
5
0
1
Time
3
a) Yes, the diagram can be generated by the stop-and-wait protocol. The sequence
numbers alternate between 1 and 0, with seq. no 1 being retransmitted. This fits
within the guidelines for the stop and wait protocol
b) No. Seq. no. 1 was retransmitted. In go back n a retransmission would retransmit
the entire sending window, not just one packet.
c) No. SACK is also a window based protocol, transmissions in the sequence are
occurring a packet at a time.
a) No, the sequence numbers follow a window based scheme, multiple packets are
transmitted back to back.
b) No. If you notice the diagram, packet 5 was retransmitted, and only packet 5. In
go back n the retransmission would have retransmitted seq nos, 5 0 and 1 not
just 5
c) Yes. The diagram shows a window based protocol, and the retransmission of
packet 5 only indicates that the protocol uses a selective repeat scheme, both of
which are characteristics of SACK
d) SWS = 3. The sequence numbers wrap around after 5, yielding MaxSeq = 6. The
packets are sent in 3 unit bursts. Hence SWS = 3. Note that I mentioned that
there may be packets before the first seq. no (5) and after the last (3). But the
wrap around of seq numbers after 5 prevents this from being a valid case.
a) No, the sequence numbers follow a window based scheme, multiple packets are
transmitted back to back.
b) Yes. The packets follow a window based scheme. But there are no other
indicators to pin the protocol down to any particular window based scheme.
c) Yes. The packets follow a window based scheme. But there are no other
indicators to pin the protocol down to any particular window based scheme.
d) SWS >= 3. There are at least 3 packets in the burst, so the SWS should be at
least 3. There may be packets before the first packet (3) and after the last
packet, so SWS may be greater than 3.
2. Given the following 8 bit pattern 01011100 and the generator polynomial x3+x2+1,
compute the CRC bits. Given a 1 bit error that transforms the 8 bit pattern from
01011100 to 11011100, show that the pattern protected by the above CRC can
detect the error.
CRC generator poly: 1101
Performing poly long division, CRC bits: 0000. Note: The original 8 bit data pattern
when it is extended by 4 bits is directly divisible by the generator poly.
Data pattern with CRC: 010111000000
When the data pattern is corrupted from 01011100 to 11011100, the overall bit
pattern including CRC bits is:
110111000000
Dividing the above by the CRC generator poly 1101, yields a non-zero remainder of
0111. In the absence of an error the remainder should have been 0.
a) Suppose you wanted to establish a communication network between earth and a
star light years away in space
(a) Would Sliding Window be an appropriate protocol, in the presence of
errors? What would be the recommended sending window size? Justify
your answer.
(b) Would stop and wait be an appropriate protocol? Justify your answer.
(c) Suppose the network only has one bit errors. Which of the following error
detection schemes would you use and why?
i. Checksum
ii. One dimensional Parity
iii. Two dimensional Parity
iv. CRC
a) No. The round trip delay would be several years. Therefore any protocol using
retransmission is inappropriate. If you use sliding window, the only reasonable
window size is one that is larger than the size of the message to be sent.
otherwise, a smaller window would permit only part of the message to be sent,
after which the sender would wait several years before receiving an ack that
would permit the window to be advanced.
b) No. The propagation time to distant stars would be very large, making Stop and
Wait inappropriate. Since the efficiency of the stop and wait protocol is
proportional to the ratio of transmission time to propagation time, it would be a
very inefficient protocol.
c) Two dimensional parity would be the best scheme. It is relatively inexpensive in
terms of space and computer overhead. It can also correct one bit errors, so it is
the best scheme to use.
3. Consider the following network running the distance vector routing protocol. In
the diagram, vertices represent routers and edges (arcs) represent links between
routers. The numerical annotation on the links represents link costs. Higher costs
indicate worse links
(a) Show the routing table at node A when the distance vector routing
algorithm stabilizes
(b) Suppose the link between node A and node E fails, show the routing table
at node B when the distance vector algorithm stabilizes. Show all
important steps in your analysis.
B
5
3
C
D
6
2
2
A
4
E
(a) Routing Table at Node A:
Destination
B
C
D
E
Next Hop
C
A
A
A
Cost
5
2
2
4
(b) The distance vector routing algorithm never stabilizes. The failure of the link from A
to E initiates a count to infinity problem since every other node relies on A to get to
E.
Download