Latest

OSPF Configuration Guide : OSPF Distance External Command Behavior

Today I am going to talk about the OSPF (Open Shortest Path First). A well known dynamic routing protocol which is an Link State routing protocol. I already wrote about the basics of OSPF routing protocol in my earlier articles and if you want to have a look on these articles please go through the below mentioned links

OSPF Distance External Command Behavior 

The basic behind this article to understand the significance of the distance OSPF external feature on the local router where it is configured. Let's take an sample topology to have all these configurations.

Fig 1.1- Sample Topology

Four routers NDNA_R1, NDNA_R2, NDNA_R3, NDNA_R4 are connected as shown in the diagram. Routers NDNA_R1, NDNA_R3 and NDNA_R2, NDNA_R4 have Enhanced Interior Gateway Routing Protocol (EIGRP) neighborship on the directly connected interfaces within the subnets 192.168.13.0/30 and 192.168.24.0/30. 

There is an OSPF neighborship between NDNA_R3, NDNA_R4 within the subnet 172.168.34.0/30, routers NDNA_R1, NDNA_R2, NDNA_R3, NDNA_R4 have a loopback with respect to their numbering, for example; R1-1.1.1.1/24 etc. as shown.


Configuration on NDNA_R1 Router
!
router eigrp 1
network 1.1.1.0 0.0.0.255
network 192.168.13.0 0.0.0.3
no auto-summary
!

Configuration on NDNA_R2 Router
!
router eigrp 2
network 2.2.2.0 0.0.0.255
network 192.168.24.0 0.0.0.3
no auto-summary
!

Configuration on NDNA_R3 Router
!
router eigrp 1
network 192.168.13.0 0.0.0.3
distance eigrp 90 90
no auto-summary
!
router ospf 1
log-adjacency-changes
redistribute eigrp 1 subnets
network 172.16.34.0 0.0.0.3 area 0
distance ospf external 10
!
  
Configuration on NDNA_R4 Router
!
router eigrp 2
network 192.168.24.0 0.0.0.3
distance eigrp 180 180
no auto-summary
!
router ospf 1
log-adjacency-changes
redistribute eigrp 2 subnets
network 172.16.34.0 0.0.0.3 area 0
!

NDNA_R1 is advertising its loop back 1.1.1.0/24 to R3, R3 installs this in the RIB as eigrp route with internal AD 90. The eigrp route learnt is redistributed into OSPF 1, as per the understanding this route in ospf database will be an external route which should have an AD of 10 as configured by the command “distance ospf external 10” under OSPF 1. 

Which is not the case, this route is local to the device and learnt via EIGRP 1. The routes received as E1/E2 will have and AD of 10, the route local to R3 will have AD of 90.The AD is changed for all the incoming routes on router R3 which are marked as external E1/E2 routes.