![Huawei S6700 Series Configuration Manual Download Page 449](http://html.mh-extra.com/html/huawei/s6700-series/s6700-series_configuration-manual_169517449.webp)
20.2.1.0/24, and 20.3.1.0/24 from being sent to Switch A. Then, Switch A stores only one default
route but can still send traffic to the three network segments.
Pre-configuration Tasks
Before configuring a BGP device to send a default route to its peer, complete the following task:
l
Configuring Basic BGP Functions
Procedure
Step 1
Run:
system-view
The system view is displayed.
Step 2
Run:
bgp
as-number
The BGP view is displayed.
Step 3
Run:
ipv4-family
unicast
The IPv4 unicast address family view is displayed.
Step 4
Run:
peer
{
group-name
|
ipv4-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> ]
The device is configured to send a default route to a peer or a peer group.
If
route-policy
route-policy-name
is set, the BGP device changes attributes of a default route
based on the specified route policy.
If
conditional-route-match-all
{
ipv4-address1
{
mask1
|
mask-length1
} } &<1-4> is set, the
BGP device sends a default route to the peer only when all specified routes exist in the local
routing table.
If
conditional-route-match-any
{
ipv4-address2
{
mask2
|
mask-length2
} } &<1-4> is set, the
local device sends a default route to the peer when one of the specified routes exists in the local
routing table.
NOTE
After the
peer default-route-advertise
command is used on a device, the device sends a default route with
the local address as the next-hop address to a specified peer, regardless of whether there is a default route
in the routing table.
----End
Checking the Configuration
After a BGP device is configured to send a default route to a peer, you can check whether the
configuration is correct.
S6700 Series Ethernet Switches
Configuration Guide - IP Routing
7 BGP Configuration
Issue 01 (2012-03-15)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
430