Homework #7 Problem 1 – 5 Solution



Consider the following network of routers where the numbers above each link indicate link costs:

Considering calculations from the perspective of node z:

  1. Show a table showing iterations of the Link State routing algorithm.

  1. Show a resulting routing table (next hop for each destination).

Step N y x v t w u


Destination Next Hop


Problem 2

Consider a network of 4 routers running Distance Vector routing algorithm where the numbers above each link indicate link costs.

  1. Suppose, the link between C and D fails. Show that split horizon will not eliminate the count-to-in nity problem.

  1. How can split horizon with poisoned reverse help in eliminating the count-to-in nity problem when the link between C and D fails?

Write your answer here

Problem 3

Consider a simple network with one WiFi router and 3 hosts on the Figure. Host A and B are connected to the router over wireless interface, host C is connected using wired Ethernet interface.

  1. Assign IP (IPv4) addresses, network masks, and next hop gateways (where applicable) addresses so that all of them can communicate with each other.

Consider that have been given address block and all assignments should be made from that block. Your assignment must use the most conservative IP address allocation. That is, assign IP addresses to hosts using as many network bits (the largest possible subnet mask) as possible.

  1. Fill the content of the Host C’s routing table, without using the default route.








Node A

Node C Routing Table

Subnet Mask Interface

Node B


Page 3 of 5

CS 118 Winter 2019 : Homework 7

Problem 4

Answer the following questions regrading to IP.

  1. Suppose Host A receives an IP datagram. How does the network layer in Host A know it should pass the segment (that is, the payload of the datagram) to TCP rather than to UDP or to something else?

  1. Can a host have more than one IP address? Justify your answer brie y.

  1. How does Skype work between two hosts which are behind two di erent NAT boxes?

  1. Compare IPv4 and IPv6 headers. What are the common elds?

Write your answer here

Problem 5

Consider a network with four routers. Router A and D are IPv6 routers while router B and C are IPv4 routers. Assume that the source host sends an IPv6 packet to the destination host. The blue boxes in the gure represent the packet’s location. Show source IP address and destination IP address of the packet located at (1) through (5).

Write your answer here

Page 5 of 5