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:
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
7.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
The BGP view is displayed.
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.
376