BGP Clear and Show Commands
6-122 Configuring the Border Gateway Protocol
Example
Thefollowingexampleconfigurestheweightparameterinthecontextofconfiguringroutemap1
andapplyingittoupdatesarrivingfromtworemoteneighbors:
XSR(config)#ip as-path access-list 67 permit “^101 .*”
XSR(config)#ip as-path access-list 57 permit “^102 .*”
XSR(config)#route-map 1 permit 1
XSR(config-route-map)#match as-path 67
XSR(config-route-map)#set weight 6000
XSR(config-route-map)#exit
XSR(config)#route-map 1 permit 2
XSR(config-route-map)#match as-path 57
XSR(config-route-map)#set weight 5000
XSR(config-route-map)#exit
XSR(config)#router bgp 100
XSR(config-router)#neighbor 192.168.1.1 remote-as 101
XSR(config-router)#neighbor 192.168.2.1 remote-as 102
XSR(config-router)#
XSR(config-router)#neighbor 192.168.1.1 route-map 1 in
XSR(config-router)#neighbor 192.168.2.1 route-map 1 in
Thetwoinstancesofroutemap1performamatchonIPaspathaccesslists67and57,inthat
orderwithaweightof6000forupdatesmatchingACL67,and5000forupdatesmatchingACL57.
Ifthesamedestinationsareadvertisedbyalltworemoteneighbors,theoutboundtrafficfromthis
routerwillbedirectedtotheneighborwhohadamatchonACL67,asthoserouteswillhavethe
highestvalueoftheweightparameter.

BGP Clear and Show Commands

clear ip bgp

ThiscommandresetsoneormoreBGPconnections,byeitherahardorsoftreset.Softresetsare
preferredbecausetheyarelessdisruptiveoveralltointernetworking.BGPconnectionsmustbe
resetwhenevertheBGProutingpolicyischangedbymeansofoneofthefollowing:
•BGPrelatedaccesslists
•BGPrelatedweights
•BGPrelateddistributionlists
• SpecificationoftheBGPtimer
•BGPadministrativedistance
•BGPrelatedroutemaps
•BGPneighborconfiguration
Twooptionsforsoftresetare:
•Routerefreshissupporteddependingonwhethertherouterefreshcapabilityhasbeen
negotiatedduringtheOPENsession
•Storedupdates(explicitneighbor soft-reconfiguration)