cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
308
Views
3
Helpful
4
Replies

BGP Metric

beta_admin66
Level 1
Level 1

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.

 

4 Replies 4

balaji.bandi
Hall of Fame
Hall of Fame

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

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

@beta_admin66 

 You should apply the route map out direction and restart the bgp

neighbor 10.0.14.2 route-map R4-PRE-METRIC out

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


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

@paul driver   - good catch.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Review Cisco Networking for a $25 gift card