3.4

Configure and verify default routing

Default routes indicate a next hop to take when a route is unknown. They are a catch-all route that will be chosen if there is nothing in the routing table for a destination which is why it is known as the gateway of last resort.

Default routes can be dynamic or static:

Static default routes

Static Default Routes are manually entered on the router by the network administrator:

Pros

Cons

Example:

Router(config)# ip route 0.0.0.0 0.0.0.0 172.16.0.4

Router(config)# ip route 0.0.0.0 0.0.0.0 s1/0

When the next-hop destination is configured as an interface it is preferred over configuring the next-hop destination as an IP address.

Static routes have no metric

The Administrative Distance (AD) of a Static Route is 1. By default, only a directly connected route (with an Administrative Distance/AD of 0).

Floating Static Routes

Floating Static Routes are routes that are defined with an AD higher than the dynamic routing protocol. This means that the route will only be used if the dynamic route drops. As an example, if the IGP being used was EIGRP (which has an AD of 90) you could add a static route with an AD of 91 (Router(config)# ip route 0.0.0.0 0.0.0.0 172.16.0.4 91 which is 1 more than the dynamic route), which would install the static route in the routing table if the dynamic route ever fell out of the table.

Track Objects

Static routes do not monitor reachability which means that the route stays in the table even if the next hop is down. The exception to this rule is when the destination is an interface. Using Track objects and IP SLAs allows you to monitor next hop and amend the routing if the default route is no longer valid/applicable.

Example

Router(config)#ip sla 1
Router(config-ip-sla)# icmp-echo 172.16.0.4
Router(config-ip-sla-echo)# exit
Router(config)# ip sla schedule 1 life forever start-time now
Router(config)# ip route 192.168.0.0 255.255.255.0 172.16.0.4 track 1

Dynamic default routes

These are learned via a dynamic routing protocol and allow you to learn backups in the event the primary fails. Dynamic routing protocol metrics allow selecting the best gateway to exit your network. A default route within a dynamic routing protocol is a redistributed static route from one or more border routers.

Example:

Router(config)# ip route 0.0.0.0 0.0.0.0 172.31.255.1
Router(config)# router ospf 172
Router(config-router)# default-information originate metric 5

In OSPF it is simple as you can just say that the router is the originator of a default route. In EIGRP you have to redistribute the Static Route into the dynamic routing protocol.

Router(config)# ip route 0.0.0.0 0.0.0.0 172.31.255.1
Router(config)# router eigrp 172
Router(config-router)# redistribute static
Router(config-router)# default-metric 10000 1 255 1 1500

If you need a new website or your website needs updating go to https://10kinds.tech.

10 Kinds Technology
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram