G22.2262: Data Communications and Network Design
Due Date: Thursday, October 25, 2001
This homework assignment has two parts:
Write a program that implements IP routing!
The program should take the following arguments:
For example, the program can be invoked as follows:
iproute 188.8.131.52 ipaddrfile table1
Suppose ipaddrfile had the following lines:
In the above case, your code would assume the machine has three IP address:
· 184.108.40.206 (with subnet mask 255.255.255.0),
· 220.127.116.11 (with subnet mask 255.255.255.0), and
· 18.104.22.168 (with the default subnet mask).
The routing table should contain the following columns:
For example, the you can have
a routing table as follows:
22.214.171.124 126.96.36.199 2
188.8.131.52 184.108.40.206 3
220.127.116.11 18.104.22.168 1
22.214.171.124 126.96.36.199 1
188.8.131.52 184.108.40.206 1
220.127.116.11 18.104.22.168 2
22.214.171.124 126.96.36.199 3
0.0.0.0 188.8.131.52 3
The program should print out one of the following:
Deliver directly over
Deliver to IP_address over interface X
Deliver to myself
Network is unreachable
Here are some example runs:
$ iproute 184.108.40.206
Deliver directly over interface 2
$ iproute 220.127.116.11 ipaddrfile table1
Deliver to 18.104.22.168 over interface 1
$ iproute 22.214.171.124
Deliver directly over interface 3
$ iproute 126.96.36.199
Deliver to 188.8.131.52 over interface 3
$ iproute 184.108.40.206
Deliver to 220.127.116.11 over interface 3
In the textbook, please read the following chapters:
Chapter 8: Internet Protocol: Routing IP Datagrams and
Chapter 10: Classless and Subnet Address Extensions
After reading that chapter, please answer the following questions:
1. Why do we need CIDR?
2. Suppose we were using CIDR and had a routing table that had the following entries:
18.104.22.168 22.214.171.124 1
126.96.36.199 188.8.131.52 2
184.108.40.206 220.127.116.11 2
18.104.22.168 22.214.171.124 1
10.1.0.0 126.96.36.199 2
188.8.131.52 184.108.40.206 2
Using the algorithm in Section 10.22.2, how many comparisons would be required to find the router for 220.127.116.11? For 18.104.22.168? For 22.214.171.124?
3. Draw the binary trie structure for the routing table in Question 2.
4. The existing traceroute operates by sending out a packet with a Time To Live (TTL) of 1. The first hop then sends back an ICMP error message indicating that the packet could not be forwarded because the TTL expired. The packet is then resent with a TTL of 2, and the second hop returns the TTL expired. This process continues until the destination is reached, allowing the sender to figure the route to a host. That said, please answer the following:
a. What happens if the route changes while traceroute is running?
b. If a user uses traceroute to figure out the route from A to B, does the user know the route that B takes to get to A? Why or why not?
5. Consider a fixed subnet partition of a class B network number that will accommodate at least 121 networks. What is the contiguous subnet mast that will accommodate that? How many hosts can be on each number?
6. Consider an organization that wants to subnet their class B address to hold 127 hosts on each subnet. What continuous subnet mask should they use?
7. Does it make sense to subnet a class D address? Why or why not?
8. If a host contains a default route in the IP routing table, will IP ever generate a “destation unreachable” message? Why or why not?
Students with last names starting with A through H should e-mail their homework to Aristotle Tsirigos firstname.lastname@example.org
Students with last names starting with I through N should e-mail their homework to Vikram Sharma email@example.com
Students with last names starting with O through S should e-mail their homework to Lenny Satya firstname.lastname@example.org
Students with last names starting with T through Z should e-mail their homework to Yongchun Zhao email@example.com