The peer default-route-advertise command configures a BGP device to advertise a default route to its peer group.
The undo peer default-route-advertise command cancels the configuration.
By default, a BGP device does not advertise any default route to its peer group.
peer group-name default-route-advertise [ route-policy route-policy-name ]
peer group-name default-route-advertise route-filter route-filter-name
peer group-name default-route-advertise [ route-policy route-policy-name ] { conditional-route-match-all | conditional-route-match-any } { ipv6-address mask-length } &<1-4>
peer group-name default-route-advertise route-filter route-filter-name { conditional-route-match-all | conditional-route-match-any } { ipv6-address mask-length } &<1-4>
undo peer group-name default-route-advertise
Parameter | Description | Value |
---|---|---|
group-name |
Specifies the name of a peer group. |
The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
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. |
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. |
conditional-route-match-all |
The default routes are sent to the peer group only when all the conditional routes are matched. |
- |
conditional-route-match-any |
The default routes are sent to the peer group if any conditional route is matched. |
- |
ipv6-address |
Specifies the IPv6 address of the conditional routes. |
The value is in the format of X:X:X:X:X:X:X:X. |
mask-length |
Specify IPv6 address for conditional route. |
It is an integer ranging from 0 to 128. |
Usage Scenario
Default routes are usually used in a network with the following characteristics:
Configuration Impact
When this command is run, the default route with the next hop as the local device is unconditionally sent to its peer group regardless of whether default routes exist in the routing table.
<HUAWEI> system-view [~HUAWEI] ip vpn-instance vpn1 [*HUAWEI-vpn-instance-vpn1] ipv6-family [*HUAWEI-vpn-instance-vpn1-af-ipv6] route-distinguisher 100:1 [*HUAWEI-vpn-instance-vpn1-af-ipv6] quit [*HUAWEI-vpn-instance-vpn1] quit [*HUAWEI] bgp 100 [*HUAWEI-bgp] ipv6-family vpn-instance vpn1 [*HUAWEI-bgp-6-vpn1] group test external [*HUAWEI-bgp-6-vpn1] peer test as-number 200 [*HUAWEI-bgp-6-vpn1] peer test default-route-advertise