10-04-2012 09:29 AM - edited 03-07-2019 09:17 AM
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
10-04-2012 09:50 AM
Did you soft clear the BGP relationship after the config?
Can you check the BGP table and see what is the metric
10-05-2012 03:38 AM
Yes. the issue is seen even after the BGP relationship is reset.
the Metric is 200 since it is an IBGP.
-Vijay
10-05-2012 03:59 AM
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
10-05-2012 06:33 AM
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
10-05-2012 08:34 AM
You can't change the AD using route-map
10-05-2012 08:55 AM
Any other ways of changing it? for a particular route?
-Vijay
10-05-2012 09:28 AM
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
10-06-2012 05:33 AM
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
>> 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
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide