Test 2 Review C: Questions

R2c.1.

How does the ARP protocol work for retrieving the MAC address corresponding to an IP address (so an IP packet can be sent to its destination)?

R2c.2.

How many computers can receive addresses in a network whose CIDR address block is 209.65.56.0/23? What are the valid addresses for these computers?

R2c.3.

Why is NAT (network address translation) helpful for networks with more devices than the address block allows?

R2c.4.

Why would you not want to use NAT for a server?

R2c.5.

What does DHCP accomplish, and how does it work?

R2c.6.

Which of the following could happen to an IP packet under its “best effort” guarantee?

a. A packet may not reach its destination, but with the sender receiving no notification of the failure.
b. Several copies of the same packet may arrive at the destination.
c. A packet may arrive at its destination with some bits tweaked.
d. A packet may arrive at its destination with some additional bytes added to its end.
e. A sequence of packets sent to the same destination may arrive there in a different order.
R2c.7.

Suppose we have the following network configuration.

  • The eth1 port of a router named A is connected to an Internet service provider.
  • 10.0.0.0/16: The eth0 port of three routers A, B, and C are connected to the 10.0.0.0/16 network. A's controller eth0 has address 10.0.0.1; B's controller eth0 has address 10.0.0.2; and C's controller eth0 has address 10.0.0.3.
  • 10.1.0.0/16: The eth1 port of two routers B and D are connected to the 10.1.0.0/16 network. B's controller eth1 has address 10.1.0.1; D's controller eth1 has address 10.1.0.2.
  • 10.2.0.0/16: The eth1 port of router C is connected to the 10.2.0.0/16 network with address 10.2.0.1.
  • 10.3.0.0/16: The eth0 port of router D is connected to the 10.3.0.0/16 network with address 10.3.0.1.

What should C's routing table contain? Each row should indicate a network, a port, and either a gateway address or the word “direct”.

R2c.8.

What is the purpose of the time-to-live field in an IPv4 packet header, and how does it work?

R2c.9.

IPv4 includes support for breaking a packet into fragments as a packet enters a network with a smaller maximum length. In IPv6, support for this is dropped. How, then, does IP allow messages that are too long for one or more networks between it and its destination, when the sender doesn't even know the route the message will take?

Test 2 Review C: Solutions

R2c.1.

On receiving an IP packet whose destination IP address is unknown, a device broadcasts an ARP request to all computers on the same Ethernet, asking who has that IP address. Whichever computer has that address responds directly to the requestor with its MAC address. The requestor caches this IP→MAC address mapping so that it can immediately forward any other packets it receives marked with the same IP address.

R2c.2.

It can have up to 510 computers, addressed from 209.65.56.1 through 209.65.56.255 and from 209.65.57.0 through 209.65.57.254. [209.65.56.0 is reserved for describing the full network, and 209.65.57.255 is reserved for messages that should be broadcast throughout the network.]

R2c.3.

We can dedicate a private-network address (such as 10.x.x.x or 192.168.x.x, reserved for private use) to each device, and the router supporting NAT will dynamically allocate an actual IP address in the block whenever one of the devices sends a message out; and it remembers this mapping so that whenever it receives a message back to that address it can forward it to the device to which the address is allocated. (Obviously the mapping will eventually expire, so that addresses can be reused on different devices.)

As long as the number of active devices never exceeds the number of addresses in the IP block, this should be safe. [If the number of active devices exceeds the IP block size, then a NAT router will have to map multiple devices to some IP addresses, and it will do some remapping of TCP/UDP ports.]

R2c.4.

For a server, clients from outside the network are the ones initiating first contact, so they need a fixed address with which to identify the server; however, hosts for which NAT is used would typically see their IP address change over time. (Secondarily, NAT would not help, since servers typically see a steady stream of traffic, so any NAT allocation would be effectively permanent.)

R2c.5.

DHCP configures computers to match the parameters of the local network automatically, including a distinct IP address for each computer, the network mask, the Internet gateway, and the DNS servers. A computer new to the network broadcasts a request for DHCP configuration information, and the DHCP server responds with the configuration for that computer. To prevent multiple computers getting assigned the same IP address, the DHCP server maintains a set of IP address allocations, each of which expires after a fixed time frame.

R2c.6.

Any of these could happen except (d.).

R2c.7.
networkportgateway
10.0.0.0/16eth0direct
10.1.0.0/16eth010.0.0.2
10.2.0.0/16eth1direct
10.3.0.0/16eth010.0.0.2
defaulteth010.0.0.1
R2c.8.

The time-to-live field ensures that each IP packet eventually disappears from the network, even in the case that it happens to enter an endless cycle of routers, each believing that the way to get the packet to the destination is to send it to the next router in the cycle. As each router forwards a packet to its next destination, it decrements the value in the time-to-live field; but if the time-to-live field already contains 0, it drops the packet rather than forward it to the next destination.

R2c.9.

When a router receives a packet that is too long for its network, it sends back a response saying that the packet was rejected due to length, including information about the maximum length for its network. Upon receiving this response, the sender can break the original message into smaller fragments and then resend. It should get farther along the route, but it may still be too long for a later network, in which case it will split the message further.