The peer default-route-advertise command advertises a default route to a peer or peer group.
The undo peer default-route-advertise command cancels the configuration.
By default, the default route is not advertised to any peer or peer group.
peer { group-name | ipv4-address | ipv6-address } default-route-advertise [ route-policy route-policy-name ] [ conditional-route-match-all { ipv4-address1 { mask1 | mask-length1 } } &<1-4> | conditional-route-match-any { ipv4-address2 { mask2 | mask-length2 } } &<1-4> ]
peer { group-name | ipv4-address | ipv6-address } default-route-advertise [ route-policy route-policy-name ] [ conditional-route-match-all { ipv6-address1 prefix-length1 } &<1-4> | conditional-route-match-any { ipv6-address2 prefix-length2 } &<1-4> ]
undo peer { group-name | ipv4-address | ipv6-address } default-route-advertise
| Parameter | Description | Value |
|---|---|---|
| group-name | Specifies the name of the peer group. | The name is a string of 1 to 47 characters without any space. It is case-sensitive. |
| ipv4-address | Specifies the IPv4 address of the peer. | It is in dotted decimal notation. |
| ipv6-address | Specifies the IPv6 address of the peer. | The prefix 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 the Route-Policy. | The name must be unique and is a string of 1 to 40 characters. It is case-sensitive. |
| conditional-route-match-all ipv4-address1 { mask1 | mask-length1 } | Indicates the IPv4 address, mask and mask length of the conditional routes. The default routes are sent to the peer or peer group only when all the conditional routes are matched. | - |
| conditional-route-match-any ipv4-address2 { mask2 | mask-length2 } | Indicates the IPv4 address, mask and mask length of the conditional routes. The default routes are sent to the peer or peer group only when any conditional route is matched. | - |
| conditional-route-match-all { ipv6-address1 prefix-length1 } | Advertises a default route to a peer or peer group only when a route that matches the specified IPv6 address and mask length exists in the local routing table. | - |
| conditional-route-match-any { ipv6-address2 prefix-length2 } | Advertises a default route to a peer or peer group only when a route that matches the specified IPv6 address or mask length exists in the local routing table. | - |
ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-VPN-Target address family view, BGP-IPv6 unicast address family view, and BGP-VPN instance IPv4 address family view.
ipv6-address is valid only in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.
BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view, BGP-IPv6 unicast address family view, BGP-IPv4 unicast address family view, BGP-VPN-Target address family view
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.
If the peer default-route-advertise command is run in the BGP-VPN-Target address family view, the local device advertises a default VPN target route to the peer on which VPN ORF is enabled. On receipt of the default route, the peer can send all VPNv4 routes to the local device.
Configuration Impact
When this command is run, the default route with the next hop as the local device is unconditionally sent to its peer or peer group regardless of whether default routes exist in the routing table.
To configure 6PE, specify the address of the peer as an IPv4 unicast address in the IPv6 unicast address family view.