Sample Configuration
Below is a sample configuration for BGP Route Summarization using the aggregate commands described earlier in this section.
i. Prefixes received from switch1 without route summarization:
CLI (network-admin@switch3*) > vrouter-fib-routes-show intf-id 5
vrid ip prelen intf-id bd vlan port nexthop-mac flags egress-id
---- --------- ------ ------- -- ---- ---- ----------------- ----- ---------
0 10.0.54.0 24 5 62 19 66:0e:94:90:c3:bb 100023
0 10.0.55.0 24 5 62 19 66:0e:94:90:c3:bb 100023
0 10.0.56.0 24 5 62 19 66:0e:94:90:c3:bb 100023
0 10.0.57.0 24 5 62 19 66:0e:94:90:c3:bb 100023
0 10.0.58.0 24 5 62 19 66:0e:94:90:c3:bb 100023
0 10.0.59.0 24 5 62 19 66:0e:94:90:c3:bb 100023
ii. vrouter-bgp-aggregate-address-add vrouter-name <NAME> network <A.B.C.D> netmask <M>
CLI (network-admin@switch2*) > vrouter-bgp-aggregate-address-add vrouter-name vr3 network 10.0.48.0 netmask 21
CLI (network-admin@switch2*) > vrouter-bgp-aggregate-address-add vrouter-name vr3 network 10.0.56.0 netmask 21
CLI (network-admin@switch2*) > vrouter-bgp-aggregate-address-show
vrouter-name network vrf as-set summary-only matching-MED-only origin route-map suppress-map
------------ ------------ ------- ------ ------------ ----------------- ------ --------- ------------
vr3 10.0.48.0/21 default false true false none
vr3 10.0.56.0/21 default false true false none
CLI (network-admin@switch3*) > vrouter-fib-routes-show intf-id 5
vrid ip prelen intf-id bd vlan port nexthop-mac flags egress-id
---- --------- ------ ------- -- ---- ---- ----------------- ----- ---------
0 10.0.48.0 21 5 62 273 66:0e:94:90:68:9d Trunk 100020
0 10.0.56.0 21 5 62 273 66:0e:94:90:68:9d Trunk 100020
iii. vrouter-bgp-aggregate-address-add vrouter-name <NAME> network <A.B.C.D> netmask <M> as-set true
CLI (network-admin@switch2*) > vrouter-bgp-aggregate-address-add vrouter-name vr3 network 10.0.48.0 netmask 21
CLI (network-admin@switch2*) > vrouter-bgp-aggregate-address-add vrouter-name vr3 network 10.0.56.0 netmask 21 as-set true
CLI (network-admin@switch2*) > vrouter-bgp-aggregate-address-show
vrouter-name network vrf as-set summary-only matching-MED-only origin route-map suppress-map
------------ ------------ ------- ------ ------------ ----------------- ------ --------- ------------
vr3 10.0.48.0/21 default false true false none
vr3 10.0.56.0/21 default true true false none
CLI (network-admin@switch3*) > vrouter-fib-routes-show intf-id 5
vrid ip prelen intf-id bd vlan port nexthop-mac flags egress-id
---- --------- ------ ------- -- ---- ---- ----------------- ----- ---------
0 10.0.48.0 21 5 62 273 66:0e:94:90:68:9d Trunk 100020
0 10.0.56.0 21 5 62 273 66:0e:94:90:68:9d Trunk 100020
CLI (network-admin@switch3*) > vtysh-cmd vrouter name vr0 cmd "show ip bgp 10.0.48.0/21"
BGP routing table entry for 10.0.48.0/21
Paths: (1 available, best #1, table default)
Advertised to non peer-group peers:
10.0.62.2
65002, (aggregated by 65002 30.13.13.13) =======> without 'as-set' AS_PATH information is not included.
10.0.62.2 from 10.0.62.2 (30.13.13.13)
Origin IGP, valid, external, atomic-aggregate, best (First path received)
Last update: Fri Jul 15 14:38:11 2022
CLI (network-admin@switch3*) > vtysh-cmd vrouter name vr0 cmd "show ip bgp 10.0.56.0/21"
BGP routing table entry for 10.0.56.0/21
Paths: (1 available, best #1, table default)
Advertised to non peer-group peers:
10.0.62.2
65002 65001, (aggregated by 65002 30.13.13.13) =======> with 'as-set' AS_PATH information is included.
10.0.62.2 from 10.0.62.2 (30.13.13.13)
Origin IGP, valid, external, best (First path received)
Last update: Fri Jul 15 15:14:08 2022
iv. vrouter-bgp-aggregate-address-add vrouter-name <NAME> network <A.B.C.D> netmask <M> with match-MED-only
CLI (network-admin@switch1*) > vrouter-prefix-list-add vrouter-name vr1 name PREFIX58 action permit seq 5 prefix 10.0.58.0 netmask
CLI (network-admin@switch1*) > vrouter-route-map-add vrouter-name vr1 name SET_COMM_METRIC seq 10 action permit match-prefix PREFIX58 metric 300
CLI (network-admin@switch1*) > vrouter-route-map-add vrouter-name vr1 name SET_COMM_METRIC seq 15 action permit
CLI (network-admin@switch1*) > vtysh-cmd vrouter name vr1 cmd "show ip bgp neighbor 10.0.55.2 advertised-routes" BGP table version is 33, local router ID is 10.0.57.1, vrf id 0
Default local pref 100, local AS 65001
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.0.48.0/21 10.0.55.2 0 65002 i
*> 10.0.54.0/24 0.0.0.0 0 32768 i
*> 10.0.55.0/24 0.0.0.0 0 32768 i
*> 10.0.56.0/24 0.0.0.0 0 32768 i
*> 10.0.57.0/24 0.0.0.0 0 32768 i
*> 10.0.58.0/24 0.0.0.0 300 32768 i
*> 10.0.59.0/24 0.0.0.0 0 32768 i
Total number of prefixes 7
CLI (network-admin@switch2*) > vrouter-bgp-aggregate-address-show
vrouter-name network vrf as-set summary-only matching-MED-only origin route-map suppress-map
------------ ------------ ------- ------ ------------ ----------------- ------ --------- ------------
vr3 10.0.48.0/21 default false true false none
vr3 10.0.56.0/21 default false true false none
CLI (network-admin@switch3*) > vrouter-fib-routes-show intf-id 5
vrid ip prelen intf-id bd vlan port nexthop-mac flags egress-id
---- --------- ------ ------- -- ---- ---- ----------------- ----- ---------
0 10.0.48.0 21 5 62 273 66:0e:94:90:68:9d Trunk 100020
0 10.0.56.0 21 5 62 273 66:0e:94:90:68:9d Trunk 100020
CLI (network-admin@switch2*) > vrouter-bgp-aggregate-address-add vrouter-name vr3 network 10.0.56.0 netmask 21 matching-MED-only true
CLI (network-admin@switch2*) > vrouter-bgp-aggregate-address-show
vrouter-name network vrf as-set summary-only matching-MED-only origin route-map suppress-map
------------ ------------ ------- ------ ------------ ----------------- ------ --------- ------------
vr3 10.0.48.0/21 default false true false none
vr3 10.0.56.0/21 default false true true none
CLI (network-admin@switch3*) > vrouter-fib-routes-show intf-id 5
vrid ip prelen intf-id bd vlan port nexthop-mac flags egress-id
---- --------- ------ ------- -- ---- ---- ----------------- ----- ---------
0 10.0.56.0 24 5 62 273 66:0e:94:90:68:9d Trunk 100020
0 10.0.59.0 24 5 62 273 66:0e:94:90:68:9d Trunk 100020
0 10.0.57.0 24 5 62 273 66:0e:94:90:68:9d Trunk 100020
0 10.0.58.0 24 5 62 273 66:0e:94:90:68:9d Trunk 100020
0 10.0.48.0 21 5 62 273 66:0e:94:90:68:9d Trunk 100020
Setting Metric of all specific routes to 300
CLI (network-admin@switch1*) > vrouter-route-map-modify vrouter-name vr1 name SET_COMM_METRIC action permit seq 15 metric
CLI (network-admin@switch1*) > vtysh-cmd vrouter name vr1 cmd "show ip bgp neighbor 10.0.55.2 advertised-routes"
BGP table version is 44, local router ID is 10.0.57.1, vrf id 0
Default local pref 100, local AS 65001
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.0.48.0/21 10.0.55.2 300 0 65002 i
*> 10.0.54.0/24 0.0.0.0 300 32768 i
*> 10.0.55.0/24 0.0.0.0 300 32768 i
*> 10.0.56.0/21 10.0.55.2 300 0 65002 i
*> 10.0.56.0/24 0.0.0.0 300 32768 i
*> 10.0.57.0/24 0.0.0.0 300 32768 i
*> 10.0.58.0/24 0.0.0.0 300 32768 i
*> 10.0.59.0/24 0.0.0.0 300 32768 i
Total number of prefixes 8
When all the metrics are matched, only summary address is advertised and specific routes are suppressed.
CLI (network-admin@switch3*) > vrouter-fib-routes-show intf-id 5
vrid ip prelen intf-id bd vlan port nexthop-mac flags egress-id
---- --------- ------ ------- -- ---- ---- ----------------- ----- ---------
0 10.0.48.0 21 5 62 273 66:0e:94:90:68:9d Trunk 100020
0 10.0.56.0 21 5 62 273 66:0e:94:90:68:9d Trunk 100020