How does the ARP protocol work for retrieving the MAC address
corresponding to an IP address (so an IP packet can be sent to
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.
How many computers can receive addresses in a network whose
CIDR address block is 184.108.40.206/23?
What are the valid addresses for these computers?
It can have up to 510 computers,
addressed from 220.127.116.11 through 18.104.22.168
and from 22.214.171.124 through 126.96.36.199.
[188.8.131.52 is reserved for describing the full network,
and 184.108.40.206 is reserved for messages that should be
broadcast throughout the network.]
Why is NAT (network address translation) helpful
for networks with more devices than the address block allows?
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.]
Why would you not want to use NAT for a server?
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.)
What does DHCP accomplish, and how does it work?
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.
Which of the following could happen to an IP packet under its
“best effort” guarantee?
A packet may not reach its destination, but with the
sender receiving no notification of the failure.
Several copies of the same packet may arrive at the
A packet may arrive at its destination with some bits
A packet may arrive at its destination with some
additional bytes added to its end.
A sequence of packets sent to the same destination
may arrive there in a different order.
Any of these could happen except (d.).
Suppose we have the following network configuration.
The eth1 port of a router named A is connected to an Internet service
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.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
What is the purpose of the time-to-live field in an
IPv4 packet header, and how does it work?
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
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?
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