Second Homework Assignment
Posted 2 Feb 2004 by herman
Due in class on Monday February 9th.
This homework asks you to show comprehension of the concepts from lectures of the first two weeks. Please read the homework by the 4th of February so you can ask questions about it before I leave town on the afternoon of the 4th.
The homework is in the file: homework2.pdf.
Solution, posted 11 Feb 2004 by hermanProblem 1. Host d must be able to forward packets to every host on LAN B, every host on LAN C, and also everyone in the Internet. This can be done with three lines in the forwarding table, using wildcard matching:
Note that the default line (the third line) doesn't have to specify an interface (Eth0 or Eth1) because this is implied by the gateway's IP address 184.108.40.206 matching the second line.
- For IP address 220.127.116.11 with a mask of 24 bits (meaning we only consider comparing on the first three bytes), a packet should be forwarded onto Eth0.
- For IP address 18.104.22.168 with a mask of 24 bits, a packet with a matching destination address should be forwarded onto Eth1.
- For IP address 0.0.0.0 with a mask of 0 bits (meaning any address that doesn't match with the first two lines above), the packet should be forwarded via the gateway at 22.214.171.124.
(You could also have a line for the loopback interface, such as127.0.0.1 32 bits (no gateway) interface=loopbackif you wish, but it is not essential for answering the question.)
The IP packet in question is travelling from host e to host a. Clearly, it has to be forwarded through d and through m in order to reach a. We are only asked about the forwarding from d to m for this question. So, the Ethernet frame sent from d to m will have these data:
- Destination IP address: 126.96.36.199 (for host a)
- Source IP address: 188.8.131.52 (from host e)
- Destination Ethernet (MAC) address: 0A:00:23:21:9A:05 (to the NIC on host m of LAN B)
- Source Ethernet (MAC) address: 08:01:00:9C:75:23 (from the NIC on host d of LAN B)