peer default-route-advertise (BGP-IPv4 unicast address family view) (IPv6)

Function

The peer default-route-advertise command configures a BGP device to advertise a default route to its peer.

The undo peer default-route-advertise command cancels the configuration.

By default, a BGP device does not advertise any default route to its peer.

Format

peer peerIpv6Addr default-route-advertise [ route-policy route-policy-name ]

peer peerIpv6Addr default-route-advertise [ route-policy route-policy-name ] { conditional-route-match-all | conditional-route-match-any } { ipv4-address { mask-length | mask } } &<1-4>

peer peerIpv6Addr default-route-advertise route-filter route-filter-name

peer peerIpv6Addr default-route-advertise route-filter route-filter-name { conditional-route-match-all | conditional-route-match-any } { ipv4-address { mask-length | mask } } &<1-4>

undo peer peerIpv6Addr default-route-advertise

Parameters

Parameter Description Value
peerIpv6Addr

Specifies the IPv6 address of a BGP peer.

The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

route-policy route-policy-name

Specifies the name of a route-policy.

The name is a string of 1 to 200 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

conditional-route-match-all

The default routes are sent to the peer or peer group only when all the conditional routes are matched.

-

conditional-route-match-any

The default routes are sent to the peer or peer group if any conditional route is matched.

-

ipv4-address

Specifies the IPv4 address of a peer.

The value is in dotted decimal notation.

mask-length

Specifies the mask length of the conditional routes.

It is an integer ranging from 0 to 32.

mask

Specifies the mask of the conditional routes.

It is in dotted decimal notation.

route-filter route-filter-name

Specifies the name of a route-filter.

The value is a string of 1 to 200 case-sensitive characters, spaces not supported. If parameters are included in the referenced route-filter, specify values for them in the format of (var1, var2, ...var8) behind the route-filter name. A maximum of eight parameters can be specified, and each value ranges from 1 to 200 characters.

Views

BGP-IPv4 unicast address family view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

Default routes are usually used in a network with the following characteristics:

  • Each device has multiple EBGP peers and receives full Internet routes from each EBGP peer.
  • There are multiple RRs, and each RR receives full Internet routes.

    If load balancing is not performed on the network, a BGP peer receives at most one copy of active full Internet routes. If load balancing is performed on the network, the number of active routes received by a BGP peer is doubled, which causes the number of routes on the network to sharply increase. On such a network, you can configure a BGP device to advertise only default routes to its BGP peer and use default routes for traffic load balancing, which can greatly reduce the number of routes on the network.

Configuration Impact

When this command is run, the default route with the next hop as the local device is unconditionally sent to its peer regardless of whether default routes exist in the routing table.

Example

# Configure a BGP device to advertise default routes to its peer.
<HUAWEI> system-view
[~HUAWEI] bgp 100
[*HUAWEI-bgp] peer 2001:DB8:1::1 as-number 100
[*HUAWEI-bgp] ipv4-family unicast
[*HUAWEI-bgp-af-ipv4] peer 2001:DB8:1::1 enable
[*HUAWEI-bgp-af-ipv4] peer 2001:DB8:1::1 default-route-advertise
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >