Configuring BGP route summarization

Route summarization can reduce the number of redistributed routes and the routing table size. IPv4 BGP supports automatic route summarization and manual route summarization. Manual summarization takes precedence over automatic summarization. IPv6 BGP supports only manual route summarization.

The output interface of a BGP summary route is Null 0 on the originating router. Therefore, a summary route must not be an optimal route on the originating router. Otherwise, BGP will fail to forward packets matching the route. If a summarized specific route has the same mask as the summary route, but has a lower priority, the summary route becomes the optimal route. In this case, you must change the priority of the summary or the specific route to make the specific route as the optimal route.

Configuring automatic route summarization

Automatic route summarization enables BGP to summarize IGP subnet routes redistributed by the import-route command so BGP advertises only natural network routes.

To configure automatic route summarization (IPv4):

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter BGP view or BGP-VPN instance view.

  • Enter BGP view:bgp as-number

  • Enter BGP-VPN instance view:

    1. bgp as-number

    2. ip vpn-instance vpn-instance-name

N/A

3. Enter BGP IPv4 unicast address family view or BGP-VPN IPv4 unicast address family view.

address-family ipv4 [ unicast ]

N/A

4. Configure automatic route summarization.

summary automatic

By default, automatic route summarization is not configured.

Configuring manual route summarization

By configuring manual route summarization, you can summarize both redistributed routes and routes injected using the network command and determine the mask length for a summary route as needed.

To configure BGP manual route summarization (IPv4):

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter BGP view or BGP-VPN instance view.

  • Enter BGP view:bgp as-number

  • Enter BGP-VPN instance view:

    1. bgp as-number

    2. ip vpn-instance vpn-instance-name

N/A

3. Enter BGP IPv4 unicast address family view or BGP-VPN IPv4 unicast address family view.

address-family ipv4 [ unicast ]

N/A

4. Create a summary route in the BGP routing table.

aggregate ip-address { mask | mask-length } [ as-set | attribute-policy route-policy-name | detail-suppressed | origin-policy route-policy-name | suppress-policy route-policy-name ] *

By default, no summary route is configured.

To configure BGP manual route summarization (IPv6):

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter BGP view.

bgp as-number

N/A

3. Enter BGP IPv6 unicast address family view.

address-family ipv6 [ unicast ]

N/A

4. Create a summary route in the IPv6 BGP routing table.

aggregate ipv6-address prefix-length [ as-set | attribute-policy route-policy-name | detail-suppressed | origin-policy route-policy-name | suppress-policy route-policy-name ] *

By default, no summary route is configured.