HOMEWORK#2 SOLUTION

1. Distance Vector Routing

The distance table in X is:

 

W

Y

W

1

?

Y

?

4

A

6

10

There is no enough information given in the problem to determine the distance table entries D( W, Y) and D(Y,W). To know there values, we would need to know Y’s minimum cost to W

Since X’s least cost path to A goes through W, a change in the link cost c(X, W) will cause X to inform all its neighbors of a new minimum cost path to A; Since X’s least cost path to A does not go through Y, a change in the link cost c(X, Y) will not cause X to inform its neighbors of the new minimum cost path to A.

2. Multicast routing

There are 62 links in a binary tree of depth 5. With multicast, the packet traverses a link exactly once. So the cost of sending one packet to all 32 receivers via multicast is 62. With unicast, each of the 32 receivers is sent an individual packet. So each packet must travel across five links( depth of binary tree is 5) from the source to the destination. Hence the cost is 32*5=160.

A linear topology will make the cost of unicast emulation and network-layer multicast as far apart as possible.

3. Congestion Control

Let time be slotted in units of T sec. In slot 1 the source router sends the first packet. At the start of slot 2, the second router has received the packet but cannot acknowledge it yet. At the start of slot 3, the third router has received the packet, but it cannot acknowledge it either, so all the routers behind it are still hanging. In this protocol, the first acknowledgement can only be sent when the destination host takes the packet from the destination router. Now the acknowledge begins to propagating back. It takes two full transits of the subnet, 2(n-1)T sec, before the source router can send the second packet. Thus the throughput is one packet every 2(n-1)T sec.

4. UDP

IP packets contain IP addresses, which is used for host-to-host delivery. Once such a packet arrives, the network handler needs to know which process to give it to. UDP packets contain a destination port. This information is essential so they can be delivered to the right process.

5. TCP

The loss rate, L, is the ratio of the number of packets lost over the number of packets sent. In a cycle, 1 packet is lost.

The number of packets sent in a cycle is:

W/2 +(W/2+1)+(W/2+2)…….+(W/2+W/2)=S (W/2+n) (where n=0,1,…W/2)

=(W/2+1) W/2+S n

=(W/2+1)W/2 +W/2(W/2+1)/2

=W2/4+W/2 +W2/8+W/4

=3/8W2+3/4W

Thus the loss rate is:

L=1/(3/8W2+3/4W)