cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
38295
Views
30
Helpful
18
Replies

How to change the administrative distance for external eigrp routes

farancci
Level 1
Level 1

I am learning network from 2 different interfaces I want to prefer one over the other I am trying to use distance with the access-list command but it is not influencing the distance. I have tried this command for internal routes and works fine but for external eigrp routes it does not seems to be working. Is there is any specific reason? and how to workaround that

18 Replies 18

tekha
Level 3
Level 3

You should be able to manipulate the administrative distance of EIGRP, using the "distance eigrp" command.

E.g.

router eigrp 1234

distance eigrp 91 172

First number being all internal routes, the second being all external routes.

I hope this is what you are looking for.

That will change the distance for all the internal and external routes learned through eigrp, however I want to change the distance for specific route learned through specific source.

Like in this example.

R2(config)# access-list 99 permit 10.1.3.0 0.0.0.255

R2(config)# router eigrp 1

R2(config-router)# distance 91 10.1.2.4 0.0.0.0 99

R2(config-router)# end

However this process does not work with external eigrp routes

Have you tried "distance 91 10.1.2.4 0.0.0.0" on the neighboring routers to see if that works?

I take it you get this route via static or some other routing protocol. Or is it via another EIGRP instance?

I have tried that also.

This route is redistributed from ospf in to eigrp and i m learning through eigrp

Well then I'm all out of ideas concerning the distance.

Aren't there any other way you could prefer routings from one interface over the other.

How about changing the bandwidth on one interface or manipulating the metric?

As far as I know defaul-metric applies to all the routes dont know if there is any other way to influence the metric for specific route. Any idea?

Hello Scott

You can use a few different things to influence eigrp metrics

Interface delay
Offset list
Acls

When using the acl for you route you also need to specify the router which is route is being advertised from

Sh ip eigrp topology x.x.x.x. This will show the advertising router for the route you wish to manipulate


172.16.1.0 0.0.0.255 ( let's say this is you route you need to manipulate)
And 10.1.1.1 is the advertising router


Access-list 101 permit 172.16.1.0 0.0.0.255

router eigrp 100

distance 99 10.1.1.1 0.0.0.0 101

Apologies for being a short post but I am on my hols in Ibiza at present and wife is nagging me to come off csc ASAP!

Res
Paul





Sent from Cisco Technical Support iPad App


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

pengfang
Level 1
Level 1

Hi

I got same issue using distance command in EIGRP for external redistributed routes,it dosen't work.. I would LabR1(192.168.0.3) prefer the D EX routes coming from 192.168.0.1. The IOS is 12.1(3r)T2.

interface FastEthernet0/0

ip address 192.168.0.3 255.255.255.0

duplex auto

speed auto

!

router eigrp 100

network 192.168.0.0 0.0.0.255

distance 165 192.168.0.1 0.0.0.0

no auto-summary

LabR1#sh ip ei topology

IP-EIGRP Topology Table for AS(100)/ID(192.168.0.3)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,

       r - reply Status, s - sia Status

P 192.168.249.0/24, 2 successors, FD is 258816

         via 192.168.0.1 (258816/256256), FastEthernet0/0

         via 192.168.0.2 (258816/256256), FastEthernet0/0

P 192.168.248.0/25, 2 successors, FD is 258816

         via 192.168.0.1 (258816/256256), FastEthernet0/0

         via 192.168.0.2 (258816/256256), FastEthernet0/0

P 192.168.0.0/24, 1 successors, FD is 28160

         via Connected, FastEthernet0/0

P 10.53.192.0/18, 2 successors, FD is 258816

         via 192.168.0.1 (258816/256256), FastEthernet0/0

         via 192.168.0.2 (258816/256256), FastEthernet0/0

LabR1#sh ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

       * - candidate default, U - per-user static route, o - ODR

       P - periodic downloaded static route

Gateway of last resort is 192.168.0.2 to network 0.0.0.0

     192.168.0.0/16 is variably subnetted, 3 subnets, 2 masks

D EX    192.168.249.0/24 [170/258816] via 192.168.0.2, 00:03:34, FastEthernet0/0

                        [170/258816] via 192.168.0.1, 00:03:34, FastEthernet0/0

D EX    192.168.248.0/25 [170/258816] via 192.168.0.2, 00:03:34, FastEthernet0/0

                        [170/258816] via 192.168.0.1, 00:03:34, FastEthernet0/0

C       192.168.0.0/24 is directly connected, FastEthernet0/0

     10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks

D EX    10.53.192.0/18 [170/258816] via 192.168.0.2, 00:03:35, FastEthernet0/0

                       [170/258816] via 192.168.0.1, 00:03:35, FastEthernet0/0

LabR1#

Likewise I see that this was posted three years ago, but still has not been answered

Pend's issue is slightly different. He appears to have two EIGRP sources and wants to prefer one source over the other. For this purpose you wouldn't be messing with AD, you'd want to alter metrics. This can be done one of two ways. The easiest is to modify the metric using an offset-list on the advertising router. i.e on router 192.168.0.2

access-list 1 permit 192.168.248.0 0.0.0.127

access-list 1 permit 192.168.249.0 0.0.0.255

router eigrp 1

offset-list 1 out

IF you don't control the router you'd have to do it with a route-map

access-list 1 permit 192.168.248.0 0.0.0.127

access-list 1 permit 192.168.249.0 0.0.0.255

access-list 2 permit 192.168.0.2 0.0.0.0

route-map mod-metric permit 10

   match ip address 1

  match ip route-source 2

  set metric 10000000

  continue

route-map permit 20

This will increase the composite metric on those routes coming form 192.168.0.2 and therefore prefer routes form 192.168.0.1

**Mark all helpful posts and solutions**

scott.pendleton
Level 1
Level 1

I knwo this is 3 year since the last post, but I came into this seaching for something else and noticed it had not been answered.

           

I understand the issue is that you are receiving the same subnet via eigrp and ospf on the same router and you want to prefer one some routes from eigrp and others from ospf. Well the short answer is that you can't conditionally modify admin distance of externaly learned eigrp routes. You can however can do it for ospf using

access-list 99 permit 10.1.3.0 0.0.0.255

router ospf 1

distance 171 10.1.2.4 0.0.0.0 99

This would make the specific OSPF routes less desireable rather than making the EIGRP routes more desireable. Not exactly the answer to your question, but will acheive the same result.

**Mark all helpful posts and solutions**

Unfortunately, it is not possible to change the AD per prefix for external EIGRP routes. If the route is coming via two different interfaces, an alternative could be to use an offset-list for the external routes, to make them less preferred.

Jose, you are very clear. Thanks for your information.

BTW, I tried offset-list, but offset-list also doesn't affect external routes in EIGRP.

I am finding whether route-map can be used for specific external routes in EIGRP.

Kyujin,

I have tested the offset-list applied inbound and it works for internal and external routes in IOS 15.0(1)M.

Best Regards,

Jose.

That is true. Jose.

I tested. it worked. Thanks for confirming this.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card