cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
650
Views
4
Helpful
7
Replies

Changing BGP AD on routes from specific AS

dlongworth
Level 1
Level 1

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 7

royalblues
Level 10
Level 10

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

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.

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

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

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.

Hi.

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

It's for this problem.

Regards

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

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