IP Basics - Routing 101

IP basics: Routing 101

What's an IP subnet? What's a physical media-type? What's a media-protocol?

These are all questions first of terminology, but also of layers. Networking can be discussed in terms of layers and how each layer acts as an interface, performing communication between the layer above and below it. This is done for numerous reasons, but I believe the most important are reuse and flexibility. It is useful to be able to differentiate between the layers and to agree on a common terminology to be able to talk clearly about building networks and routers. The most common taxonomy for networks is defined by the OSI networking model. If you are not familiar with the OSI networking model, see the first chapter of Interconnections by Radia Perlman. The complete reference can be found in the bibliography. To get started with routing, you don't need to memorize all seven layers of the model. Just understand the concepts in the following definitions:

  • Physical Medium -- in most cases a wire, or perhaps an RF link. It is generally associated with a specific physical interface. As an example, think of a normal serial cable used to connect a DB9 serial port to a DB25 external modem. 
  • Physical Protocol -- the protocol (normally electrical or optical) which runs on the physical medium. RS–232 is an example for a serial cable, or IEEE 802.3 for Ethernet.
  • Link-Layer Protocol -- the protocol used to negotiate a connection (or a link) between two machines sharing the same physical medium. Examples are PPP, HDLC, Frame Relay, and Ethernet. The link-layer does not dictate which networking protocol you run on top of it, but it does need to know about it. This is why you might find different PPP implementations for IP and IPX.
  • Networking Protocol -- the protocol which dictates addressing of nodes and packets, and the way that packets are routed between endpoints. Examples are IP and IPX.
  • Transport Protocol -- the protocol which interfaces the networking protocol to the operating system and processes within it (also known as an end-to-end protocol). In the case of TCP/IP, there are multiple protocols which comprise the protocol suite—namely, TCP and UDP.
  • Application Protocol -- the level of protocol created by applications programmers, often where users get involved. They invoke commands such as telnet, which define a sequence of TCP transactions, which in turn are realized through a series of IP events (which define transmissions between Ethernet hosts, which in turn result in electromagnetic waveforms propagating through a piece of twisted-pair). Other application protocols are NFS, HTTP, NTP, NNTP, SNMP, SMTP, FTP, and many others.

Figure 2.1: Layered Network Model
 

Figure 2.1 illustrates each layer encapsulating the layer above it. When everything is configured properly, the different layers work together as a cohesive whole, and the user doesn't even think about these things. In contrast, you need to understand what's happening at the different layers to be able to effectively design and trouble-shoot your network. As an example, not being able to make a connection to a remote machine does not necessarily mean the network's "down," at least not if the problem is with the user's DNS configuration. By correctly assessing the level at which the problem exists, you eliminate the need to test other layers, whose problems are merely symptomatic of the root problem. The end result of a good understanding is less time spent on wild goose chases.