
Scenario 2
: The administrator of AS 65001 requires that ISP1 be active and ISP2 be backup for
the traffic to 10.11.0.0/16 and 10.22.0.0/16.
To meet the preceding requirements, run the
peer
{
group-name
|
ipv4-address
}
preferred-
value
value
command on Router A to increase the PrefVal values of the routes learned from
ISP1. This configuration ensures that the routes learned from ISP1 are selected as the optimal
routes. Detailed configurations are as follows:
bgp 65001
#
ipv4-family unicast
peer 10.1.2.2 preferred-value 120 //Set the PrefVal of the routes
learned from AS 300 to 120.
Run the
display bgp routing-table
[
ip-address
] command to check the configurations.
# Display the routing table of Router A.
[RouterA]
display bgp routing-table
BGP Local router ID is 10.1.2.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 4
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 10.11.0.0/16
10.1.2.2
120 300 100?
* 10.1.3.2 0 200?
*> 10.22.0.0/16
10.1.2.2
120 300 100?
* 10.1.3.2 0 200?
The preceding command output shows that Router A selects the routes learned from ISP1.
# Display detailed information about the route 10.11.0.0/16 or 10.22.0.0/16 on Router A. The
route 10.11.0.0/16 is used as an example.
[RouterA]
display bgp routing-table 10.11.0.0
BGP local router ID : 10.1.2.1
Local AS number : 65001
Paths: 2 available, 1 best, 1 select
BGP routing table entry information of 10.11.0.0/16:
From: 10.1.2.2 (10.1.2.2)
Route Duration: 00h05m36s
Direct Out-interface: GigabitEthernet0/0/0
Original nexthop: 10.1.2.2
Qos information : 0x0
AS-path 300 100, origin incomplete,
pref-val 120
, valid, external, best, select,
active, pre 255
Advertised to such 2 peers:
10.1.3.2
10.1.2.2
BGP routing table entry information of 10.11.0.0/16:
From: 10.1.3.2 (10.1.3.2)
Route Duration: 00h23m11s
Direct Out-interface: GigabitEthernet0/0/1
Original nexthop: 10.1.3.2
Qos information : 0x0
AS-path 200, origin incomplete,
pref-val 0
, valid, external, pre 255,
not
preferred for PreVal
Not advertised to any peer yet
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.
905