Skip to main content

Dynamic Routing Protocols

i need multiple gps apps for some reason

Dynamic routing protocols implement algorithms that use information about the network's topology and metrics to build packet forwarding routes. When there are multiple paths available, it chooses one over the rest. Information about these routes can be shared between routers on the same network. Routers store learned routes from one or more routing protocols on it's IP routing table.

Topology & Metrics

The algorithms used in dynamic routing protocols can be classified as either distance vector or link state protocols. Distance vector protocols use the next hop router, choosing a path that minimizes the hop count to the destination. Link state protocols build a complex map of the network's topology, choosing a path that minimizes a specific cost metric (depending on the type of link state algorithm used).

Convergence

Sometimes two GPS providers agree on a route to a destination. The same applies to dynamic routing protocols. Convergence occurs when two routing protocols agree on the entire network's topology. Routers must be capable of adapting to changes that happen in the network, including:

  • newly added networks
  • router and router interface failures
  • link failures
  • avoiding sinkholes
  • avoiding loops

A network is in a steady state when all the routers share the same copy of the network's topology.

Autonomous Systems (Raw Lesson Content)

As well as the algorithm used to determine the network topology, routing protocols can be classified according to the way they deal with administrative boundaries. A network under the administrative control of a single owner is referred to as an autonomous system (AS). An Interior Gateway Protocol (IGP) is one that identifies routes within an AS. An Exterior Gateway Protocol (EGP) is one that can advertise routes between autonomous systems. An EGP includes a field to communicate the network's autonomous system ID and allows network owners to determine whether they can use paths through another organization's network.

Route Selection

Routers might have multiple entries in their routing tables to similar networks. In those cases, it needs to pick a route to use. Usually, the first determining factor is that longer prefixes are preferred over shorter ones, and this is called longest prefix match. For example:

  • There are two entries for the address 198.51.100.0:
  • 198.51.100.0/24 g0 -> route using g0
  • 198.51.100.0/28 g1 -> route using g1 In the above case, longest prefix match would route the packet to 198.51.100.0 via g1, since it has a longer and more specific prefix.

Each routing protocol supported by a network's router can add a route for any given destination prefix to the routing table. This means that there might be duplicate routes in the routing table, both having an identical prefix (meaning longest prefix match can't choose between then), each from a different routing protocol. However, since different routing protocols use different metrics, they cannot be directly compared to choose a routing path. Instead, routing path precedence is decided by an administrative distance (AD) value. AD values are usually automatically configured by the router's manufacturer, but can be edited as needed.

Source AD value
Local Interface
Directly Connected
0
Static Route 1
Border-Gateway-Protocol 20
Enhanced-Interior-Gateway-Routing-Protocol 90
Open-Shortest-Path-First 110
Routing-Information-Protocol 120
Unknown 255

The router prefers paths with the lowest AD value. A value of 255 means that the route will not use an unknown route. Higher AD routes will be used as a backup route in case a higher route (e.g. a static route) fails.