Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

Changing BGP AD on routes from specific AS

Hi All.

Is it possible to change the Admin Distance on eBGP routes (using 'Distance' cmd, I guess), but only from a specific AS?

IOS 12.2SX

I guess what I'm looking for is the Distance cmd to reference a route-map instead of an ACL.

Cheers

David

7 REPLIES

Re: Changing BGP AD on routes from specific AS

David,

What is the need for changing the AD for Ebgp for some specific routes?

If you are trying to do this to modify routing preference, then there are lot of other attributes which you can use with BGP

Narayan

New Member

Re: Changing BGP AD on routes from specific AS

Hi Narayan,

I have a preference for certain EIGRP routes to be chosen over their BGP equivalents but it'd be simpler if I could reference the origination AS instead of a few hundred routes.

Hall of Fame Super Bronze

Re: Changing BGP AD on routes from specific AS

In that case you can do it under EIGRP but only for internal EIGRP routes, you can't do it under the BGP routing process.

See a sample in my lab:

I want to make 10.1.2.2 an EIGRP route:

Rack1R1#sh ip route

Codes: C - connected, S - static, 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

i - IS-IS, su - IS-IS summary, 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 not set

192.168.12.0/30 is subnetted, 1 subnets

C 192.168.12.0 is directly connected, Serial1/0

20.0.0.0/32 is subnetted, 1 subnets

B 20.1.2.2 [20/0] via 192.168.12.2, 00:03:41

10.0.0.0/32 is subnetted, 1 subnets

B 10.1.2.2 [20/0] via 192.168.12.2, 00:03:41

150.1.0.0/32 is subnetted, 1 subnets

B 150.1.2.2 [20/0] via 192.168.12.2, 00:03:41

____________________________

access-list 1 permit 10.1.2.2

router eigrp 1

network 192.168.12.1 0.0.0.0

distance 19 192.168.12.2 0.0.0.0 1

no auto-summary

_______________________________________

Rack1R1#sh ip route

Codes: C - connected, S - static, 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

i - IS-IS, su - IS-IS summary, 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 not set

192.168.12.0/30 is subnetted, 1 subnets

C 192.168.12.0 is directly connected, Serial1/0

20.0.0.0/32 is subnetted, 1 subnets

B 20.1.2.2 [20/0] via 192.168.12.2, 00:03:51

10.0.0.0/32 is subnetted, 1 subnets

D 10.1.2.2 [19/2297856] via 192.168.12.2, 00:00:07, Serial1/0

150.1.0.0/32 is subnetted, 1 subnets

B 150.1.2.2 [20/0] via 192.168.12.2, 00:03:51

___________________________________

HTH,

____

Edison.

Please rate helpful posts

New Member

Re: Changing BGP AD on routes from specific AS

That does help, thank you, but unfortunately I do need it also for EIGRP external routes.

Hall of Fame Super Bronze

Re: Changing BGP AD on routes from specific AS

Hi David,

Too bad, this can only be done with internal EIGRP routes.

You can't use the distance command within a route-map for BGP routes.

__

Edison.

New Member

Re: Changing BGP AD on routes from specific AS

Hi.

you can use the network backdoor command, under bgp, for this routes.

It's for this problem.

Regards

New Member

Re: Changing BGP AD on routes from specific AS

Perhaps you could use the network backdoor command to influence the route

310
Views
4
Helpful
7
Replies
CreatePlease to create content