How to configure Administrative Distance

Hello Shivam

To change the AD value of EIGRP use the following command:

R1(config)#router eigrp 12      
R1(config-router)#distance eigrp 100 160

The first value (100) is the configured AD for internal EIGRP, and the second value (160) is the configured AD for external EIGRP.

For OSPF use the following command:

R1(config)#router ospf 1
R1(config-router)#distance ospf external 150 inter-area 80 intra-area 80

Here you can change the external, inter-area, and intra area AD values for OSPF.

To change the AD of a particular static route you can use the following command:

ip route 101010.0 255.255.255.0 192.168.1.5 10

where 10 is the new AD of this particular route.

Now it is useful to change the AD because you can then control how routes enter the routing table. One particular use of changing the AD which can be helpful, is the use of a floating static route. For more information about this, take a look at the following lesson:

You should be careful when configuring ADs. The ADs used should be the same across all your routers so that routing loops are not created.

I didn’t use a loopback interface. In newer Cisco IOS versions, such as 15.X, you will find that all directly connected networks appear twice in the routing table. Once with the C indicator and once with the L indicator. C refers to directly connected networks and includes the whole subnet (/24), while L revers to Local routes, which includes only the IP address of the interface itself, which is why a /32 mask is used.

I hope this has been helpful!

Laz