Chapter 10. Routing Protocols

A routing protocol is a means whereby devices interchange information about the state of the network. The information collected from other devices is used to make decisions about the best path for packets to flow to each destination network.

Routing protocols are applications that reside at layer seven in the OSI model. There are many routing protocols in existence, though only a few are in common use today. Older protocols are rarely used, though some networks may contain legacy devices that support only those protocols. Some firewalls and servers may support a limited scope of routing protocols—most commonly RIP and OSPF—but for the sake of simplicity, I will refer to all devices that participate in a routing protocol as routers.

Routing protocols allow networks to be dynamic and resistant to failure. If all routes in a network were static, the only form of dynamic routing we would be able to employ would be the floating static route. A floating static route is a route that becomes active only if another static route is removed from the routing table. Here's an example:

ip route 0.0.0.0 0.0.0.0 192.168.1.1 1
ip route 0.0.0.0 0.0.0.0 10.0.0.1 2

The primary default route points to 192.168.1.1, and has a metric of 1. The second default route points to 192.168.1.2, and has a metric of 2.

Routes with the best metrics are inserted into the routing table, so in this case, the first route will win. Should the network 192.168.1.0 become unavailable, all routes ...

Get Network Warrior now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.