Cisco device uses “default-information originate” statement to generate a default route in OSPF. There are two ways to originate default route by using this command:
1) When you configure “default-information originate” under OSPF process without any argument after this statement, OSPF process will first checks , if any default route is already present in routing table. If a default route is already in present in routing table, such as via static or dynamic protocol, OSPF originate default route. If default route does not exist in routing table, OSPF will not originate default route. This behavior is desirable when there are multiple exist point out of OSPF domain to external network.
2)The behavior can be modified by adding "always" argument to the "default-infomation orginate" statement,which essentially skips the checking for a default route already being installed in the table.
Under OSPF process "redistribute static subnets "command is used to redistribute static routes in OSPF, However static default route (ip route 0.0.0.0 0.0.0.0 192.168.1.2) is not injected in to OSPF topology database.Even if there is a default route in the routing table, by default Cisco's OSPF implementation will not forward it to the rest of the network. This is because OSPF uses a link state algorithm that keeps track of links rather than routes.
To propagate a default route in OSPF, use the default-information originate configuration command:
Example: Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.2 Router(config)#router ospf 100 Router(config-router)#default-information originate metric 10 metric-type 1 Router(config-router)#exit
You can look at the external default route in the OSPF database with the following command:
Router1#sh ip ospf database | in 0.0.0.0
0.0.0.0 192.168.2.1 371 0x80000001 0x0018CA 100
Router1#sh ip ospf database external 0.0.0.0
OSPF Router with ID (10.1.1.2) (Process ID 100)
Type-5 AS External Link States
Routing Bit Set on this LSA LS age: 7 Options: (No TOS-capability, DC) LS Type: AS External Link Link State ID: 0.0.0.0 (External Network Number ) Advertising Router: 192.168.1.1 LS Seq Number: 80000002 Checksum: 0xF366 Length: 36 Network Mask: /0 Metric Type: 1 (Comparable directly to link state metric) TOS: 0 Metric: 10 Forward Address: 0.0.0.0 External Route Tag: 100
In this example, you can see that the default route is advertised by the router 192.168.1.1 with a metric of 10 and a metric type of 1. The metric type in this case refers to whether this route is considered by OSPF to be a Type 1 or Type 2 external route. By default OSPF originate Type 2 external route.
You can also originate Conditional default route in OSPF.Conditional default route in OSPF originate by using route-map in default-information command under router OSPF process. The route map configured in the "default-information originates" command check the existing IP prefixes in the IP routing table.
To know more about OSPF condition route advertisement please read this document:
Hi,I am trying to connect a 9200 switch stack to our existing 3850 core switch via fiber. I have no idea why, but I am unable to get this to work; I'm getting no blinking lights on either end of the connection.I am using a 1GB GLC-SX-MMD at both ends of t...
I'm trying to update a Cisco 6509-E with dual SUP 720 MSFC3 daughterboards. The Policy Feature Card 3 is model WS-F6K-PFC3A. However, when I look at the release notes for 15 code the PFC3A is not referenced. I've had success updating 15 code on the P...
Hi,A customer just bought a few N7K-M348XP-25L so i bring one into my lab to test the basic capabilities (customer request) with traffic generators (spirent and viavi). The issue that i'm experiencing is that the interfaces receive traffic but n...
It seems I have to paths to a network, also physically have two paths, but only one is getting into the route table? CORE-9500-01#show ip bgp 10.20.41.0BGP routing table entry for 10.20.41.0/24, version 13Paths: (2 available, best #2, tab...
The problem occurs after rebooting the switch. The switch comes back up, but I am not able to ping the switch or telnet to the switch.When connecting directly into the console of the switch, the switch is not able to ping out. Shutting down the vlan with ...