How to configure Administrative Distance

Hello,
I work with a bgp network that links all over the world. But now I have been asked to implement redundancy to single bgp linked sites using firewalls. Is it possible to create a redundant path from one location that uses OSPF to another that uses eigrp if the bgp fails. If it is possible can you point me to what I should study. I normally trial out what needs to be done before hand.

Hi Robert,

It is possible but you might have to get a bit creative. You could IP SLA and conditional advertising. Hereā€™s an example I created once for RIP:

RIP Reliable Default Route

You can do something similar for OSPF or EIGRP.

Rene

19 posts were merged into an existing topic: How to configure Administrative Distance

great article Rene!

In your lesson you teach that you can change the admin distance for prefixes in RIP, can you do the same in OSPF? is it isnā€™t possible, what would be the ways that you could do that?

thanks for your help!

Hello Christopher

It is possible to change the AD for any routing protocol within a router. The default values are adjustable. Remember however, that Administrative Distance is a value that is valid only locally. That means that any changes you make to AD will change the way that the specific router handles routing, but will not change how other routers handle routing.

I hope this has been helpful!

Laz

Hi Rene,
How to change the AD of the EIGRP summary route?

Hello Roshan

Using the command ip summary-address eigrp, you are able to create a summary aggregate address. This command allows you to specify the AD used as an additional parameter to the command like so

ip summary-address eigrp as-number ip-address mask [admin-distance]

You can find out more about this command at this Cisco Command Reference documentation.

I hope this has been helpful!

Laz

Hi Guys - Is there any practical application for advertising a route with an admin distance of 255?

Hi Gareth,

Keep in mind you canā€™t ā€œadvertiseā€ an administrative distance. The AD is only local to the router.

A route with an AD of 255 will not be installed in the routing table. One reason why you might want to do this, is to prevent routing loops in redistribution scenarios.

This can get pretty complicated, I have an example here:

Look for the ā€œAdministrative Distanceā€ section, or search in the lesson for ā€œdistance 255ā€.

In a nutshell, in some redistribution scenarios the router installs wrong or unwanted routes which results in routing loops or sub-optimal routing. We can use an AD of 255 to get rid of any unwanted routes.

Hope this helps!

Rene

Thanks Rene - ā€œAD is not advertised and is only local to the routerā€ and ā€œAD of 255 can be used to prevent sub-optimal routing or loops,ā€ are both great nuggets of information! All the best for Christmas - Gareth.

1 Like

Hi Laz ,

Please help me here as i am unable to understand this topic , i dont understand its purpose and configuration level as i m doing fresh start in learning routing protocol .

Rgds
Shivam Chahal

Team ,
Please help in here still no revert from ur side .

Rgds
Shivam

Hello Shivam

A router can learn about a specific route in many different ways. It can learn it because it is directly connected to one of its physical interfaces, because it has been statically assigned, or it can learn it via a routing protocol such as OSPF or EIGRP.

Now if a router learns about a particular destination from multiple sources, there must be a way to determine which source is more reliable.

For example, letā€™s say R1 learns about a route to 10.10.10.0/24 from OSPF and from EIGRP. (Remember, that a router can run multiple routing protocols at the same time). It has to put the route in the routing table, but which of the two protocolsā€™ information will it use? In other words, will it appear like so in the routing table?

O 10.10.10.0/24 [110/2] via 192.168.23.3, 00:09:45, FastEthernet0/1

or like this?

D 10.10.10.0/24 [90/33280] via 192.168.23.3, 00:21:53, FastEthernet0/1

Remember that in each case, the metric used to evaluate how to route to this destination is different, so the resulting routing may be different for each protocol used.

In order for a router to determine how to install this route into the routing table, the administrative distance (AD) is used. In this case, OSFPā€™s AD is 110 and EIGRPā€™s AS is 90. Since EIGRPā€™s AS is smaller, EIGRP wins, so the EIGRP entry is used.

Hereā€™s another one. Imagine that R1 has an interface with an IP address of 10.10.10.1/24. R1 also receives via OSPF, a route to the 10.10.10.0/24 network. Should the router use the directly connected information or the OSPF information to place the network in the routing table? Because the AD of a directly connected network is 0 and that of OSPF is 110, the directly connected information is used because it has a lower AD. So you get the following in the routing table:

      10.10.10.0/24 is variably subnetted, 2 subnets, 2 masks
C        10.10.10.0/24 is directly connected, GigabitEthernet0/1
L        10.10.10.1/32 is directly connected, GigabitEthernet0/1

So AD is used to determine which source of routing information should be used when the same route is learned from two or more sources.

I hope this has been helpful!

Laz

Hi Laz ,
Thanks for ur reply , I am well aware of The requirment of Ad value in routing protocol .
I donā€™t understand how can I change the ad value
Why u take loop back ip address in above figure .

Rgds
Shivam

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

Thanku so much laz , now my point is clear .
Rgds
Shivam

1 Like

Hi Laz ,
How r you ? As per thoroughly read the forum of related post . i Came at this point where these statement is not relate with my understanding of this topic .

ā€œ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**.ā€

that Administrative Distance is a value that is valid only locally. That means that any changes you make to AD will change the way that the specific router handles routing, but will not change how other routers handle routing.

Both statement is contradict , if we change AD value is it routing behavior change or what ?

Could u please explain both statement in detail .

and while change AD Value in router how can we decided what value need to putted here to ???
Any range of AD ?

I have a few question irrespect to this .
1.In what condition where there is a requirment to change Ad value .
2.What is redistribution process ??

Suppose two routing protocols like ospf and eigrp is running on a router and provide information of same prefix or a network as per defination of Administartive distance Router choose best route or path by choosing lower ad value .In that case they will choose eigrp .
Please correct if I am wrong to change Ad value is required because we can get back up path to reach same prefix if some how our primary or best path is fail like in case if available route to reach destination is through eigrp is fail , to not to happen we firstly configured to lowering the ad value of ospf routing protocol in same router
Ospf Ad value <Default eigrp value (90 )

Sir this is a highlighted point ,please clarify it how you decided to put the value in distance command ,have u take any random value after putting you mention that it is inter area or intra area and after changing the value what the router behave do in routing table .

Edited :-

PLEASE SHARE UR REVIEW ,SUPPOSE A ROUTER C RECEIVE THE ROUTE INFORMATION OF SAME PREFIX FROM ROUTER A and ROUTER B , ON BOTH THE ROUTER RIP IS DEPLOYED , NOW WHICH PATH ROUTER C CHOOSE AS BOTH OF THEM HAVE DEFAULT VALUE 120 .
PLEASE CORRECT IF I AM WRONG IS BY CHANGE THE DEFAULT VALUE OF AD OF ANYONE OF ROUTER WE CAN FIND BEST PATH OR THEY PERFORM ANY OTHER MECHANISM .
rgds
Shivam Chahal.

Hello Shivam

The administrative distance is a value that is valid only locally. This value is not communicated to other routers. However, if you have an AD of 10 for OSPF on one router, and an AD of 200 for OSPF on another router, and you are also running EIGRP (AD of 90), then these two routers may use different routing protocols to route to the same networks. This is something that can cause routing loops.

So even though the AD is a local value that only affects the local routing table, it should be manually configured to be the same value across all routers in your topology.

There are many reasons to change the AD. It can be used for floating static route, as mentioned in a previous post, or to make one routing protocol preferable over the other. Even so, in general, the default AD should not be changed unless absolutely necessary for your specific topology.

The AD does not affect redistribution, as it is not a value that is shared among routers. The redistribution between routing protocols will take place in the same way, regardless of the AD. The AD is only used to determine if a route which is learned via two or more sources, will be placed in the local routing table or not.

Letā€™s say you have both OSPF and EIGRP learning about a route to 172.16.5.0/24. EIGRP has a lower AD, so the EIGRP route will be placed in the routing table. If a change to the topology takes place, EIGRP will simply reconverge and find a different route via EIGRP. If no other route is found via EIGRP, only then will the OSPF route be used.

If all routers are using RIP, then the AD plays no role. The AD will only play a role if a route is learned via two or more sources. Even if you change the AD for RIP on any of these routers, it has nothing to compare this AD with. You must have two or more sources in order for the AD to have any meaning.

I hope this has been helpful!

Laz