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:
I have to demonstrate the load balancing between two isp. customer has two mpls connection from different providers, he wants to load balance between two provider, how we can achieve this if im doing on prem deployement of sd-wan controller, customer has ...
I have to demonstrate on prem ztp server, what are the prerequist or how to configure. i have follow the below link:-https://sdwan-docs.cisco.com/Product_Documentation/Getting_Started/Viptela_Overlay_Network_Bringup/04Deploy_the_vBond_Orchestrator/05Start...
Hi all,My experience is not great in the field of Cisco, because I have been working on Microsoft networks for a long time.But I have a question now I download 7.2.1.0218, and I drew the attached diagram and created a number of vlans also I put a computer...
Hello,I have a private vlan set up for some IoT devices (PLCs/HMIs/control servos and motors).This vlan is 192.168.1.0.I have 3 Cisco IE4000 switches connected to a 3560x up-linked to a 3650x access switch. Each of the IE4Ks have about 10-12 devices ...
Hello Everyone!I was trying to configure a Cisco Catalyst 3750G 24 port switch but it is not booting. I tried all possible solutions suggested in google search like flash initialization, pressing the mode button. But the error reads like boot process fail...