IMP Distance Vector
IMP Distance Vector
123: Computer Networks
Homework 3 Solutions
1. Learning Bridges
Consider the hosts W, X, Y, Z and the learning bridges B1, B2, B3. Assume, that they
have empty forwarding tables to begin with and keep on adding entries based on the
events.
a. Suppose host X sends a packet to W. Which bridges learn the location of host X
(i.e., which of the bridge’s interfaces should traffic destined to X be directed)?
Also, does host Y see this packet? Also, which bridges learn the location of host
W?
Bridges B1, B2, B3 learn of the location of host X. Yes,
the host Y will see this packet since each of the bridges
will flood this packet since they do not know the location
of W. No, the bridges do not learn the location of W since
the bridges flood the packet but do not know flooding on
which interface made W get the packet.
b. Now, suppose host Z sends to X. Which bridges learn the location of host Z?
Also, does host Y see this packet? Also, which bridges learn the location of host
X from this transmission?
Bridges B1, B2, B3 will learn the location of Z. No, host
Y will not see this packet since the bridges already know
the location of host X and hence do not need to flood the
packet. As before, this transmission does not tell us
anything about the host that receives the packet.
c. Now, suppose host Y sends to X. Which bridges learn the location of host Y?
Also, does host Z see this packet? Also, which bridges learn the location of host
X from this transmission?
Bridge B1, B2 will learn the location of Y. No, host Z
will not see this packet. As before, this transmission
does not tell us anything about the host that receives the
packet.
d. Now, finally host W sends to Y. Which bridges learn the location of host W? Does
host Z see this packet? Also, which bridges learn the location of host Y from this
transmission?
Bridges B2, B3 will learn of the location of W. Yes, host
Z will see this packet.As before, this transmission does
not tell us anything about the host that receives the
packet.
2. IP Forwarding
Consider the forwarding and (partial) ARP tables below take from a router
connected to four different networks. The router uses the IP addresses 192.168.32.2,
192.168.0.3, 192.168.6.1, and 192.168.7.1, on each of those networks, respectively.
Destination Next Hop Interface
192.168.0.0/16 eth0
192.168.0.0/21 eth1
192.168.6.0/24 eth2
192.168.7.0/24 eth3
IP Address MAC Address
192.168.32.1 00:21:56:4a:38:00
192.168.32.2 ba:e8:56:24:88:00
192.168.0.4 78:31:c1:c5:7c:48
192.168.0.3 00:50:56:c0:00:01
192.168.6.1 00:50:56:c0:01:F1
192.168.6.255 FF:FF:FF:FF:FF:FF
192.168.7.1 0:50:56:c0:73:d8
a. Suppose the following Ethernet frame arrived at a router with the tables above.
(Only a subset of the header fields are shown.) Which entry in the forwarding
table would it match?
Eth Src Eth Dst IP Src IP Dst Payload
1 (A,0,)
2 (A,0,) (C,6,C),(D,16,D)
3 (A,0,), (C,6,C) (E,8,C),(D,16,D)
4 (A,0,), (C,6,C), (E,8,C) (B,12,C),(D,12,C),(F,16,C)
5 (A,0,), (C,6,C), (E,8,C),(B,12,C) (D,12,C),(F,16,C)
6 (A,0,), (C,6,C), (F,16,C)
(E,8,C),(B,12,C),(D,12,C)
7 (A,0,), (C,6,C),
(E,8,C),(B,12,C),(D,12,C), (F,16,C)
4. Distance Vector Routing
For the network given above, give the global distancevector tables when using Distance
Vector Routing Algorithm for the following three instances
a. Each node knows only the distances to its immediate neighbors.
Info @ A B C D E F
A 0 ∞ 6 16 ∞ ∞
B ∞ 0 ∞ ∞ 4 ∞
C 6 ∞ 0 ∞ 2 ∞
D 16 ∞ ∞ 0 4 ∞
E ∞ 4 2 4 0 8
F ∞ ∞ ∞ ∞ 8 0
b. Each node has reported the information it had in the preceding step to its
immediate neighbors.
Info @ A B C D E F
A 0 ∞ 6 16 8 ∞
B ∞ 0 6 8 4 12
C 6 6 0 6 2 10
D 16 8 6 0 4 12
E 8 4 2 4 0 8
B 12 0 6 8 4 12
C 6 6 0 6 2 10
D 12 8 6 0 4 12
E 8 4 2 4 0 8
All of the links in the above network have weight 1. All entries in the routing table are
timed, ie. if node fails to receive an update for the particular entry for more than a certain
time interval, then the entry is marked invalid and discarded.
a. Now suppose that after the link between B and C fails, the following events occur
in order given below:
Event 1: B sends a route update saying the cost to reach C is infinite. (Note:
Though the route update is sent the other nodes do not receive the update right
away and will receive the route update only in later events!)
Event 2: Simultaneously both A and D send updates saying that each can reach
C with a cost of 2.
Event 3: Now, A gets an update from B and D at the same time. The update
from B is what was sent at Event 1 while the update from D was sent at Event 2.
After getting these two updates, A updates its routing table to say that it can
reach C via D with a cost of 3.
Event 4: Similarly, D will make a similar update after getting the update from B
and A. That is, D updates its routing table to say that it can reach C via A with a
cost of 3.
Given the state of the network above, briefly explain how this scenario would
continue if the network were to, from this point on, implement
i. Split horizon
ii. Split Horizon with Poison Reverse.
i.In Split
Horizon, both A and D will not advertise to each
other since they learn about the path from each other.
After B chooses one of them to be its parent it will
advertise a route to C with cost 4. However, both A and D
have routes with cost 3 via each other. Hence, neither A
and D will use the update that B sent. Eventually, all the
entries will time out!
ii. If Split Horizon with Poison Reverse is added, then the
count to infinity will end immediately, since A and D will
send each others saying that the distance to C for them is
∞ , since they learnt it from each other.
Note: Your points depend on how well you have explained
what happens. Points have been allocated based on
explanation if you’ve listed another possible scenario.
b. Now again suppose that if in the network above, the link between B and C goes
down, list a sequence of events in which Split Horizon with Poison Reverse will
fail to prevent a loop? (Assuming we use Split Horizon with Poison Reverse from
the start) Use the following notation to describe the events ie. the messages sent
by the nodes.
Notation: [(X>Y, #) to Z] denotes that X can reach Y in a distance # and
the update is sent to Z.
1.[(B>C, ∞ ) to D]
2.[(A>C, 2) to D]
3.[(B>C, ∞ ) to A]
4.[(D>C, 3) to B]
5.[(A>C, ∞ ) to D]
6.[(B>C, 4) to A]
7.[(D>C, ∞ ) to B]
8.[(A>C, 5) to D]
9.[(B>C, ∞ ) to A]
10. [(D>C, 6) to B]
And the oscillations will continue and count to infinity.