ZXR105900ESeriesCongurationGuide(IPv4Routing)
AsshowninFigure5-10,S1andS2areapairofIBGPpeers,S1andS3areapair
ofEBGPpeers,S2andS4areapairofEBGPpeers,S2andS4areapairofEBGP
peers.ToavoidAS100toactastransitiveASandpreventS1fromadvertisingnetwork
segment192.18.10.0/24ofAS300toAS200,congurelterfunctiononS1.
Figure5-10FilteringRoutebyUsingNLRI
CongurationonS1(ThefollowingcontentomitscongurationofportandIGP):
S1(config)#routerbgp100
S1(config-bgp)#nosynchronization
S1(config-bgp)#neighbor182.17.1.2remote-as100
S1(config-bgp)#neighbor182.17.1.2next-hop-self
S1(config-bgp)#neighbor182.17.20.1remote-as200
S1(config-bgp)#neighbor182.17.20.1route-mapMAP1out
S1(config-bgp)#exit
S1(config)#route-mapMAP1permit10
S1(config-route-map)#matchipaddress1
S1(config-route-map)#exit
S1(config)#ipv4-access-list1
S1(config-ipv4-acl)#rule1deny192.18.10.00.0.0.255
S1(config-ipv4-acl)#rule2permitany
Theroute-mapcommandandACLareusedtopreventS1fromadvertisingtheroute
withprex192.18.10.0/24toAS200,thatis,thisrouteislteredonS1.Therefore,S3
cannotlearntheroute192.18.10.0/24.
ToviewBGProutingtableonS3,usetheshowipbgproutecommand.
S3#showipbgproute
Statuscodes:*-valid,>-best,i-internal,s-stale
Origincodes:i-IGP,e-EGP,?-incomplete
NetworkNextHopMetricLocPrfRtPrfPath
*>192.168.11.0/24182.17.20.220300100i
5-30
SJ-20150114102049-003|2015-01-15(R1.0)ZTEProprietaryandCondential