cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
342
Views
12
Helpful
6
Replies

Need help understanding some commands

burleyman
Level 8
Level 8

I am still learning some commands and what they do. Here is a confiruation on one of our routers. Can someone explain lin by line what they accomplish?

route-map p2p-weight permit 10

continue 20

set weight 4000

!

route-map p2p-weight permit 20

set metric 10

!

route-map mpls-weight permit 10

continue 20

set weight 6000

!

route-map mpls-weight permit 20

set metric 10

Thanks,

Mike

6 Replies 6

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Mike,

these two route-maps are thought to be used with BGP to manipulate some BGP attributes:

first route-map is made of two blocks or clauses 10 and 20.

first block set BGP weight to 4000 (default value is 0 for routes coming from other routers)

the continue 20 command is a sort of goto label that tells to go to block 20

so then block 20 is executed and the end result is that all routes have the weight set to 4000 and MED (BGP metric) set to 10 (here the default value is simply unset or is a copy of an IGP metric)

the same schema is applied to the second route-map

you can expect to see in BGP config lines like:

neigh x.x.x.x route-map p2p-weight in|out

Hope to help

Giuseppe

Jon Marshall
Hall of Fame
Hall of Fame

Mike

In addition to Giuseppe's post -

metric is used to influence incoming traffic from BGP neighbors so you are advertising this to EBGP peers.

weight is only local to the actual router.

So under your "router bgp configuration do you have neighbor statements that are both in and out for the same route-map ?

Jon

This is what I have...

router bgp 65014

bgp router-id 10.20.1.225

bgp log-neighbor-changes

neighbor 10.115.123.53 remote-as 65000

neighbor 206.115.123.53 remote-as 65000

maximum-paths 2

address-family ipv4

neighbor 10.115.123.53 activate

neighbor 10.115.123.53 soft-reconfiguration inbound

neighbor 10.115.123.53 route-map mpls-weight in

neighbor 206.115.123.53 activate

neighbor 206.115.123.53 soft-reconfiguration inbound

neighbor 206.115.123.53 distribute-list 10 out

neighbor 206.115.123.53 route-map mpls-weight in

maximum-paths 2

no auto-summary

no synchronization

network 10.20.1.0 mask 255.255.255.0

network 10.115.123.52 mask 255.255.255.252

network 206.115.123.52 mask 255.255.255.252

aggregate-address 10.20.0.0 255.255.0.0 summary-only

exit-address-family

!

address-family nsap

maximum-paths 2

no synchronization

exit-address-family

Mike

Hello Mike,

the same route-map mpls-weight is applied to both neighbors in address-family ipv4 (unicast)

and also there is maximum-paths 2

this router is going to install in routing table two paths for each destination if the two neighbors provide the same set of routes (or at least for routes in common)

you can check with sh ip bgp X and sh ip route X

where X is one prefix learned in BGP.

Hope to help

Giuseppe

So who ever put this in are they tring to do load balancing? or something else? What would happen if they were removed?

Thanks for your help,

Mike

Hello Mike,

yes the idea is to implement load-balancing between these two neighbors preferring them to other (if other ones exist)

If there no other neighbors if you remove the neigh x.x.x.x route-map mpls-weight in there will be no change on the local router.

the setting of MED (metric) could however have an impact if there are other eBGP neighbors on other routers of this site/domain.

Hope to help

Giuseppe

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: