Professional Documents
Culture Documents
Imp Cse123 Hw3 Sol
Imp Cse123 Hw3 Sol
Homework 3 Solutions
(Total Points: 60)
Instructions:
Take a printout of this template, write answers in the spaces provided below each question, and submit
the scanned copies of your homework on Gradescope. You can even write your answers electronically.
Q1.1 Consider the network topology shown in Figure 1 comprising router, switches, and hosts. The IP
addresses and MAC addresses assigned to various interfaces are shown in the figure. Assume that the
router’s ARP table is empty.
(a) To successfully deliver the above IP packet, the router needs to send an ARP request. Which
host(s) receive the ARP request? (1 pt)
Sol: Host H1 and H2
(b) Mention the following header fields for the ARP request packet sent by the router. (1 pt)
Sol:
Ethernet Source Ethernet Destination IP Source IP Destination
(d) After the above ARP request-reply exchange, mention the following header fields for the IP
packet that gets delivered to the destination host. (1 pt)
Sol:
Ethernet Source Ethernet Destination IP Source IP Destination
Q1.2 Consider the network topology shown in Figure 2 comprising routers, switches, and hosts. The
IP addresses and MAC addresses assigned to various interfaces are shown in the figure. The routing
and ARP table entries are also shown for selected routers and hosts. The figure shows five timestamps
in the journey of an IP packet from source host 192.168.1.2 to destination host 192.168.2.2.
Consider an edge router of a private network implementing Network Address and Port Translation
and having the following table entries in its NA(p)T table.
202.38.16.7:6001 172.16.2.1:3650
202.38.16.7:6002 172.16.2.1:5114
202.38.16.7:6003 172.16.2.2:3535
202.38.16.7:6004 172.16.2.3:4125
(a) If the following IP packet from the public network—destined to a host in the internal private
network—arrives at the NAT, then mention the header fields for the packet once it passes
through the NAT and enters the private network. (2 pt)
Sol:
IP Source IP Destination Source Port Destination Port
Sol:
IP Source IP Destination Source Port Destination Port
Consider the below network topology where circles represent routers and the routers are using
link-state routing algorithm to determine the least cost routes to all other routers. Determine the
routing table entries for routers B, C, D, and E after convergence.
A C 11
C C 2
D D 1
E C 4
Routing table for C
A E 9
B B 3
D B 4
E E 2
A A 7
B A 15
C A 12
D D 6
A E 11
B E 19
C E 16
E E 4
Q4 Distance Vector Routing (20 pt)
Consider the below network topology where circles represent routers and the routers are using a
distance-vector routing algorithm to determine the least cost routes to all other routers.
In the initial state of the distance vector routing algorithm, each node only knows the distance of the
routers that are directly connected to it. The below table shows distance vectors maintained at each
router at the start of the algorithm.
A 0 5 2 3 ∞
B 5 0 4 ∞ 3
C 2 4 0 ∞ 4
D 3 ∞ ∞ 0 ∞
E ∞ 3 4 ∞ 0
(a) Once all the routers have sent their respective distance vectors shown above to their
immediate neighbors, fill in the updated distance-vector values below for each router. (10 pt)
Sol: 2pt for each correct distance vector
Information Distance to Node
at node
A B C D E
A 0 5 2 3 6
B 5 0 4 8 3
C 2 4 0 5 4
D 3 8 5 0 ∞
E 6 3 4 ∞ 0
(b) Once all the routers have sent their respective distance vectors in (a) to their immediate
neighbors, fill in the updated distance-vector values below for each router. (10 pt)
Sol: 2pt for each correct distance vector
A 0 5 2 3 6
B 5 0 4 8 3
C 2 4 0 5 4
D 3 8 5 0 9
E 6 3 4 9 0
Q5.1 Consider the below scenarios where a BGP router receives multiple route updates for the same
network. Referring to the BGP route selection rules, for each of the below scenarios, circle the route
update that will be preferred by the BGP router to reach the advertised network. (3 pt)
Sol: 1 pt for each correct answer
Scenario 1:
Scenario 2:
Scenario 3:
Q5.2 Consider the topology of autonomous systems shown in Figure 3. Each autonomous system is
using BGP to send route updates for the 18.56/16 network. (3 pt)
If an IP packet originating from AS8 wants to reach a host in the 18.56/16 network, then what router
path (eg, R18–R16–R15–R14) will the packet follow?
Sol: R19–R13–R12–R11–R9–R4