Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 12
Network NextHop MED LocPrf PrefVal Path/Ogn
*>
9.1.1.0/24
200.1.3.1
0 20 10?
*> 20.1.1.0/24 0.0.0.0 0 0 ?
*> 20.1.1.1/32 0.0.0.0 0 0 ?
*> 127.0.0.0 0.0.0.0 0 0 ?
*> 127.0.0.1/32 0.0.0.0 0 0 ?
*> 200.1.2.0 200.1.3.1 0 0 20?
*> 200.1.2.1/32 200.1.3.1 0 0 20?
*> 200.1.3.0 0.0.0.0 0 0 ?
* 200.1.3.1 0 0 20?
*> 200.1.3.1/32 0.0.0.0 0 0 ?
*> 200.1.3.2/32 0.0.0.0 0 0 ?
* 200.1.3.1 0 0 20?
Step 3
Configure AS_Path filters on Router B and apply the AS_Path filters to routes to be advertised
by Router B.
# Create AS_Path filter 1 to deny the routes carrying AS number 30. The regular expression
"_30_" indicates any AS list that contains AS 30 and "*" matches any character.
[RouterB]
ip as-path-filter path-filter1 deny _30_
[RouterB]
ip as-path-filter path-filter1 permit .*
# Create AS_Path filter 2 to deny the routes carrying AS 10.
[RouterB]
ip as-path-filter path-filter2 deny _10_
[RouterB]
ip as-path-filter path-filter2 permit .*
# Apply the AS_Path filters to routes to be advertised by Router B.
[RouterB]
bgp 20
[RouterB-bgp]
peer 200.1.2.1 as-path-filter path-filter1 export
[RouterB-bgp]
peer 200.1.3.2 as-path-filter path-filter2 export
[RouterB-bgp]
quit
Step 4
# View routes advertised by Router B.
# View routes advertised by Router B to AS 30. You can see that Router B does not advertise
the direct route imported by AS 10.
[RouterB]
display bgp routing-table peer 200.1.3.2 advertised-routes
BGP Local router ID is 2.2.2.2
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
*> 200.1.2.0 200.1.3.1 0 0 20?
*> 200.1.2.1/32 200.1.3.1 0 0 20?
*> 200.1.3.0 200.1.3.1 0 0 20?
*> 200.1.3.2/32 200.1.3.1 0 0 20?
The route does not exist in the BGP routing table of Router C.
[RouterC]
display bgp routing-table
BGP Local router ID is 3.3.3.3
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
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.
971