Homework 3 Solutions

Problem 1: Reliable initialization via alternating bit
For three consecutive crashes, if the crash bit is incremented after each crash and the messages are lost as in the figure, the receiver believes that a single crash took place and the sender thinks that the receiver knows about all three of them. This can result in data loss.

If we changed the protocol so that the crash bit is incremented only after the reset acknowledgement is received, this problem would be avoided. This way, even though the receiver would not be aware of the exact number of crashes, the sender would know exactly how many crashes the receiver thinks it saw because it changes the bit only after receiveing the reset acknowledgement. Old reset acknowledgements cannot cause problems because the link is FIFO in both directions, so a certain value of the reset acknowledgement is not repeated until the receiver sends the other value and the sender receives it.
 

Problem 2: Ethernet,Min Packet sizes, and Semi-Reliability

a)  Since Nethernet removes the minimum packet size condition then we can eliminate padding.

b)  No, this rule is no longer valid . Since we are allowing a sender to send a packet without a minimum size criteria, the receiver should
      not discard a packet less than 64 bytes.

c) Consider the following scenario. (A sends to B  and B sends to A)

                                                   

    We need the old mechanism because in this example node C would not detect the collision without the old mechanism

d)  Using the same diagram , node D will not be able to detect any collision as it is not transmitting and will not wait for 51.2 microsec nor
      will there an increase in voltage .

e)  If node D is the receiver (i.e A sends a packet to D in the above example )
     D will receive the packet. correctly as it does not detect collsion
    A will detect collision and will retransmit.
     D will accept the packet again  causing duplicates
 

Problem 3: Bridging Failure


1) X ---> Intro   ,       Bridge learns X is on the left.

2) Server --> Y    ,      since the source is still X , the bridge learns that X is on the right.

3)  Y -->  X  ,               bridge will not pass the frame as it thinks X is on the right.

To fix the protocol, instead of the server sending the frame to Y after it receives from X it sends a frame back to X itself
This frame has server's address as source , with H and Y's address in the data field .
 
 
 
 

Homework 4 Solutions

Problem 1: IP Broadcast Storms

Endnode B does not know the data link address of A so an ARP request is made. A receives it and sends an ARP response back to B with the incorrect data link address of 1's. B sends the data packet to A with all the 1's address is the destination Data Link address. This is sent by the bridge to all stations on the other LAN as well and all stations pick up this frame because of the (incorrect) all 1's address.

All these nodes will pick up the frame, look at the routing address, and (except for B) will realize that its not for them. Thus, for instance, say C will try and forward the frame to A as part of being "helpful". If C does not know A's data link address, C will also try and ARP to A and the entire process will repeat with every node receiving a copy from C. Since this happens for all nodes C, if N nodes receive a copy the first time, they create N copies after the second round, each of these N copies create a further N copies, and the number of copies grows as N^k, where k is the number of iterations of this process. These kind of storms really take down Ethernets.

If the bridge is replaced by an IP router the problem gets a bit better because the router isolates the problem to the LAN in which A is attached. Thus we have the same exponential growth but a smaller N, the number of nodes in A's LAN and not the number of nodes in the Extended LAN as before. Since routers isolate storms, that is one of the reasons cited for using routers instead of bridges.

Problem 2: Distance Vector Modifications

Along with the distances, have the neighbors sends out the Max Minimum bandwidth to all other nodes D. Store this information (say as Bandwidth(R,D)). Then we add the following equation to compute the best bandwidth path

Bandwidth (R, D) = Maximum across all neighbors N of (Min (Bandwidth (R, N), Bandwidth (N, D))

And the neighbor N which achieves this max is the neighbor we route to.

For link state routing, we simply carry the link bandwidths in the link state packets. Then we redo the same algorithm above for every node in the graph (although in centralized fashion). Doing it up to N times where N is the number of nodes will guarantee that the information converges. In some sense, it is a centralized simulation of distance vector.

Problem 3: Link State Routing

A has crashed and restarted . The following sequence of events occur.

t=1;         A sends out LSP (1) to C and B

t=2;         B and C respond with LSP(16) and LSP(15)  of A ,which they have stored locally
                  Does not update its copy.
t=3;         A sends LSP(17) to B and C
t=4;         B and C receive LSP(17) . They update their copies and forward to E
t=5;         E receives LSP(17) . responds with LSP(32) of A .
t=6;         B and C update their copies of A and forward it to A itself
t=7;         A receives the LSP and now sends out LSP (33)
t=8;        B and C update their copy of A and forward it to C
t=9;         E receives the LSP and updates its copy.

finally at t=9 it will be stabilized.
 

Note : LSP(x) implies LSP with sequence number x.