Open In App

Configuring OSPF Default Route Propagation

Last Updated : 13 Nov, 2022
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Pre-requisite: Open Shortest Path First (OSPF) protocol states

Default Route Propagation method supported by OSPF is to learn and redistribute default routes. OSPF requires that the router subcommand default-information originate, which essentially tells OSPF to redistribute default routes found in the routing table, either of the following : 

  1. Static routes
  2. Routes from another routing protocol

Default routing feature when using default-information originate command with OSPF :

  1. Redistribution of any default route (0.0.0.0/0) in the routing table.
  2. Set the metric to cost 1 and the metric type to type E2 by default.
  3. OSPF also allows the use of the “always” keyword, which means that the default is sourced despite whether the default route is in the routing table or not.

OSPF Default Route Propagation Subcommand : 

Router subcommand

Description

default-information originate Originates a type 5 LSA with a link ID of 0.0.0.0 only if the default route already exists in the routing table.
default-information originate always Originates a type 5 LSA with a link ID of 0.0.0.0 regardless of whether the default route is in the routing table of the router

Configuring OSPF Default Route Propagation :

Step 1: Create 2 router topologies in GNS3 as shown in the image below :

Configuring OSPF Default Route Propagation :

 

Step 2: Configure the IPv4 address on the physical interface on the routers :

R1(config)#interface FastEthernet0/0
R1(config-if)#ip address 10.0.0.1 255.255.255.0
R1(config-if)#no shutdown
R2(config)#interface FastEthernet0/0
R2(config-if)#ip address 10.0.0.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#interface fastEthernet 1/0
R2(config-if)#ip address 12.0.0.1 255.255.255.0 
R2(config-if)#no shutdown
R3(config)#interface fastEthernet 0/0 
R3(config-if)#ip address 12.0.0.2 255.255.255.0
R3(config-if)#no shutdown

Step 3: Configure a loopback interface on R1 with an IPv4 address :

R2(config)#interface Loopback0
R2(config-if)#ip address 1.1.1.1 255.255.255.255

Step 4: Configure a loopback  interface on R3 with an IPv4 address :

R3(config)#interface Loopback0
R3(config-if)#ip address 2.2.2.2 255.255.255.255

Step 5: Configuring OSPF process on both routers with the command router OSPF <process-id> :

R1(config)#router ospf 1
R1(config-router)#exit
R2(config)#router ospf 1
R2(config-router)#exit
R3(config)#router ospf 1
R3(config-router)#exit

Step 6: Enabling OSPF on the interfaces with the interface level subcommand ip ospf <process-id> area <area-id> :

R1(config)#interface FastEthernet0/0
R1(config-if)#ip ospf 1 area 0
R1(config-if)#interface Loopback0
R1(config-if)#ip ospf 1 area 0
R2(config)#interface FastEthernet0/0
R2(config-if)#ip ospf 1 area 0
R2(config-if)#interface FastEthernet1/0
R2(config-if)#ip ospf 1 area 0
R3(config)#interface FastEthernet0/0
R3(config-if)#ip ospf 1 area 0
R3(config-if)#interface Loopback0
R3(config-if)#ip ospf 1 area 0

Step 7: Checking the IPv4 routing table on the routers and see the OSPF route entry :

R1#show ip route

 

R2#show ip route

 

R3#show ip route

 

Step 8:  Configuring R1 to always originate and propagate a default route throughout the entire OSPF autonomous system :

R1(config)#router ospf 1
R1(config-router)#default-information originate always
R1(config-router)#exit

Step 9: Verifying whether the default route is being propagated correctly by R1 or not by viewing the routing table of R2 and R3 and looking for the entry of the default route :

R2#show ip route

 

R3#show ip route

 

Step 10: Capturing interface in GNS3 using Wireshark : 

  • To capture the interface in GNS3 :
  1. Make sure that Wireshark is installed on your PC.
  2. Hover over the interface you want to capture and right-click on the interface  
  3. A drop-down menu will appear with some options.
  4. Select the option that says “Start capture”.

 

  • OSPF advertisements :

 

Step 11: Checking the OSPF database on all routers :

R1#show ip ospf database

 

R1#show ip ospf database external 

 

R2#show ip ospf database

 

R2#show ip ospf database external 

 

R3#show ip ospf database

 

R3#show ip ospf database external 

 



Next Article

Similar Reads

three90RightbarBannerImg
  翻译: