BGP Cisco-proprietary Weight Settings

ccnp-routing
Lab on the Cisco BGP weight setting, applied per prefix with a route map and per neighbor, to influence one router’s choice of outbound path.
Published

Jan 21, 2018

  1. Per prefix
R2#show ip bgp 45.45.45.0/24
BGP routing table entry for 45.45.45.0/24, version 4
Paths: (2 available, best #2, table default)
  Advertised to update-groups:
     11        
  Refresh Epoch 2
  64510
    5.5.5.5 from 5.5.5.5 (5.5.5.5)
      Origin IGP, metric 0, localpref 100, valid, external
      rx pathid: 0, tx pathid: 0
  Refresh Epoch 1
  64510
    4.4.4.4 from 4.4.4.4 (4.4.4.4)
      Origin IGP, metric 0, localpref 100, valid, external, best
      rx pathid: 0, tx pathid: 0x0
R2(config)#ip prefix-list weight50 seq 10 permit 45.45.45.0/24
R2(config)#route-map RmW50 permit
R2(config-route-map)#match ip address prefix-list weight50
R2(config-route-map)#set weight 50
R2(config)#route-map RmW50 permit 20
R2(config-route-map)#exit
R2(config)#router bgp 64500
R2(config-router)#neighbor 5.5.5.5 route-map RmW50 in
R2#clear ip bgp 5.5.5.5 soft # Because we only want to enable the weight of the incoming update from R5
R2#show ip bgp 45.45.45.0/24
BGP routing table entry for 45.45.45.0/24, version 6
Paths: (2 available, best #1, table default)
  Advertised to update-groups:
     11        
  Refresh Epoch 3
  64510
    5.5.5.5 from 5.5.5.5 (5.5.5.5)
      Origin IGP, metric 0, localpref 100, weight 50, valid, external, best
      rx pathid: 0, tx pathid: 0x0
  Refresh Epoch 1
  64510
    4.4.4.4 from 4.4.4.4 (4.4.4.4)
      Origin IGP, metric 0, localpref 100, valid, external
      rx pathid: 0, tx pathid: 0
  1. Per neighbor:
Back to top