Configuring BGP Routing Policy.docx
- 文档编号:5796324
- 上传时间:2023-01-01
- 格式:DOCX
- 页数:36
- 大小:94.15KB
Configuring BGP Routing Policy.docx
《Configuring BGP Routing Policy.docx》由会员分享,可在线阅读,更多相关《Configuring BGP Routing Policy.docx(36页珍藏版)》请在冰豆网上搜索。
ConfiguringBGPRoutingPolicy
ConfiguringBGPRoutingPolicy
RoutingpolicydetermineshowthesystemhandlestheroutesitreceivesfromandsendstoBGPpeersorotherroutingprotocols.Inmanycases,routingpolicyconsistsoffilteringroutes,acceptingcertainroutes,acceptingandmodifyingotherroutes,andrejectingsomeroutes.Youcanthinkofroutingpolicyasawaytocontroltheflowofroutesintoandoutofthesystem.
Youcanuseoneormoreofthefollowingmechanismstoconfigureroutingpolicy:
Accesslists
Prefixtrees
Communitylists
Routemaps
Prefixlists
TheremainderofthissectionprovidesdetailedinformationonusingthesefeatureswithBGP.Beforeproceeding,pleaseseeERXRoutingProtocolsConfigurationGuide,Vol. 1,Chapter 1,ConfiguringRoutingPolicy,forathoroughbackgroundonhowthesefeaturesworkingeneral.
TypesofBGPRouteMaps
Aroutemapconsistsofmatchclausesandsetclauses.Matchclauses,whichconsistofamatchcommand,specifytheattributevaluesthatdeterminewhetheraroutematchestheroutemap.Setclauses,whichconsistofasetcommand,modifythespecifiedattributesofroutesthatpassallmatchclausesintheroutemap.
BGProutemapscanbeappliedtoinboundroutes,outboundroutes,andredistributedroutes.BGProutemapsareoftwotypes,thosethatsupportbothmatchandsetclauses,andthosethatsupportonlymatchclauses.
Thematch-and-setroutemapsconsistoftheroutemapsconfiguredwithanyofthecommandslistedinTable 1-8.
Table 1-8Commandsthatcreatematch-and-setroutemaps
aggregate-addressattribute-map
redistributeroute-map
bgpdampeningroute-map
table-map
neighborroute-mapin
vrfimport-map
neighborroute-mapout
vrfexport-map
BGPsupportstheclauseslistedinTable 1-9formatch-and-setroutemaps.
Table 1-9ClausessupportedinBGPmatch-and-setroutemaps
matchas-path
setas-pathprepend
matchcommunity
setcomm-listdelete
matchdistance
setcommunity
matchextcommunity
setdampening
matchipaddress
setextcommunity
matchipnext-hop
setipnext-hop
matchlevel
setlocal-preference
matchmetric
setmetric
matchmetric-type
setmetric-type
matchroute-type
setorigin
matchtag
settag
setweight
Thematch-onlyroutemapsconsistoftheroutemapsconfiguredwithanyofthecommandslistedinTable 1-10.YoucanuseanyofthematchclauseslistedinTable 1-9intheseroutemaps.Setclauseshavenoeffectintheseroutemaps.
Table 1-10Commandsthatcreatematch-onlyroutemaps
aggregateadvertise-map
aggregatesupport-map
BGPdoesnotsupporttheclauseslistedinTable 1-11.However,seethesectionlaterinthischapter,ApplyingTableMaps,forexceptionsforroutemapsappliedviathetable-mapcommand.
Table 1-11ClausesnotsupportedinBGProutemaps
setautomatic-tag
setlevel
setdistance
setroute-type
matchas-path
∙UsetomatchanAS-pathaccesslist.
∙TheimplementedweightisbasedonthefirstmatchedASpath.
∙Example
host1(config)#route-mapnyc1permit10
host1(config-route-map)#matchas-pathpathlist5
∙Usethenoversiontodeletethematchclausefromaroutemaporaspecifiedvaluefromthematchclause.
matchcommunity
∙Usetomatchacommunitylist.
∙Supportedforinboundandoutboundroutemaps.
∙Example
host1(config)#route-mapnyc1permit10
host1(config-route-map)#matchcommunitycomm5
∙Usethenoversiontodeletethematchclausefromaroutemaporaspecifiedvaluefromthematchclause.
matchdistance
∙Usetomatchanyroutesthathavethespecifiedadministrativedistance.
∙Example
host1(config)#route-mapnyc1permit10
host1(config-route-map)#matchdistance25
∙Usethenoversiontodeletethematchclausefromaroutemaporaspecifiedvaluefromthematchclause.
matchextcommunity
∙Usetomatchanextendedcommunitylistinaroutemap.
∙Youcanspecifyoneormoreextendedcommunitylistnamesinamatchclause.Ifyouspecifymorethanoneextendedcommunitylist,thelistsarelogicalORed.
∙Example
host1(config)#route-mapnyc1permit10
host1(config-route-map)#matchextcommunitytopeka10
∙Usethenoversiontoremovethematchclausefromaroutemaporaspecifiedvaluefromthematchclause.
matchipaddress
∙Usetomatchanyroutethathasadestinationnetworknumberthatispermittedbyanaccesslist,aprefixlist,oraprefixtree,orperformspolicyroutingonpackets.
∙Example
host1(config)#route-mapnyc1permit10
host1(config-route-map)#matchipaddressprefix-treeboston
∙Usethenoversiontodeletethematchclausefromaroutemaporaspecifiedvaluefromthematchclause.
matchipnext-hop
∙Usetomatchanyroutesthathaveanext-hoprouteraddresspassedbythespecifiedaccesslist,prefixlist,orprefixtree.
∙Example
host1(config)#route-mapnyc1permit10
host1(config-route-map)#matchipnext-hop5192.54.24.1
∙Usethenoversiontodeletethematchclausefromaroutemaporaspecifiedvaluefromthematchclause.
matchlevel
∙Usetomatchroutesforthespecifiedtype.
∙Example
host1(config)#route-mapnyc1permit10
host1(config-route-map)#matchlevel-1
∙Usethenoversiontodeletethematchclausefromaroutemaporaspecifiedvaluefromthematchclause.
matchmetric
∙Usetomatcharouteforthespecifiedmetricvalue.
∙Example
host1(config)#route-mapnyc1permit10
host1(config-route-map)#matchmetric10
∙Usethenoversiontodeletethematchclausefromaroutemaporaspecifiedvaluefromthematchclause.
matchmetric-type
∙Usetomatcharouteforthespecifiedmetrictype.
∙Example
host1(config)#route-mapnyc1permit10
host1(config-route-map)#matchmetric-typeexternal
∙Usethenoversiontodeletethematchclausefromaroutemap.
matchroute-type
∙Usetomatcharouteforthespecifiedroutetype.
∙Example
host1(config)#route-mapnyc1permit10
host1(config-route-map)#matchroute-typelevel-1
∙Usethenoversiontodeletethematchclausefromaroutemaporaspecifiedvaluefromthematchclause.
matchtag
∙Usetomatchthetagvalueofthedestinationroutingprotocol.
∙Example
host1(config)#route-map1
host1(config-route-map)#matchtag25
∙Usethenoversiontodeletethematchclausefromaroutemaporaspecifiedvaluefromthematchclause.
neighborroute-map
∙Usetoapplyaroutemaptoincomingoroutgoingroutes.
∙Ifyouspecifyanoutboundroutemap,BGPadvertisesonlyroutesthatmatchatleastonesectionoftheroutemap.
∙Aclausewithmultiplevaluesmatchesaroutehavinganyofthevalues;thatis,themultiplevaluesarelogicalORed.
∙IfyouspecifyaBGPpeergroupbyusingthepeerGroupNameargument,allthemembersofthepeergroupinheritthecharacteristicconfiguredwiththiscommandunlessitisoverriddenforaspecificpeer.However,youcannotconfigureamemberofapeergrouptooverridetheinheritedpeergroupcharacteristicforoutboundpolicy
∙Newpolicyvaluesareappliedtoallroutesthataresent(outboundpolicy)orreceived(inboundpolicy)afteryouissuethecommand.
ToapplythenewpolicytoroutesthatarealreadypresentintheBGPRIB,youmustusetheclearipbgpcommandtoperformasoftclearorhardclearofthecurrentBGPsession.
BehaviorisdifferentforoutboundpoliciesconfiguredforpeergroupsforwhichyouhaveenabledAdj-RIBs-Out.IfyouchangetheoutboundpolicyforsuchapeergroupandwanttofilltheAdj-RIBs-Outtableforthatpeergroupwiththeresultsofthenewpolicy,youmustusetheclearipbgppeer-groupcommandtoperformahardclearoroutboundsoftclearofthepeergroup.YoucannotmerelyperformahardclearoroutboundsoftclearforindividualpeergroupmembersbecausethatcausesBGPtoresendonlythecontentsoftheAdj-RIBs-Outtable.
∙Usethenoversiontoremovetheroutemap.
route-map
∙Usetodefinetheconditionsforredistributingroutesfromoneroutingprotocolintoanother,andforfilteringormodifyingupdatessenttoorreceivedfrompeers.
∙Eachroute-mapcommandhasalistofmatchandsetcommandsassociatedwithit.
∙Thematchcommandsspecifythematchcriteria—theconditionsunderwhichredistributionisallowedforthecurrentroutemap.
∙Thesetcommandsspecifythesetactions—theredistributionactionstoperformifthecriteriaenforcedbythematchcommandsareset.
∙Useroutemapswhenyouwishtohavedetailedcontroloverhowroutesareredistributedbetweenroutingprocesses.
∙Thedestinationroutingprotocolistheoneyouspecifywiththeroutercommand.
∙Thesourceroutingprotocolistheoneyouspecifywiththeredistributecommand.
∙Aclausewithmultiplevaluesmatchesaroutehavinganyofthevalues;thatis,themultiplevaluesarelogicalORed.
∙IfyouspecifyaBGPpeergroupbyusingthepeerGroupNameargument,allthemembersofthepeergroupinheritthecharacteristicconfiguredwiththiscommandunlessitisoverriddenforaspecificpeer.
∙Usethenoversiontodeletetheroutemap.
setas-pathprepend
∙UsetomodifyanASpathforBGProutesbyprependingoneormoreASnumbersoralistofASnumberstothepathlist.
∙TheonlyglobalBGPmetricavailabletoinfluencethebest-pathselectionistheAS-pathlength.ByvaryingthelengthoftheASpath,aBGPspeakercaninfluencethebest-pathselectionbyapeerfartheraway.
∙Example
host1(config)#route-mapnyc1permit10
host1(config-route-map)#setas-pathprependlistlist10
∙Usethenoversiontodeletethesetclausefromaroutemap.
setcomm-listdelete
∙Usetoremovecommunitiesspecifiedbythecommunitylistfromthecommunityattributeofroutesmatchingt
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Configuring BGP Routing Policy