cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1278
Views
0
Helpful
5
Replies

Changing weight for MP-BGP

walter berris
Level 1
Level 1

Hi guys, I'm trying to manipulate a path selection in our IP/MPLS network. How can i change the weight on the local PE? or is it better for me to change the weight of that route on the other PE by using a export route-map? I had already tried changing the other route weight with the commands below, but when i ran the sh ip bgp vpnv4 vrf command it still showed the weight as 0.

!

access-list 46 permit 172.20.101.160 0.0.0.7

!

route-map IPBH_CHANGE_WEIGHT_OM permit 10

match ip address 46

set weight 32770

!

ip vrf 4G_BH_BMP01_REGION10_OM

export map IPBH_CHANGE_WEIGHT_OM

!

BMP-DIST-MPE01#sh ip bgp vpnv4 vrf SP_OMRAN_MPLS 172.20.101.72

BGP routing table entry for 10269:1010191:172.20.101.72/29, version 314907

Paths: (3 available, best #3, table SP_OMRAN_MPLS)

  Not advertised to any peer

  Local, imported path from 10269:1010186:172.20.101.72/29

    10.1.41.2 (metric 4) from 10.1.41.2 (200.32.198.121)

      Origin incomplete, metric 1, localpref 100, valid, internal

      Extended Community: RT:10269:1010190

        OSPF DOMAIN ID:0x0005:0x000000030200 OSPF RT:0.0.0.3:2:0

        OSPF ROUTER ID:172.20.35.10:0

      mpls labels in/out nolabel/35095

  Local, imported path from 10269:1010219:172.20.101.72/29

    10.1.41.4 (metric 3) from 10.1.41.2 (200.32.198.121)

      Origin incomplete, metric 1, localpref 100, valid, internal

      Extended Community: RT:10269:1010229

        OSPF DOMAIN ID:0x0005:0x000000030200 OSPF RT:0.0.0.3:2:0

        OSPF ROUTER ID:172.20.35.18:0

      Originator: 10.1.41.4, Cluster list: 200.32.198.121

      mpls labels in/out nolabel/190

  Local, imported path from 10269:1010247:172.20.101.72/29

    172.20.35.29 (via 4G_BH_BMP01_REGION3_OM) from 0.0.0.0 (10.1.41.6)

      Origin incomplete, metric 1, localpref 100, weight 32768, valid, external, best

      Extended Community: RT:10269:1010256

        OSPF DOMAIN ID:0x0005:0x000000030200 OSPF RT:0.0.0.3:2:0

        OSPF ROUTER ID:172.20.35.30:0

Network          Next Hop            Metric LocPrf Weight Path

* i172.20.101.72/29 10.1.41.2                1    100      0 ?

* i                 10.1.41.4                1    100      0 ?

*>                  172.20.35.29             1         32768 ?

BMP-DIST-MPE01#sh ip bgp vpnv4 vrf SP_OMRAN_MPLS             

BGP table version is 1153539, local router ID is 10.1.41.6

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

Origin codes: i - IGP, e - EGP, ? - incomplete

BMP-DIST-MPE01#sh ip bgp vpnv4 vrf SP_OMRAN_MPLS 172.20.101.72
BGP routing table entry for 10269:1010191:172.20.101.72/29, version 314907
Paths: (3 available, best #3, table SP_OMRAN_MPLS)
  Not advertised to any peer
  Local, imported path from 10269:1010186:172.20.101.72/29
    10.1.41.2 (metric 4) from 10.1.41.2 (200.32.198.121)
      Origin incomplete, metric 1, localpref 100, valid, internal
      Extended Community: RT:10269:1010190
        OSPF DOMAIN ID:0x0005:0x000000030200 OSPF RT:0.0.0.3:2:0
        OSPF ROUTER ID:172.20.35.10:0
      mpls labels in/out nolabel/35095
  Local, imported path from 10269:1010219:172.20.101.72/29
    10.1.41.4 (metric 3) from 10.1.41.2 (200.32.198.121)
      Origin incomplete, metric 1, localpref 100, valid, internal                                Would be preferred route....
      Extended Community: RT:10269:1010229
        OSPF DOMAIN ID:0x0005:0x000000030200 OSPF RT:0.0.0.3:2:0
        OSPF ROUTER ID:172.20.35.18:0
      Originator: 10.1.41.4, Cluster list: 200.32.198.121
      mpls labels in/out nolabel/190
  Local, imported path from 10269:1010247:172.20.101.72/29
    172.20.35.29 (via 4G_BH_BMP01_REGION3_OM) from 0.0.0.0 (10.1.41.6)
      Origin incomplete, metric 1, localpref 100, weight 32768, valid, external, best
      Extended Community: RT:10269:1010256
        OSPF DOMAIN ID:0x0005:0x000000030200 OSPF RT:0.0.0.3:2:0
        OSPF ROUTER ID:172.20.35.30:0

BMP-DIST-MPE01#sh ip bgp vpnv4 vrf SP_OMRAN_MPLS             
BGP table version is 1153539, local router ID is 10.1.41.6
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
Origin codes: i - IGP, e - EGP, ? - incomplete

Network          Next Hop            Metric LocPrf Weight Path
* i172.20.101.72/29 10.1.41.2                1    100      0 ?
* i                 10.1.41.4                1    100      0 ?                                       did not export the weight change to 32770
*>                  172.20.35.29             1         32768 ?

THANKS in advance.

5 Replies 5

seems the network defined in acl 46 is  incorrect

you gave defined access-list 46 permit 172.20.101.160 0.0.0.7 but it should be

172.20.101.72/29

few more info

what is the last mile routing protocol you are using between your CE and PE may be i can suggest something else if i have complete config

Hi Shirshendu, indeed the acl is incorrect, it should be 172.20.101.72, not 172.20.35.24. I have attached a drawing with the scenario, this is a redundant ring using ospf. There is a VRF configured on all 3 PEs and they are imported into the main VRF which is configured on the BMP PE. The network is up and working, i want to make the middle PE the best route for the 172.20.101.72 network. Presently it preferr BMP-DIST_MPE01 because it has a higher weight which is the default 32768. I know it chose that because 1. Its directly connected and 2. BGP selection WEIGHT. What i want to know is how to manipulate the weight by either;

1. change the weight of the route on the local PE to 0 or,

2. change and export the weight on the MPE02 to a higher value. (presently i have it configured with 32770 vlaue but it is not propagating in the BGP table as shown in the image, it stays at 0)

NOTE: i have not restart the BGP session. How can i clear MP-BGP session?

Thanks again for your help.

Try changing your ACL and clear ip bgp ..

Clear has to be done per neighbour or AS basis there is nothing to segregate as BGP or MBGP neighbours while clearing

However soft reset can be allowed on per neighbour whch will refresh the filters without beaking the neighbourship

To use feature of soft reset soft  infound have to be enable on the neighbour command under BGP

If this  dont work i do have some doubt yet.  I can sugget an alternate way

access-list 46 permit 172.20.101.72 0.0.0.7

!

route-map IPBH_CHANGE_WEIGHT_OM permit 10

match ip address 46

set local preference 150

!

route-map IPBH_CHANGE_WEIGHT_OM permit 20

!

ip vrf 4G_BH_BMP01_REGION10_OM

export map IPBH_CHANGE_WEIGHT_OM

**Please rate My solution if it helps You*****

Hello Walter,

weight is not a BGP or MP BGP attribute,  it is a local parameter that lives within a single router and  cannot be exported to any other device.

This is not a question of BGP vs. MP BGP.

In order to make the desired change you need a route-map applied inbound  in the vpnv4 address-family of the leftmost PE named  BMP-DIST-MPE01.

The route-map will be applied to the MP BGP session to the central PE and will rise the weight to a value greater then 32768

route-map RISE-WEIGHT permit 10

match ip address 46

set weight 40000

router bgp XX

address-family vpnv4

neigh  route-map RISE-WEIGHT in

Another possible option is to to make 0 the weight of the locally generated route on BMP-DIST-MPE01 and to rise the local preference on the central PE as Shirshendi is suggesting.

Hope to help

Giuseppe


Review Cisco Networking for a $25 gift card