Changing BGP AD on routes from specific AS

Unanswered Question
Aug 19th, 2008
User Badges:

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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (1 ratings)
Loading.
royalblues Wed, 08/20/2008 - 05:52
User Badges:
  • Green, 3000 points or more

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

dlongworth Sun, 09/07/2008 - 17:35
User Badges:

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.

Edison Ortiz Sun, 09/07/2008 - 18:16
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

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


dlongworth Sun, 09/07/2008 - 18:47
User Badges:

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


Edison Ortiz Sun, 09/07/2008 - 20:01
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

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.

mrosasco Mon, 09/08/2008 - 04:17
User Badges:

Hi.

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

It's for this problem.

Regards


sdoremus33 Wed, 09/10/2008 - 08:01
User Badges:
  • Bronze, 100 points or more

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

Actions

This Discussion