10-20-2024 09:51 AM
Hi,
I set up a LAB with 4 routers using BGP. I have a prefix list and a route map for two networks and linked them to the BGP configuration (to change the metric to 90)
Why is Metrix 90 displayed for all routes? The metric should only be changed for 1.1.1.1/32 and 192.186.0.0/20.BGP, Metric,
router bgp 4
bgp log-neighbor-changes
network 4.4.4.4 mask 255.255.255.255
network 201.10.1.0
network 201.10.2.0
network 201.10.3.0
network 201.10.4.0
aggregate-address 201.10.0.0 255.255.248.0 summary-only
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Loopback0
neighbor 1.1.1.1 next-hop-self
neighbor 6.6.6.6 remote-as 6
neighbor 6.6.6.6 update-source Loopback0
neighbor 6.6.6.6 next-hop-self
neighbor 10.0.14.2 remote-as 1
neighbor 10.0.14.2 route-map R4-PRE-METRIC in
neighbor 10.0.46.2 remote-as 6
!
ip prefix-list R4-METRIC seq 5 permit 1.1.1.1/32
ip prefix-list R4-METRIC seq 10 permit 192.168.0.0/20
!
route-map R4-PRE-METRIC permit 10
match ip address R4-METRIC
set metric 90
!
route-map R4-PRE-METRIC permit 20
R4#show ip bgp
BGP table version is 17, local router ID is 201.10.4.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, x best-external, f RT-Filter
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 10.0.14.2 90 0 1 i
* 10.0.46.2 0 6 5 1 i
*> 4.4.4.4/32 0.0.0.0 0 32768 i
* 5.5.5.5/32 10.0.14.2 90 0 1 5 i
*> 10.0.46.2 0 6 5 i
* 6.6.6.6/32 10.0.14.2 90 0 1 5 6 i
*> 10.0.46.2 0 0 6 i
* 10.20.0.0/19 10.0.14.2 90 0 1 5 6 i
*> 10.0.46.2 0 0 6 i
* 172.16.0.0/21 10.0.14.2 90 0 1 5 i
*> 10.0.46.2 0 6 5 i
*> 192.168.0.0/20 10.0.14.2 90 0 1 i
* 10.0.46.2 0 6 5 1 i
*> 201.10.0.0/21 0.0.0.0 32768 i
s> 201.10.1.0 0.0.0.0 0 32768 i
s> 201.10.2.0 0.0.0.0 0 32768 i
Network Next Hop Metric LocPrf Weight Path
s> 201.10.3.0 0.0.0.0 0 32768 i
s> 201.10.4.0 0.0.0.0 0 32768 i
Thank you.
10-20-2024 10:09 AM
how is your network looks like - after changing the metric did you reset the BGP soft reset to take effective with neighbors.
clear ip bgp * soft or clear ip bgp * soft in
10-20-2024 11:28 AM
You should apply the route map out direction and restart the bgp
neighbor 10.0.14.2 route-map R4-PRE-METRIC out
10-21-2024 12:11 AM
Hello
Your RM ISN'T match on the PF as such it setting all routes to 90
it should be set:
Example:
route-map R4-PRE-METRIC permit 10
match ip address prefix-list R4-METRIC
set metric 90
route-map R4-PRE-METRIC permit 20
10-21-2024 12:33 AM
@paul driver - good catch.
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