system-view
The system view is displayed.
Step 2
Run:
bgp
{
as-number-plain
|
as-number-dot
}
The BGP view is displayed.
Step 3
Run:
ipv4-family
unicast
The IPv4 unicast address family view is displayed.
Step 4
Run:
preference
{
external
internal
local
|
route-policy
route-policy-name
}
The BGP preference is set.
The smaller the preference value, the higher the preference.
BGP has the following types of routes:
l
EBGP routes learned from peers in other ASs
l
IBGP routes learned from peers in the same AS
l
Locally originated routes (A locally originated route is a route summarized by using the
summary automatic
command or the
aggregate
command.)
Different preference values can be set for these three types of routes.
In addition, a routing policy can also be used to set the preferences for the routes that match the
policy. The routes that do not match the policy use the default preference.
NOTE
At present, the
peer route-policy
command cannot be used to set the BGP preference.
----End
8.4.3 Configuring Preferred Values for BGP Routes
After preferred values are set for BGP routes, the route with the greatest value is preferred when
multiple routes to the same destination exist in the BGP routing table.
Procedure
Step 1
Run:
system-view
The system view is displayed.
Step 2
Run:
bgp
{
as-number-plain
|
as-number-dot
}
The BGP view is displayed.
Step 3
Run:
peer
{
group-name
|
ipv4-address
}
preferred-value
value
HUAWEI NetEngine80E/40E Router
Configuration Guide - IP Routing
8 BGP Configuration
Issue 02 (2014-09-30)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
764