5RVWA2YKJ
5RVWA2YKJ
Fall 2016
Homework Assignment 4
1. Consider a datagram network using 32-bit host addresses. Suppose a router has four links,
numbered 0 through 3, and packets are to be forwarded to the link interfaces as follows:
a. Provide a forwarding table that has five entries, uses longest prefix matching, and forwards packets
to the correct link interfaces.
Answer: The forwarding table with the longest prefix will look like below
b. Describe how your forwarding table determines the appropriate link interface for datagrams with
destination addresses:
11001000 10010001 01010001 01010101
11100001 01000000 11000011 00111100
11100001 10000000 00010001 01110111
This study source was downloaded by 100000882452313 from CourseHero.com on 03-27-2024 14:33:17 GMT -05:00
https://www.coursehero.com/file/18176235/CN-HW4/
Answer: Prefix match for 11001000 10010001 01010001 01010101 is entry the last entry
and hence the it will choose link 3
Prefix match for 11100001 01000000 11000011 00111100 is the 3rd entry an hence it will
choose link 2
Prefix match for 11100001 10000000 00010001 01110111 is the 4th entry and hence it will
choose link 3
2. Consider a datagram network using 8-bit host addresses. Suppose a router uses longest prefix
matching and has the following forwarding table:
For each of the four interfaces, give the associated range of destination host addresses and the
number of addresses in the range.
Answer: Below is the address range specific to the Prefix Match and the Interface link.
3. Consider a subnet with prefix 128.119.40.128/26. Give an example of one IP address (of form
xxx.xxx.xxx.xxx) that can be assigned to this network. Suppose an ISP owns the block of addresses
of the form 128.119.40.64/26. Suppose it wants to create four subnets from this block, with each
block having the same number of IP addresses. What are the prefixes (of form a.b.c.d/x) for the four
subnets?
This study source was downloaded by 100000882452313 from CourseHero.com on 03-27-2024 14:33:17 GMT -05:00
https://www.coursehero.com/file/18176235/CN-HW4/
Answer: For the subnet with prefix 128.119.40.128/26 we can see that 26 bits are used to
identify as the network address and remaining 6 bits out of the 32 bit IPV4 address is used to
represent the hosts. So there can be a maximum of 64 hosts. So any IP address from
128.119.40.128/26 to 128.119.40.191/26 is an example.
For the second of the question where ISP owns addresses of the form 128.119.40.64/26, 26
bits are used for the network identification and there can be 64 hosts. If e want to create four
subnets with each having equal number of IP addresses, we can assign 16 hosts to each
subnet and use 28 bits for network identification or subnet mask. The subnets will be below.
128.119.40.64/28
128.119.40.80/28
128.119.40.96/28
128.119.40.112/28
s
4.
This study source was downloaded by 100000882452313 from CourseHero.com on 03-27-2024 14:33:17 GMT -05:00
https://www.coursehero.com/file/18176235/CN-HW4/
Below is W’s view of the topology
In the above solutions produced X does not know the AC link since X receives no advertisement with
both A and C on the path to the destination.
This study source was downloaded by 100000882452313 from CourseHero.com on 03-27-2024 14:33:17 GMT -05:00
https://www.coursehero.com/file/18176235/CN-HW4/
Powered by TCPDF (www.tcpdf.org)