Chapter5BGPConguration
CongurationonS2:
S2(config)#routerbgp400
S2(config-bgp)#neighbor192.168.1.1remote-as100
S2(config-bgp)#neighbor192.168.1.1activate
S2(config-bgp)#neighbor192.168.2.1remote-as100
S2(config-bgp)#neighbor192.168.2.1activate
S2(config-bgp)#exit
ToviewBGProutingtableonS2,useshowipbgproute.
S2(config-bgp)#showipbgproute
Statuscodes:*valid,>best,i-internal
Origincodes:i-IGP,e-EGP,?-incomplete
NetworkNextHopMetricLocPrfRtPrfPath
*>10.0.1.0/24192.168.2.15020100i
*10.0.1.0/24192.168.1.110020100i
*>10.0.2.0/240.0.0.00i
S2(config)#showipbgproutedetail10.0.1.0255.255.255.0
BGProutingtableentryfor10.0.1.0/24
01:44:13receivedfrom192.168.2.1(10.0.1.1)
origini,nexthop192.168.2.1,metric50,
aspath[100]
01:47:25receivedfrom192.168.1.1(10.0.1.1)
origini,nexthop192.168.1.1,metric100,
Aspath[100]
As4path
Receivedlabelnotag
BymeansofMEDmodication,S2selectsthelink1(MEDvalueis50smallerthan
thatoflink2)toroutetoAS100preferably.
lConguringBGPCommunityStringAttributes
Thecommunitystringattributesareoptionaltransitiveattributes.Thecommunityisa
groupofdestinationrouteswithoneormorecommonfeatures.Ithas4bytes,therst
2bytesareASnumberandthelast2bytesareidentier.Whenaggregatecommunity
routes,theaggregatedrouteinheritsallthecommunityattributesfromallroutes.
Thedenitionsofseveralwell-knowncommunityattributesaregivenasfollows:
àno-export:AdvertisementtoEBGPneighborsisdisabled.
àno-advertise:AdvertisementtoanyBGPneighborsisdisabled.
àno-export-subconfed:Forbidtoadvertisetheroutewiththisattributeto
confederationoutside.
àlocal-AS:AdvertisetheroutewiththisattributetoBGPneighborroutersinAS.
àInternet:Advertisetheroutewiththisattributetoallotherrouters.
5-41
SJ-20150114102049-003|2015-01-15(R1.0)ZTEProprietaryandCondential