Routing fundamentals

Routing takes place on the Network layer (Layer 3) of the OSI model, and on the Network layer of the Network model. While switches are store-and-forward devices that use MAC addresses to identify nodes, routers are also store-and-forward devices, but they use IP addresses to identify nodes. Routers (and Layer 3 switches, for that matter) allow us to move data between networks. A router is also responsible for maintaining information about other routers on the network, which it stores in tables. There are also several different protocols that enable a router to learn the topology of a network.

A router can do everything a switch or hub can, and has more functionality. The obvious difference is that it is capable of handling internetwork traffic, but many routers also have firewall capabilities and the ability to use the shortest path to a node. As our networks become more complex, these features become tremendously useful.

There are two broad categories of routing, and both of them will be discussed in this chapter:

There are several dynamic routing protocols available; not all of them are available with pfSense. They are explained as follows: