Category Archives: Static Routing

ip route 0.0.0.0 0.0.0.0

ip route 0.0.0.0 0.0.0.0

Creating a static route to network 0.0.0.0 0.0.0.0 is another way to set the gateway of last resort on a router. As with the ip default-network command, using the static route to 0.0.0.0 is not dependent on any routing protocols. However, ip routing must be enabled on the router.

Note: IGRP does not understand a route to 0.0.0.0. Therefore, it cannot propagate default routes created using the ip route 0.0.0.0 0.0.0.0 command. Use the ip default-network command to have IGRP propagate a default route.

EIGRP propagates a route to network 0.0.0.0, but the static route must be redistributed into the routing protocol.

In earlier versions of RIP, the default route created using the ip route 0.0.0.0 0.0.0.0 was automatically advertised by RIP routers. In Cisco IOS Software Release 12.0T and later, RIP does not advertise the default route if the route is not learned via RIP. It may be necessary to redistribute the route into RIP.

The default routes created using the ip route 0.0.0.0 0.0.0.0 command are not propagated by OSPF and IS-IS. Additionally, this default cannot be redistributed into OSPF or IS-IS using the redistribute command. Use the default-information originate command to generate a default route into an IS-IS or OSPF routing domain. For more detailed information on behavior of default routes with OSPF, refer to How Does OSPF Generate Default Routes?

Configure BGP to advertise a Default Route on Cisco Nexus Switches

Redistribute and Default-Information Originate Commands

The redistribute command configured under the BGP process injects all the routes that exist in the Routing Table by a specific source routing protocol (and permitted by a route-map) in the BGP RIB with the exception of the default route.

To additional allow the default route to be installed from the source routing protocol in the BGP RIB, the command default-information originate is required.

Once in the BGP RIB, the default route is advertised to all BGP neighbors unless specifically denied by an outbound filter configured per neighbor.

BGP configuration section shows redistribute eigrp and default-information originate in place.

Note: Before NX-OS version 6.2(2) for Nexus 7000 series and version 6.0(2)N3(1) for Nexus 5000 series, the command default-information originate was not required. Default route used to be also injected in BGP RIB only by the redistribute command.

https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/213952-configure-bgp-to-advertise-a-default-rou.html

https://www.cisco.com/c/en/us/support/docs/ip/routing-information-protocol-rip/16448-default.html

Static route, IPSLA & Tracking

track 1 interface FastEthernet0/0 line-protocol

event manager applet Static-DOWN
event track 1 state down
action 5.0 cli command “enable”
action 5.1 cli command “conf t”
action 5.2 cli command “no ip route 192.168.1.0 255.255.255.252 10.1.1.2”
action 5.3 cli command “end”

event manager applet Static-UP
event track 1 state up
action 5.5 cli command “enable”
action 5.6 cli command “conf t”
action 5.7 cli command “ip route 192.168.1.0 255.255.255.252 10.1.1.2”
action 5.8 cli command “end”

IP SLA is the way to go. I use it often. Configure an icmp IPSla towards the other end of the p2p. Then configure your static route with the “track” keyword. This will drop the static route if the IP SLA goes down .The configuration would look something like below.

IOS:
ip sla 1
icmp-echo x.x.x.x <- IP you want to ping
timeout 1000
frequency 1
ip sla schedule 1 life forever start-time now
!
track 1 rtr 1 reachability
ip route x.x.x.x x.x.x.x x.x.x.x track 1

XR:
ipsla
operation 400
type icmp echo
source address x.x.x.x
destination address x.x.x.x
frequency 15
schedule operation 400
start-time now
life forever

track 400
type rtr 400 reachability

router static
address-family ipv4 unicast
63.217.25.200/29 te2.97 x.x.x.x track 400
63.216.144.48/28 te2.97 x.x.x.x track 400