Dynamic Routing

When you configure a static route on a node, it is added to a table of routes, and marked as either a static or manually configured route). It is also possible if the node is a router (not a host) for routes to be added to this routing table dynamically, by various routing protocols. Regardless of how routes are added to this table, a gateway uses this routing table to decide which interface to forward packets to.

Some routing protocols support on IPv4 (RIPv1, RIPv2, OSPFv2, BGP4). Some support only IPv6 (RIPng, OSPFv4). Some support both IPv4 and IPv6 (ISIS and BGP4+).

An Autonomous System is collection of many networks under a common management. It is identified by an AS Number. Originally AS Numbers were 16 bits long (for a maximum of 65,536 AS networks). Just like IPv4, we are running out of 16 bit AS Network Numbers, so now there are also 32 bit AS Numbers (which allow up to 4.3 billion AS Networks). Fortunately, only very senior network engineers (and not many of them) have to know about and work with these, so unlike the transition from IPv4 to IPv6, this transition is going very smoothly. The AS Networks are like the “countries” of the Internet. Traveling between countries is more difficult and requires different procedures than just traveling within a country.

Some protocols are Interior Gateway Routing Protocols (IGRP). Examples of this are RIP, OSPF and ISIS. These are used to route packets from one node to another inside of Autonomous Systems (AS Networks). Other routing protocols are Exterior Gateway Routing Protocols (EGRP). Examples of these are BGP and BGP4+. These route packets between Autonomous Systems.

Older routing protocols (like RIP and RIPng) use a distance-vector routing algorithm. More recent protocols (like OSPF) use a link-state routing algorithm. These are two very different ways of building a model of where the other routers are in a network. The link-state algorithms have superior characteristics.

RIP – Routing Information Protocol

RIP is specified in RFC 1058, “Routing Information Protocol”, June 1988. However, the algorithm used (Bellman-Ford) was the very first routing protocol for ARPANET, going back to 1967. This version is now known as RIPv1.

RIPv1 is an Interior Gateway Routing Protocol, suitable for routing inside a moderate sized Autonomous System. It uses the older distance vector routing algorithm. It supports only IPv4. It was designed based on Classful allocation (Classes A, B and C, pre-CIDR). There is no support for router authentication (making RIP vulnerable to certain hacking attacks). The maximum hop count is 15, which limits the maximum sized network it can handle. Because RIPv1 does not handle CIDR, it cannot be used on the IPv4 Internet today.

An enhanced version of RIP (RIPv2) was specified in RFC 2453, “RIP Version 2”, November 1998. This added the ability for RIP to carry subnet information in order to support networks with CIDR allocated blocks (variable length subnet masks). It also adds router authentication based on the MD5 message digest algorithm.

RIPv1 and RIPv2 can be used only for the routing of IPv4 packets, and run only over IPv4. RIPv1 is obsolete, but RIPv2 can run in parallel with RIPng in a single dual-stack network (there is no conflict between them).

RIPng – RIP Next Generation

RIPng is specified in RFC 2080, “RIPng for IPv6”, January 1997.

Like RIPv1 and RIPv2, RIPng is an Interior Gateway Routing Protocol. It is suitable for routing inside of a moderate sized Autonomous System. It uses the older distance-vector routing algorithm.

Like RIPv2, RIPng supports variable length subnet masks. There is no support for router authentication (making it vulnerable to certain hacker attacks). Like the other RIP variants, it has a maximum hop count of 15, which limits the maximum sized network it can handle.

RIPng supports only the routing of IPv6 packets, and runs only over IPv6. It can co-exist with RIPv2 on a single dual-stack network (there are no conflicts).

OSPF – Open Shortest Path First Routing Protocol

OSPF is an Interior Gateway Routing Protocol. It is suitable for routing in any sized Autonomous System. Unlike RIP, it uses the newer Link-State routing algorithm. Every route supporting OSPF in a given AS Network builds the same model of the routing environment (routing table). Routers distribute this information to each other through flooding.

OSPFv2 is specified in RFC 2328, “OSPF Version 2”, April 1998. It should really be called “OSPF for IPv4”. It can only route IPv4 packets, and it runs only over IPv4.

OSPFv3 was specified in RFC 2740, “OSPF for IPv6”, December 1999. It has been replaced with RFC 5340, “OSPF for IPv6”, July 2008.

OSPFv2 and OSPFv3 can co-exist in a single dual-stack network. There is no conflict between them.

BGP4 – Border Gateway Protocol 4

BGP4 was originally specified in RFC 1652, “A Border Gateway Protocol 4 (BGP-4)”, July 1994. This was replaced with RFC 1771, “A Border Gateway Protocol 4 (BGP-4)”, March 1995. This in turn was replaced by RFC 4271, “A Border Gateway Protocol 4 (BGP-4)”, January 2006. This version is still current.

Unlike the protocols described above, BGP4 is an Exterior Gateway Routing Protocol. it is suitable for exchanging routing information between, not within Autonomous Systems. BGP4 is used only for routing IPv4 traffic, and runs only over IPv4. It has support for CIDR.

BGP4+ was originally specified in RFC 2283, “Multiprotocol Extensions for BGP-4”, February 1998. This was replaced with RFC 2858, “Multiprotocol Extensions for BGP-4”, June 2000. This was in turn replaced with RFC 4760, “Multiprotcol Extensions for BGP-4”, January 2007. This version is still current.

This protocol is widely known as “BGP4+”, but that nickname does not appear anywhere in the RFC. It is not a separate protocol from BGP4, but a set of extensions to the basic BGP4 protocol. BGP4+ adds support for IPv6, IPX, L3VPN, etc.

If you are running BGP4+ you are already running BGP4, because all of its functionality is included as a proper subnet.

Only very senior network engineers typically work with BGP4 or BGP4+. BGP routers tend to be fairly powerful, expensive devices. They are like the Internet equivalent of Central Switches in a telephone company.

The CNE6 Silver courseware only covers this brief introduction to dynamic routing protocols. Network Engineer Gold goes into more detail.