cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
787
Views
5
Helpful
8
Replies
Highlighted

Route-map configuration help in BGP

Hi Experts,

I'm trying to set the metric using rout-map but have some problem in making it work. need little assistance.

SW2# sh ip route 11.11.11.0

11.11.11.0/24, ubest/mbest: 11/0

     via 10.10.10.10, [200/0], 00:00:04, bgp-1, internal, tag 1

SW2# sh run bgp

feature bgp

router bgp 1

  router-id 2.2.2.2

  address-family ipv4 unicast

    network 2.2.2.0/24

  neighbor 10.10.10.10 remote-as 1

    update-source loopback1

    address-family ipv4 unicast

      route-map match_11 in

SW2# sh ip prefix-list match_11

ip prefix-list match_11: 1 entries

   seq 5 permit 11.11.11.0/24

SW2# sh route-map match_11

route-map match_11, permit, sequence 10

  Match clauses:

    ip address prefix-lists: match_11

  Set clauses:

    metric 10

SW2#

Thanks,

-Vijay

8 REPLIES 8
Highlighted
Cisco Employee

Did you soft clear the BGP relationship after the config?

Can you check the BGP table and see what is the metric

Highlighted

Yes. the issue is seen even after the BGP relationship is reset.

the Metric is 200 since it is an IBGP.

-Vijay

Highlighted

Hello Vijay,

what you call metric is the administrative distance

via 10.10.10.10, [AD>>200/0<<

the proposed route-map can change the number on the right inside the brackets not that on the left

Hope to help

Giuseppe

Highlighted

oh.. my bad...stupid mistake.

i actually wanted to modify the AD of a particular route. I could not see that option under route-map. is there any option?

Thanks,

-Vijay

Highlighted

You can't change the AD using route-map

Highlighted

Any other ways of changing it? for a particular route?

-Vijay

Highlighted

For particular prefix if you want ot change the administrative distance, you need to use static route

You can change the change the administrative distance of prefixes from a route source using distance command. But this will change the AD of all prefixes from that source.

if the above options doesn't help you, we need to look for alternate options to meet your requirement

Highlighted

Hello Vijay,

in router bgp mode two commands are available

distance

distance bgp

the first one allows to change the distance but only of eBGP routes according to command reference

http://www.cisco.com/en/US/docs/ios-xml/ios/iproute_pi/command/iri-cr-a1.html#GUID-08F67FB3-0062-4888-9ED2-785D17B6B4ED

>> For BGP, the              distance command sets the administrative distance of the External BGP (eBGP) route.   

distance bgp allow to change the AD of eBGP, iBGP and locally generated routes so it is not selective at all

http://www.cisco.com/en/US/docs/ios-xml/ios/iproute_bgp/command/bgp-c1.html#GUID-C9FF92FD-0811-41A0-871C-73926045E641

To be noted BGP routes are held in the BGP table, so if the competition is with another BGP route you can easily choice the preferred one by manipulating a BGP attribute like weight or local preference.

Only BGP best path is proposed to the IP routing table where an AD of 200 is associated to iBGP routes and AD of 20 for eBGP routes.

Also in your case the iBGP route is installed in the IP routing table so I don't see the need to change the route AD.

Hope to help

Giuseppe

Content for Community-Ad