Dynamic Routing

Static routing - manually configure routes to each destination using "IP ROUTE" command. Dynamic routing - use dynamic routing protocol to find best routes to destination networks

As can be seen, without any static routes or dynamic routing protocols, R1's routing table looks like theis below:

Only the connected (Network) and local (Host) routes were automatically added when IP addresses were configured on the interfaces. Learn above !!

Dynamic routing protocols use a similar concept to SPANNING TREE's "ROOT COST" which is used to determine the best path to the ROOT BRIDGE and this is also based on "COST" using "Administrative Distance" and "Metrics"

Fundamentals

  • Routers using dynamic routing advertise the routes they know to other routers

  • They form 'adjacencies' or neighbour relationships to exchange this information

  • If multiple routes to destination are learned, the router determines which is more trustworthy and adds it to the routing table. It uses the "METRIC" of the route (Lower = Better)

Types of Dynamic Routing Protocols

Dynamic Routing Protocols have 2 main categories

Distance Vector Routing Protocols

  • Called Distance Vector because the routers only learn the 'distance' (metric) and 'vector' (direction, the next hop router) of each route

  • DV protocols operate by sending the following to their directly connected neighbours

    • their known destination networks

    • their metric to reach their known destination networks

  • This method of sharing route information is known as "routing by rumour", because the router does not know the network beyond its neighbours. It only knows the information that its neighbours tell it.

  • Every router creates a 'connectivity map" of the network

  • This will be the SAME on each router and to allow this, each router advertises information about its INTERFACES (connected networks - see beginning) to its neighbours. These advertisements are passed along to other routers until all routers in the network develop the same map of the network.

  • Then EACH router INDEPENDENTLY uses this map to calculate the BEST routes to each destination

  • Link state protocols react faster in reacting to changes in the network than Distance Vector protocols. The 2 Link state protocols in use today are OSPF and IS-IS

"Metrics"

Metrics are used to compare the routes learned via the SAME routing protocol !!!!

  • A routers table contains the best route to each destination network it knows about

  • If a router learns 2 different routes to the SAME destination, - which is best???

    • It uses a METRIC value to determine which is best (LOWER=BETTER) and will be added into the routing table

    • Each routing protocol uses a different metric to determine the best route. Sometimes a router will learn 2 or more routes to the same DESTINATION (same network address, same subnet mask or prefix length) with the same METRIC, both will be added into the routing table and traffic will be load balanced over both routes.

In the brackets [110/3] - the first is the OSPF administrative distance followed by the metric (3 in this case) so both routes have been added and load balanced across the gi1/0 and gi0/0 interfaces. This is called ECMP (Equal Cost Multi-Path)

IGP

METRIC

DESCRIPTION

RIP

Hop Count

Each Router in the path counts as ONE hop. The TOTAL METRIC is the total number of hops to the destination. Links of all speeds are equal

EIGRP

Bandwidth and Delay (by default)

By default, the bandwidth of the slowest link in the route and the TOTAL METRIC is the total cost of each link in the route.

OSPF

Cost

The COST of each link is calculated on bandwidth. The TOTAL METRIC is the total cost of each link in the route

IS-IS

Cost

The TOTAL METRIC is the total cost of each link in the route. The COST of each link is NOT automatically calculated by default. All links have a cost of 10 by default

"Administrative Distances"

Different protocols have different metrics, and so cannot be compared. Lets say a company is using TWO Interrior Gateway Protocols, say OSPF AND EIGRP. The OSPF metric to reach the destination network of 192.168.4.0/24 mifght be 30 and for EIGRP its 33280. Which is better? Which route should the router add into its routing table?

The ADMINISTRATIVE DISTANCE (AD) is used to determine which routing protocol is more "trustworthy" and so which route to add into the routing table

The table below is for CISCO devices. Juniper for example use different AD's for its IGP and EGP's.

QUIZ 1

Administrative Distances can be manually changed so that a routing protocol can have precedence over another when normally the latter would be used. The reasoning for doing this is varied but for example a static route (normally having an AD of 1) will be changed to having an AD of 100

R1(config)# do show ip route

As can be seen we have created a static route less preferred than one learned by a dynmic routing protocol. This is called a "floating static route" This route wil be INACTIVE - it wont show up in the routing table unless the route learned by the dynamic routing protocol is removed (ie. the remote router stops advertising for some reason, or an interface failure causes an adjacency with a neighbour to be lost)

QUIZ 2

QUIZ 3

QUIZ 4

QUIZ 5

LAB

Q1

  • OSPF is the dynamic routing protocol on R1 and R2

  • PC1->R1->R2->SRV1

  • It will use R1 and then ISPBR1 to get to 1.1.1.1

Q2

  • R1(config)#ip route 10.0.2.0 255.255.255.0 203.0.113.1 120

  • R2(config)#ip route 10.0.1.0 255.255.255.0 203.0.113.5 120

  • No, the floating static routes do not show up on either routing table.

Q3

Yes, once the port was shut down, it was removed from the routing table and the floating static route was installed into the routuing table - see below

Last updated