Chapter 4 part A: IP and Routing basics

The main topic here is how IP works; 4.1 contains an overview of IP itself, 4.2 discusses the simpler mechanisms used by IP routers to communicate and build their routing tables.  Some more advanced material is deferred to "part B" (subnets, supernets, and how the real Internet is built).

Section 4.1

Figure 4.2 on page 249 is an important illustration of how IP is used tojoin different kinds of physical networks (eg Ethernet, FDDI (a kind oftoken ring), and PPP (point-to-point protocol)). The "I" in IP stands forInternetworking, and that's exactly what IP does: interconnects differentphysical LANs into one network.

To do this, IP must provide a global mechanism for addressing and routing, so that packets can actually be delivered from any host to any other host. IP addresses are 32 bits, and space for them is shown in the header diagram on page 252 (Fig 4.3). A more detailed discussion of IP addresses begins on page 262, in section 4.1.3. An essential feature of IP addresses isthat they consist of a "network" part and a "host" part. 4.1.3 lists the"legacy" mechanism for network/host allocation; the current strategy today is discussed later in 4.3.2. The entire point of this network/host separation is that routers list only the network parts of the destination addresses, which saves space. There are currently around 5 million hosts on the Internet, but only 50,000 or so networks. A routing table of 50,000 entries is (just barely) feasible; a table a hundred times larger is not.

In addition to routing and addressing, IP must also support the transmission of packets that may be too large for some intermediate physical LAN. For example, two token rings with a 4K max packet size can send and receive packets of size 4KB, but if they are connected by an intervening Ethernet that can only forward packets of size 1.5KB, something has to give. IP handles this by supporting fragmentation. This is summarized starting on page 253. The IP approach is awkward and inefficient, and IP fragmentation is seldom used (instead, IP tends to choose rather small packet sizes (eg 512 bytes) to avoid it). However, fragmentation is essential conceptually,in order for IP to be able to support large packets without knowing anything about the intervening networks.

Note that IP is a "best effort" system; there are no acknowledgements or retransmissions or any of that stuff. We ship it off, and hope it gets there. Most of the time, it does. 4.1.2 discusses this "service model"at more length.

In section 4.1.4 the text returns to the details of how IP forwarding works.

4.1.5 discusses ARP, the protocol used if a host knows the desired local IP address and needs to find out the Ethernet address.

4.1.6, which you can skip entirely, discusses automatic IP address assignment to hosts, by a DHCP server.

4.1.7 discusses ICMP, the Internet Control Message Protocol. You should at least skim this, because new ICMP messages will be introduced later in the text.

Skip 4.1.8.

Study questions:

Suppose IP didn't support fragmentation, but instead simply required that all participating physical LANs supported a packet size of at least 512 bytes. How would this change things? (This model is actually relatively close to the truth, since fragmentation is avoided so strenuously.)

How does IP forwarding (section 4.1.4) differ from Ethernet switch forwarding? Both are instances of the datagram-forwarding strategy, presented in 3.1.1.

Suppose you wanted to connect two Ethernet LANs, Eth1 and Eth2. You have two routers, one on each LAN, and a Token Ring link joining them. What would you have to do to get a packet from host A on Eth1 to host B on Eth2? Assume everything has to be done "manually". To where does host A's Ethernet actually deliver the packet, initially?

Exercises:

1    IP addresses come one per interface
11  ARP cache algorithms. Hint: the bad case for (a) is when we send a bunch of packets before the first packet's ARP query comes back. For each of the subsequent packets in the bunch, the Ethernet destination address is not in the cache.
27    IP routers v learning bridges. Ignore (a) versus (b) though; just describe the differences generally.

Section 4.2 - IP routing: distance-vector

Technically, forwarding is the name for sending a packet along its path, and routing refers to the process of building and maintaining routing tables. Section 4.2.1 discusses the abstraction used in the rest of this section: we'll ignore hosts and IP networks and simply focus on getting packets from one router to another, destination, router.

4.2.2 discusses the primary "small-scale" algorithm/protocol used today: distance-vector, or RIP (Routing Information Protocol). The normal case proceeds straightforwardly; some abberant cases (and their fixes) are discussed beginning with the last paragraph on page 287. There is some debate today whether or not these fixes have, effectively anyway, completely solved the problem.

Study Questions

How does IP forwarding differ from Ethernet-switch forwarding? How does IP routing differ from the table-learning mechanism used by Ethernet switches? Are there any similarities?  

Exercises

12    Build a routing table using distance-vector
14    Given the distance-vector routing tables, reconstruct the network topology
15    Slightly different distance-vector problem
19    Split horizon technique for avoiding "slow convergence to infinity"