Configuring BGP On Cisco RoutersStudent Guide V2708129e9 8940 407c 899c 88cd8f0d2962 Config V4 Student
User Manual:
Open the PDF directly: View PDF
.
Page Count: 1149 [warning: Documents this large are best viewed by clicking the View PDF Link!]


Credits
Copyrightnotices:
Americas
Headquarters
CiscoSystems,Inc.
SanJose,CA
AsiaPacific
Headquarters
CiscoSystems(USA)
Pte.Ltd.
Singapore
Europe
Headquarters
CiscoSystems
InternationalBV
Amsterdam,
TheNetherlands
Ciscohasmorethan200officesworldwide.Addresses,phone
numbers,andfaxnumbersarelistedontheCiscoWebsiteat
www.cisco.com/go/offices.
CiscoandtheCiscologoaretrademarksorregisteredtrademarks
ofCiscoand/oritsaffiliatesintheU.S.andothercountries.Toview
alistofCiscotrademarks,gotothisURL:
www.cisco.com/go/trademarks.Thirdpartytrademarksmentioned
arethepropertyoftheirrespectiveowners.Theuseoftheword
partnerdoesnotimplyapartnershiprelationshipbetweenCisco
andanyothercompany.(1110R)
DISCLAIMERWARRANTY:THISCONTENTISBEING
PROVIDED"ASIS"ANDASSUCHMAYINCLUDE
TYPOGRAPHICAL,GRAPHICS,ORFORMATTINGERRORS.
CISCOMAKESANDYOURECEIVENOWARRANTIESIN
CONNECTIONWITHTHECONTENTPROVIDEDHEREUNDER,
EXPRESS,IMPLIED,STATUTORYORINANYOTHER
PROVISIONOFTHISCONTENTORCOMMUNICATION
BETWEENCISCOANDYOU.CISCOSPECIFICALLYDISCLAIMS
ALLIMPLIEDWARRANTIES,INCLUDINGWARRANTIESOF
MERCHANTABILITY,NON-INFRINGEMENTANDFITNESSFOR
APARTICULARPURPOSE,ORARISINGFROMACOURSEOF
DEALING,USAGEORTRADEPRACTICE.Thislearningproduct
maycontainearlyreleasecontent,andwhileCiscobelievesittobe
accurate,itfallssubjecttothedisclaimerabove.
CopyrightDate:
©2015CiscoSystems,Inc.

Students,thisletterdescribesimportantcourseevaluation
accessinformation.
WelcometoCiscoSystemsLearning.ThroughtheCiscoLearningPartnerProgram,
Ciscoiscommittedtobringingyouthehighest-qualitytrainingintheindustry.Cisco
learningproductsaredesignedtoadvanceyourprofessionalgoalsandgiveyouthe
expertisethatyouneedtobuildandmaintainstrategicnetworks.
Ciscoreliesoncustomerfeedbacktoguidebusinessdecisions.Therefore,your
valuableinputwillhelpshapefutureCiscocoursecurricula,products,andtraining
offerings.PleasecompleteabriefCiscoonlinecourseevaluationofyourinstructor
andthecoursematerialsinthisstudentkit.Onthefinaldayofclass,yourinstructor
willprovideyouwithaURL,directingyoutoashortpost-courseevaluation.Ifthere
isnoInternetaccessintheclassroom,pleasecompletetheevaluationwithinthe
next48hoursorassoonasyoucanaccesstheweb.
OnbehalfofCisco,thankyouforchoosingCiscoLearningPartnersforyourInternet
technologytraining.
Sincerely,
CiscoSystemsLearning
WelcomeStudents
CourseIntroduction

Inthiscourseyouwilllearnhowtodesign,implement,andverifyaBGPinthe
customerandserviceprovidernetworks.
Uponcompletingthiscourse,youwillbeabletomeettheseobjectives:
Configure,monitor,andtroubleshootbasicBGPtoenableinterdomainroutingin
anetworkscenariowithmultipledomains
UseBGPpolicycontrolstoinfluencetherouteselectionprocesswithminimal
impactonBGProuteprocessinginanetworkscenariowhereyoumustsupport
connectionstomultipleISPs
UseBGPattributestoinfluencetherouteselectionprocessinanetwork
scenariowhereyoumustsupportmultipleconnections
CompletethecorrectBGPconfigurationtosuccessfullyconnectthecustomer
networktotheInternetinanetworkscenarioinwhichmultipleconnectionsmust
beimplemented
ConfiguretheserviceprovidernetworktobehaveasatransitASinatypical
implementationwithmultipleBGPconnectionstootherautonomoussystems
EnableroutereflectionaspossiblesolutiontoBGPscalingissuesinatypical
serviceprovidernetworkwithmultipleBGPconnectionstootherautonomous
systems
UseavailableBGPtoolsandfeaturestooptimizethescalabilityoftheBGP
routingprotocolinatypicalBGPnetwork
LearnerSkillsandKnowledge
Thissubtopicliststheskillsandknowledgethatlearnersmustpossesstobenefit
fullyfromthecourse.ThesubtopicalsoincludesrecommendedCiscolearning
offeringsthatlearnersshouldfirstcompletetobenefitfullyfromthiscourse.
Intermediate to advanced knowledge of Cisco IOS Software configuration
Configuring and troubleshooting RIP, EIGRP, OSPF and IS-IS
Skills and knowledge equivalent to those learned in:
Interconnecting Cisco Networking Devices v2.0, Part 1 (ICND1 v2.0) and
Part 2 (ICND2 v2.0), or
Interconnecting Cisco Networking Devices: Accelerated Version 2.0
(CCNAX v2.0)
Implementing Cisco IP Routing (ROUTE v2.0)
Building Cisco Service Provider Next-Generation Networks Part 1
(SPNGN1) v1.2
Building Cisco Service Provider Next-Generation Networks Part 2
(SPNGN2) v1.2
Overview

Thistopicdescribesthecoursegoalandobjectives.
Upon completing this course, you will be able to meet these objectives:
Describe how to configure, monitor, and troubleshoot basic BGP to enable
interdomain routing in a network scenario with multiple domains
Describe how to use BGP policy controls to influence the BGP route selection
process in a network scenario in which you must support connections to multiple
ISPs
Describe how to use BGP attributes to influence the route selection process in a
network scenario where you must support multiple connections.
Describe how to successfully connect the customer network to the Internet in a
network scenario in which multiple connections must be implemented
Upon completing this course, you will be able to meet these objectives:
Describe how to configure the service provider network to behave as a transit
AS in a typical implementation with multiple BGP connections to other
autonomous systems.
Enable route reflection as possible solution to BGP scaling issues in a typical
service provider network with multiple BGP connections to other autonomous
systems
Describe the available BGP tools and features to optimize the scalability of the
BGP routing protocol in a typical BGP network
Thegoalofthecourseistoprovidelearnerswithin-depthknowledgeofBGP.
CourseGoalandObjectives

Thistopicpresentsthesuggestedflowofthecoursematerials.
AM PM
Day1 CourseIntro
Module1:BGPOverview
Module1(Cont.)
Day2 Module2:BGPTransitAutonomousSystems Module3:RouteSelectionUsingPolicy
Controls
Day3 Module3(Cont.) Module4:RouteSelectionUsingAttributes
Day4 Module4(Cont.)
Module5:Customer-to-ProviderConnectivity
withBGP
Module5(Cont.)
Day5 Module6:ScalingServiceProviderNetworks
Module7:OptimizingBGPScalability
Module7(Cont.)
Theschedulereflectstherecommendedstructureforthiscourse.Thisstructure
allowsenoughtimefortheinstructortopresentthecourseinformationandforyouto
workthroughthelabactivities.Theexacttimingofthesubjectmaterialsandlabs
dependsonthepaceofyourspecificclass.
CourseFlow

Thistopicpresentsthetrainingcurriculumforthiscourse.
YouareencouragedtojointheCiscoCertificationCommunity,adiscussionforum
opentoanyoneholdingavalidCiscoCareerCertification(suchasCiscoCCIE®,
CCNA®,CCDA®,CCNP®,CCDP®,CCIP®,CCNP®SecurityandCCNP®Voice,or
CCSP™).ItprovidesagatheringplaceforCiscocertifiedprofessionalstoshare
questions,suggestions,andinformationaboutCiscoCareerCertificationprograms
andothercertification-relatedtopics.Formoreinformation,visit
http://www.cisco.com/web/learning/training-index.html.
YourTrainingCurriculum

Thissubtopicpresentsthelearningcenterinformation.
Additionalinformationisavailableat:
https://learningnetwork.cisco.com/community/learning_center
https://learningnetwork.cisco.com/community/certifications/ccna.
Your name
Your company
Job responsibilities
Skills and knowledge
Brief history
Objective
TrainingCurriculum

ThistopicpresentstheCiscoiconsandsymbolsthatareusedinthiscourse,aswell
asinformationonwheretofindadditionaltechnicalreferences.
CiscoGlossaryofTerms
ForadditionalinformationonCiscoterminology,refertotheCiscoInternetworking
TermsandAcronymsglossaryoftermsat
http://docwiki.cisco.com/wiki/Category:Internetworking_Terms_and_Acronyms_(ITA)
.
AdditionalReferences

Introduction
BGPisaninterdomain(interautonomoussystem)routingprotocolthatisusedto
exchangeroutinginformationfortheInternet.BGP,bydesign,isaveryrobustand
scalableroutingprotocol.BecauseBGPisdeployedasaninterdomainrouting
protocol,ithasmanyrichfeaturesthatallowyoutoimplementavarietyofrouting
policies.
InthismoduleyouwilllearnthebasicBGPtechnology,detailsaboutBGPsession
establishmentandroutinginformationexchange.YouwillalsolearnthebasicCisco
IOSBGPconfigurationandtroubleshootingtasks.
Uponcompletingthismodule,youwillbeableto:
DefineshowtoidentifyappropriateBGPuseandlimitations.
DescribeBGPpathattributesandthefunctionalityofeachattribute.
DescribeBGPneighborsandneighborsessionestablishmentprocedures.
DescribeBGProuteprocessingandBGProutingupdates
DescribehowtoconfigurebasicBGP
DescribehowtoperformthestepstocorrectbasicBGPconfigurationand
sessionerrors
BGPOverview

Overview
TheBGPisaveryrobustandscalableroutingprotocol.Youcanseethatfromthe
factthatitistheroutingprotocolthatisusedontheInternet.Serviceprovidersand
customernetworks,suchasuniversitiesandcorporations,usuallyuseanIGPsuch
asEIGRP,OSPF,orIS-ISfortheexchangeofroutinginformationwithintheir
networks.AnycommunicationbetweentheseIGPsandtheInternetorbetween
serviceproviderswillbeaccomplishedthroughBGP.Thislessonintroducesbasic
BGPcharacteristicsandfeatures.
Uponcompletingthislesson,youwillbeableto:
Describeinterdomainroutinginrelationtothedesigngoalsofinterdomain
routingprotocols
Explaintheneedforaninterdomainroutingprotocol
ListthebasiccharacteristicsofBGP
ListBGPdevelopmentconsiderations
Identifywhenasingle-homedcustomershoulduseBGPasaninterdomain
routingprotocol
DescribewhenBGPisappropriateforthemultihomedcustomer
DescribetheuseofBGPinatransitautonomousbackbone
ListsomeofthelimitationsofBGP
IntroducingBGP

WhentalkingtopeoplewhoareinvolvedwithInternetrouting,network
administratorscommonlyusetheterms"autonomoussystem,""interdomainrouting,"
"interiorroutingprotocol,"and"exteriorroutingprotocol."
An AS is a collection of networks under a single technical administration.
An IGP is run inside an AS, resulting in optimum intra-AS routing.
An EGP is run between autonomous systems to enable routing policies and
improve security.
Theseterms,whichmaybeconfusingforanovice,aredefinedasfollows:
AnASisacollectionofnetworksunderasingletechnicaladministration.Other
definitionsrefertoacollectionofroutersorIPprefixes,butintheendtheyare
allessentiallythesamething.Theimportantprincipleisthetechnical
administration,whichmeanssharingthesameroutingprotocolandrouting
policy.Legalandadministrativeownershipoftheroutersdoesnotmatterwith
autonomoussystems.AutonomoussystemsareidentifiedbyASnumbers.AS
numbersare16-bit,unsignedintegersrangingfrom1to65,535.PublicAS
numbers(1to64,511)areassignedandmanagedbyanInternetregistry.A
rangeofprivateASnumbers(64,512to65,535)hasbeenreservedfor
customersthatneedanASnumbertorunBGPintheirprivatenetworks.New
32-bitASnumberswerecreatedwhentheASnumberpoolfromIANA
approachedexhaustion.
Interdomainroutingisroutingbetweenautonomoussystems.Itisusuallybased
onasetofpolicies,notjustthetechnicalcharacteristicsoftheunderlying
infrastructure.
Exteriorroutingprotocols(BGPbeingtheonlyexteriorroutingprotocolthatis
usedtoday)areprotocolsthathavetherightsetoffunctionstosupportvarious
interdomainroutingpolicies.Suchprotocolsarecontrarytointeriorrouting
protocols(forexample,OSPF,IS-IS,orEIGRP).Interiorroutingprotocolsfocus
onlyonfindingtheoptimum(usuallyfastest)routebetweentwopoints,without
respecttoroutingpolicies.
DesignGoalsforInterdomainRouting
Scalability
The Internet has more than 600,000 aggregated routes and is still growing.
Secure routing information exchange
Routers from another AS cannot be trusted.
Tight filters are required; authentication is desirable.
Support for routing policies
Routing between autonomous systems might not always follow the optimum
path.
Exterior routing protocols have to support a wide range of customer
requirements.
InterdomainRouting

Theexampleillustratestheneedforaninterdomainroutingprotocol.Itdepictstwo
companiesthatareconnectedtotheInternetvialeasedlinesofdifferingspeeds.
Assuming standard IGP route selection rules, how will the traffic between AS 1
and AS 20 flow?
Will AS 2 allow this traffic?
How would you solve this problem with OSPF or EIGRP?
InroutingprotocolsotherthanBGP,routingdecisionsarenormallymadetotake
advantageofthehighestbandwidthavailable.Doingsowouldmaketrafficbetween
AS1andAS20flowviaAS2.ThissituationwouldallowtheusersinCompanyAto
generatetrafficontheInternetaccesslinethatwaspurchasedandpaidforby
CompanyB.So,thissituationisnotdesirableforAS2.
CompanyBisunlikelytoallowtrafficfromCompanyAtoreachtheInternetusing
theCompanyBaccessline.CompanyB,infact,couldcreateanaccess-listblocking
allIPpacketsfromAS1frombeingtransmittedonthe2-Mbpsseriallinefrom
CompanyBtotheInternet.ThatactionwouldcreateablackholebecauseCompany
AwouldsenditspacketstoCompanyBandthenCompanyBwoulddropthem.
Toavoidthissituation,CompanyBmustmakesurethatthepacketsfromCompany
AthataredestinedfortheInternetareneversenttoCompanyB.Also,CompanyB
mustmakesurethatpacketsfromtheInternetthataredestinedforCompanyAare
neversentusingtheInternetaccesslinetoCompanyB.CompanyBcould
implementaroutingpolicythatindicatesthatAS2willreceivereachability
informationfromAS1foritsownusebutthatAS2willnotforwardthatparticular
informationtotheInternet.Also,AS2willreceivereachabilityinformationaboutthe
InternetfromitsISPbutwillneverforwardthatinformationtoAS1.Onlynetworks
localtoAS2willbesenttoAS1.
TheresultofthisroutingpolicywouldbethatAS1seesallnetworkswithinAS2as
reachableoverthe2-MbpslinkthatdirectlyconnectsAS1withAS2.Theroutersin
AS1willnotseetherestoftheInternetasreachablethroughAS2.Therefore,AS1
forwardspacketstowardtheInternetdirectlyoverthe64-kbpslink.
Also,theIPnetworksinAS1willappearreachablebyAS2overthe2-Mbpslink,
whichdirectlyconnectsAS1withAS2.However,theISPwillnotreceivethat
reachabilityinformationfromAS2;itwillreceiveitonlyfromAS1.Therefore,traffic
fromtheInternettoCompanyAwillbetransmittedoverthe64-kbpslink.
ThisroutingpolicyiseasytoimplementwhennetworkadministratorsareusingBGP
butimpossibletoimplementwithanyotherroutingprotocol.EIGRP,forexample,
candoroutefilteringonlyonindividualIPsubnets,notonallprefixesbelongingtoan
AS.Link-stateprotocols,suchasOSPF,cannotdopowerfulroutefilteringatall.
BGPusesASnumberstodoroutefiltering.Thisapproachmakesitpossibletoscale
BGPoverInternet.
WhyExternalRoutingProtocols?

BGPisadistancevectorprotocol.So,BGPannouncestoitsneighborsthoseIP
networksthatitcanreachitself.Thereceiversofthatinformationsay,"IfthatAScan
reachthosenetworks,thenIcanreachthemviatheAS."
BGP is a distance vector protocol with enhancements:
Reliable updates
Triggered updates only
Rich metrics (called path attributes)
BGP is designed to scale to huge internetworks
IftwodifferentpathsareavailabletoreachthesameIPsubnet,thentheshortest
pathisused.Thisdeterminationrequiresamechanismcapableofmeasuringthe
distance.Alldistancevectorprotocolshavesuchmechanisms,called"metrics."BGP
containsaverysophisticatedmethodofcomputingtheshortestpathbyusing
attributesthatareattachedtothereachableIPsubnet.
BGPsendsroutingupdatestoitsneighborsbyusingareliabletransport.This
techniquemeansthatthesenderoftheinformationalwaysknowsthatthereceiver
hasactuallyreceivedtheinformation.Asaresult,thereisnoneedforperiodic
updatesorroutinginformationrefreshes.InBGP,onlyinformationthathaschanged
istransmitted.
BGPenablesreliableinformationexchangeandiscapableofbatchingtherouting
updates.ThesetwocharacteristicsallowBGPtoscaletolarge,Internet-sized
networks.
Reliable updates:
TCP used as transport protocol
No periodic updates
Periodic keepalives to verify TCP connectivity
Triggered updates are batched and rate-limited
Every 5 seconds for internal peer
Every 30 seconds for external peer
ThereliabletransportmechanismthatBGPusesisstandardTCP.BGPisan
applicationprotocolthatusesboththeTCPandIPprotocolsforreliableconnections.
BecauseBGPusesareliabletransport,thesenderknowsthatthereceiverhas
actuallyreceivedthetransmittedinformation.Thiscapabilitymakesperiodicupdates
unnecessary.
ArouterthathasreceivedreachabilityinformationfromaBGPpeermustbesure
thatthepeerrouterisstillthere.Otherwise,theroutercouldroutetraffictowarda
next-hoprouterthatisnolongeravailable,causingtheIPpacketstobelostina
blackhole.TCPdoesnotprovidetheservicetosignalthattheTCPpeerhasbeen
lost,unlesssomeapplicationdataisactuallytransmittedbetweenthepeers.Inan
idlestate,wherethereisnoneedforBGPtoupdateitspeer,thepeercouldbe
unreachablewithoutTCPdetectingit.Therefore,BGPtakescareofdetectingthe
presenceofneighborsbyperiodicallysendingsmallBGPkeepalivepacketstothem.
ThesepacketsareconsideredapplicationdatabyTCPandthereforemustbe
transmittedreliably.AccordingtotheBGPspecification,thepeerrouteralsomust
replywithaBGPkeepalivepacket.
WhenBGPwascreated,akeydesigngoalwastobeabletohandleenormous
amountsofroutinginformationinverylargeandcomplexnetworks.Inthis
environment,manylinkscouldgoupanddown(flapping),causingtopology
changes.Theroutingprotocolmustconsiderallthesechanges.Butlow
convergencetimeandquickresponsestotopologychangesrequirefastupdates
andhighCPUpowertoprocessbothincomingandoutgoingupdates.Thelargerthe
network,themoreupdatespersecondcanbeexpectedifimmediateresponseis
required.Thepresenceoftoomanyupdatesinlargenetworkscanjeopardize
networkscalability.
ThedesignersofBGPdecidedthatscalabilitywasamoreimportantissuethanlow
convergencetime,soBGPwasdesignedtobatchupdates.Anychangesthatare
receivedwithinthebatchintervaltimearesaved.Attheendoftheinterval,onlythe
remainingresultisforwardedinanoutgoingupdate.Ifanetworkflapsseveraltimes
duringthebatchinterval,onlythestateattheendoftheintervalissentinanupdate.
BGPCharacteristics

ThebatchingfeatureavoidsanuncontrolledfloodofupdatesallovertheInternet
becausethebatchingprocedurelimitsthenumberofupdates.
Common BGP uses:
Customers that are connected to more than one service provider
Service provider networks (transit autonomous systems)
Service providers exchanging traffic at an exchange point (CIX, GIX, NAP, ...).
NAP defines the exchange points between region and core.
CIX or GIX points define international exchange points.
Network cores of large-enterprise customers
NAP—Network Access Point, CIX—Commercial Internet eXchange, GIX—Global
Internet eXchange

ThedesignersoftheBGPprotocolhavesucceededincreatingahighlyscalable
routingprotocol,whichcanforwardreachabilityinformationbetweenautonomous
systems(alsoknownasroutingdomains).Thedesignershadtoconsideran
environmentwithanenormousnumberofreachablenetworksandcomplexrouting
policiesthatweredrivenbycommercialratherthantechnicalconsiderations.
BGP was designed to perform well in the following areas:
Interdomain routing applications
Huge internetworks with large routing tables
Environments that require complex routing policies
Some design tradeoffs were made:
BGP uses TCP for reliable transport—CPU-intensive
Scalability is the top priority—slower convergence
TCP,awell-knownandwidelyprovenprotocol,waschosenasthetransport
mechanism.ThatdecisionkeptBGPsimple,butitincreasedtheCPUresource
requirementsforroutersrunningBGP.Thepoint-to-pointnatureofTCPalso
introducesaslightincreaseinnetworktraffic.Thisincreaseoccursbecauseany
updatethatshouldbesenttomanyreceivershastobemultipliedintoseveral
copies.ThosecopiesarethentransmittedonindividualTCPsessionstothe
receivers.
Whenevertherewasadesignchoicebetweenfastconvergenceandscalability,
scalabilitywasthetoppriority.Thebatchingofupdatesandtherelativelylow
frequencyofkeepalivepacketsareexamplesofdesignersplacingconvergencetime
secondtoscalability.
BGPconvergencetimescanbemodifiedwiththe
configurationofnondefaultvaluesforBGPscanand
advertisementtimers.
BGPDevelopmentConsiderations

NormalInternetaccesstoasingleISPdoesnotrequireBGP;staticroutesaremore
commonlyusedtohandlethissituation.SmallISPsthatbuyInternetconnectivity
fromotherISPsusethistypeofconnectivitymoreoften.Especiallyiftheywantto
starttheirbusinesstheproperway—byusingtheirownASnumberandhavingtheir
ownaddressspace.
Large customer or small ISP connecting to the Internet
ThefigureshowsacustomernetworkthatisconnectedtotheInternetusingasingle
ISP,butsuchascenarioisgenerallynotthecasewhenBGPisused.
UseGuidelines—Single-HomedCustomers
Use BGP between the customer and the service provider in these situations:
Customers multihomed to the same service provider
Customers that need dynamic routing protocol with the service provider to detect
failures
Hint: Use private AS number for these customers.
Smaller ISPs that need to originate their routes in the Internet
Use static routes in all other cases:
Static routes always simpler than BGP
Undercertainconditions,BGPmustbeconfiguredbetweenthecustomerandthe
serviceprovider.Forexample,BGPisneededwhencustomersaremultihomedto
thesameserviceprovider,thatis,thecustomernetworkshavemultiplelinks
connectingthemwiththeserviceprovidernetwork.Suchcustomersrequiredynamic
routingprotocolinteractionwiththeserviceprovidertodetectlinkfailures.PrivateAS
numbers(ASnumbersbetween64,512and65,534orbetween4,200,000,000—
4,294,967,294)areusuallyimplementedinBGPconfigurationsforthesecustomers.
CustomersthatplantoconnecttomorethanoneISP,andsmallISPsthatplanto
havemultipleInternetconnectionsinthefuture,usuallyuseBGPwiththeirservice
provider.Theyusethisoptionevenwhentheyhaveasinglelinkwiththeservice
providerinordertobepreparedforfutureupgrades.
Inallothercases,usingstaticroutesfromtheserviceprovidertowardthecustomer
andusingadefaultstaticroutefromthecustomertowardtheserviceprovideristhe
preferredmethodofprovider-to-customerroutingintheInternet.
Single-HomedCustomers

TheBGPisappropriateforthemultihomedcustomer.Thecustomermusthaveits
ownofficiallyassignedASnumber.Thecustomerisalsoresponsibleforannouncing
itsownIPnetworkstobothISPs.BothISPsforwardallroutesthattheyreceivefrom
theInternettothecustomernetwork.Thecustomershouldavoidforwardingany
routinginformationthattheyreceivefromoneISPtotheother.Otherwise,the
customerbecomesatransitproviderbetweenthetwoISPs.Mostcustomersliketo
avoidthissituationbecauseitcreatesaresourcedrainonroutersandnetworklinks.
Customer connecting to more than one service provider
ThefigureillustratesacustomernetworkthatisconnectedtotwodifferentISPs,
requiringtheuseofBGPforfullredundancy.
Fullredundancyisachievedinthissetup.Ifeitherofthetwoaccesslinksfails,the
reachabilityinformationthatwaspreviouslytransmittedonthenow-failedlinkis
withdrawn.ButBGPreachabilityinformationisstillannouncedbythecustomer
routerovertheremaininglink.Thus,theISPstillseesallnetworkswithinthe
customerASasreachablebutonlyovertheremainingpath.Also,receivedroutes
fromtheInternetarewithdrawnwhenthelinkfailsbutroutesthatarereceivedover
theremaininglinkarenotaffected.Thus,theInternet,includingtheISPtowhichthe
directconnectionhasfailed,isstillreachableovertheremaininglink.
Thisdesigncanalsohandleotherproblems.Acasewherebothaccesslinksare
available,buttheconnectionbetweenoneoftheISPsandtherestoftheInternetis
lost,worksasfollows.TheISPthathasaproblemreachingtherestoftheInternet
withdrawsallthoseroutesandtellsthecustomerASthatitcannolongerreachthe
Internet.ButthenetworkslocaltotheISPwiththeInternetreachabilityproblemare
stillreachablebythecustomer,sothoseroutesarenotwithdrawn.Thenetworksin
thecustomerASarestillreachablebytheISPintrouble,butthatISPcannolonger
forwardtheannouncementtotherestoftheInternet.TherestoftheInternetwill,
however,seethecustomernetworksasreachableoverthepathtotheotherISP,
whichisfullyfunctional.
UserGuidelines—MultihomedCustomers
BGP is almost mandatory for multihomed customers.
Multihomed customers have to use public AS numbers.
Multihomed customers should use a provider-independent address space.
Thefollowinguseguidelinesapplytomultihomedcustomers:
AlthoughtherearedesignswhereBGPcouldbeavoided,mostmultihomed
customersneedtouseBGPwiththeirserviceproviders.
MultihomedcustomersmusthavetheirownASnumbers.Itisrecommendedto
useapublicASnumber(between1and23.455,between23.457and64.534,or
between131.072and4.199.999.999).
Multihomedcustomersshoulduseaprovider-independentaddressspace,which
isallocatedtothemdirectlybyanInternetregistry.
MultihomedCustomers

BGPismostcommonlyimplementedinserviceprovidernetworkstoensure
connectivitybetweencustomersandtherestoftheInternet.AnISPmightexchange
BGPupdateswiththecustomersorusestaticroutingtowardthem.ThatISPalso
connectstootherISPsandisrequiredtoforwardtheroutesthatarereceivedfrom
customerstotherestoftheInternet,aswellasintheotherdirection.Asaresult,
userdatatrafficstartstoflowbetweenthecustomersandtherestoftheInternet.
Suchanetwork,providingtransitservicestotrafficthatisoriginatedinother
networks,iscalleda"transitautonomoussystem,"or"transitAS."AtransitASisan
ASthatexchangesBGProutinginformationwithotherautonomoussystemsand
forwardsinformationthatisreceivedfromoneAStoanotherAS.
Using BGP to exchange routes is mandatory for transit autonomous systems
(provider networks carrying customer traffic).
Whenroutinginformationisforwarded,thereceiverwillseeanavailablepathtoa
destinationandstarttransmittinguserdatatowardthedestinationusingthatpath.
ThetransitASmustbepreparedtorelaytheuserdata.
ISPnetworkscansometimeshavededicatedpeer-to-peerconnections.These
connectionsaresometimescalledprivatepeering.ISPsalsointerconnectat
exchangepoints.Technically,anexchangepointisjustamultiaccesssubnet:aLAN
(forexample,aGigabitEthernetorFastEthernetswitch),aDPTring,oranATM
switch.ManyISPscanconnecttoanexchangepointandestablishBGPsessions.
Thebenefitofanexchangepointisthatitishighlyscalable.Thereisnoneedfor
morephysicalinterfacesintheISPborderrouterwhenanewISPislaunched.Ifthe
alreadyestablishedISPswantto,theycanopenaBGPsessionwiththenewISP.
Whenthissessionisopened,theystarttoexchangeroutinginformationandthen
userdatatrafficovertheexchangepoint.
TransitAutonomousSystems

BGP-enabledroutersmakeforwardingdecisionsbasedonthedestination
IPaddressonly.ThesourceIPaddressdoesnotaffecttheBGPdecision.
BGP and associated tools cannot express all routing policies.
You cannot influence the routing policies of downstream autonomous systems.
“BGP does not enable one AS to send traffic to a neighbor AS intending that the
traffic take a different route from that taken by traffic originating in the neighbor AS.”
(RFC 1771)
IfanASactsasatransitASforotherautonomoussystems,theIPpacketsthatare
createdandtransmittedfromtheotherautonomoussystemsarenottreated
differentlyfromtheIPpacketsthatarecreatedandtransmittedfromthelocalAS.If
thelocalAShasdecidedthatthebestpathtoreachacertaindestinationisviaa
specificnext-hoprouter,thenitwillroutealluserdatatraffictowardthefinal
destinationviathatspecificnext-hoprouter.ThelocalASmakesitsdecisionbased
ondestinationaddressonly,regardlessofwhichIPhosthassourcedtheIPpackets.
BGPLimitations

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
BGP is an enhanced distance vector protocol with reliable transport.
Customers that plan to connect to more than one ISP, and small ISPs that plan
to have multiple Internet connections in the future, usually use BGP with their
service provider. Most multihomed customers use BGP with their service
providers.
A transit AS is an AS that exchanges BGP routing information with other
autonomous systems and forwards information that is received from one AS to
another AS.
In the BGP, you cannot influence the routing policies of downstream
autonomous systems.
Summary

Overview
Toaidroutersincalculatingthebestroutetoselectwhenmultiplepathstoa
particulardestinationexist,routesthatarelearnedviaBGPhavepropertiesthatare
associatedwiththem.ThesepropertiesarereferredtoasBGPpathattributes.An
understandingofhowBGPpathattributesinfluencerouteselectionisrequiredto
designrobustBGPnetworks.
Uponcompletingthislesson,youwillbeableto:
DescribetheconceptofBGPpathattributes
Explainthedifferencebetweenmandatoryanddiscretionarywell-knownBGP
attributes
ExplainthedifferencebetweennontransitiveandtransitiveoptionalBGP
attributes
DescribethefunctionalityoftheAS-pathattribute
Describethefunctionalityofthenext-hopattribute
UnderstandingBGPPathAttributes

EachBGPupdateconsistsofoneormoreIPsubnetsandasetofattributesthatare
attachedtothem.
BGP metrics are called path attributes.
BGP attributes are categorized as "well-known" and "optional."
All compliant implementations must recognize well-known attributes.
You should not expect that all implementations can recognize optional attributes.
Only some implementations (could be private) are able to recognize optional
attributes.
AllBGPimplementationsarerequiredtorecognizecertainattributes.Those
attributesarecalled"well-knownBGPattributes."
Attributesthatarenotwell-knownarecalled"optional."Optionalattributesareeither
specifiedinalaterextensionofBGPoreveninprivatevendorextensionsthatare
notdocumentedinastandarddocument.
BGPPathAttributes

Well-knownattributesaredividedintomandatoryanddiscretionary.
All well-known attributes are propagated to other neighbors.
The difference between mandatory and discretionary well-known attributes:
Mandatory well-known attributes must be present in all update messages.
Discretionary well-known attributes are optional; they could be present in
update messages.
Thereisasmallsetofthreespecificwell-knownattributesthatarerequiredtobe
presentoneveryupdate.Theseattributesarethenext-hop,AS-path,andorigin
attributesandarereferredtoas"mandatorywell-knownattributes."
Otherwell-knownattributesmayormaynotbepresent,dependingonthe
circumstancesunderwhichtheupdatesaresentandthedesiredroutingpolicy.The
well-knownattributesthatcouldbepresent,butarenotrequired,arecalled
"discretionarywell-knownattributes."
WhenarouterreceivesaBGPupdate,itanalyzestheattachedattributesand
comparesthemwiththeattributesthatwereattachedtothesameIPsubnetwhenit
wasreceivedfromadifferentsource.Therouterthenmakesadecisionaboutwhich
sourceindicatesthebestpathtotheparticularIPsubnet.Thebestrouteis
propagated,alongwithitswell-knownattributes,tootherBGP-speakingneighbors.
MandatoryWell-KnownBGPAttributes
Origin
The origin of a BGP route
i RouteoriginatedinanIGP
e RouteoriginatedinEGP
? RoutewasredistributedintoBGP
AS-path
Sequence of AS numbers through which the network is accessible
Next-hop
IP address of the next-hop router
Thethreemandatorywell-knownattributesareorigin,AS-path,andnext-hop:
Origin:WhenarouterfirstoriginatesarouteinBGP,itsetstheoriginattribute.
IfinformationaboutanIPsubnetisinjectedusingthenetworkcommandorvia
aggregation(routesummarizationwithinBGP),theoriginattributeissetto"i"for
IGP.IfinformationaboutanIPsubnetisinjectedusingredistribution,theorigin
attributeissetto"?"forunknownorincompleteinformation(thesetwowords
havethesamemeaning).Theorigincode"e"wasusedwhentheInternetwas
migratingfromEGPtoBGPandisnowobsolete.
AS-path:TheegressroutermodifiestheAS-pathattributeeverytime
informationaboutaparticularIPsubnetpassesoveranASborder.Whena
routerfirstoriginatesarouteinBGP,theAS-pathattributeisempty.Eachtime
thattheroutecrossesanASboundary,thetransmittingASprependsitsownAS
numbertoappearfirstintheASpath.Youcantrackthesequenceof
autonomoussystemsthroughwhichtheroutehaspassedbyusingtheAS-path
attribute.
Next-hop:Therouteralsomodifiesthenext-hopattributeastheroutepasses
throughthenetwork.ThisattributeindicatestheIPaddressofthenext-hop
router.Thenext-hoprouteristheroutertowhichthereceivingroutershould
forwardtheIPpacketstoreachthedestinationthatisadvertisedintherouting
update.
DiscretionaryWell-KnownBGPAttributes
Local preference
Used for consistent routing policy within AS
Atomic aggregate
Informs the neighbor AS that the originating router aggregated routes
AllBGPimplementationsmustsupportdiscretionarywell-knownattributes.However,
Well-KnownBGPAttributes

discretionarywell-knownattributesdonothavetobepresentinallBGPupdates.
Routersusediscretionarywell-knownattributesonlywhenthosefunctionsare
required.
Thefollowingaredescriptionsofthesetwoattributes:
Localpreference:Localpreferenceisusedintherouteselectionprocess.This
attributeiscarriedwithinanASonly.Therouterprefersaroutewithahighlocal
preferencevaluetoaroutewithalowvalue.Bydefault,routesthatarereceived
fromapeerASaretaggedwiththelocalpreferencesettoavalueof100before
theyareenteredintothelocalAS.IfthisvalueischangedthroughBGP
configuration,theBGPselectionprocessisinfluenced.Becauseallrouters
withintheASgettheattributealongwiththeroute,aconsistentroutingdecision
ismadethroughouttheAS.
Atomicaggregate:Theatomicaggregateattributeisattachedtoaroutethatis
createdasaresultofroutesummarization(called"aggregation"inBGP).This
attributesignalsthatinformationthatwaspresentintheoriginalroutingupdates
mayhavebeenlostwhentheupdatesweresummarizedintoasingleentry.

OptionalBGPattributesaretransitiveornontransitive.
The difference between transitive or nontransitive optional BGP attributes:
Transitive optional attributes: Propagated to other neighbors if not
recognized; partial bit set to indicate that the attribute was not recognized
Nontransitive optional attributes: Discarded if not recognized
Recognized optional attributes are propagated to other neighbors based on their
meaning (not constrained by transitive bit).
Whenarouterreceivesanupdatethatcontainsanoptionalattribute,therouter
checkstoseewhetheritsimplementationrecognizestheparticularattribute.Ifit
does,thentheroutershouldknowhowtohandleitandwhethertopropagateit.
Iftherouterdoesnotrecognizetheattribute,theBGPimplementationshouldlook
forthetransitivebitintheattributecode.Someattributes,althoughnotrecognized
bytherouter,mightstillbehelpfultoupstreamroutersandshouldbepropagated.
Theseattributes(called"transitiveoptionalattributes")arepropagatedevenwhen
theyarenotrecognized.Ifarouterpropagatesanunknowntransitiveoptional
attribute,itsetsanextrabitintheattributeheader.Thisbitiscalledthe"partialbit."
The"partialbit"indicatesthatatleastoneoftheroutersinthepathdidnotrecognize
themeaningofatransitiveoptionalattribute.
Otherattributes,called"nontransitiveoptionalattributes,"mightbeofnovalueto
upstreamroutersifarouterearlierinthepathdoesnotrecognizethem.Routersthat
donotrecognizetheseattributesdropthem.
Nontransitive attributes
MED:
Used to discriminate between multiple entry points to a single AS
Transitive attributes
Aggregator
Specifies IP address and AS number of the router that performed route
aggregation
Community
Used for route tagging
OneofthenontransitiveoptionalattributesistheMEDattribute,whichalso
influencestheBGProuteselectionprocess.Wheneverthereareseverallinks
betweentwoadjacentautonomoussystems,oneAScanusetheMEDattributeto
tellanotherAStopreferoneofthelinksforspecificdestinations.
Transitiveoptionalattributesincludethefollowing:
Aggregator:IdentifiestheASandtherouterwithinthatASthatcreatedaroute
summarization,oraggregate.
Community:Anumericalvaluethatcanbeattachedtocertainroutesasthey
passaspecificpointinthenetwork.Forfilteringorrouteselectionpurposes,
otherrouterscanexaminethecommunityvalueatdifferentpointsinthenetwork
.BGPconfigurationmaycauserouteswithaspecificcommunityvaluetobe
treateddifferentlythanothers.
OptionalBGPAttributes

AnedgeroutermodifiestheAS-pathattributeeverytimeinformationabouta
particularIPsubnetpassesoveranASborder.Whenarouterfirstoriginatesaroute
inBGP,theAS-pathattributeisempty.ThelocalASnumberisprependedtotheAS
patheachtimethattheroutecrossesanASboundary.
The AS-path attribute is empty when a local route is inserted in the BGP table.
The AS number of the sender is prepended to the AS-path attribute when the
routing update crosses AS boundary.
The receiver of BGP routing information can use the AS-path attribute to
determine through which AS the information has passed.
An AS that receives routing information with its own AS number in the AS path
silently ignores the information.
ThereareseveralconsequencesofAS-pathattributebehavior:
WhenyouexamineBGProutes,theASpathcanbeinterpretedasthe
sequenceofautonomoussystemsthatmustbepassedthroughtoreachthe
indicatednetwork.TheASthatoriginallyinjectedtherouteintoBGPisalways
foundattherightmostendoftheASpath.
Itiseasytodistinguishlocalroutesfromroutesthathavebeenreceivedfrom
otherautonomoussystems.BGProuteswithanemptyASpathwereinjected
intoBGPfromwithinthelocalAS.
TheAS-pathattributeisalsousedtoavoidroutingloops.Whenarouterreceivesa
BGPupdate,itcheckstheAS-pathattributeandlooksforitsownASnumber.Ifthat
numberisfoundintheASpath,thentheroutehasalreadycrossedthelocalASand
therouterisnowfacedwitharoutinginformationloop.Toavoidthissituation,the
routeissilentlyignored.
AS-PathAttributeExample
ThefigureshowshowBGPlooppreventionworks.
Thenetwork10.0.0.0/8islocaltoAS123.TherouterinAS123injectstheroute
10.0.0.0/8intoBGPwithanemptyAS-pathattribute.
WhentheedgerouterinAS123sendsaroutingupdateaboutnetwork10.0.0.0/8to
AS2,theASnumber123isprependedtotheemptyASpath,resultinginanAS
pathconsistingofonly123.Thesendingrouterdoestheprependingaspartofthe
outgoingBGPupdateprocessing.WhiletherouteisstillwithinAS123,theAS-path
entryforAS123doesnotappearintheASpath.
TherouterinAS21propagatestheinformationaboutthenetwork10.0.0.0/8toAS
37.BecauseitissendingtheBGPupdatetoAS37,itprependsitsownASnumber
totheASpath,resultinginanASpathconsistingofthesequenceof21123.
AS37alsopropagatesthereceivedroutetoAS123.Toavoidaroutingloop,where
AS123mighttrytoreachitsownnetwork(10.0.0.0/8)viaAS37,BGPhasabuilt-in
mechanismthatcausestherouterinAS123todroptheincomingupdateassoonas
itfindsitsownAS123intheASpath.Noerrorwillbesignaled,becausenothingis
reallywrong.ItismerelytheprocedurethatBGPusestoavoidaroutinginformation
AS-PathAttribute
loop.

1.
2.
3.
TheBGPnext-hopattributeidentifiestheIPaddressthataroutershoulduseto
forwardpacketstowardthedestinationthatisannouncedinaBGProutingupdate.
The next-hop attribute indicates the next-hop IP address that is used for packet
forwarding.
It is usually set to the IP address of the sending EBGP router.
Can be set to a third-party IP address to optimize routing.
Inmostcases,thesendingroutersetsthenext-hopattributetoitsownIPaddress.
Therearecases,however,wherethenext-hopIPaddresspointstoathirdrouter.
Next-HopProcessing
Thefigureshowstheusualnext-hopprocessing.
Next-hop attribute is usually set to the IP address of the sending router.
Theprocessingisasfollows:
R2announcesnetwork21.0.0.0/8toR1.TheoutgoingIPaddressofR2(the
addressthatisusedtoestablishtheBGPTCPsession)isusedastheBGPnext
hop.
R1receivestheroutingupdateandinstallsitinitsBGPtableandroutingtable.
ShouldR1needtoforwardpacketstowardnetwork21.0.0.0/8,itwouldsend
thosepacketstowardtheIPaddress10.0.0.1(R2).
WhenR1propagatestheinformationabout21.0.0.0/8toR3,itsetstheBGP
next-hopattributetoitsownIPaddress.
Next-HopProcessingonSharedMedia
If the receiving BGP router is in the same subnet as the current next-hop
address, the next-hop address remains unchanged to optimize packet
forwarding.
Thenext-hopprocessingchangesiftheBGProutersconnecttoasharedsubnet.In
thefigurehere,ifR1announcesthenetwork21.0.0.0/8toR3withtheBGPnext-hop
addresssettoR1,thepacketsfromAS37towardnetwork21.0.0.0/8willhaveto
crossthesharedLANtwice.R1thussendstheroutingupdatetowardR3withthe
BGPnext-hopaddressunchanged(stillpointingtowardR2),allowingoptimaldata
transferacrossthesharedLAN.
Moreformally,theBGPnext-hoprulestatesthatifthe
Next-HopAttribute

currentBGPnexthopisinthesameIPsubnetasthe
receivingrouter,thenext-hopaddressisnotchanged;
otherwise,thenext-hopattributeischangedtotheIP
addressofthesendingrouter.
Next-HopProcessingonNBMANetwork
BGP next-hop processing can break connectivity with improper network designs
over partially meshed WAN networks.
BGPnext-hopprocessingresultsinoptimumdatatransferoversharedmedia(for
example,aLANsubnet).Inpartiallymeshednetworks(suchasDMVPN),BGPnext-
hopprocessingcanbreakIPconnectivity.
Consider,forexample,thenetworkdiagraminthefigure.R1sendsaroutingupdate
aboutnetwork21.0.0.0/8toR3withR2settothenext-hopaddress(astheyareall
inthesamesubnet).Becausethereisnodirectconnection(virtualcircuit)between
R3andR2butR3stilltriestosendpacketsdirectlytowardR2,theconnectivity
betweenAS37andAS21isbroken.
Therearetwowaystosolvethisconnectivityloss:
UsethesubinterfacesonR1tomakesurethatR2andR3areindifferent
subnets.BGPnext-hopprocessingwillthenensurethatR1istheBGPnext-hop
intheoutgoingBGPupdates.
DisabletheBGPnext-hopprocessingonR1inanexistingmultipointDMVPN
designthatsharesacommonsubnet.(Thisoptionisstronglydiscouragedin
normalBGPdesignbecauseroutingproblemsshouldbesolvedwithaproper
networkdesignofpoint-to-pointsubinterfaces.)

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
BGP metrics that are attached to a BGP route are called "path attributes." Some
path attributes are well-known. Every BGP implementation should be able to
recognize the well-known attributes.
Some of the well-known attributes are mandatory and have to be present in
every BGP update. Mandatory well-known attributes are the AS-path, next-hop,
and origin. Other well-known attributes are discretionary.
Attributes that are not required to be recognized by every BGP implementation
are called “optional.” These attributes could be transitive (propagated if not
recognized) or nontransitive (dropped).
The AS-path attribute lists the autonomous systems that the routing update has
already crossed. This attribute is used for BGP loop detection and BGP route
selection.
The next-hop attribute specifies the IP address that should be used for packet
forwarding. The next hop is usually set to the IP address of the BGP router
sending the update.
Summary

Overview
UnderstandingtheBGPneighborsessionestablishmentprocessisakeycomponent
tounderstandingthefundamentaloperationoftheBGPprotocol.
BGPisanEGPthathasbeendesignedforscalabilityandpolicycontrol.Asaresult,
BGPrequiresneighboringrouterstobeexplicitlyconfiguredbeforeBGProuting
updatescanbesentbetweenthem.ThissituationdiffersfromIGPssuchasEIGRP,
IS-IS,andOSPF,thatdiscoverneighborsbyusingabroadcastpacketorahello
protocol.Inthislesson,BGPneighborsessionestablishmentproceduresare
discussed.
Uponcompletingthislesson,youwillbeableto:
ExplainhowBGPdiscoversneighbors
DescribetheBGPsessionestablishmentprocess
DescribetheroleoftheBGPkeepaliveinsessionestablishmentand
maintenance
ExplainhowoptionalMD5authenticationcanprotectsessionsbetweenBGP
peers
EstablishingBGPSessions

Unlikeotherroutingprotocols,BGPhasnomeansofautomaticallydetecting
neighbors.TheBGPprotocoliscarriedinaTCPsession,whichmustbeopened
fromoneroutertotheother.Todoso,therouterattemptingtoopenthesession
mustbemanuallyconfiguredwithneighborinformationindicatingtowhich
IPaddresstodirectitsconnectionattempts.
BGP neighbors are not discovered; they must be configured manually.
Configuration must be done on both sides of the connection.
Both routers will attempt to connect to the other with a TCP session on port
number 179.
Only the session with the higher router-ID remains after the connection attempt.
The source IP address of incoming connection attempts is verified against a list
of configured neighbors.
Therouterthatreceivestheincomingconnectionattemptsdoesnotanswerthemif
theattemptsarenotfromoneoftheconfiguredneighbors.TheIPsourceaddressof
theconnectionattemptpacket(TCPSYNpacket)isverifiedagainstthelistofIP
addressesthattherouteritselfwoulddirectitsconnectionattemptsto.
Tosucceedintheconnectionattempts,bothroutersmustbeconfiguredtoreach
eachother.Asideeffectofthissituationisthattheywillbothattempttoconnect.
Thissideeffectaddsrobustnesstothesessionestablishmentprocess,butitalso
introducestheriskthattwoBGPsessionswillbeestablishedbetweenapairofBGP
routers.
TworoutersshouldhaveonlyasingleBGPsessionbetweenthem.Therouter-ID
valuesthatareexchangedwhentheBGPsessionisestablishedallowtheBGP
routerstodetectwhentwoparallelsessionsexist.Onlythesessionthatwasinitiated
bytherouterwiththenumericallyhigherrouter-IDwillberetained.Theothersession
isdropped.
AroutermaynotopenaBGPsessiontoitself.IftheconfiguredneighborIPaddress
is,infact,anIPaddressofthelocalrouter,therouterrecognizestheproblemand
tearsdownthesession.Therouter-IDisalsousedforthisverification.
BGPNeighborDiscoveryExample
ThisexampleillustratesasmallBGPnetwork.
Small BGP Network
Thenetworkthatisdisplayedinthefigureservesasthesamplenetworktogenerate
printoutsinthefollowingexamples.
Initially, all BGP sessions to the neighbors are idle.
R2# show ip bgp summary
BGP router identifier 172.16.22.2, local AS number 1
BGP table version is 31, main routing table version 31
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/P
fxRcd
172.16.12.11 4 100 0 0 1 0 0 00:00:37 Idle
BGPNeighborDiscovery

172.16.22.22 4 200 0 0 1 0 0 00:00:14 Idle
TheshowipbgpsummarycommandgivesanoverviewoftheBGPstatus.Each
configuredneighborislistedintheoutputofthecommand.TheIPaddresstowhich
theconnectionattemptsaredirectedisalsodisplayed,alongwiththeBGPversion
number,theremoteASnumber,somecountervalues,thestatusofthesession,and
howlongagothesessionchangedstate.
The"Idle"stateindicatesthattherouteriscurrentlynotattemptinganyconnection
establishments.
ThevariousstatesforaBGPconnectionareIdle,Active,OpenSent,OpenConfirm,
andEstablished.

Beforeanyconnectionattemptismade,theBGPpeerrelationmusthaveleftthe
IdlestateandenteredtheActivestate.ForaBGPsessionbetweentworoutersin
differentautonomoussystems,thisstatusresultswhentheIPaddressoftheremote
routerbecomesreachableonadirectlyconnectedinterface.
A TCP session is established when the neighbor becomes reachable.
BGP Open messages are exchanged.
R2# debug ip tcp transactions
R2# debug ip bgp
R2# debug ip bgp events
BGP: 172.16.12.11 active went from Idle to Active
BGP: 172.16.12.11 open active, local address 172.16.12.2
TCP0: state was LISTEN -> SYNRCVD [179 -> 172.16.12.11(11374)]
TCP0: state was SYNRCVD -> ESTAB [179 -> 172.16.12.11(11374)]
TCBEFF01278 accepting EC3FFBE8 from 172.16.12.11.11374
BGP: 172.16.12.11 passive open to 172.16.12.2
BGP: 172.16.12.11 passive went from Idle to Connect
BGP: 172.16.12.11 passive rcv message type 1, length (excl. header) 38
BGP: ses global 172.16.12.11 (0xEFF0F1B8:0) pas Receive OPEN
BGP: 172.16.12.11 passive rcvd OPEN w/ remote AS 100, 4-byte remote AS 100
BGP: 172.16.12.11 passive went from Connect to OpenSent
BGP: 172.16.12.11 passive went from OpenSent to OpenConfirm
BGP: 172.16.12.11 passive went from OpenConfirm to Established
BGP(0): 172.16.12.11 was the first peer to be established for IPv4 Unicast
%BGP-5-ADJCHANGE: neighbor 172.16.12.11 Up
Thedebugoutputshowshowtheroutercreatesasocketdatastructureandbindsit
toitslocalIPaddress172.16.12.2andthewell-knownport179.Thentherouter
sendsaTCPSYNpackettotheconfiguredpeerrouterIPaddressof172.16.12.11
andahighportnumber11374.Theconnectionattemptsucceeds,andtheTCP
sessionisthenreadytotransfertheBGPinformation.
ThefirstBGPinformationthatissentistheBGPOpenmessage.TheBGPsession
thengoesfromtheActivestatetotheOpenSentstatewhilewaitingfortheother
routertorespond.IfthepeerrouteracceptstheparametersintheOpenmessage,it
respondswithitsownOpenmessage.Whenthelocalrouterreceivesthismessage,
thestategoesfromOpenSenttoOpenConfirm.Thelocalrouterthenverifiesthe
peerrouterparametersinitsOpenmessage.Iftheyareaccepted,akeepalive
packetissenttosignalthisacceptance.Thestateisthen"Established."
The BGP Open message contains the following:
BGP version number
AS number of the local router
Holdtime
BGP router identifier
Optional parameters
TheparametersintheBGPOpenmessageareasfollows:
Versionnumber:Thesuggestedversionnumber.Thehighestcommonversion
thatbothrouterssupportisused.MostBGPimplementationstodayuseBGP4.
ASnumber:TheASnumberofthelocalrouter.Thepeerrouterverifiesthis
information.IfitisnottheASnumberthatisexpected,theBGPsessionistorn
down.
Holdtime:Thenumberofsecondsthatmayelapsebetweenreceptionof
successiveBGPmessages.Ifthetimeisexceeded,thepeerisconsidered
dead.Thetworoutersagreetousethelowestsuggestedvalue.Whenthe
sessionisestablished,bothroutersusekeepalivemessagestomakesurethat
theholdtimerdoesnotexpire.Asuggestedhold-timervalueof0indicatesthat
thetimerneverexpiresandnokeepalivesshouldbesent.
BGPidentifier:Anumberuniquelyidentifyingtherouter.TheCiscorouteruses
oneofitsIPaddressesforthisnumber,therouter-ID.Therouter-IDisselected
asthenumericallyhighestIPaddressofanyloopbackinterface.Ifthereisno
loopbackinterface,therouterusesthehighestIPaddressofanyinterfacethatis
upatthetimeofthestartoftheBGPprocess.
Optionalparameters:TLVencoded.Anexampleofoptionalparametersis
sessionauthentication.
EstablishingaBGPSession

BGP neighbors—steady state
All neighbors shall be up (no state information).
R2# show ip bgp summary
BGP router identifier 172.16.22.2, local AS number 1
BGP table version is 16, main routing table version 16
15 network entries using 2220 bytes of memory
15 path entries using 960 bytes of memory
2/2 BGP path/bestpath attribute entries using 272 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 3500 total bytes of memory
BGP activity 78/63 prefixes, 84/69 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/P
fxRcd
172.16.12.11 4 100 18 15 16 0 0 00:11:46 6
172.16.22.22 4 200 5 8 16 0 0 00:00:27 9
WhentheBGPsessionsareintheEstablishedstate,routinginformationexchange
cantakeplace.Theshowipbgpsummarycommandoutputhereindicatesthata
sessionisestablishedbynotdisplayinganyinformationatallinthe"State"column.
Thecountervaluesshowhowmanymessageshavebeenreceivedandsentinthe
session."InQ"showshowmanymessageshavebeenreceivedbutnotyet
processed.AhighInQnumberindicateslackofCPUresourcestoprocesstheinput.
"OutQ"showshowmanyoutgoingmessagesarequeued.AhighOutQnumber
indicateslackofbandwidthtotransmittheoutgoingmessagesorCPUoverloadof
theotherrouter.
TheBGProuteruses"TblVer"(tableversion)totrackthechangesthatneedtobe
senttotheneighbors.ThereisamajortableversionnumberforthelocalBGPtable.
Thetableversionnumberisdisplayedonthefirstlineofoutputfromthisshow
command.Thereisalsoonetableversionnumberthatismaintainedforeachofthe
neighborsoftheBGProuter;thisnumberisdisplayedontheinformationlineofthe
neighbors.
WheneveraBGProuterentersachangeintoitsBGPtable,themajortableversion
numberisincrementedandthechangedrouteistaggedwiththisnumber.Whenthe
timecomestoupdateaspecificneighbor,therouterscanstheBGPtable.All
changeswheretheversionnumberisbetweentheneighborversionandthecurrent
tableversionaresenttotheBGPneighborinasingleBGProutingupdate.Afterthe
entiretableisscannedandallchangeshavebeensenttotheneighbor,thetable
versionnumberoftheneighborissettothehighestvalueoftheroutesbeingsent.
Atableversionofaneighborthatislowerthanthemajortableversionindicatesthat
theneighborisnotyetfullyupdated.Theupdateintervalforaneighborinanother
ASisnormally30seconds(thedefaultvalueoftheBGPadvertisementtimer).
Inadditiontotheinformationaboutallsessionstoallneighbors,theoutputalso
showstheamountofmemorythatisbeingusedfortheBGPdatastructures.

1.
2.
3.
TCP-basedBGPsessionsdonotprovideanymeansofverifyingthepresenceofa
BGPneighbor.AfterBGPhasestablishedtheTCPsession,theonlymethodof
verifyingneighborpresenceistoactuallysendBGPtraffic.BGPtrafficissentover
theTCPsessionwithACKs,andisthereforereliable.SuccessfullysendingBGP
trafficconfirmstheexistenceofaBGPneighbor.
A TCP-based BGP session does not provide any means of verifying BGP
neighbor presence:
Except when sending BGP traffic
BGP needs an extra mechanism:
Keepalive BGP messages provide verification of neighbor existence.
Keepalive messages are sent every 60 seconds.
However,thereareoftenlongperiodsoftimewhennoBGPtrafficissentbetween
neighbors.Duringthoseperiods,TCPimplementsnomechanismtocheckforthe
existenceoftheconfiguredneighbor.BGPneighborscouldthereforeeasilybe
disconnectedduringtimesofsessioninactivity.Thissituationwouldleadtoincorrect
routinginformationontheothersideoftheBGPsession.
Toavoidroutingpacketstoarouterthatisnolongerthere,BGPneedsanextra
mechanismtomakesurethataneighborexists.BGPsendsspecialkeepalive
messagesduringeverykeepaliveintervaltoinformitspeerofitspresence.By
default,thisintervalisevery60seconds.IfnoBGPtrafficisreceivedwithinthe
selectedholdtimeinterval,theBGProutersendsaBGPnotificationmessagetothe
inactivepeerandtearsdowntheirBGPsession.ThedefaultBGPholdtimevalueis
180seconds.
Whenchangingthedefaultvaluesofkeepaliveandholdtimeintervals,youmusttake
carenottoconfiguretoobigakeepaliveintervalincomparisontotheholdtime.Too
bigadifferencecouldresultinresettingoftheBGPsessionafteronlyonekeepalive
messagehasbeenmissed,makinganetworkunstable.Thesuggestedratioof
keepalive-to-holdtimeintervalis1:3.
Keepalive interval value is not communicated in the BGP Open message.
Keepalive value is selected as follows:
Configured value, if local holdtime is used
Configured value, if holdtime of neighbor is used and keepalive < (holdtime /
3)
Smaller integer in relation to (holdtime / 3), if holdtime of neighbor is used
and keepalive > (holdtime / 3)
Asopposedtotheholdtimeinterval,BGPpeersdonotcommunicatethekeepalive
intervalintheOpenmessage.Theselectionofakeepaliveintervalistherefore
basedontheselectedholdtimevalue.Theselectedholdtimevalue,whichisusedby
bothpeers,isthesmallerofbothconfiguredvalues.
TheBGPprocessselectsthekeepaliveintervalvalueaccordingtotheseconditions:
Ifthelocallyconfiguredvalueofholdtimeisselected(beingtheloweroftwo),
thepeersusethelocallyusedkeepaliveinterval.
Iftheholdtimeintervaloftheneighborisselected,andthelocallyconfigured
keepaliveintervalislessthanathirdoftheholdtimeinterval,thepeersusethe
locallyconfiguredkeepalive.
Iftheholdtimeintervaloftheneighborisselected,andthelocallyconfigured
keepaliveintervalismorethanathirdoftheholdtimeinterval,thepeersusethe
smallerintegervalueinrelationto(holdtime/3).
KeepaliveValueExample
Iftheselectedholdtimeequals17secondsandtheconfiguredkeepaliveequals10
seconds,the(holdtime/3)rulewillbeusedtoselectthekeepalivevalue.Therefore,
(17/3)=5.67,andthekeepalivevaluethatisusedbyBGPwillequal5seconds.
BGPKeepalives

AuthenticationbetweenBGPneighborscanbenegotiatedbetweenBGP-speaking
routersusingoptionalparametersintheOpenmessage.
BGP peers may optionally use MD5 TCP authentication using a shared secret.
Both routers must be configured with the same password (MD5 shared secret).
Each TCP segment is verified.
IfyouareusingMD5authentication,everyTCPsegmentontheBGPsessionwillbe
transmittedtotheconfiguredneighboralongwithachecksum.Thechecksumis
calculatedtogetherwithasecretknownbythetworoutersusingtheMD5algorithm.
Thecommonsecretisnevertransmittedonthenetwork.Ifthereceiver,whichis
usingthesamecommonsecret,calculatesthesamechecksumfromtheTCP
segment,thenthereceivercanbeprettysurethattheinformationistransmittedfrom
thecorrectsourceandtheinformationhasnotbeenaltered.
AuthenticationofBGPsessionsisavitaltooltoavoidDoSattacks.
CiscorouterssupportkeychaintoconfigureBGP
authentication.BGPsupportsonlyHMAC-MD5and
HMAC-SHA1-12cryptographicalgorithms.
MD5Authentication

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
With interior routing protocols, adjacent routers are usually discovered through a
dedicated hello protocol. In BGP, neighbors must be manually configured to
increase routing protocol security.
BGP neighbors, once configured, establish a TCP session and exchange the
BGP Open message, which contains the parameters that each BGP router
proposes to use.
The router uses BGP keepalives to provide a verification of the existence of a
configured BGP neighbor.
MD5 authentication can be configured on a BGP session to help prevent
spoofing, DoS attacks, or man-in-the-middle attacks.
Summary

Overview
RouteprocessingisfundamentaltotheoperationofBGP.KnowledgeoftheBGP
routeselectionprocess,routepropagation,andhowtheBGPandIProutingtables
arebuiltiskeytoproperlyconfiguringBGPandtroubleshootingBGProutingissues.
Uponcompletingthislesson,youwillbeableto:
DescribeBGProutingupdates
ExplainhowarouterbuildsBGPtables
DescribetherouteselectionprocessinBGP
ExplainhowarouterpropagatesBGProutestootherBGPneighbors
ExplainhowarouterbuildsanIProutingtablewhenitisusingBGP
ExplainhowBGPadvertiseslocalnetworks
DescribetheroleofautomaticsummarizationinBGProuteprocessing
ProcessingBGPRoutes

AfteraBGPsessionisestablished,routingupdatesstarttoarrive.EachBGProuting
updateconsistsofoneormoreentries(routes).Eachrouteisdescribedaccordingto
theIPaddressandsubnetmask,alongwithanynumberofattributes.Thenext-hop,
AS-path,andoriginattributesmustalwaysbepresent.OtherBGPattributesare
optionallypresent.
Small BGP Network
Thenetworkinthefigureservesasthesamplenetworkforgeneratingprintoutsin
thefollowingexamples.
Information from the BGP tables is exchanged after adjacency establishment.
R2# debug ip bgp updates
%BGP-5-ADJCHANGE: neighbor 172.16.22.22 Up
BGP(0): 172.16.22.22 rcvd UPDATE w/ attr: nexthop 172.16.22.22, origin i,
metric 0, merged path 200, AS_PATH
BGP(0): 172.16.22.22 rcv UPDATE about 10.0.2.128/28 -- DENIED due to: AS-
PATH contains our own AS;
BGP(0): 172.16.22.22 rcvd 10.0.2.16/28
BGP(0): Revise route installing 1 of 1 routes for 10.0.2.16/28 -
> 172.16.22.22(global) to main IP table
Thedebugoutputshowshowinformationaboutnetwork10.0.2.16/28isreceived
fromneighbor172.16.22.22.TheneighborindicatesthatIPpacketstodestinationIP
addressesinnetwork10.0.2.16/28canbeforwardedtothenext-hopaddress
172.16.22.22.TheASpath200indicatesthatthefinaldestinationisinAS200.The
metricistheMEDvalue.
Network10.0.2.128/28isdenied.ThereasonisASpathloopdetection.The
receivingrouterdetectsitsownASnumberintheASpathandsilentlydiscards
(denies)theroute.
ReceivingRoutingUpdates

Allroutesthatarereceivedfromaneighboraresavedintheroutermemory.
Therefore,thereisnoneedtoretransmitorrefreshanyunchangedinformation.
All inbound updates are placed into the BGP table.
R2# show ip bgp
BGP table version is 11, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - inte
rnal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-
Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
* 1.0.0.0/24 172.16.22.22 0 0 200 99 i
*> 172.16.12.11 0 0 100 99 i
*> 10.0.1.0/24 172.16.12.11 0 0 100 i
*> 10.0.2.0/28 172.16.22.22 0 0 200 i
*> 10.0.2.16/28 172.16.22.22 0 0 200 i
*> 10.0.2.32/28 172.16.22.22 0 0 200 i
*> 10.0.2.48/28 172.16.22.22 0 0 200 i
*> 10.0.2.64/28 172.16.22.22 0 0 200 i
*> 10.0.2.80/28 172.16.22.22 0 0 200 i
*> 10.0.2.96/28 172.16.22.22 0 0 200 i
*> 10.0.2.112/28 172.16.22.22 0 0 200 i
Whenthereismorethanonewaytoreachaparticularnetwork,thelocalrouter
selectsoneofthemasthebest.Thebestalternativemightbelaterlostbecausethe
neighboringrouterwithdrawstherouteortheneighboringrouterisnolonger
reachable.However,theremainingalternativesarestillstoredinmemoryandanew
alternativeisselectedasthebestwithoutinvolvingotherBGProuters.
Theshowipbgproutercommandgivesanoverviewofallroutinginformationthatis
receivedfromallneighbors.Thecommanddisplaysbasicinformationabouteach
routeonasingleline.Theoutputissorted—alternativestoreachthesamenetwork
aredisplayedonconsecutivelines.Thenetworknumberisdisplayedonlyonthefirst
linesindicatingthesamenetwork.Thenetworkcolumnisleftblankonthe
consecutivelinesindicatingalternativestoreachthesamenetwork.
Therouterselectsonlyoneofthealternativesasthebestpathtowardthe
destination.Thisalternativeisindicatedwiththe">"sign.
BuildingBGPTable

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
WhenarouterhasmorethanonealternativeroutetoreachthesameIPsubnet
(networkandmask),therouterhastoselectoneoftheroutesasbestinitsdefault
modeofoperation.Tomakethisselection,therouterusestheBGPattributesthat
areattachedtothevariousupdates.
Exclude routes with inaccessible next hop
Prefer highest weight (local to router)
Prefer highest local preference (global within AS)
Prefer routes that the router originated
Prefer shortest AS path (only length is compared)
Prefer lowest origin code (IGP < EGP < Incomplete)
Prefer lowest MED
Prefer external (EBGP) paths over internal (IBGP)
For IBGP paths, prefer path through closest IGP neighbor
For EBGP paths, prefer oldest (most stable) path
Prefer paths from router with the lowest BGP router-ID
Theselectioncriteriaarecheckedintheorderthatisindicatedinthefollowingsteps.
Thefirstcheckthatindicatesadifferenceisusedforrouteselection,andnofurther
testingisdone.
Theroutercheckswhetherthenext-hopattributeindicatesanIPaddressthatis
reachableaccordingtothecurrentroutingtable.Itisnotnecessarytohavea
directconnectiontothenexthop.Itcanverywellbeseveralrouterhopsaway
andtheroutetoitlearnedbytheIGP.Ifthenexthopisnotreachable,therouter
doesnotconsidertheBGProuteasacandidatetobecomeselectedasthe
best.
Therouterpreferstheroutewiththehigherweight.Theweightisnotcarried
withtheupdates;itisavaluethatisassignedtotheroutebythelocalrouterand
consideredonlywithintherouteritself.
Ifthelocalpreferenceattributesaredifferent,theroutewiththehighestvalueis
selectedasbest.
IfoneoftheroutesisinjectedintotheBGPtablebythelocalrouter,thelocal
routerprefersittoanyroutesthatitreceivesfromotherBGProuters.
Atthispoint,thelengthsoftheASpathsarecompared(thecontentisnot
checked;onlythenumberofautonomoussystemsineachASpathiscounted).
Theroutewiththeshortestlengthisselected.
IftheAS-pathlengthsarethesame,theorigincodeischecked.BGPwillprefer
thepathwiththelowestorigintype:IGPislowerthanEGP,andEGPislower
thanIncomplete.
TherouternextcomparesMEDvaluesbutonlyifitreceivestheupdatesfrom
thesameneighboringAS.RouteswithalowerMEDarepreferred.
Atthispoint,itisclearthatthedestinationnetworkisoutsidethelocalASand
thatthereisnotmuchdifferenceamongthealternatives.BecausetheIP
packetstothedestinationnetworkmustleavetheAS,itisbetterthattheydoso
asquicklyaspossible.IfanyofthealternativesarereceivedfromaBGPpeerin
anotherAS,thatalternativeispreferred.
IftherouterreceivesallalternativesfrompeerroutersinthelocalAS,eachof
themwillindicateanexitpoint,andtheclosestexitisused.Distancetotheexit
pointiscalculatedbycomparingtheIGPcostsagainsttheBGPnexthops,as
indicatedintheroutingtable.
IftherouterreceivesallalternativesfromEBGPneighbors,themoststable
path(theoldestpath)ispreferred.
Iftherouterstillcannotdifferentiateamongtheroutes,itneverthelesshasto
makeadecisionandselectthebestroute.ItcheckstheBGPsessionson
whichitreceivedtheupdatesandchoosestheroutethatwasreceivedonthe
sessionforwhichthepeerrouterhasthelowestBGProuter-ID.
Theroutermakesthefinaltestonlyafterithasmadeallotherchecksand
determinedthatallalternativeroutesareequallygood.
BGPRouteSelectionCriteria

Alocalrouterpropagatesonlytheroutethatitselectedasbesttotheneighbors.
However,therouterneversendsaroutebackonthesameBGPsessionuponwhich
itwasreceived.Onthecontrary,whenitselectsaneighborasthebestnexthop,the
routermakessurethattheneighborisnotpointingbacktothelocalrouter.The
routeraccomplishesthistaskby"poisoning"theroute(markingtheroute
unreachable)andsendingawithdrawmessagetothatneighbor.
The best BGP routes are propagated to BGP neighbors.
R2# debug ip bgp updates
BGP(0): (base) 172.16.12.11 send UPDATE (format) 10.0.2.0/28, next 172.16.
12.2, metric 0, path 200
BGP(0): 172.16.12.11 NEXT_HOP is on same subnet as the bgp peer and set to
172.16.12.11 for net 10.0.1.0/24, flags 200, sb: AC100C00, mask: FFFFFF00
BGP(0): (base) 172.16.12.11 send UPDATE (format) 10.0.1.0/24, next 172.16.
12.11, metric 0, path 100
BGP(0): (base) 172.16.12.11 send UPDATE (format) 10.0.0.0/28, next 172.16.
12.2, metric 0, path Local
Therouterconductsroutepoisoningtoavoidapotentialroutingloopproblemin
whichaneighborrouterselectedasthebestnexthopmightrelyonthelocalrouter
asthebestnexthop.
Theprocessofpreventingroutinginformationfrombeingsentbacktothesourceof
informationiscalled"splithorizon."
BGPRoutePropagation

TherouteintheBGPtablethatBGPselectsasthebestisacandidatefor
installationintheIPforwardingtableorroutingtable.
The best BGP routes are copied into the IP routing table based on administrative
distance.
R2# show ip route
<... output omittted ...>
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
B 1.0.0.0 [20/0] via 172.16.22.22, 00:03:07
10.0.0.0/8 is variably subnetted, 20 subnets, 3 masks
<... output omitted ...>
B 10.0.1.0/24 [20/0] via 172.16.12.11, 00:03:06
B 10.0.2.0/28 [20/0] via 172.16.22.22, 00:06:46
B 10.0.2.16/28 [20/0] via 172.16.22.22, 00:06:46
B 10.0.2.32/28 [20/0] via 172.16.22.22, 00:06:46
B 10.0.2.48/28 [20/0] via 172.16.22.22, 00:06:46
B 10.0.2.64/28 [20/0] via 172.16.22.22, 00:06:46
B 10.0.2.80/28 [20/0] via 172.16.22.22, 00:06:46
B 10.0.2.96/28 [20/0] via 172.16.22.22, 00:06:46
B 10.0.2.112/28 [20/0] via 172.16.22.22, 00:06:46
<... output omitted ...>
Beforearoutecanbeinstalled,therouterhastocheckwhetherthereisanyother
routingprotocolthathasinformationaboutthesamesubnet(networkandmask).If
thesubnetisknownviadifferentsources,therouterusestheADtodeterminewhich
sourcetouse.ADisaratingofthetrustworthinessofaroutinginformationsource.
ADisoftenexpressedasanumericalvaluebetween0and255.Thehigherthe
value,thelowerthetrustworthinessrating.Inthiscase,therouterwillinstallthe
routewiththelowestAD.
Theoutputfromtheshowiproutecommandindicateswhichroutesintherouting
tablewereinstalledusingtheBGPinformation.Thoseroutesaredenotedwiththe
letter"B."TheADisshowninthecommandoutputasthefirstnumberwithinthe
brackets.
Inthisexample,network1.0.0.0/24isreachablevia172.16.22.22.Aftertherouter
hasinstalledtherouteintheroutingtable,userdatatrafficstartstobeforwarded.
BuildingIPRoutingTable

TheBGProutingprocesscaninjectnewroutesintotheBGPtable.Arouterwill
propagatenewlyinjectedroutestoneighboringBGPpeersifitselectsthemasbest.
Thiswaytherouterprovidestheneighboringautonomoussystemswithinformation
aboutnetworksthatarereachableinthelocalAS.Thisprocessiscalledadvertising,
originating,orannouncinglocalroutes.
The BGP router process keeps a list of local networks (defined with the network
command or through redistribution).
The BGP process periodically scans the IP routing table and inserts or revokes
routes from the BGP routing table based on their presence in the IP routing
table.
TheBGPprocesscaninjectlocalroutesintwodifferentways:
AlistofnetworksisconfiguredontherouterundertheBGProuterprocessusing
thenetworkconfigurationcommand.Thelistednetworksarecandidatesfor
beinginjected.Networksareinjectedonlyiftheyappearintheroutingtable.In
thecasewheretheIGPthatisusedwithintheASfindsavalidpathtothem,the
routeswillbeintheroutingtable.
Routesthatarelearnedbyanotherroutingprotocolareredistributed.TheIGP
thatisusedwiththeAScanalsoactasasourceofroutinginformationabout
localnetworks.
AdvertisingLocalNetworksExample
Inthisexample,network10.0.0.0/28isdirectlyconnectedtointerfaceLoopback1.
The BGP route is revoked after the network is removed from the routing table.
R2# debug ip routing
R2# debug ip bgp updates
is_up: Loopback1 0 state: 6 sub state: 1 line: 0
RT: interface Loopback1 removed from routing table
RT: del 10.0.0.0 via 0.0.0.0, connected metric [0/0]
RT: delete subnet route to 10.0.0.0/28
RT: del 10.0.0.1 via 0.0.0.0, connected metric [0/0]
RT: delete subnet route to 10.0.0.1/32
BGP(0): route 10.0.0.0/28 down
BGP(0): no valid path for 10.0.0.0/28
BGP: topo global:IPv4 Unicast:base Remove_fwdroute for 10.0.0.0/28
BGP(0): (base) 172.16.12.11 send unreachable (format) 10.0.0.0/28
Therouteto10.0.0.0/28waspreviouslyinstalledintheBGPtablebecauseitwas
listedwithanetworkstatementanditwasintheroutingtableasdirectlyconnected.
WhentheLoopback1interfacegoesdown,therouterremovesthedirectly
connectedroutefromitsroutingtable.Becausetheroutenolongerexistsinthe
routingtable,itmustalsoberemovedfromtheBGPtable.
BecausetherehasbeenachangeintheBGPtable,theBGPneighborsmustbe
informed.TheroutersendsaBGPupdatemessagetoitsneighborindicatingthat
network10.0.0.0/28isnowunreachable.
The BGP route is advertised after the network appears in the routing table.
RT: add 10.0.0.0/28 via 0.0.0.0, connected metric [0/0]
RT: interface Loopback1 added to routing table
RT: updating connected 10.0.0.1/32 (0x0):
via 0.0.0.0 Lo1
RT: add 10.0.0.1/32 via 0.0.0.0, connected metric [0/0]
BGP(0): route 10.0.0.0/28 up
BGP: topo global:IPv4 Unicast:base Remove_fwdroute for 10.0.0.0/28
BGP(0): redistributedlocal route 10.0.0.0/28 modified
BGP(0): (base) 172.16.12.11 send UPDATE (format) 10.0.0.0/28, next 172.16.
12.2, metric 0, path Local
Inthisexample,network10.0.0.0/28islistedwithanetworkstatementintheBGP
process.However,thenetworkwasnotintheroutingtableoftherouter,sothe
networkwasnotinjectedintoitsBGPtable.
Later,theLoopback1interfacecomesbackupagain.Thisreappearancemeansthat
thenetwork10.0.0.0/28isnowintheroutingtableasadirectlyconnectedroute.As
aresult,therouteronceagaininjectsthe10.0.0.0/28networkintoitsBGPtableand
AdvertisingLocalNetworks
thenupdatesitsconfiguredneighbor.

WhenaBGProuterisconfiguredtolocallyannounceroutesintoBGP,thebehavior
ofthenetworkcommandvariesdependingonwhetherautomaticsummarizationis
enabledordisabled.Whenautomaticsummarizationisenabled,BGPsummarizes
thelocallyoriginatedBGPnetworks(networkx.x.x.x)totheirclassfulboundaries.
VerifyifBGPautomaticsummarizationisdisabledorenabled.Thefollowing
exampleswillhaveBGPautomaticsummarizationenabled.
Verify BGP automatic summarization.
Enable automatic summarization when:
Summarization of IGP-to-BGP redistributed routes to major network
boundary required
Using classful network command to summarize subnets to a major network
boundary
Disable automatic summarization when:
Summarization on IGP-to-BGP redistribution not desired
Using classless variant of the network command
Whenasubnetexistsintheroutingtableandthefollowingthreeconditionsare
satisfied,thenanysubnet(componentroute)ofthatclassfulnetworkinthelocal
routingtablewillpromptBGPtoinstalltheclassfulnetworkintotheBGPtable:
Aclassfulnetworkstatementforthatnetworkexistsintheroutingtable.
Aclassfulmaskhasbeenconfiguredonthatnetworkstatement.
Automaticsummarizationisenabled.
Whenautomaticsummarizationisdisabled,theroutesthatareintroducedlocally
intotheBGPtablearenotsummarizedtotheirclassfulboundaries.
ThebehavioroftheredistributionprocedureinBGPisalsoinfluencedbythe
configurationofautomaticsummarizationontherouter.Whenenabled,all
redistributedsubnetswillbesummarizedtotheirclassfulboundariesintheBGP
table.Whendisabled,allredistributedsubnetswillbepresentintheiroriginalformin
theBGPtable.
EnableautomaticsummarizationinBGPwhenthesummarizationofsubnetstotheir
classfulboundarieswillnotintroduceflawedinformationintotheBGPtable.Inother
words,leaveautomaticsummarizationenabledonlywhenyouareusingafully
assignedclassfulnetworkmatchingthenetworkthatwassummarizedinBGP.
Wheneverpossible,usetheclasslessvariantofthenetworkcommand,specifying
thesubnetmasklengthofthenetwork.Whenyouareredistributingnetworksinto
BGP,thepreferredmethodistodisableautomaticsummarization.Disabling
automaticsummarizationensuresthatcorrectinformationisinsertedintotheBGP
tableoftherouter.
AutomaticSummarizationExample
Inthisexample,fivesubnetsofthemajorclassAnetwork10.0.0.0/8(10.0.0.0/28,
10.0.0.16/28,10.0.0.32/28,10.0.0.48/28,and10.0.0.64/28)existintheroutingtable.
R2# show ip route
10.0.0.0/8 is variably subnetted, 11 subnets, 3 masks
<... output omitted ...>
C 10.0.0.0/28 is directly connected, Loopback1
C 10.0.0.16/28 is directly connected, Loopback2
C 10.0.0.32/28 is directly connected, Loopback3
C 10.0.0.48/28 is directly connected, Loopback4
C 10.0.0.64/28 is directly connected, Loopback5
<... output omitted ...>
Five subnets for 10.0.0.0 exist in the routing table.
Automatic summarization is enabled for BGP.
BGP has been configured to locally announce 10.0.0.0.
router bgp 1
network 10.0.0.0
auto-summary
AutomaticSummarization

R2# show ip bgp
BGP table version is 12, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - inte
rnal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-
Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 1.0.0.0/24 172.16.12.11 0 0 100 99 i
*> 10.0.0.0 0.0.0.0 0 32768 i
*> 10.0.1.0/24 172.16.12.11 0 0 100 i
Classful network summary is inserted into BGP table.
WhenyouareinsertingnetworksintotheBGPtablewiththeclassfulnetwork
commandandautomaticsummarizationisdisabled,noinsertionintotheBGPtable
willoccurunlessanexactmatchexistsintheIProutingtable(meaningthata
classfulnetworkhastobepresentintheIProutingtable).
Whenautomaticsummarizationisenabled,themajornetworkcommandwill
summarizeallsubnetsintheIProutingtabletotheirmajornetworkboundary.
Thereisaclassfulnetworkcommand,andautomaticsummarizationisenabledfor
BGP.ThissetupresultsintheinsertionofaclassfulnetworksummaryintotheBGP
table,insteadofseparatesubnets.
Subnets10.0.0.0/28,10.0.0.16/28,10.0.0.32/28,10.0.0.48/28,and10.0.0.64/28
weresummarizedduringinsertionintotheBGPtabletotheclassfulnetwork
10.0.0.0/8.Thisactionoccurredbecauseaclassfulnetworkcommandand
automaticsummarizationwereconfiguredontherouter.Ifautomaticsummarization
isdisabled,noinsertionintotheBGPtableoccursatall.
ThelocallysourcedsummaryhasalltheattributesofalocallysourcedBGProute
(nexthop=0.0.0.0,weight=32768,emptyAS-pathlist),andismarkedashaving
anIGPorigin(beingsourcedwiththenetworkcommand).
R2# show ip route
<... output omitted ...>
10.0.0.0/8 is variably subnetted, 11 subnets, 3 masks
C 10.0.0.0/28 is directly connected, Loopback1
C 10.0.0.16/28 is directly connected, Loopback2
C 10.0.0.32/28 is directly connected, Loopback3
C 10.0.0.48/28 is directly connected, Loopback4
C 10.0.0.64/28 is directly connected, Loopback5
<... output omitted ...>
Five subnets 10.0.0.0 exist in the routing table.
Automatic summarization is enabled for BGP.
BGP has been configured to redistribute connected routes into BGP.
router bgp 1
redistribute connected
auto-summary
R2# show ip bgp
BGP table version is 15, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - inte
rnal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-
Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 1.0.0.0/24 172.16.12.11 0 0 100 99 i
*> 10.0.0.0 0.0.0.0 0 32768 ?
*> 10.0.1.0/24 172.16.12.11 0 0 100 i
*> 172.16.0.0 0.0.0.0 0 32768 ?
Classful network summary is inserted into BGP table.
Inthisexample,automaticsummarizationisenabled,resultinginthesummarization
ofredistributedsubnetstotheirclassfulboundaries.Subnets10.0.0.0/28,
10.0.0.16/28,10.0.0.32/28,10.0.0.48/28,and10.0.0.64/28willbesummarizedinto
thesingleclassAnetwork10.0.0.0/8.Thenetwork10.0.0.0/8isalocallysourced
summarywithalltheattributesofalocallysourcedBGProute(nexthop=0.0.0.0,
weight=32768,emptyAS-pathlist).Theoriginoftherouteismarkedasincomplete
becausetherouteissourcedthroughredistribution.
Ifautomaticsummarizationwasdisabled,morespecificrouteswouldbepresentin
theBGPtableinsteadofthesummaryprefix10.0.0.0/8.

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
After BGP sessions are established between BGP routers, they can start
exchanging routing updates.
All updates that are received from BGP neighbors are stored in the BGP table,
regardless of whether they are used.
The route selection process takes into account various BGP attributes that are
attached to the route, as well as local decisions (indicated with weights).
Only the best BGP routes are propagated to other BGP routers.
Only the best BGP routes are installed in the local IP routing table.
Every BGP router can also originate the routes in BGP. The routes to be
originated are entered manually in the BGP routing process or redistributed into
BGP from an IGP.
Summary

Overview
BasicBGPconfigurationiscriticaltoanysuccessfulBGPimplementation.Network
administratorsuseCiscoIOScommandsthatareincludedinthislessoninallBGP
implementations.Thoroughknowledgeofthecommandsinthislessonistherefore
crucialtoensuringasuccessfulimplementationusingBGP.
Uponcompletingthislesson,youwillbeableto:
IdentifytheCiscoIOScommandthatisrequiredtoconfiguretheBGProuting
process
IdentifytheCiscoIOScommandsthatarerequiredtoconfigureexternalBGP
neighbors
IdentifytheCiscoIOScommandsthatarerequiredtoconfigurebasictimersand
MD5authenticationinBGP
IdentifythecommandsthatarerequiredtoannouncelocalnetworksinBGP
DescribeBGProuteredistribution,includingthecommandsthatarerequiredto
configureBGProuteredistribution
DescribetheclasslessbehaviorofBGPandidentifytheCiscoIOScommand
thatisrequiredtoconfigureBGPforclasslessoperation
DescribeBGProuteaggregation,includingtheCiscoIOScommandsthatare
requiredtoconfigurebasicBGProuteaggregation
DescribetheBGPConditionalRouteInjectionfeature
DescribetheBGPSupportforTTLSecurityCheckfeature
DeterminewhenBGProuteaggregationisnotappropriateinmultihomed
topologies
ConfiguringBasicBGP

YouwillusetherouterbgpcommandtostarttheBGProutingprocessintherouter.
Therecanbe,atmost,oneBGPprocessinarouter.Itmustbeassignedthelocal
ASnumber.
router(config)# router bgp as-number
Starts BGP routing.
Get your AS number from American Registry for Internet Numbers
(http://www.arin.net) or Réseaux IP Européens (http://www.ripe.net).
Use private AS numbers (between 64,512 and 65,534 or between
4,200,000,000 and 4,294,967,294) if you run BGP in a private network.
Only one BGP routing process per router is allowed.
TheASnumberisa16-bitor32-bitinteger.New32-bitASnumberswerecreated
whentheASnumberpoolfromIANAapproachedexhaustion.TheASnumberpool
wasextendedfrom16to32bits.ItmustuniquelyidentifytheASamongallrouters
thatareexchangingBGProutinginformation,eitherdirectlyorindirectly.This
requirementmeansthattheASnumbersmustbeuniquewhenBGPinformationis
exchangedwiththeInternet.
TheASnumbercanbeapublicASnumberoraprivateASnumber.PublicAS
numbersrangefrom1to64,534or131,072to4,199,999,999.AnInternetregistry(
ARIN:http://www.arin.netorRIPE:http://www.ripe.net)assignspublicASnumbers.
PrivateASnumbersrangefrom64,512to65,534or4,200,000,000—
4,294,967,294.PrivateASnumbersareneverpropagatedontothepublicInternet.
BGPRoutingProcess

BGPdoesnotautomaticallydiscoverneighbors.Youwillneedtoexplicitlyconfigure
BGPneighbors.ThelocalrouterwilltrytoconnecttotheindicatedIPaddressand
alsoacceptincomingconnectionattemptsfromtheindicatedIPaddress.
router(config-router)# neighbor ip-address remote-as as-number
Defines an external neighbor
External neighbor has to be reachable over directly connected subnet
router(config-router)# neighbor ip-
address description neighbor description
Assigns a description to an external neighbor.
router(config-router)# neighbor ip-address shutdown
Disables a BGP neighbor
ThefirstattributethatyoumustconfigurewithanewneighboristheremoteAS
numberinwhichtheneighboristakingpart.WhentheTCPsessionisestablished
betweenBGProuters,eachrouterverifiestheconfiguredremoteASnumberwith
theexchangeofBGPOpenmessages.
Youmayoptionallyconfigureotherattributeswiththeneighboronsuccessive
configurationlines,referringtothesameneighborIPaddressbutindicatingdifferent
attributes.
Withtheneighbordescriptioncommand,adescription(textstring)canbeentered
thatdescribestheneighbor.
Whenyouaredebuggingortroubleshooting,youcanusetheneighborshutdown
commandtotemporarilydisableBGPneighborwithoutdeletingBGPneighbor
configuration.YoucanshutdowntheBGPneighborduringextensivemodificationof
routingpoliciestopreventinconsistentroutingdata.
ConfiguringExternalNeighbors

Overview
Throughthisdiscovery,youwilllearnhowtoconfigureexternalBGP,BGPtimers,
andMD5authentication.
Discovery1:ConfigureBasicBGP

Topology

Ifyoushutdownaninterfaceonarealrouterorswitch,the
connecteddevicewillseeitas"down/down."Dueto
virtualizationspecifics,IOLbehaviorisslightlydifferent.If
youshutdownaninterfaceonarouterorswitch,the
connecteddevicewillseeitas"up/up."InIOL,thestatus
ofaninterfacecanonlybe"up/up"or"administratively
down/down."
DeviceInformation
Device Interface IPaddress Description
R2 Ethernet0/0 172.16.22.2/24 ConnectiontoISP2
R2 Ethernet0/1 172.16.12.2/24 ConnectiontoISP1
ISP1 Ethernet0/1 172.16.12.11/24 ConnectiontoR2
ISP1 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
10.0.1.1/28
10.0.1.17/28
10.0.1.33/28
10.0.1.49/28
10.0.1.65/28
10.0.1.81/28
Loopbackssimulate
LANnetworks
ISP2 Ethernet0/0 172.16.22.22/24 ConnectiontoR2
ISP2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
Loopback7
Loopback8
Loopback9
10.0.2.1/28
10.0.2.17/28
10.0.2.33/28
10.0.2.49/28
10.0.2.65/28
10.0.2.81/28
10.0.2.97/28
10.0.2.113/28
10.0.2.129/28
Loopbackssimulate
LANnetworks
JobAids

Step1
YouwillconfigureanexternalBGPsessionbetweenR2andISP1routers.On
theR2router,configureBGPexternalneighborISP1.
ISP1hasIPaddress172.16.12.11andBGPAS100.R2routerisalready
configuredintheBGPAS1.
R2(config)# router bgp 1
R2(config-router)# neighbor 172.16.12.11 remote-as 100
Step2
OntheR2router,verifythestateoftheBGPsession.
ToverifytheBGPsession,usetheshowipbgpsummarycommand.
R2# show ip bgp summary
BGP router identifier 172.16.22.2, local AS number 1
BGP table version is 34, main routing table version 34
9 network entries using 1332 bytes of memory
9 path entries using 576 bytes of memory
1/1 BGP path/bestpath attribute entries using 136 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 2068 total bytes of memory
BGP activity 15/6 prefixes, 21/12 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
172.16.12.11 4 100 0 0 1 0 0 never Idle
172.16.22.22 4 200 1359 1357 34 0 0 20:29:01 9
Youshouldsee"Idle"statenexttotheneighbor172.16.12.11.
Step3
OntheISP1router,configureBGPexternalneighborR2.
R2hasIPaddress172.16.12.2andBGPAS1.ISP1routerisalreadyconfigured
intheBGPAS100.
ISP1(config)# router bgp 100
ISP1(config-router)# neighbor 172.16.12.2 remote-as 1
Shortly,afterconfiguringexternalBGPneighborontheISP1router,youwillsee
thefollowingmessageontheISP1router'sconsole:
*Feb 5 01:13:18.858: %BGP-5-ADJCHANGE: neighbor 172.16.12.2 Up
ExternalBGPsessionbetweenR2andISP1issuccessfullyestablished.
Step4
OntheR2router,verifythestateoftheBGPsession.
ToverifytheBGPsession,usetheshowipbgpsummarycommand.
R2# show ip bgp summary
BGP router identifier 172.16.22.2, local AS number 1
BGP table version is 40, main routing table version 40
15 network entries using 2220 bytes of memory
15 path entries using 960 bytes of memory
2/2 BGP path/bestpath attribute entries using 272 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 3500 total bytes of memory
BGP activity 21/6 prefixes, 27/12 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
ConfigureBasicBGP
DiscoverySteps

172.16.12.11 4 100 32 36 40 0 0 00:25:36 6
172.16.22.22 4 200 1398 1398 40 0 0 21:04:31 9
Insteadofstateinformation,youshouldseethenumberofprefixesrouterreceivedfromits
neighbor.NowyouknowthatthestateisEstablishedandthatrouterR2received6prefixesfrom
theISP1router.
Step5
OntheR2routerconfirmthatBGPstateisestablished.
ToconfirmBGPstate,usetheshowipbgpneighborcommand.
R2# show ip bgp neighbors 172.16.12.11
BGP neighbor is 172.16.12.11, remote AS 100, external link
BGP version 4, remote router ID 10.0.1.81
BGP state = Established, up for 00:32:50
Last read 00:00:46, last write 00:00:11, hold time is 180, keepalive interval is 60 seconds
Neighbor sessions:
1 active, is not multisession capable (disabled)
Neighbor capabilities:
Route refresh: advertised and received(new)
Four-octets ASN Capability: advertised and received
Address family IPv4 Unicast: advertised and received
Enhanced Refresh Capability: advertised and received
Multisession Capability:
Stateful switchover support enabled: NO for session 1
Fromtheoutput,alsoobservethedefaultholdtimeandkeepaliveinterval.
ConfiguringBGPTimers
ChangingtheBGPdefaultholdtimeandkeepalivetimersisusuallynot
recommended.Thedefaults(keepalive:60seconds;holdtime:180seconds)should
workfineinmostsituations.IfforanyreasonafasterBGPresponsetoapeerdown
eventisneeded,theneighbortimersontheroutercanbereduced.Forexample,in
scenarioswheremultiplepathstowarddestinationsareavailable.Thisreductionwill
resultinafasterdetectionofalostpeerandfasterswitchingtothealternatepathin
theBGPtable,thusimprovingconvergence.
router(config-router)# timers bgp keepalive holdtime
Changes the default values of BGP timers per BGP process.
Only the holdtime value is communicated in the BGP Open message.
Both peers use the smallest configured holdtime value on BGP peers.
router(config-router)# neighbor ip-address timers keepalive holdtime
Changes the default values of BGP timers per specific neighbor.
Overrides the bgp settings of the timers.
SupposethatthereisaBGProuterwithanexpiredholdtime,whichmeansthatno
BGPtrafficwasreceivedwithintheholdtimeinterval.ThisBGProuterwillsenda
notificationtoitsBGPpeer,notifyingitastothereasonforclosingthesession.The
BGProuteronwhichtheholdtimehasexpiredmovestheinactivepeerintotheIdle
state.Afteracertaintimeinterval,aBGProuteragaintriestoreconnecttothe
previouslydisconnectedBGPpeerandwillalsoacceptconnectionattemptsfrom
thatpeer.Thistimeintervalisdeterminedbyauto-enableandconnectiontimers.
TosetthetimersforaspecificBGPpeerorpeergroup,usetheneighbortimers
routerconfigurationcommand.Thiscommandoverridesthevaluesthatyouhaveset
usingthetimersbgpcommand.
Step6
YouwillchangeBGPtimersforsessionbetweenR2andISP1routers.Onthe
R2router,changethedefaultholdtimeandkeepaliveintervalforISP1neighbor
only.
Useaholdtimeof30secondsandkeepaliveinterval10seconds.

R2(config)# router bgp 1
R2(config-router)# neighbor 172.16.12.11 timers 10 30
Step7
OntheISP1router,changethedefaultholdtimeandkeepaliveintervalforBGPprocess.
Useholdtimeof30secondsandkeepaliveinterval10seconds.
ISP1(config)# router bgp 100
ISP1(config-router)# timers bgp 10 30
TimersarenegotiatedatBGPneighborestablishment.OntheISP1router,clearBGPsessionsby
usingthefollowingcommand:
ISP1# clear ip bgp *
*Feb 5 02:41:15.321: %BGP-5-ADJCHANGE: neighbor 172.16.12.2 Down User reset
*Feb 5 02:41:15.321: %BGP_SESSION-5-
ADJCHANGE: neighbor 172.16.12.2 IPv4 Unicast topology base removed from session User reset
*Feb 5 02:41:15.382: %BGP-5-ADJCHANGE: neighbor 172.16.12.2 Up
Step8
OntheR2router,verifytheBGPholdtimeandkeepaliveinterval.
BGPtimershavechangedforISP1neighbor:
R2# show ip bgp neighbors 172.16.12.11
BGP neighbor is 172.16.12.11, remote AS 100, external link
BGP version 4, remote router ID 10.0.1.81
BGP state = Established, up for 00:01:03
Last read 00:00:08, last write 00:00:00, hold time is 30, keepalive interval is 10 seconds
Neighbor sessions:
1 active, is not multisession capable (disabled)
Neighbor capabilities:
Route refresh: advertised and received(new)
Four-octets ASN Capability: advertised and received
Address family IPv4 Unicast: advertised and received
Enhanced Refresh Capability: advertised and received
BGPtimersaredefaultforISP2neighbor:
R2# show ip bgp neighbors 172.16.22.22
BGP neighbor is 172.16.22.22, remote AS 200, external link
BGP version 4, remote router ID 10.0.2.129
BGP state = Established, up for 00:11:01
Last read 00:00:57, last write 00:00:06, hold time is 180, keepalive interval is 60 seconds
Neighbor sessions:
1 active, is not multisession capable (disabled)
Neighbor capabilities:
Route refresh: advertised and received(new)
Four-octets ASN Capability: advertised and received
Address family IPv4 Unicast: advertised and received
Enhanced Refresh Capability: advertised and received
ConfiguringMD5Authentication
ToenableMD5authenticationonaTCPconnectionbetweentwoBGPpeers,use
theneighborpasswordrouterconfigurationcommand.
router(config-router)# neighbor ip-address password string
Enables MD5 authentication on a specific BGP session.
Password string on both routers must match.
Step9
YouwillenableMD5authenticationforBGPsessionbetweenR2andISP1
routers.OntheR2router,enableMD5authenticationontheBGPsessiontothe
ISP1neighbor.
UseMD5authenticationpasswordcisco.

R2(config)# router bgp 1
R2(config-router)# neighbor 172.16.12.11 password cisco
Step10
OntheISP1router,enableMD5authenticationontheBGPsessiontotheR2neighbor.
UseMD5authenticationpasswordcisco.
ISP1(config)# router bgp 100
ISP1(config-router)# neighbor 172.16.12.2 password cisco
MakesurethepasswordthatisusedonISP1issameaspasswordusedonR2.Spacecharacter
afterpasswordwillbecomepartofthepassword.
Ifpasswordismisconfigured,youwillseethefollowingmessageontherouterconsole:
%TCP-6-
BADAUTH: Invalid MD5 digest from 172.16.12.2(60123) to 172.16.12.11(179) (RST) tableid - 0
Step11
OntheISP1router,verifythatBGPsessiontotheR2routerisestablished.
ISP1# show ip bgp neighbors 172.16.12.2
BGP neighbor is 172.16.12.2, remote AS 1, external link
BGP version 4, remote router ID 172.16.22.2
BGP state = Established, up for 00:08:19
Last read 00:00:02, last write 00:00:02, hold time is 30, keepalive interval is 10 seconds
Configured hold time is 30, keepalive interval is 10 seconds
Minimum holdtime from neighbor is 0 seconds
Neighbor sessions:
1 active, is not multisession capable (disabled)
Neighbor capabilities:
Route refresh: advertised and received(new)
Four-octets ASN Capability: advertised and received
Address family IPv4 Unicast: advertised and received
Enhanced Refresh Capability: advertised and received
Step12
OntheR2router,verifythatBGPprefixesarereceivedfromISP1router.
YoushouldseesixBGPprefixesreceivedfromISP1router.
R2# show ip bgp summary
BGP router identifier 172.16.22.2, local AS number 1
BGP table version is 28, main routing table version 28
15 network entries using 2220 bytes of memory
15 path entries using 960 bytes of memory
2/2 BGP path/bestpath attribute entries using 272 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 3500 total bytes of memory
BGP activity 63/48 prefixes, 75/60 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
172.16.12.11 4 100 69 73 28 0 0 00:10:15 6
172.16.22.22 4 200 19 24 28 0 0 00:13:06 9

BeforeyouinjectanylocalroutinginformationintoBGPtableforadvertisingtoother
BGProuters,somebasicconfigurationisrequired.
Only administratively defined networks are announced in BGP.
Manually configure networks to be announced.
Use redistribution from IGP.
Use aggregation to announce summary prefixes.
Therearetwowaystodothisconfiguration:
Listthenetworknumbersthatarecandidatestobeadvertisedusingthe
networkconfigurationcommand.Ifanyofthelistednetworksarereachableby
thelocalrouter,accordingtoitsroutingtable,thenthenetworkisinjectedasa
routeintotheBGPtable.
Redistributeroutinginformationthathasbeenlearnedbyotherroutingprotocols
intotheBGPtable.YoucanusetheIGPthatisusedwithintheAS.Anyroute
thatisknownbythelocalIGPcanbeinjectedintotheBGPtableusingroute
redistributionbetweentheIGPandBGPonthelocalrouter.
AroutercanalsointroducenewroutinginformationintotheBGPtableby
summarizingroutesalreadythere.Thisactivityiscalledrouteaggregationandalso
requiresconfiguration.
AnyroutethattherouterintroducesintotheBGPtablewillappearasanewroute.
TheAS-pathattributeforsucharoutewillbeempty,indicatingalocalroute.TheAS
pathchangeslaterastheroutepassesASboundaries.
router(config-router)# (no) auto-summary
Enables or disables summarization of networks before insertion into the BGP
table:
Locally inserted networks (using the network command)
Redistributed routes
Enabled by default
WhentherouterisconfiguredtolocallyannounceroutesintoBGP,thebehaviorof
thenetworkcommandvariesdependingonwhetherautomaticsummarizationis
enabledordisabled.Whenautomaticsummarizationisenabled,thecommand
summarizeslocallyoriginatedBGPnetworkstotheirclassfulboundaries.Bydefault,
automaticsummarizationisenabledforBGP.
Whenasubnetexistsintheroutingtableandthefollowingthreeconditionsare
satisfied,thenanysubnet(componentroute)ofthatclassfulnetworkinthelocal
routingtablewillpromptBGPtoinstalltheclassfulnetworkintotheBGPtable:
Aclassfulnetworkstatementforthatnetworkexistsintheroutingtable.
Aclassfulmaskhasbeenconfiguredonthatnetworkstatement.
Automaticsummarizationisenabled.
Whenautomaticsummarizationisdisabled,theroutesthatareintroducedlocally
intotheBGPtablearenotsummarizedtotheirclassfulboundaries.
TheBGPauto-summarycommandisalsoresponsibleforthebehaviorofthe
redistributionprocedureinBGP.Whenthecommandisenabled,allredistributed
subnetswillbesummarizedtotheirclassfulboundariesintheBGPtable.Whenitis
disabled,allredistributedsubnetswillbepresentintheiroriginalformintheBGP
table.
router(config-router)# network major-network-number
To manually define a major network
Allows advertising of major networks into BGP.
At least one of the subnets must be present in the routing table.
Behavior depends on the presence of the auto-summary command.
The meaning of the network command in BGP is completely different from any
other routing protocol.
AnnouncingNetworksinBGP

TospecifythenetworkstobeadvertisedbytheBGProutingprocess,usethe
networkrouterconfigurationcommand.Toremoveanentry,usethenoformofthis
command.
ThemeaningofthenetworkcommandinBGPisradically
differentfromthemeaningofthecommandinother
routingprotocols.Inallotherroutingprotocols,the
networkcommandindicatesinterfacesoverwhichthe
routingprotocolwillberun.InBGP,itindicatesonlywhich
routesshouldbeinjectedintotheBGPtableonthelocal
router.Also,BGPneverrunsoverindividualinterfaces;it
isrunoverTCPsessionswithmanuallyconfigured
neighbors.
Thenetworkcommandwithnomaskoptionusestheclassfulapproachtoinserta
majornetworkintotheBGPtable.Atleastonesubnetofthespecifiedmajornetwork
needstobepresentintheIProutingtabletoallowBGPtostartannouncingthe
majornetworkasaBGProute.Ifautomaticsummarizationisdisabled,anexact
matchisrequired.
router(config-router)# network major-network-number route-map route-map-
name
The addition of the route-map option allows network parameters to be modified
before you enter them into the BGP table.
The route-map option can be used for the following:
Changing the weight value of a locally sourced route
Tagging sourced routes with BGP communities
Setting the local preference for a specific network
Changing the value of the MED for a specific network
WhentherouterisconfiguredtoinsertroutesintotheBGPtable,thedefault
attributesoflocallysourcedroutescanbemodifiedwiththeinclusionoftheroute-
mapoptioninthebasicnetworkcommand.
Theattachedroute-mapcanchangethefollowingattributesoflocallysourced
networkswiththenetworkcommand:
Weight(defaultvalue=32768):TheweightattributeisaspecialCiscoattribute
thatisusedinthepathselectionprocesswhenthereismorethanonerouteto
thesamedestination.Becauseweightisconsideredbeforelocalpreferencein
BGProuteselection,locallysourcedroutesarealwayspreferred,unlessthe
weightvalueismodified.
Community(defaultvalue=nonexistent):Usedfortaggingroutesattheir
source.
Localpreference(defaultvalue=100):UsedforAS-wideBGPbest-path
selection.
MED(defaultvalue=0):Usedforreturn-pathselectionintopologieswhere
multipleexitpointstothesameneighborASexist.
AnnouncingNetworksinBGPExample
Ifasubnetexistingintheroutingtableis75.75.75.0/24,andnetwork75.0.0.0is
configuredundertherouterbgpcommand(assumingthatautomaticsummarization
isenabled),BGPwillintroducetheclassfulnetwork75.0.0.0/8intheBGPtable.If
thefollowingthreeconditionsarenotallmet,thenBGPwillnotinstallanyentryin
theBGPtableunlessthereisanexactmatchintheIProutingtable:
Aclassfulnetworkstatementforthenetworkexistsintheroutingtable.
Aclassfulmaskhasbeenconfiguredonthatnetworkstatement.
Automaticsummarizationisenabled.

TherearetwoalternativesforinjectinglocalroutesintotheBGPtable:listthem
usingthenetworkcommandorredistributethem.Listingtheroutesgivesyoutotal
controlovernetworksthatcouldpossiblybeadvertisedbyBGP.Thisoptionisvery
desirableformultihomedcustomersorISPs.Ontheotherhand,thisapproach
requiresmanyconfigurationcommandsthatcouldbedifficulttomaintain.
Easier than listing networks in BGP process in large networks.
Redistributed routes carry origin attribute "incomplete."
Always filter redistributed routes to prevent route leaking.
Avoid in service provider environments.
Iftherearealotofnetworkstobeadvertised,andBGPisusedprimarilytoachieve
scalability,notroutingsecurity(forexample,inenterprisenetworks),itcouldbe
easiertoletthelocalIGPfindtheroutesandthenredistributethemintoBGP.
However,thisapproachintroducestheriskthattheIGPmayfindsomenetworksthat
arenotsupposedtobeadvertised.Privatenetworknumbers,suchasnetwork
10.0.0.0/8,areoftenusedwithinanASforvariousreasonsbutmustneverbe
advertisedouttotheInternet.Carefulfilteringmustbedonetopreventunintentional
advertising.
WhentherouterinjectsaroutethatislistedwithanetworkcommandintoitsBGP
table,theorigincodeissetto"IGP."IftherouteisinjectedintotheBGPtable
throughredistribution,theorigincodeissetto"unknown/incomplete."
RedistributingRoutesintoBGP

Overview
Throughthisdiscovery,youwilllearnhowtoconfigureBGPredistributionandBGP
routeaggregation.
Discovery2:AnnouncingNetworksinBGP

Topology

Ifyoushutdownaninterfaceonarealrouterorswitch,the
connecteddevicewillseeitas"down/down."Dueto
virtualizationspecifics,IOLbehaviorisslightlydifferent.If
youshutdownaninterfaceonarouterorswitch,the
connecteddevicewillseeitas"up/up."InIOL,thestatus
ofaninterfacecanonlybe"up/up"or"administratively
down/down."
DeviceInformation
Device Interface IPaddress Description
R2 Ethernet0/0 172.16.22.2/24 ConnectiontoISP2
R2 Ethernet0/1 172.16.12.2/24 ConnectiontoISP1
R2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
10.0.0.1/28
10.0.0.17/28
10.0.0.33/28
10.0.0.49/28
10.0.0.65/28
Loopbackssimulate
LANnetworks
ISP1 Ethernet0/1 172.16.12.11/24 ConnectiontoR2
ISP1 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
10.0.1.1/28
10.0.1.17/28
10.0.1.33/28
10.0.1.49/28
10.0.1.65/28
10.0.1.81/28
Loopbackssimulate
LANnetworks
ISP2 Ethernet0/0 172.16.22.22/24 ConnectiontoR2
ISP2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
Loopback7
Loopback8
Loopback9
10.0.2.1/28
10.0.2.17/28
10.0.2.33/28
10.0.2.49/28
10.0.2.65/28
10.0.2.81/28
10.0.2.97/28
10.0.2.113/28
10.0.2.129/28
Loopbackssimulate
LANnetworks
JobAids

Step1
YouwillredistributeconnectedroutesintoBGP.R2routerispreconfiguredwith
fiveLoopbackinterfacesandisalreadyrunningBGPintheAS1.
Initially,verifywhichLoopbackinterfacesareontheR2router.ReadLoopback
interface'sIPaddressesandsubnetmasks.Youwillneedthisinformationwhen
configuringaccesslist.
R2# show ip interface | include Loopback|Internet address
< text omitted >
Loopback1 is up, line protocol is up
Internet address is 10.0.0.1/28
Loopback2 is up, line protocol is up
Internet address is 10.0.0.17/28
Loopback3 is up, line protocol is up
Internet address is 10.0.0.33/28
Loopback4 is up, line protocol is up
Internet address is 10.0.0.49/28
Loopback5 is up, line protocol is up
Internet address is 10.0.0.65/28
OntheR2router,redistributeconnectedroutesintoBGP:
R2(config)# router bgp 1
R2(config-router)# redistribute connected
Thisway,youwillincludeallconnectedinterfaces,includingLoopback
interfaces,intotheBGProutingtable.
Step2
OntheR2router,configureaccesslistthatpermitseven-numberedLoopback
interfaces(Loopback2andLoopback4).
Useaccesslistnumber1.
R2(config)# access-list 1 permit 10.0.0.16
R2(config)# access-list 1 permit 10.0.0.48
Step3
OntheR2router,makesurethatonlyeven-numberedLoopbackinterfacesare
redistributedintoBGP.
R2(config)# router bgp 1
R2(config-router)# distribute-list 1 out connected
Step4
ClearallBGPsessionsontheR2router.
R2# clear ip bgp *
Step5
OntheR2router,verifythattworoutesareaddedintoBGProutingtable.
R2# show ip bgp
BGP table version is 18, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.16/28 0.0.0.0 0 32768 ?
AnnouncingNetworksinBGP
DiscoverySteps

*> 10.0.0.48/28 0.0.0.0 0 32768 ?
*> 10.0.1.0/28 172.16.12.11 0 0 100 i
*> 10.0.1.16/28 172.16.12.11 0 0 100 i
*> 10.0.1.32/28 172.16.12.11 0 0 100 i
*> 10.0.1.48/28 172.16.12.11 0 0 100 i
*> 10.0.1.64/28 172.16.12.11 0 0 100 i
*> 10.0.1.80/28 172.16.12.11 0 0 100 i
*> 10.0.2.0/28 172.16.22.22 0 0 200 i
*> 10.0.2.16/28 172.16.22.22 0 0 200 i
*> 10.0.2.32/28 172.16.22.22 0 0 200 i
*> 10.0.2.48/28 172.16.22.22 0 0 200 i
*> 10.0.2.64/28 172.16.22.22 0 0 200 i
*> 10.0.2.80/28 172.16.22.22 0 0 200 i
*> 10.0.2.96/28 172.16.22.22 0 0 200 i
*> 10.0.2.112/28 172.16.22.22 0 0 200 i
*> 10.0.2.128/28 172.16.22.22 0 0 200 i
Whenyouseenexthopis0.0.0.0,youknowthattheseroutesarelocallyinsertedintoBGP
routing.
AlsoobservethatorigincodeisincompleteforroutesthatareinsertedbyR2router.
RedistributionUsingRouteMaps
RoutesthatareredistributedintoBGPwillcarrytheoriginattributeincomplete.In
mostcases,thissituationdoesnotjeopardizeBGPfunctionality.Itcouldposea
problemiftherouteselectionprocesshastodecideonthebestroutetowarda
particulardestinationbasedontheMEDattribute.Inthecaseofreceivingtwo
routes,onewiththeIGPorigin(insertedwiththenetworkcommand),andanother
onewiththeincompleteorigin,thefirstroutewouldalwaysbeselected,nomatter
whatvaluetheMEDattributeissetto(accordingtotheBGProuteselectionrules).
Origin can be set to "IGP" with a route-map.
Other BGP path attributes can also be set:
Metric
Next-hop
Community
Youcanconfigureroute-mapsontheroutertofilterupdatesandmodifyvarious
attributes.Aconfiguredroute-mapcanbeappliedtoroutesbeingredistributedfrom
theIGP.
Onlytheroutesthatarepermittedbytheroute-mapwillberedistributed.Whenyou
usethesetcommandintheroute-map,youcanmodifyspecificpathattributesthat
areattachedtotheredistributedroutes.Thus,onlyselectedrouteswillbe
advertised,andtheywillhavethedesiredattributevalues.
Whenyouconfiguretheroute-map,useaname.Thisnameisacase-sensitive
string,whichisusedwhenyouarereferringtotheroute-map.Anystringcouldbe
used,butameaningfulnameissuggested.
Usetheroute-mapglobalconfigurationcommandandthematchandsetroute-
mapconfigurationcommandstodefinetheconditionsforredistributingroutes.Each
repetitionoftheroute-mapcommandhasalistofmatchandsetcommandsthat
areassociatedwithit.Thematchcommandsspecifythematchcriteria—the
conditionsunderwhichredistributionisallowedforthecurrentroute-mapcommand.
Thesetcommandsspecifythesetactions—theparticularredistributionactionsto
performifthecriteriaenforcedbythematchcommandsaremet.
Whenyouarepassingroutesthrougharoute-map,itcanhaveseveralparts.Any
routethatdoesnotmatchatleastonematchclauserelatingtoaroute-map
commandwillbeignored;thatis,theroutewillnotbeadvertised.Ifyouwantto
modifyonlysomedata,youmustconfigureasecondroute-mapsectionwithan
explicitmatchspecified.
Step6
OntheR2router,configureroutemap,whereyouwillmatchbasedon
previouslyconfiguredaccesslistandsetorigincodetoIGP.
R2(config)# route-map evenLoop permit 10
R2(config-route-map)# match ip address 1
R2(config-route-map)# set origin igp

Step7
OntheR2router,redistributeconnectedroutesintoBGPbyusingpreviously
configuredroutemap.
R2(config)# router bgp 1
R2(config-router)# redistribute connected route-map evenLoop
Step8
OntheR2router,verifythatorigincodeoftwoaddedroutesintheBGProuting
tablehaschangedintoIGP.
R2# show ip bgp | include 0.0.0.0
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
ConfiguringClasslessBGP
BGPversion4isaclasslessprotocol,meaningthatitsroutingupdatesincludethe
IPaddressandthesubnetmask.ThecombinationoftheIPaddressandthesubnet
maskiscalledanIPprefix.AnIPprefixcanbeasubnet,amajornetwork,ora
supernet.
BGPusesprefixnotation(address/numberofbits)todisplayIPprefixes.The
numberfollowingtheslash(/)inthe192.168.0.0/16notationinthefigurerefersto
thenumberofbitsinthesubnetmaskbeingsetto1.Thesubnetmask255.255.0.0
startswith16consecutivebitssetto1,andtherestofthebitssetto0.
Asanotherexample,thesubnet172.16.1.0withmask255.255.255.0canbewritten
usingtheprefixnotationas172.16.1.0/24.
Whenclasslessprefixnotationisused,anoldclassAnetwork,forexample,
10.0.0.0,withthenaturalmask,iswrittenas10.0.0.0/8.AclassBnetwork,
172.17.0.0withnaturalmask,iswrittenas172.17.0.0/16,andaclassCnetwork,
192.168.1.0withnaturalmask,iswrittenas192.168.1.0/24.
BGP supports CIDR.
Any BGP router can advertise individual networks or supernets (prefixes).
Prefix notation is used with BGP instead of subnet masks.
192.168.0.0/16 = 192.168.0.0 255.255.0.0
Step9
OntheR2router,configureLoopback1interfacesubnettobeadvertisedinto
BGP.TheLoopback1interfacehasaclasslessprefixpreconfigured
(10.0.0.0/28).
ToadvertiseclasslessnetworksintoBGP(asubnetorasupernet),youcanuse
thenetworkcommandwiththemaskkeywordandthesubnetmaskspecified.
SupposethatanexactmatchisnotfoundintheIProutingtable.Thissituation
canoccurforexample,whenyouarecreatingasummaryorwhenyouare
advertisingonlyapartofyouraddressspace.Fortheadvertisementtosucceed,
youwillneedtomanuallyconfigureamatchingprefixontherouterintheformof
astaticroutepointingtothenull0interface.
R2(config)# router bgp 1
R2(config-router)# network 10.0.0.0 mask 255.255.255.240
Step10
OntheR2router,verifythatLoopback1interfacesubnetispresentintheBGProutingtable.
R2# show ip bgp
BGP table version is 21, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 0.0.0.0 0 32768 i
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*> 10.0.1.0/28 172.16.12.11 0 0 100 i
*> 10.0.1.16/28 172.16.12.11 0 0 100 i
*> 10.0.1.32/28 172.16.12.11 0 0 100 i
*> 10.0.1.48/28 172.16.12.11 0 0 100 i
*> 10.0.1.64/28 172.16.12.11 0 0 100 i
*> 10.0.1.80/28 172.16.12.11 0 0 100 i
*> 10.0.2.0/28 172.16.22.22 0 0 200 i
*> 10.0.2.16/28 172.16.22.22 0 0 200 i
*> 10.0.2.32/28 172.16.22.22 0 0 200 i
*> 10.0.2.48/28 172.16.22.22 0 0 200 i
*> 10.0.2.64/28 172.16.22.22 0 0 200 i
*> 10.0.2.80/28 172.16.22.22 0 0 200 i
*> 10.0.2.96/28 172.16.22.22 0 0 200 i
*> 10.0.2.112/28 172.16.22.22 0 0 200 i
*> 10.0.2.128/28 172.16.22.22 0 0 200 i
R2# show ip bgp 10.0.0.0/28
BGP routing table entry for 10.0.0.0/28, version 21
Paths: (1 available, best #1, table default)
Advertised to update-groups:
3
Refresh Epoch 1
Local
0.0.0.0 from 0.0.0.0 (10.0.0.65)
Origin IGP, metric 0, localpref 100, weight 32768, valid, sourced, local, best
Ifthekeywordmaskandthesubnetmaskareomitted,thenetworkisassumedtohaveits
naturalmaskaccordingtothenetworkclass.Inthiscase,theroutewillstillbeinjectedintothe
BGPtableontherouterifthereisanysubnetofthemajornetworkthatisreachableaccording
totheroutingtable.
Step11
OntheR2router,advertisesubnet10.0.0.0/24intoBGP.Subnet10.0.0.0/24is
representingallLoopbackinterfacesthatareconfiguredonR2router.
R2(config)# router bgp 1
R2(config-router)# network 10.0.0.0 mask 255.255.255.0
Step12
OntheR2router,verifythatsubnet10.0.0.0/24ispresentintheBGProuting
table.
R2# show ip bgp 10.0.0.0/24
% Network not in table
RouteisnotpresentintheBGProutingtable.
ThenetworkcommandwiththemaskoptiontellsBGPthat10.0.0.0/24isa
candidateforbeingadvertised.Themaskkeywordandthemask255.255.255.0
arerequiredbecausethemaskisnotthenaturalone.However,beforethe
candidaterouteisactuallyadvertised,theroutercheckstheroutingtableforan
exactmatch(bothnetworknumberandmask).Itwillalwaysbefoundbecause
thereisastaticrouteforit.Thisstaticroutepointstothenullinterface,whichis
alwaysavailable.
Theconclusionisthat10.0.0.0/24willalwaysbeadvertisedbythisrouter.All
otherBGProuterswillusethisinformationandforwardanyIPpacketswiththe
destinationIPaddressintheinterval10.0.0.0to10.0.0.255(inclusive)inthe
directionofthisrouter.Whenthosepacketsarrive,therouter,inthisexample,
musthavemoreexplicitroutestothedifferentpartsofthe10.0.0.0/24address
range.IGPcouldanswerthisneedbutitisnotshowninthisconfiguration
example.
Step13

OntheR2router,configureexplicitstaticroutefor10.0.0.0/24pointingtothenull
interface.
R2(config)# ip route 10.0.0.0 255.255.255.0 Null 0
If,however,anIPpacketarriveswithadestinationaddresstowhichthisrouter
doesnothaveamoreexplicitroute,thestaticroutewillroutethepackettothe
nullinterface,whereitisdropped.Thisroutingisasafetyprecautionthatwill
preventaroutingloop,whichmightoccurwhenroutesummariesareusedin
combinationwithdefaultrouting.SupposethatapacketarrivesfromtheInternet
toasubnetof10.0.0.0/24,whichiscurrentlynotreachable.Inthiscase,the
packetmightfollowthedefaultroutetowardtheInternetbecausethereisno
moreexplicitroute.Ofcourse,thepacketwouldimmediatelyberoutedback
again,andaroutingloopwouldoccur.
Step14
OntheR2router,verifythatsubnet10.0.0.0/24isnowpresentintheBGProutingtable.
R2# show ip bgp 10.0.0.0/24
BGP routing table entry for 10.0.0.0/24, version 22
Paths: (1 available, best #1, table default)
Advertised to update-groups:
3
Refresh Epoch 1
Local
0.0.0.0 from 0.0.0.0 (10.0.0.65)
Origin IGP, metric 0, localpref 100, weight 32768, valid, sourced, local, best
Route10.0.0.0/24ispresentintheBGProutingtable.
AggregatingBGPNetworks
WhentheBGPtableisalreadypopulatedwithroutesthatshouldbesummarized,
youmustconfigurearoutertodoso.ThesummarizationofBGProutesiscalled
"aggregation."
Useaggregationwhenagroupofmorespecificrouteshasbeeninjectedintothe
BGPtableatonestagebutcanbesummarizedatalaterstage.Theroutestobe
summarizedcouldbeIGProutesthathavebeenredistributedintoBGP.BeforeBGP
advertisestheseroutestotherestofthenetwork,anaggregationofthesubnetsinto
alargerannouncementwouldbeappropriate.
Insomenetworks,morespecificroutesareinjectedintotheBGPtablebysome
routers,andaggregationisdoneinanotherrouteroreveninanotherAS.This
approachiscalled"proxyaggregation."
Whenarouterisconfiguredtodoaggregation,youmustconfiguretheroute
summary.IfanyroutethatisalreadyintheBGPtableiswithintherangethatis
indicatedbythesummary,thenthesummaryrouteisalsoinjectedintotheBGP
tableontherouteandadvertisedtootherrouters.Thisactioncreatesmore
informationintheBGPtable.Togetanybenefitsfromtheaggregation,youmust
suppressthemorespecificroutesthatarecoveredbytheroutesummary.This
suppressionisanoptiontotheaggregateconfigurationcommand.
Whenyousuppressthemorespecificroutesthroughconfiguration,theyarestill
presentintheBGPtableoftherouterdoingtheaggregation.However,becausethe
routesaremarkedassuppressed,theyareneveradvertisedtoanyotherrouter.
Summarization is called "aggregation" in BGP.
Aggregation creates summary routes (called "aggregates") from networks
already in BGP table.
Individual networks can be announced or suppressed.
Step15
OntheISP1router,configureBGPaggregationonthesubnet10.0.1.0/24.
Donotusesummary-onlykeyword,toobserveboththeroutesummary,and
themorespecificroutesthatwillbeadvertised.

ISP1(config)# router bgp 100
ISP1(config-router)# aggregate-address 10.0.1.0 255.255.255.0
Step16
OntheISP1router,verifypresenceofaggregatedroute10.0.1.0/24intheBGProuting
table.
ISP1# show ip bgp
BGP table version is 73, local router ID is 10.0.1.81
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 172.16.12.2 0 0 1 i
*> 10.0.0.0/24 172.16.12.2 0 0 1 i
*> 10.0.0.16/28 172.16.12.2 0 0 1 i
*> 10.0.0.48/28 172.16.12.2 0 0 1 i
*> 10.0.1.0/28 0.0.0.0 0 32768 i
*> 10.0.1.0/24 0.0.0.0 32768 i
*> 10.0.1.16/28 0.0.0.0 0 32768 i
*> 10.0.1.32/28 0.0.0.0 0 32768 i
*> 10.0.1.48/28 0.0.0.0 0 32768 i
*> 10.0.1.64/28 0.0.0.0 0 32768 i
*> 10.0.1.80/28 0.0.0.0 0 32768 i
*> 10.0.2.0/28 172.16.12.2 0 1 200 i
*> 10.0.2.16/28 172.16.12.2 0 1 200 i
*> 10.0.2.32/28 172.16.12.2 0 1 200 i
*> 10.0.2.48/28 172.16.12.2 0 1 200 i
*> 10.0.2.64/28 172.16.12.2 0 1 200 i
*> 10.0.2.80/28 172.16.12.2 0 1 200 i
*> 10.0.2.96/28 172.16.12.2 0 1 200 i
*> 10.0.2.112/28 172.16.12.2 0 1 200 i
*> 10.0.2.128/28 172.16.12.2 0 1 200 i
Step17
OntheR2router,verifypresenceofaggregatedroute10.0.1.0/24andmorespecificroutes
intheBGProutingtable.
R2# show ip bgp
BGP table version is 37, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 0.0.0.0 0 32768 i
*> 10.0.0.0/24 0.0.0.0 0 32768 i
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*> 10.0.1.0/28 172.16.12.11 0 0 100 i
*> 10.0.1.0/24 172.16.12.11 0 0 100 i
*> 10.0.1.16/28 172.16.12.11 0 0 100 i
*> 10.0.1.32/28 172.16.12.11 0 0 100 i
*> 10.0.1.48/28 172.16.12.11 0 0 100 i
*> 10.0.1.64/28 172.16.12.11 0 0 100 i
*> 10.0.1.80/28 172.16.12.11 0 0 100 i
*> 10.0.2.0/28 172.16.22.22 0 0 200 i
*> 10.0.2.16/28 172.16.22.22 0 0 200 i
*> 10.0.2.32/28 172.16.22.22 0 0 200 i
*> 10.0.2.48/28 172.16.22.22 0 0 200 i
*> 10.0.2.64/28 172.16.22.22 0 0 200 i
*> 10.0.2.80/28 172.16.22.22 0 0 200 i
*> 10.0.2.96/28 172.16.22.22 0 0 200 i
*> 10.0.2.112/28 172.16.22.22 0 0 200 i
*> 10.0.2.128/28 172.16.22.22 0 0 200 i
Thisapproachisgenerallynotdesirable.Therefore,suppressionofindividualroutes,
describednext,isusedinmostcases.

Step18
OntheISP1router,configureBGPaggregationonthesubnet10.0.1.0/24by
usingkeywordsummary-only.
ISP1(config)# router bgp 100
ISP1(config-router)# aggregate-address 10.0.1.0 255.255.255.0 summary-
only
Step19
OntheISP1router,verifypresenceofaggregatedroute10.0.1.0/24intheBGProuting
table.
ISP1# show ip bgp
BGP table version is 79, local router ID is 10.0.1.81
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 172.16.12.2 0 0 1 i
*> 10.0.0.0/24 172.16.12.2 0 0 1 i
*> 10.0.0.16/28 172.16.12.2 0 0 1 i
*> 10.0.0.48/28 172.16.12.2 0 0 1 i
s> 10.0.1.0/28 0.0.0.0 0 32768 i
*> 10.0.1.0/24 0.0.0.0 32768 i
s> 10.0.1.16/28 0.0.0.0 0 32768 i
s> 10.0.1.32/28 0.0.0.0 0 32768 i
s> 10.0.1.48/28 0.0.0.0 0 32768 i
s> 10.0.1.64/28 0.0.0.0 0 32768 i
s> 10.0.1.80/28 0.0.0.0 0 32768 i
*> 10.0.2.0/28 172.16.12.2 0 1 200 i
*> 10.0.2.16/28 172.16.12.2 0 1 200 i
*> 10.0.2.32/28 172.16.12.2 0 1 200 i
*> 10.0.2.48/28 172.16.12.2 0 1 200 i
*> 10.0.2.64/28 172.16.12.2 0 1 200 i
*> 10.0.2.80/28 172.16.12.2 0 1 200 i
*> 10.0.2.96/28 172.16.12.2 0 1 200 i
*> 10.0.2.112/28 172.16.12.2 0 1 200 i
*> 10.0.2.128/28 172.16.12.2 0 1 200 i
Theprefix10.0.1.0/24isinjectedbecausethereisatleastonemorespecificroutewithin
thesummaryrange.Inthiscase10.0.1.0/28,10.0.1.16/28,10.0.1.32/28,10.0.1.48/28,
10.0.1.64/28,and10.0.1.80/28arewithintherange.Themorespecificroutesaremarked
assuppressedusingthelowercaseletter"s."The"s"meansthattheyarestillpresentand
availableintheBGPtableoftherouter,buttheyarenotadvertisedonanyBGPsession.
Whenthesummary-onlyoptionisused,onlytheroutesummarywillbeadvertised,notthe
morespecificroutes.
Oneofthebenefitsofthisapproachisthattherestoftherouterswillreceiveonlyone
routeinsteadofmanymorespecificroutes.Iteasestheburdenontheotherroutersby
reducingtheamountofmemorythatisrequiredtoholdtheBGPtable.
Anotherbenefitisthatrouteflappingisreduced.Therouterdoingtheaggregation
continuesadvertisingtheaggregateaslongasthereisatleastonespecificroutewithin
therangestillavailable.Ifoneofthemorespecificroutesislostbutatleastoneremains,
theaggregateitselfisnotlost.Theflapofthemorespecificrouteisnotvisibletotherest
ofthenetwork.ThisapproachreducesthenumberofupdatesnecessaryandtheCPU
powerthatisrequiredtoprocessthem.
However,allroutesummarizationinanyroutingprotocolcausesalossofgranularity(that
is,lackofmoredetailednetworkorsubnetvisibility).Suboptimalroutingcouldbe
introducedwhenredundantpathsareavailabletoreachagroupofnetworksthatare
advertisedbyasingleroutesummary.Someofthenetworkscouldbemorereachablevia
oneofthepaths,whileothersmaybemorereachableanotherway.Fromoutsidethe
immediatenetwork,multiplepathsmaynotbevisiblebecauseonlysummaryroutesare
advertised.Therefore,thereisariskthattheleastoptimalpathwillbechosen.

Step20
OntheR2router,verifythatonlyBGPaggregatedrouteisreceivedfromISP1router.
Youwillnotseemorespecificroutes(10.0.1.0/28,10.0.1.16/28,10.0.1.32/28,
10.0.1.48/28,10.0.1.64/28,or10.0.1.80/28)advertisedfromISP1router.
R2# show ip bgp
BGP table version is 29, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 0.0.0.0 0 32768 i
*> 10.0.0.0/24 0.0.0.0 0 32768 i
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*> 10.0.1.0/24 172.16.12.11 0 0 100 i
*> 10.0.2.0/28 172.16.22.22 0 0 200 i
*> 10.0.2.16/28 172.16.22.22 0 0 200 i
*> 10.0.2.32/28 172.16.22.22 0 0 200 i
*> 10.0.2.48/28 172.16.22.22 0 0 200 i
*> 10.0.2.64/28 172.16.22.22 0 0 200 i
*> 10.0.2.80/28 172.16.22.22 0 0 200 i
*> 10.0.2.96/28 172.16.22.22 0 0 200 i
*> 10.0.2.112/28 172.16.22.22 0 0 200 i
*> 10.0.2.128/28 172.16.22.22 0 0 200 i

RoutesthatareadvertisedthroughtheBGParecommonlyaggregatedtominimize
thenumberofroutesthatareusedandreducethesizeofglobalroutingtables.
However,commonrouteaggregationcanobscuremorespecificroutinginformation
thatismoreaccuratebutnotnecessarytoforwardpacketstotheirdestinations.
Commonrouteaggregationobscuresroutingaccuracybecauseaprefixthat
representsmultipleaddressesorhostsoveralargetopologicalareacannotbe
accuratelyreflectedinasingleroute.CiscoIOSSoftwareprovidesseveralmethods
bywhichyoucanoriginateaprefixintoBGP.Themethodsincluderedistributionand
usingthenetworkoraggregate-addresscommand.Thesemethodsassumethe
existenceofmorespecificroutinginformation(matchingtheroutetobeoriginated)
ineithertheroutingtableortheBGPtable.
The BGP Conditional Route Injection feature has the following functions:
It provides means to originate a prefix into a BGP routing table without the
corresponding match.
It allows more specific routes to be generated based on administrative policy or
traffic engineering information to provide more specific control over the
forwarding of packets to these more specific routes, which are injected into the
BGP routing table only if the configured conditions are met.
It improves accuracy of common route aggregation by conditionally injecting or
replacing less specific prefixes with more specific prefixes.
TheBGPConditionalRouteInjectionfeatureallowsyoutooriginateaprefixintoa
BGProutingtablewithoutthecorrespondingmatch.Thisfeatureallowsmore
specificroutestobegeneratedbasedonadministrativepolicyortrafficengineering
information.Thisfeatureprovidesmorespecificcontrolovertheforwardingof
packetstothesemorespecificroutes.TheseroutesareinjectedintotheBGP
routingtableonlyiftheconfiguredconditionsaremet.Enablingthisfeatureallows
youtoimprovetheaccuracyofcommonrouteaggregationbyconditionallyinjecting
orreplacinglessspecificprefixeswithmorespecificprefixes.Onlyprefixesthatare
equaltoormorespecificthantheoriginalprefixmaybeinjected.
TheBGPConditionalRouteInjectionfeatureisenabledwiththebgpinject-map
exist-mapcommand.Thiscommandusestworoutemaps(inject-mapandexist-
map)toinstallone(ormorethanone)morespecificprefixintoaBGProutingtable.
Theexist-mapspecifiestheprefixesthattheBGPspeakerwilltrack.Theinject-map
definestheprefixesthatwillbecreatedandinstalledintothelocalBGPtable.
BGPConditionalRouteInjectionExample
Thisconfigurationexampleconfiguresconditionalrouteinjectionfortheinject-map
thatisnamedORIGINATEandtheexist-mapthatisnamedLEARNED_PATH:
router bgp 109
bgp inject-map ORIGINATE exist-map LEARNED_PATH
!
route-map LEARNED_PATH permit 10
match ip address prefix-list ROUTE
match ip route-source prefix-list ROUTE_SOURCE
!
route-map ORIGINATE permit 10
set ip address prefix-list ORIGINATED_ROUTES
set community 14616:555 additive
!
ip prefix-list ROUTE permit 10.1.1.0/24
!
ip prefix-list ORIGINATED_ROUTES permit 10.1.1.0/25
ip prefix-list ORIGINATED_ROUTES permit 10.1.1.128/25
!
ip prefix-list ROUTE_SOURCE permit 10.2.1.1/32
BGPConditionalRouteInjection

TheBGPSupportforTTLSecurityCheckfeatureintroducesalightweightsecurity
mechanismtoprotectEBGPpeeringsessionsfromCPUutilization-basedattacks.
Thesetypesofattacksaretypicallybrute-forceDoSattacksthatattempttodisable
thenetworkbyfloodingthenetworkwithIPpacketsthatcontainforgedsourceand
destinationIPaddresses.ThisfeatureprotectstheEBGPpeeringsessionby
comparingthevalueintheTTLfieldofreceivedIPpacketsagainstahopcount.The
hopcountisconfiguredlocallyforeachEBGPpeeringsession.Ifthevalueinthe
TTLfieldoftheincomingIPpacketisgreaterthanorequaltothelocallyconfigured
value,theIPpacketisacceptedandprocessednormally.IftheTTLvalueintheIP
packetislessthanthelocallyconfiguredvalue,thepacketissilentlydiscardedand
noICMPmessageisgenerated.Notrespondingtoaforgedpacketispartofa
designedbehaviorthathelpspreventCPUutilization-basedattacks.
BGP Support for TTL Security Check feature has the following characteristics:
Lightweight security mechanism to protect EBGP peering sessions from CPU
utilization-based attacks.
Protects the EBGP peering session by comparing the value in the TTL field of
received IP packets against a hop count that is configured locally for each EBGP
peering session.
Supports both directly connected peering sessions and multihop EBGP peering
sessions.
AccuratelyforgingtheTTLcountinanIPpacketisgenerallyconsideredtobe
impossible.ItispossibletoforgetheTTLfieldinanIPpacketheader.However,
accuratelyforgingapackettomatchtheTTLcountfromatrustedpeerisnot
possibleunlessthenetworktowhichthetrustedpeerbelongshasbeen
compromised.
ThisfeaturesupportsbothdirectlyconnectedpeeringsessionsandmultihopEBGP
peeringsessions.TheincomingpacketsthatcontaininvalidTTLvaluesdonotaffect
theBGPpeeringsession.TheBGPpeeringsessionremainsopen,andtherouter
silentlydiscardstheinvalidpacket.TheBGPsession,however,canstillexpireif
keepalivepacketsarenotreceivedbeforethesessiontimerexpires.
TheBGPSupportforTTLSecurityCheckfeatureshouldbeconfiguredoneach
participatingrouter.Itprovidesaneffectiveandeasy-to-deploysolutiontoprotect
EBGPpeeringsessionsfromCPUutilization-basedattacks.Whenthisfeatureis
enabled,ahostcannotattackaBGPsessionifthehostisnotamemberofthelocal
orremoteBGPnetworkorifthehostisnotdirectlyconnectedtoanetworksegment
betweenthelocalandremoteBGPnetworks.Thissolutiongreatlyreducesthe
effectivenessofDoSattacksagainstaBGPAS.
BGPSupportforTTLSecurityCheck

Overview
Throughthisdiscovery,youwilllearnhowtoenableBGPTTLsecuritycheck.
Discovery3:ImplementBGPTTLSecurityCheck

Topology

Ifyoushutdownaninterfaceonarealrouterorswitch,the
connecteddevicewillseeitas"down/down."Dueto
virtualizationspecifics,IOLbehaviorisslightlydifferent.If
youshutdownaninterfaceonarouterorswitch,the
connecteddevicewillseeitas"up/up."InIOL,thestatus
ofaninterfacecanonlybe"up/up"or"administratively
down/down."
DeviceInformation
Device Interface IPaddress Description
R2 Ethernet0/0 172.16.22.2/24 ConnectiontoISP2
R2 Ethernet0/1 172.16.12.2/24 ConnectiontoISP1
R2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
10.0.0.1/28
10.0.0.17/28
10.0.0.33/28
10.0.0.49/28
10.0.0.65/28
Loopbackssimulate
LANnetworks
ISP1 Ethernet0/1 172.16.12.11/24 ConnectiontoR2
ISP1 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
10.0.1.1/28
10.0.1.17/28
10.0.1.33/28
10.0.1.49/28
10.0.1.65/28
10.0.1.81/28
Loopbackssimulate
LANnetworks
ISP2 Ethernet0/0 172.16.22.22/24 ConnectiontoR2
ISP2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
Loopback7
Loopback8
Loopback9
10.0.2.1/28
10.0.2.17/28
10.0.2.33/28
10.0.2.49/28
10.0.2.65/28
10.0.2.81/28
10.0.2.97/28
10.0.2.113/28
10.0.2.129/28
Loopbackssimulate
LANnetworks
JobAids

Step1
TosecureaBGPpeeringsessionbetweenR2andISP2routersconfigureBGP
TTLsecuritycheck.
OntheR2router,configureBGPTTLsecuritychecktotheISP2withhopcount
10.
R2(config)# router bgp 1
R2(config-router)# neighbor 172.16.22.22 ttl-security hops 10
BGPsessionbetweenR2andISP2routerswillgodown.
RouterR2willstartsendingBGPpacketswithTTL255andwillacceptBGP
packetswith245ormore.
Step2
OntheISP2router,configureBGPTTLsecuritychecktotheR2withhopcount
10.
ISP2(config)# router bgp 200
ISP2(config-router)# neighbor 172.16.22.2 ttl-security hops 10
BGPsessionbetweenR2andISP2routerswillgoup.
%BGP-5-ADJCHANGE: neighbor 172.16.22.2 Up
Step3
OntheISP2router,verifywhatTTLvaluesareusedforBGPneighbor.
ISP2# show ip bgp neighbors 172.16.22.2 | include TTL
Connection is ECN Disabled, Mininum incoming TTL 245, Outgoing TTL 255
YoucanseeBGPpacketsaresentwithTTLnumber255andareacceptedwith
TTLvalue245ormore.
Step4
OntheR2router,verifywhatTTLvaluesareusedforBGPneighbor.
R2# show ip bgp neighbors 172.16.22.22 | include TTL
Connection is ECN Disabled, Mininum incoming TTL 245, Outgoing TTL 255
YoucanseeBGPpacketsaresentwithTTLnumber255andareacceptedwith
TTLvalue245ormore.
Step5
OntheR2router,verifythatBGPsessiontotheISP2isestablished.
R2# show ip bgp summary
BGP router identifier 10.0.0.65, local AS number 1
BGP table version is 63, main routing table version 63
14 network entries using 2072 bytes of memory
14 path entries using 896 bytes of memory
3/3 BGP path/bestpath attribute entries using 408 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 3424 total bytes of memory
BGP activity 38/24 prefixes, 38/24 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
ImplementBGPTTLSecurityCheck
DiscoverySteps

172.16.12.11 4 100 241 247 63 0 0 00:37:51 1
172.16.22.22 4 200 19 23 63 0 0 00:12:47 9
BGPsessionbetweenR2andISP2routersissecuredwithBGPTTLsecuritycheck.

Inthisexample,theprimaryproviderisdoingaggregationof192.1.0.0/16before
sendingittotherestofthenetwork.Thissituationmeansthattheprimaryprovideris
alsodoingproxyaggregationfortheroute192.1.1.0/24thatisadvertisedbythe
multihomedcustomer.TherestoftheInternetwillnotseetheroute192.1.1.0/24via
theprimaryprovider.
Customer prefers primary provider, using alternate only as backup.
Primary provider advertises the aggregate.
Alternate provider advertises individual network.
Themultihomedcustomeralsoadvertises192.1.1.0/24tothealternateprovider.In
thiscase,theproviderdoesnotdoanyaggregationofanyroutesstartingwith192.1
(andshouldnotdoso).Thissituationmeansthatthealternateproviderwill
propagate192.1.1.0/24totherestoftheInternet.
Customer prefers primary provider, using alternate only as backup.
Primary provider advertises the aggregate.
Alternate provider advertises individual network.
TherestoftheInternetnowseesoverlappingroutes.Itsees192.1.1.0/24as
reachableviathealternateproviderand192.1.0.0/16asreachableviatheprimary
provider.Thesetworoutesaretreatedasdifferentroutes.Theyarenotcompared
witheachotherinarouteselectionprocessbecausetheyindicatedifferent
destinations.Becausetherouterviewsthemasdifferentdestinations,bothroutes
willbeinjectedintotheroutingtable.
Ifapacketarriveswithadestinationaddressinthe192.1.1.0/24network,therestof
theInternetwillfollowthe"longestmatchingprefix"ruleandforwardthepacketto
thealternateprovider.
Toavoidthisissue,theprimaryprovidermustturnoffaggregation.Iftheprimary
providerdoesso,therestoftheInternetwillsee192.1.1.0/24bothways.And,
becausethesameroute(networkandmask)isreachableintwoways,route
selectionprocessingstarts.Dependingontheattributevalues,therestofthe
Internetcouldbeadvisedtousetheprimaryproviderinsteadofthealternateone.
However,turningoffaggregationwillalsocausetheprimaryprovidertoadvertiseall
routeswithintheaggregate,andallbenefitsofaggregationwillbelost.
MultihomedCustomerProblem

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
The BGP process in a Cisco router is started with the router bgp command and
BGP neighbors are added with neighbor command.
MD5 authentication can be used to secure a connection between two BGP
neighbors. BGP also supports TTL security check feature, which protects EBGP
sessions from CPU utilization-based attacks.
Local networks are announced in BGP by listing them with the network
command or by redistributing them.
BGP supports aggregation but BGP route aggregation is not appropriate in
multihomed topologies.
Summary

Overview
ToensurethatbasicBGPconfigurationsareoperatingcorrectly,youneedtobe
familiarwithBGPmonitoringcommands.IfbasicBGPconfigurationsarenot
functioningasexpected,BGPtroubleshootingskillsarecriticaltosuccessful
problemresolution.
ThislessonintroducestheCiscoIOScommandsthatareavailableformonitoring
andtroubleshootingbasicBGPconfigurations.Thecommandsthatarerequiredto
monitorthestatusofBGP,neighborconnections,andtheBGPtablearediscussed.
ThelessonalsodiscussestechniquesfortroubleshootingthemostcommonBGP
sessionstartupissues.
Uponcompletingthislesson,youwillbeableto:
IdentifytheCiscoIOScommandthatisrequiredtomonitortheoverallstatusof
theBGProutingprocess
IdentifytheCiscoIOScommandthatisrequiredtomonitorBGPneighbors
IdentifytheCiscoIOScommandsthatarerequiredtomonitortheBGPtable
IdentifytheCiscoIOScommandsthatarerequiredtoperformbasicBGP
debugging
ListcommonBGPsessionstartupproblems
TroubleshootbasicBGPsessionstartupproblemswhentheneighborisnot
reachable
TroubleshootbasicBGPsessionstartupproblemswhentheneighborisnot
configured
TroubleshootbasicBGPsessionstartupproblemswhenanASnumber
mismatchexists
MonitoringandTroubleshootingBGP

TodisplaythestatusofallBGPconnections,usetheshowipbgpsummaryEXEC
command.
Thiscommandhasnoargumentsorkeywords.
router> show ip bgp summary
Displays BGP memory use, and displays BGP neighbors and the state of
communication with them
R2# show ip bgp summary
BGP router identifier 172.16.22.2, local AS number 1
BGP table version is 10, main routing table version 10
9 network entries using 1332 bytes of memory
9 path entries using 576 bytes of memory
1/1 BGP path/bestpath attribute entries using 136 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 2068 total bytes of memory
BGP activity 9/0 prefixes, 9/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/P
fxRcd
172.16.12.11 4 100 0 0 1 0 0 never Idle
172.16.22.22 4 200 63 62 10 0 0 00:54:24
9
ThiscommandisveryusefulwhenyouaretroubleshootingBGP.Theoutputinthe
figureprovidesashortsummaryofthestatusoftheBGPprocessintherouter.
ThefirstsectionoftheoutputdescribestheBGPtableanditscontent:
TheBGPtableversionistheversionnumberofthelocalBGPtable.This
numberisincreasedeverytimethatthetableischanged.
ThemainroutingtableversionshowsthelastversionoftheBGPdatabasethat
wasinjectedintothemainroutingtable.
Thesubsequentlinesoftextindicatetheamountofmemorythathasbeen
allocatedtoholdthetable.Theselinesoftextdisplayhowmanynetworksare
knownandhowmanydifferentpathsandattributevaluesareassociatedwith
them.
Thesecondsectionoftheoutputisatableinwhichthecurrentneighborstatuses
areshown.Thereisonelineoftextforeachneighborthathasbeenconfigured.The
columnsareasfollows:
IPaddressoftheneighborasconfiguredinthelocalrouter
BGPversionnumberthattherouteruseswhencommunicatingwiththe
neighbor
ASnumberoftheremoteneighbor
Numberofmessagesandupdatesthathavebeenreceivedfromtheneighbor
sincethesessionwasestablished
Numberofmessagesandupdatesthathavebeensenttotheneighborsincethe
sessionwasestablished
VersionnumberofthelocalBGPtablethathasbeenincludedinthemostrecent
updatetotheneighbor
Numberofmessagesthatarewaitingtobeprocessedintheincomingqueue
fromthisneighbor
Numberofmessagesthatarewaitingintheoutgoingqueuefortransmissionto
theneighbor
Howlongtheneighborhasbeeninthecurrentstateandthenameofthecurrent
state(thestate"Established"isnotprintedout,sonostatenameindicates
"Established")
YoucanusethisinformationtoverifythatBGPsessionsareupandestablished.If
theyarenot,youwillhavetofurtherinvestigatetheBGPconfigurationtolocatethe
problem.YoucanalsoverifytheIPaddressandASnumberoftheconfiguredBGP
neighborwiththeshowipbgpsummarycommand.
Ifthesessionstateis"Established,"thenumberofmessagesthathavebeensent
MonitoringOverallBGPRouting
andreceived,asdisplayedintheoutputoftheshowipbgpsummarycommand,
canindicateBGPstability.Usethecommandafewtimes,withatimeinterval
betweentheprintouts,andcalculatehowmanymessageshavebeenexchanged
duringthatperiod.
ManymessagesintheincomingqueueindicatealackofCPUresourcesinthelocal
router.Manymessagesintheoutgoingqueueindicatealackofbandwidthtothe
remoterouteroralackofCPUresourcesintheremoterouter.

TodisplayinformationabouttheTCPandBGPconnectionstoneighbors,usethe
showipbgpneighborsEXECcommand.
router> show ip bgp neighbors ip-address
Displays detailed neighbor information
R2# show ip bgp neighbors 172.16.12.11
BGP neighbor is 172.16.12.11, remote AS 100, external link
BGP version 4, remote router ID 10.0.1.81
BGP state = Established, up for 00:03:10
Last read 00:00:26, last write 00:00:31, hold time is 180, keepalive int
erval is 60 seconds
Neighbor sessions:
1 active, is not multisession capable (disabled)
Neighbor capabilities:
Route refresh: advertised and received(new)
Four-octets ASN Capability: advertised and received
Address family IPv4 Unicast: advertised and received
Enhanced Refresh Capability: advertised and received
Multisession Capability:
Stateful switchover support enabled: NO for session 1
Youcanusethiscommandfortwodifferentpurposes.Thegeneralpurpose,as
showninthefigure,istogetinformationabouttheTCPsessionandtheBGP
parametersofthesession.AllBGPsessionparametersaredisplayed.Inaddition,
TCPtimersandcountersarealsodisplayed.
Theotheruseisnotshowninthisexample.Ifanyoftheoptionalqualifiersreferring
toroutesorpathsaregiven,theBGProutinginformationthatwassentorreceived
onthissessionisdisplayed.Thisfeatureisusefulwhenyouaretroubleshootingpath
selection.
MonitoringBGPNeighbors

TodisplayentriesintheBGProutingtable,usetheshowipbgpEXECcommand.
router> show ip bgp
Displays all routes in the BGP table in summary format
R2# show ip bgp
BGP table version is 18, local router ID is 172.16.22.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - inte
rnal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-
Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 1.0.0.0/24 172.16.22.22 0 0 200 i
* 172.16.12.11 0 0 100 99 i
*> 10.0.1.0/28 172.16.12.11 0 0 100 i
*> 10.0.1.16/28 172.16.12.11 0 0 100 i
*> 10.0.1.32/28 172.16.12.11 0 0 100 i
*> 10.0.1.48/28 172.16.12.11 0 0 100 i
*> 10.0.1.64/28 172.16.12.11 0 0 100 i
*> 10.0.1.80/28 172.16.12.11 0 0 100 i
*> 10.0.2.0/28 172.16.22.22 0 0 200 i
<... output omitted ...>
Inmostcases,whentheshowipbgpcommandisgivenwithoutoptionalqualifiers,
theentireBGPtableisdisplayed.Anabbreviatedlistofinformationabouteachroute
isdisplayed,onelineperprefix.Theoutputissortedinnetworknumberorder.
Therefore,iftheBGPtablecontainsmorethanoneroutetothesamenetwork,the
routesaredisplayedonsuccessivelines.Thenetworknumberisprintedonthefirst
oftheselinesonly.Thefollowinglines,whichrefertothesamenetwork,havethe
networknumberfieldleftblank.
Some,butnotall,oftheBGPattributesthatareassociatedwiththerouteare
displayedontheline.Next-hop,MED(displayedas"Metric"),localpreference,and
weighteachhavetheirowncolumns.TheAS-pathattributeisdisplayedasthe
sequenceofASnumbersinthe"Path"column.ImmediatelyfollowingtheASpath,
butnotpartoftheAS-pathattribute,theoriginattributeisdisplayed.Thelowercase
letter"i"meansIGP,"e"meansEGP,and"?"meansincompleteorunknown.
TheBGPpathselectionprocessselectsoneoftheavailableroutestoeachofthe
networksasthebest.Theseroutesarepointedoutbythecharacter">"intheleft
column.
router> show ip bgp ip-prefix [mask subnet-mask]
Displays detailed information about all paths for a single prefix
R2# show ip bgp 1.0.0.1
BGP routing table entry for 1.0.0.0/24, version 18
Paths: (2 available, best #1, table default)
Advertised to update-groups:
1
Refresh Epoch 1
200
172.16.22.22 from 172.16.22.22 (10.0.2.129)
Origin IGP, metric 0, localpref 100, valid, external, best
Refresh Epoch 1
100 99
172.16.12.11 from 172.16.12.11 (10.0.1.81)
Origin IGP, metric 0, localpref 100, valid, external
BGP attributes are listed for each route: AS-Path, Next-Hop, advertising router
IP address, advertising router Router-ID.
The bottom row lists other BGP attributes.
IfmoreinformationandthecompletesetofBGPattributesarerequired,theshowip
bgpcommandshouldbeenteredwiththenetworknumberonthecommandline.
ThiscommanddisplaysallrelevantBGPinformationaboutthatspecificnetwork.
MonitoringBGPTable

Inthisexample,theinformationaboutnetwork1.0.0.1isdisplayed.Therearetwo
routesto1.0.0.1.Oneisreceivedfromneighbor172.16.12.11andtheotherfrom
172.16.22.22.
TheBGProuteselectionprocesshasselectedthisrouteasthebest.So,BGPwill
trytoinstallthisrouteintotheroutingtable.Installationofroutesintheroutingtable
ismadebasedontheAD.

ThereareseveralCiscoIOScommandsthatyoucanusetoperformdebuggingof
basicBGPconfigurations.
router# debug ip tcp transactions
Displays all TCP transactions (start of session, session errors, etc.)
router# debug ip bgp events
Displays significant BGP events (neighbor state transitions, update runs)
IfaBGPsessionstaysintheActivestate,whereitisactivelysendingconnection
attemptstotheneighbor,debugiptcptransactionscanprovidevaluable
informationaboutfailedconnectionattempts.AllTCPtransactionsintherouterare
displayedontheconsoleastheyhappen.Thenetworkadministratorcanthen
determinewhethertheTCPsessionisbeingestablished,and,ifnot,whatthe
probablecauseoftheproblemmightbe.
IftheTCPsessionsucceedsbutistorndownwithinashorttime,youmightfindthe
reasonifyouusedebugipbgpevents.AllBGPeventswillbedisplayedonthe
consoleastheyhappenifthisdebugcommandisenabled.
router# debug ip bgp keepalives
Debugs BGP keepalive packets
router# debug ip bgp updates
Displays all incoming or outgoing BGP updates
Use with caution
Inastablestatewithnonetworktopologychanges,noBGPupdatesaresent
betweenneighboringrouters.WhenaBGPsessionhasbeenidleforsometime,the
BGPprotocolwillexchangekeepalivepacketsbetweenBGPneighbors.The
keepalivetimerhasadefaultvalueof60seconds.
Usethedebugipbgpkeepalivescommandtogetaprintoutontheconsolefor
everykeepalivepacketthatissentorreceived.Successfulkeepaliveexchanges
indicatethatthesessionisworkingandisinastablestate.
Ifnokeepaliveshavebeensentorreceived,thesessionmightstillbeworking.The
reasonfornotseeinganykeepaliveswouldbethatthesessionisneveridlelong
enough.
Usethedebugipbgpupdatescommandtogetaprintoutontheconsoleforevery
updatemessagethatissentorreceived.Thesuccessfulexchangeofupdates
indicatesthatthesessionisworkingandisnotintheIdlestate.
Inalargenetwork,updatesaresentandreceivedinlargevolumes.Startingthe
debugipbgpupdatescommandmightcauseextensiveoutputontheconsole.In
somecases,theCPUresourcesthatareusedtogeneratethoseoutputsareso
greatthatfewCPUresourcesremaintoactuallyforwardtraffic.Inacasewithvery
busyBGPsessions,itisactuallypossibletosettherouterinaconditionwhereall
CPUresourcesareconsumedwiththedebuggingprintouts.
router# debug ip bgp updates acl
Displays all incoming or outgoing BGP updates for routes matching an IP
access-list
router# debug ip bgp ip-address updates [acl]
Displays all BGP updates that are received from or sent to a BGP neighbor
(optionally matching an IP access-list)
Toavoiddebugprintoutsforeveryupdatethatissentorreceived,youcancreate
andassociateanaccess-listwiththedebugcommand.Whenyouusethis
command,theconsoledisplaysonlytheupdatesthatrefertoanetworknumberthat
DebuggingBGP
ispermittedbytheaccess-list.Thecommandisextremelyusefulinalivenetwork
withbusyBGPsessionswherethetroubleshooterisinterestedonlyinupdatesfor
specificnetworks.
Indicatingaspecificneighborcanevenfurtherrestrictthedebugging.Theconsole
displaysonlytheupdatesonthesessionwiththeindicatedneighbor.Optionally,you
cancombinethisdebugcommandwithanaccess-list.

Thereareseveralcommonsessionstartupissuesthatyoucanexperiencewhen
configuringbasicBGP.
Common BGP session startup symptoms:
BGP neighbors do not become active.
BGP neighbor is active, but the session is never established.
BGP neighbor oscillates between idle and active.
BGPSessionStartupProblems

BGPsessionstoarouterinanotherASshouldnormallyrunacrossdirectly
connectedinterfaces(routersthatshareacommonIPsubnet).Youmustconfigure
neighboringrouterstoreacheachotherusingtheIPaddressbelongingtothis
sharedsubnetsothatnootherroutingprotocolisrequiredtosetuptheBGP
session.
IfarouterisconfiguredwithaBGPneighborthatisinanotherASbutnotdirectly
connected,thesessionwillstayintheIdlestate.Therouterwillnotevenattemptto
setupthesession.
Symptom:
BGP neighbors do not become active.
show ip bgp neighbors displays the neighbor state as Idle for several
minutes.
Diagnosis:
Neighbor is not directly connected.
Verification:
Verify with show ip route.
Thenormalwaytofixthisproblemistochangetheneighborreferencesothatitis
referredbyanIPaddressthatisdirectlyconnected.However,insomeoddcases,
theneighborisintentionallyreachableusinganinterfacethatisnotdirectly
connected.Inthatrarecase,thelocalroutermusthaveroutinginformationonhow
toreachthataddress.Also,youmustconfiguretheBGPsessionwiththeebgp-
multihopoption.
IfthesessiongoesintotheActivestate,therouterwillattempttoestablishthe
session.Ifsessionestablishmentisunsuccessful,youwillhavetotroubleshootthe
problem.Thedebugiptcptransactionscommandwilldisplaytheconnect
attempts.
Symptom:
BGP neighbor is active; session is not established.
debug ip tcp transactions display shows that the TCP SYN packet is not
answered with a SYN-ACK packet.ex
Diagnosis:
Neighbor is not reachable.
Verification:
Verify connectivity with ping.
Check for the presence of an access-list.
TCPsessionestablishmentstartswiththeroutersendingaTCPSYNpacket.Ifthe
TCPSYNpacketisneveranswered,theremoteroutermightbedeadornot
reachable.Trytousethepingcommandandverifytheexistenceoftheremote
routerandtheIPpacketexchangebetweenthelocalandremoterouter.
BGPNeighborNotReachableExample
Inthisexample,theremoteBGProuterisnotavailable.
ISP1# debug ip tcp transactions
TCP special event debugging is on
<... output omitted ...>
*Feb 6 05:04:01: TCBEFE6AF18 created
*Feb 6 05:04:01: TCBEFE6AF18 setting property TCP_VRFTABLEID (20) EC3C8C6
C
<... output omitted ...>
*Feb 6 05:04:01: TCP: Random local port generated 43645, network 1
*Feb 6 05:04:01: TCBEFE6AF18 bound to 172.16.12.11.43645
*Feb 6 05:04:01: Reserved port 43645 in Transport Port Agent for TCP IP t
ype 1
*Feb 6 05:04:01: TCP: sending SYN, seq 2161553223, ack 0
*Feb 6 05:04:01: TCP0: Connection to 172.16.12.22:179, advertising MSS 14
60
*Feb 6 05:04:01: TCP0: state was CLOSED -> SYNSENT [43645 -
> 172.16.12.22(179)]
<... ouput omitted ...>
BGPNeighborNotReachable

*Feb 6 05:04:31: TCP0: state was SYNSENT -> CLOSED [43645 -
> 172.16.12.22(179)]
*Feb 6 05:04:31: TCB 0xEFE6AF18 destroyed
SYN packet is sent.
SYN-ACK reply never comes back. TCP session is closed.
ThesendingrouterneverreceivesthereplytotheSYNpacketandabortstheTCP
sessioninapproximately45seconds(changingthestatefromsynsenttoclosed).

IftheTCPSYNpacketisansweredwithaTCPRSTpacket,theremoterouteris
aliveandreachablebutisnotwillingtogranttheconnectionattempt.Thereasonfor
thisrefusalmaybethatBGPhasnotbeenfullyconfiguredontheremoterouteror
thatthesourceIPaddressthatisusedbythelocalrouterintheconnectionattempt
isnotinthelistofvalidneighborsfortheremoterouter.
Symptom:
BGP neighbor is active; session is not established.
debug ip tcp transactions display shows that the TCP SYN packet is
answered with an RST packet.
Diagnosis:
This router is not configured as the BGP neighbor on the neighboring router.
Verification:
Check IP addresses of BGP neighbors with show ip bgp summary on the
neighboring router.
BGPNeighborNotConfiguredExample
Inthisexample,theremoterouterisnotconfiguredforBGPortherewasa
mismatchintheneighborIPaddresses.
ISP2# debug ip tcp transactions
*Feb 9 00:35:12.675: TCBEFA28EF0 created
<... output omitted ...>
*Feb 9 00:35:12: TCBEFA28EF0 bound to 172.16.22.22.45207
*Feb 9 00:35:12: Reserved port 45207 in Transport Port Agent for TCP IP t
ype 1
*Feb 9 00:35:12: TCP: sending SYN, seq 4270019552, ack 0
*Feb 9 00:35:12: TCP0: Connection to 172.16.22.2:179, advertising MSS 146
0
*Feb 9 00:35:12: TCP0: state was CLOSED -> SYNSENT [45207 -
> 172.16.22.2(179)]
*Feb 9 00:35:12: Released port 45207 in Transport Port Agent for TCP IP t
ype 1 delay 240000
*Feb 9 00:35:12: TCP0: state was SYNSENT -> CLOSED [45207 -
> 172.16.22.2(179)]
*Feb 9 00:35:12: TCP0: bad seg from 172.16.22.2 -
- closing connection: port 45207 seq 0 ack 4270019553 rcvnxt 0 rcvwnd 0 le
n 0
*Feb 9 00:35:12: TCP0: connection closed - remote sent RST
*Feb 9 00:35:12: TCB 0xEFA28EF0 destroyed
SYN packet is sent.
Neighbor replies with an RST packet. TCP session is closed.
TheremoterouterrespondswithanRSTpacketassoonasitreceivestheinitial
SYNpacket,terminatingtheBGPsession.
BGPNeighborNotConfigured

IftheTCPsessionisestablishedusingthespecifiedthree-wayhandshakeofSYN,
SYN-ACK,andACK,buttherouterdropsthesessionafterashortpacketexchange,
theBGPparametersaremismatched.MakesurethattheremoteASthatis
configuredontheroutermatchesthelocalASthatisconfiguredontheneighbor.If
theASnumbersdonotmatch,therouterdropsthesessionafterexchangingBGP
Openmessages.
Symptom:
BGP neighbor oscillates between Active and Idle.
debug ip tcp transactions displays the TCP session being established and
torn down immediately.
Diagnosis:
There is an AS number mismatch between BGP neighbors.
Verification:
Verify the AS numbers that are configured for neighboring routers using the
show ip bgp summary on both routers.
BGPASNumberMismatchExample
ThisexampleillustratesamismatchinanASnumber.
R2# debug ip tcp transaction
R2# debug ip bgp event
*Feb 6 06:37:44: TCBEE9C5A38 created
*Feb 6 06:37:44: TCP0: state was LISTEN -> SYNRCVD [179 -
> 172.16.12.11(60291)]
*Feb 6 06:37:44: TCP: tcb EE9C5A38 connection to 172.16.12.11:60291, peer
MSS 1460, MSS is 516
*Feb 6 06:37:44: TCP: sending SYN, seq 2355663235, ack 879693158
*Feb 6 06:37:44: TCP0: Connection to 172.16.12.11:60291, advertising MSS
1460
*Feb 6 06:37:44: TCP0: state was SYNRCVD -> ESTAB [179 -
> 172.16.12.11(60291)]
*Feb 6 06:37:44: TCBEE9C4B20 accepting EE9C5A38 from 172.16.12.11.60291
*<... output omitted ...>
*Feb 6 06:37:44: %BGP-3-
NOTIFICATION: sent to neighbor 172.16.12.11 passive 2/2 (peer in wrong AS)
2 bytes 0064
*<... output omitted ...>
*Feb 6 06:37:44: TCP0: FIN processed
*Feb 6 06:37:44: TCP0: state was ESTAB -> CLOSEWAIT [179 -
> 172.16.12.11(60291)]
*<... output omitted ...>
*Feb 6 06:37:49: TCP0: sending FIN
First, TCP session is established.
BGP notification is sent because of AS number mismatch.
WheneverthereisamismatchinASnumbers(oranyotherBGPparametersthat
arenecessaryforproperBGPoperation),theBGPsessionisterminatedwithaBGP
notification.TheTCPsessionisterminatedaswell.
BGPASNumberMismatch

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
The show ip bgp summary command displays the overall status of BGP and
shows configured neighbors and their state.
You can use the show ip bgp neighbors command to get more in-depth
information about a specific BGP neighbor.
All entries in the BGP table can be displayed with the show ip bgp command.
You can also use show ip bgp to display an extended printout about a specific
route in the BGP table.
You can use the debug ip tcp transactions command to troubleshoot BGP
session establishment problems. The command debug ip bgp events displays
significant BGP events, while debug ip bgp updates displays the routing
information being exchanged between BGP neighbors.
Summary

Overview
Thistopicsummarizesthekeypointsthatwerediscussedinthismodule.
BGP has reliable transport provided by TCP, a rich set of metrics called BGP
path attributes, and scalability features such as batched updates that make it
suitable for very large networks.
Configured BGP neighbors establish a TCP session and exchange the BGP
Open message, which contains the parameters that each BGP router proposes
to use.
Some path attributes are well-known and should be recognized by every BGP
implementation. Some of the well-known attributes, such as AS-path, next-hop,
and origin, are mandatory and have to be present in every BGP update.
The route selection process takes into account various BGP attributes that are
attached to the route, as well as local decisions.
When you are configuring BGP neighbors, you will enable the BGP routing
protocol process, establish neighbors, and advertise local routes.
ModuleSummary

Foradditionalinformation,refertotheseresources:
CiscoSystems,Inc.BorderGatewayProtocol.
http://docwiki.cisco.com/wiki/Border_Gateway_Protocol
CiscoSystems,Inc.ConfiguringBGP.
http://www.cisco.com/c/en/us/td/docs/ios/12_2/ip/configuration/guide/fipr_c/1cfbgp.html
CiscoSystems,Inc.UsingtheBorderGatewayProtocolforInterdomainRouting
http://docwiki.cisco.com/wiki/Internetworking_Case_Studies
References
Usethequestionsheretoreviewwhatyoulearnedinthismodule.Thecorrect
answersandsolutionsarefoundintheModuleSelf-CheckAnswerKey.
ModuleSelf-Check

1. WhichstatementabouttheASistrue?(Source:"IntroducingBGP")
TheASisacollectionofnetworksunderasingleadministrativedomain.
TheASisacollectionofnetworksthatbelongtodifferententerprise
networks.
TheASrequiresIGPprotocoltoexchangeroutinginformationbetween
autonomoussystems.
TheASnumbercanbeanynumberbetween0and255.

1. WhichroutingmethodbestdescribesBGP?(Source:"Introducing
BGP")
distancevector
linkstate
pathvector
hybridoflinkstateanddistancevector

1. AtransitASisanASthatexchangesBGProutinginformationwith
otherautonomoussystemsandforwardsinformationthatisreceived
fromoneAStoanotherAS.Trueorfalse?(Source:"Introducing
BGP")
true
false

1. WhichthreeitemsareBGPenhancementstotraditionaldistance
vectorroutingprotocols?(Choosethree.)(Source:"Introducing
BGP")
reliableupdates
useoftriggeredupdatesonly
enhancedsecurity
richmetrics
routesummarization
snapshotupdates

1. WhichprotocolfacilitatesreliableupdatecapabilitiesinBGP?
(Source:"IntroducingBGP")
TCP
UDP
HSRP
ICMP

1. WhatarethreecharacteristicsofanAS?(Choosethree.)(Source:
"IntroducingBGP")
ASusesIGPsforintradomainrouting.
ASusesEGPsforinterdomainrouting.
ASisacollectionofnetworksunderacommonadministrativeauthority.
ASconsistsofagroupofnetworkdomains.
ASautomaticallysummarizesaddresses
ASisregulatedbytheIETF.

1. WhichthreescenariosarecommonscenarioswhereBGPisused?
(Choosethree.)(Source:"IntroducingBGP")
acustomerwithaconnectiontomultipleserviceproviders
serviceprovidernetworksactingastransitsystemsandforwarding
externaltrafficthroughtheirnetwork
asingle-sitecustomerintranetwithcomplexadministrativepolicies
betweendepartments
asthecoreroutingprotocolinverylargeenterprisenetworks
astheroutingprotocolinanIS-ISbackbonearea
asthecoreroutingprotocolinanSNAnetwork

1. WhatarethreerecommendedBGPuseguidelinesformultihomed
customernetworks?(Choosethree.)(Source:"IntroducingBGP")
MostmultihomedcustomersshoulduseBGPwiththeirserviceproviders.
Mostmultihomedcustomersshouldforwardroutinginformationthatis
receivedfromoneprovidertotheotherprovider.
ThemultihomedcustomermusthaveitsownpublicASnumber.
Multihomedcustomersshoulduseaprovider-independent,publicaddress
space.
ThemultihomedcustomermayuseandadvertiseRFC1918addresses.
MultihomedcustomersshouldusetheASnumberoftheirprimaryISP.

1. WhatisalimitationoftheBGProutingprotocol?(Source:
"IntroducingBGP")
YoucannotuseBGPtoimplementhop-by-hoproutingpolicycontrols.
YoucannotuseBGPtoinfluencetheroutingpolicyinadownstreamAS.
BGPcannotcontrolforwardingofpacketsbasedontheirdestination
address.
BGPcannotscaletoverylargenetworkswithmorethan110,000routes.

1. WhichthreestatementsaretrueofBGPmandatorywell-known
attributes?(Choosethree.)(Source:"UnderstandingBGPPath
Attributes")
TheymustbepresentinallBGPupdates.
AllBGP-compliantimplementationsmustrecognizethem.
AllBGP-compliantroutersmustadheretopoliciesspecifiedinmandatory
attributes.
Allwell-knownattributesarepropagatedtootherneighbors.
TheymustbepresentinsomeBGPupdates.

1. WhichthreeattributesareBGPmandatorywell-knownattributes?
(Choosethree.)(Source:"UnderstandingBGPPathAttributes")
next-hop
weight
AS-path
origin
MED
localpreference

1. WhichthreepossiblevaluesareassignedtotheBGPorigin
attribute?(Choosethree.)(Source:"UnderstandingBGPPath
Attributes")
IGP
EGP
unknown
internal
external
MED

1. WhichnontransitiveoptionalBGPattributeisusefulinassistingwith
therouteselectionprocesswhenmultiplelinkstoanotherASexist?
(Source:"UnderstandingBGPPathAttributes")
next-hop
localpreference
MED
AS-path

1. InwhichtwowayscantheBGPnext-hopattributebemodified?
(Choosetwo.)(Source:"UnderstandingBGPPathAttributes")
Ifthenext-hopattributeisinthesameIPsubnetasthereceivingrouter,
theattributeisunchanged;otherwise,itissettotheIPaddressofthe
sendingrouter.
Thenext-hopattributeisalwayssettotheIPaddressofthesending
router.
Thenext-hopattributeismodifiedonlywhenBGPpacketsexitanAS.
TheBGPnext-hopattributeismodifiedonlywhenBGPpacketstraverse
point-to-pointlinks.

1. WhichthreestatementsregardingtheBGPAS-pathattributeare
true?(Choosethree.)(Source:"UnderstandingBGPPath
Attributes")
ThelocalASnumberisprependedtotheASpatheachtimethattheroute
crossesanASboundary.
TheASthatoriginallyinjectedtherouteintoBGPisalwaysfoundatthe
rightmostendoftheASpath.
TheAS-pathattributecanbeusedtoavoidroutingloops.
BGProuteswithanemptyASpathwereinjectedintoBGPfromoutside
thelocalAS.
ThelocalASnumberisappendedtotheendoftheASpatheachtimethat
theroutecrossesanASboundary.
TheASthatoriginallyinjectedtherouteintoBGPisalwaysfoundatthe
leftmostendoftheASpath.

1. Whichdescriptionappliestothelocalpreferenceattribute?(Source:
"UnderstandingBGPPathAttributes")
well-knownmandatory
well-knowndiscretionary
optionaltransitive
optionalnontransitive

1. WhichtwoattributesareBGPoptionaltransitiveattributes?(Choose
two.)(Source:"UnderstandingBGPPathAttributes")
MED
weight
aggregator
atomicaggregate
community

1. Whatisindicatedbyastateof"Idle"intheoutputofthe showip
bgpsummarycommand?(Source:"EstablishingBGPSessions")
Therouteriscurrentlynotattemptingtoestablishaconnectionwitha
neighbor.
Theconnectiontotheconfiguredneighborhastimedout.
TheconnectiontoaBGPneighborhasbeenestablished,andnoerrors
havebeenreceivedontheconnection.
TheconnectiontoaBGPneighborhasbeenestablished,andnopackets
havebeensent.

1. HowareneighborsdetectedinBGP?(Source:"EstablishingBGP
Sessions")
Theyarediscoveredautomatically
Theymustbeconfiguredmanually.

1. Router-IDisanumberthatuniquelyidentifiestherouter.Howisit
selected?(Source:"EstablishingBGPSessions")
Router-IDisthehighestIPaddressofanyloopbackinterface.Ifthereisno
loopbackinterface,therouter-IDmustbeconfiguredmanually.
Router-IDmustbeconfiguredmanually.
Router-IDisthehighestIPaddressofanyloopbackinterface.Ifthereisno
loopbackinterface,therouterusesthehighestIPaddressofanyinterface.
Router-IDisthelowestIPaddressofanyloopbackinterface.Ifthereisno
loopbackinterface,therouterusesthelowestIPaddressofanyinterface.

1. WhathappensiftwoTCPconnectionattemptsbetweenconfigured
BGPneighborssucceed?(Source:"EstablishingBGPSessions")
Bothconnectionswillbeterminated,andtheneighborswillre-establisha
neighborrelationship.
Oneconnectionwillbemaintainedasprimaryandtheotherasbackup.
Oneofthetwoconnectionswillbetorndown
Therouterwiththelowerrouter-IDwilldetermineifthesecondconnection
istorndownorusedasabackupTCPconnection.

1. GiventhefollowingBGPsessionstates,inwhichstateistherouter
whilewaitingfortheotherroutertorespondtotheBGPOpen
message?(Source:"EstablishingBGPSessions")
OpenConfirm
Established
Idle
OpenSent
Active

1. GiventhefollowingBGPsessionstates,whatistheirorderof
progressionduringthecreationofasuccessfulneighborsession?
(Source:"EstablishingBGPSessions")
OpenConfirm 3
OpenSent 5
Established 4
Active 2
Idle 1

1. BGPsessionsareestablishedoverTCPusingportnumber179.
Trueorfalse?(Source:"EstablishingBGPSessions")
true
false

1. Whatdoesthefield"TblVer"indicateintheoutputofthe showip
bgpsummarycommand?(Source:"EstablishingBGPSessions")
thecurrentversionofBGPinusebytherouter
thenumberofrouteprefixesthatarecontainedintheBGPupdateofthe
router
BGPmessagesthathavebeenreceivedfromthatneighbor
thelastversionoftheBGPdatabasethatwassenttothatneighbor

1. WhatoccurswhenyouuseMD5betweentwoBGPneighbors?
(Source:"EstablishingBGPSessions")
EverypacketisencryptedwithMD5.
TheIPheaderisencryptedusingMD5.
AnMD5checksumiscalculatedandsentwitheachpacketsothatits
sourcecanbeverified.
AusernameandpasswordareembeddedinanIPdatagramthatis
matchedtoausernameandpasswordontheremoteneighbor.

1. WhatdoesarouterthatisrunningBGPdowithaBGPupdatethat
containsitsownASpath?(Source:"ProcessingBGPRoutes")
Theroutercheckstoseewhethertheinformationthatiscontainedinthe
updateisbetterthanitscurrentinformation.Ifitis,itwillupdateitsBGP
table.
Therouteracceptstherouteupdate.
Theroutersilentlydiscards(denies)theroute.
Therouterreturnsanerrortotherouterthatsenttheupdate.

1. Whichthreeattributesmustalwaysbepresentintherouting
update?(Choosethree.)(Source:"ProcessingBGPRoutes")
MED
AS-path
local-preference
next-hop
origin

1. Whenarouterhasmorethanonealternativeroutetoreachthe
samedestination,localpreferenceischeckedbeforetheweight
attribute.Trueorfalse?(Source:"ProcessingBGPRoutes")
true
false

1. HowmanyalternatepathstoasingledestinationwillaBGProuter
maintainintheBGPtable?(Source:"ProcessingBGPRoutes")
Therouterwillmaintainonlythebestpathtothedestination.
Therouterwillmaintaintwopaths,thebestpathandabackuproute.
TheBGPtablewillholduptofourroutesbydefaultandamaximumofsix
configurableroutes.
TheBGPtablewillstoreallvalid,advertisedroutestothedestinationin
theBGPtable.

1. Whenarouterhasmorethanonealternativeroutetoreachthe
sameIPsubnet(networkandmask),therouterhastoselectoneof
themasbestinitsdefaultmodeofoperationMatchthefollowing
stepstothecorrectstepintheprocess.(Source:"ProcessingBGP
Routes")
TheroutercomparesMEDvalues,butonlyif
itreceivestheupdatesfromthesame
neighboringAS.RouteswithalowerMED
arepreferred.
Step1
ThelengthsoftheASpathsarecompared
(thecontentisnotchecked;onlythenumber
ofautonomoussystemsineachASpathis
counted).Theroutewiththeshortestlength
isselected.
Step5
IftheAS-pathlengthsarethesame,the
origincodeischecked.BGPprefersthepath
withthelowestorigintype:IGPislowerthan
EGP,andEGPislowerthanIncomplete.
Step4
Ifthelocalpreferenceattributesaredifferent,
theroutewiththehighestvalueisselected
asbest.
Step2
Therouterpreferstheroutewiththehigher
weight. Step6
Theroutercheckswhetherthenext-hop
attributeindicatesanIPaddressthatis
reachableaccordingtothecurrentrouting
table.Ifthenexthopisnotreachable,the
routerdoesnotconsidertheBGProuteasa
candidatetobecomeselectedasthebest.
Step3
IfoneoftheroutesisinjectedintotheBGP
tablebythelocalrouter,thelocalrouter
prefersittoanyroutesthatitreceivesfrom
otherBGProuters.
Step7

1. Whataretwowaysinwhichlocalnetworksareadvertisedintothe
BGProutingprotocolprocess?(Choosetwo.)(Source:"Processing
BGPRoutes")
automatically,afteraBGPneighborsessionisestablished
manually,withthenetworkcommand
throughredistributionintotheBGPprocess
byadvertisingthemtotheBGPtableontherouterafterCiscoDiscovery
Protocoldiscoversconnectednetworks

1. Whataretwosituationswhenisitappropriatetodisableautomatic
summarizationinBGP?(Choosetwo.)(Source:"ProcessingBGP
Routes")
whenBGPneighborsarenotconfiguredtoadvertiseaggregateroutesto
upstreamproviders
whentheclasslessvariantofthenetworkcommandisused
whenyouareusingaclasslessIGPintheAS
whentheeffectsofautomaticsummarizationofIGP-to-BGPredistribution
arenotdesired

1. WhatistheADofBGProutesintheIProutingtablethatwere
learnedfromBGPneighborsinadifferentAS?(Source:"Processing
BGPRoutes")
1
20
90
120

1. WhichthreeBGPattributesaredisplayedforeachrouteintheBGP
tablewhenyouareusingtheshowipbgpcommand?(Choose
three.)(Source:"ProcessingBGPRoutes")
weight
communities
origin
AS-path

1. WhatisthevalidASnumberrangeforaBGPprocessonaCisco
router?(Source:"ConfiguringBasicBGP")
1to256
1to32768
1to65535
1to131072

1. Whichtwoparametersmustyouconfigurewiththeneighbor
commandtoestablishaBGPsessionwithanexternalneighbor?
(Choosetwo.)(Source:"ConfiguringBasicBGP")
neighborIPaddress
subnetmaskoftheIPnetwork
remoteASnumber
localASnumber
descriptionoftheneighbor

1. WhatisthebestmethodtotemporarilydisableaBGPneighbor
session?(Source:"ConfiguringBasicBGP")
RemovetheneighborcommandfromtheBGProuterprocess.
RemovetheBGProuterprocessfromtheconfiguration.
Terminatetheneighborconnectionwiththeneighborshutdown
command
Disconnecttheneighborbyinitiatingarouterreload.

1. WhichtwoofthefollowingstatementsaboutconfiguringBGPtimers
areaccurate?(Choosetwo.)(Source:"ConfiguringBasicBGP")
ChangingtheBGPdefaultholdtimeandkeepalivetimersisusuallynot
recommended.
TheneighbortimerscommandsetsthetimersforaspecificBGPpeeror
peergroup.
ThetimersbgpcommandsetsthetimersforaspecificBGPpeerorpeer
group.
Holdtimeindicatesthefrequency(inseconds)withwhichtheCiscoIOS
softwaresendsmessagestoitspeer.

1. Whichtwoofthefollowingarecharacteristicsofthestring
componentoftheneighbor{ip-address|peer-group-name}
passwordstringcommand?(Choosetwo.)(Source:"Configuring
BasicBGP")
cancontainanyalphanumericcharacters,includingspaces
case-sensitivepasswordofupto100characters
firstcharactercanbeanumber
cannotspecifyapasswordintheformat"number-space-anything"

1. Whichthreestepsmustyoucompletetoadvertiseaclasslessprefix
intoBGP?(Choosethree.)(Source:"ConfiguringBasicBGP")
Configuretheprefixwiththenetworkcommand.
Specifythemaskkeywordwiththelocallyadvertisedroute.
ConfiguretheredistributeconnectedcommandundertheBGProuter
process.
Useastaticroutepointingtonull0thatmatchestheprefix.

1. Whichorigincodeiscarriedwithroutesthatareredistributedinto
BGP?(Source:"ConfiguringBasicBGP")
internal
external
unknown
incomplete

1. Whichtwoofthefollowingstatementsabouttheclasslessbehavior
ofBGParecorrect?(Choosetwo.)(Source:"ConfiguringBasic
BGP")
WhenanexactmatchisnotfoundintheIProutingtableamatchingprefix
isautomaticallyconfiguredontherouter.
Inthenetworkip-prefix-addressmasksubnet-maskcommand,theprefix
doesnothavetomatchanentryintheIProutingtable.
ToadvertiseclasslessnetworksintoBGP(asubnetorasupernet),you
canusethenetworkcommandwiththemaskkeywordandthesubnet
maskspecified.
Ifthekeywordmaskandthesubnetmaskareomitted,thenetworkis
assumedtohaveitsnaturalmaskaccordingtothenetworkclass.

1. WhataretwobenefitsofusingrouteaggregationinBGP?(Choose
two.)(Source:"ConfiguringBasicBGP")
Itensuresthatevenifaggregatenetworksaredown,theaggregateis
advertised,whicheliminatesblackholes.
Itreducestheamountofmemorythatisusedintheroutertostorethe
BGPtable.
ItreducesrouteflappinganditseffectsonrouterCPUresources.
BGPattributegranularityismaintained,whichensuresoptimalpath
selection.

1. WhichtwoofthefollowingarecharacteristicsoftheBGPConditional
RouteInjectionfeature?(Choosetwo.)(Source:"ConfiguringBasic
BGP")
allowsyoutooriginateaprefixintoaBGProutingtablewithoutthe
correspondingmatch
enabledwiththebgpinject-mapexist-mapcommand
allowsconditionalinjectingorreplacingmorespecificprefixeswithless
specificprefixes
allowsoriginationofaprefixintoaBGProutingtableonlywiththe
correspondingmatch

1. WhichtwoofthefollowingarecharacteristicsoftheBGPSupportfor
TTLSecurityCheckfeature?(Choosetwo.)(Source:"Configuring
BasicBGP")
shouldbeconfiguredononlyoneparticipatingrouter
preventsBGPsessionsfromexpiringevenifkeepalivepacketsarenot
receivedbeforethesessiontimerexpires
protectstheEBGPpeeringsessionbycomparingthevalueintheTTL
fieldofreceivedIPpacketsagainstahopcountthatisconfiguredlocally
foreachEBGPpeeringsession
supportsbothdirectlyconnectedpeeringsessionsandmultihopEBGP
peeringsessions

1. Whichtwoofthefollowingarefunctionsoftheshowipbgp
summarycommand?(Choosetwo.)
displaysBGPmemoryuse
displaysBGPneighborsandstatusofcommunicationwiththem
locatesproblemsinBGPsessionsthatareupandestablished
displaystheBGProutingtable

1. WhichcommanddoyouusetodisplaydetailedBGPneighbor
information?(Source:"MonitoringandTroubleshootingBGP")
showipbgpsummary
showipbgp
showipbgpneighborsaddress
showipbgpdetail

1. TogetinformationabouttheTCPsessionandBGPparametersof
thesession,youcanissueshowipbgpsummarycommand.True
orfalse?(Source:"MonitoringandTroubleshootingBGP")
true
false

1. Whichtwoofthefollowingstatementsabouttheshowipbgp
commandthatisusedtomonitortheBGProutingtableare
accurate?(Choosetwo.)(Source:"MonitoringandTroubleshooting
BGP")
Theshowipbgpcommandshowsanabbreviatedlistofinformation
abouteachroute,displayingonelineperprefix.
Theshowipbgpcommandshowsafulllistofinformationabouteach
route,displayingonelineperprefix.
AlloftheBGPattributesthatareassociatedwiththeroutearedisplayed
ontheline.
IftheBGPtablecontainsmorethanoneroutetothesamenetwork,the
routesaredisplayedonsuccessivelinesofthecommandoutput.

1. WhichdebugcommandshouldyouenabletotroubleshootBGP
sessionstartupissueswheretheTCPconnectionneversucceeds?
(Source:"MonitoringandTroubleshootingBGP")
ipbgpupdates
ippackets
ipbgpkeepalives
iptcptransactions

1. Whendebugginganexchangeofupdates,youshouldusedebugip
bgpkeepalivecommand.TrueorFalse?
true
false

1. Whatarethethreemostcommonsessionstartupissuesthatyou
canexperiencewhenconfiguringbasicBGP?(Choosethree.)
(Source:"MonitoringandTroubleshootingBGP")
BGPneighborsdonotbecomeactive.
BGProutingloopscauseblackholes.
ABGPneighborisactive,buttheBGPsessionisnotestablished.
TheBGPneighborstateoscillatesbetweenIdleandActive.
TheBGPsessionisactive,buttheneighborcannotbereached.
BGPkeepalivesexperienceintermittentfailures.

1. WhatisthemostcommonreasonforaBGPsessionnotleavingthe
Idlestate?(Source:"MonitoringandTroubleshootingBGP")
TheTCPportfortheconnectionisnotconfigured.
Theexternalneighborisnotdirectlyconnected.
TheTCPSYNpacketisansweredwithanRSTpacket.
TheneighborshavebeenconfiguredwiththesameASnumber.

1. WhatwillresultfromattemptingtoopenaBGPconnectionwitha
neighborthathasnotbeenproperlyconfiguredforBGP?(Source:
"MonitoringandTroubleshootingBGP")
TheBGPsessionwillremainintheIdlestate.
Theneighborsessionwillbeestablished,andthesessionstartup
parameterswillbenegotiatedovertheTCPsession.
TheBGPsessionwillbeimmediatelyterminatedwithaTCPRSTpacket.
TheBGPsessionwillbecome"stuckinActivestate."

1. WhenaBGPneighboroscillatesbetweenActiveandIdle,whatis
thelikelydiagnosis?(Source:"MonitoringandTroubleshooting
BGP")
Therearemismatchedkeepaliveintervals.
ThereisanASnumbermismatchbetweenBGPneighbors.
OnerouterisnotconfiguredastheBGPneighborontheneighboring
router.
TheBGPneighborisnotreachable.

1. WhichstatementabouttheASistrue?(Source:"IntroducingBGP")
TheASisacollectionofnetworksunderasingleadministrativedomain.
TheASisacollectionofnetworksthatbelongtodifferententerprise
networks.
TheASrequiresIGPprotocoltoexchangeroutinginformationbetween
autonomoussystems.
TheASnumbercanbeanynumberbetween0and255.
AnswerKey

1. WhichroutingmethodbestdescribesBGP?(Source:"Introducing
BGP")
distancevector
linkstate
pathvector
hybridoflinkstateanddistancevector

1. AtransitASisanASthatexchangesBGProutinginformationwith
otherautonomoussystemsandforwardsinformationthatisreceived
fromoneAStoanotherAS.Trueorfalse?(Source:"Introducing
BGP")
true
false

1. WhichthreeitemsareBGPenhancementstotraditionaldistance
vectorroutingprotocols?(Choosethree.)(Source:"Introducing
BGP")
reliableupdates
useoftriggeredupdatesonly
enhancedsecurity
richmetrics
routesummarization
snapshotupdates

1. WhichprotocolfacilitatesreliableupdatecapabilitiesinBGP?
(Source:"IntroducingBGP")
TCP
UDP
HSRP
ICMP

1. WhatarethreecharacteristicsofanAS?(Choosethree.)(Source:
"IntroducingBGP")
ASusesIGPsforintradomainrouting.
ASusesEGPsforinterdomainrouting.
ASisacollectionofnetworksunderacommonadministrativeauthority.
ASconsistsofagroupofnetworkdomains.
ASautomaticallysummarizesaddresses
ASisregulatedbytheIETF.

1. WhichthreescenariosarecommonscenarioswhereBGPisused?
(Choosethree.)(Source:"IntroducingBGP")
acustomerwithaconnectiontomultipleserviceproviders
serviceprovidernetworksactingastransitsystemsandforwarding
externaltrafficthroughtheirnetwork
asingle-sitecustomerintranetwithcomplexadministrativepolicies
betweendepartments
asthecoreroutingprotocolinverylargeenterprisenetworks
astheroutingprotocolinanIS-ISbackbonearea
asthecoreroutingprotocolinanSNAnetwork

1. WhatarethreerecommendedBGPuseguidelinesformultihomed
customernetworks?(Choosethree.)(Source:"IntroducingBGP")
MostmultihomedcustomersshoulduseBGPwiththeirserviceproviders.
Mostmultihomedcustomersshouldforwardroutinginformationthatis
receivedfromoneprovidertotheotherprovider.
ThemultihomedcustomermusthaveitsownpublicASnumber.
Multihomedcustomersshoulduseaprovider-independent,publicaddress
space.
ThemultihomedcustomermayuseandadvertiseRFC1918addresses.
MultihomedcustomersshouldusetheASnumberoftheirprimaryISP.

1. WhatisalimitationoftheBGProutingprotocol?(Source:
"IntroducingBGP")
YoucannotuseBGPtoimplementhop-by-hoproutingpolicycontrols.
YoucannotuseBGPtoinfluencetheroutingpolicyinadownstreamAS.
BGPcannotcontrolforwardingofpacketsbasedontheirdestination
address.
BGPcannotscaletoverylargenetworkswithmorethan110,000routes.

1. WhichthreestatementsaretrueofBGPmandatorywell-known
attributes?(Choosethree.)(Source:"UnderstandingBGPPath
Attributes")
TheymustbepresentinallBGPupdates.
AllBGP-compliantimplementationsmustrecognizethem.
AllBGP-compliantroutersmustadheretopoliciesspecifiedinmandatory
attributes.
Allwell-knownattributesarepropagatedtootherneighbors.
TheymustbepresentinsomeBGPupdates.

1. WhichthreeattributesareBGPmandatorywell-knownattributes?
(Choosethree.)(Source:"UnderstandingBGPPathAttributes")
next-hop
weight
AS-path
origin
MED
localpreference

1. WhichthreepossiblevaluesareassignedtotheBGPorigin
attribute?(Choosethree.)(Source:"UnderstandingBGPPath
Attributes")
IGP
EGP
unknown
internal
external
MED

1. WhichnontransitiveoptionalBGPattributeisusefulinassistingwith
therouteselectionprocesswhenmultiplelinkstoanotherASexist?
(Source:"UnderstandingBGPPathAttributes")
next-hop
localpreference
MED
AS-path

1. InwhichtwowayscantheBGPnext-hopattributebemodified?
(Choosetwo.)(Source:"UnderstandingBGPPathAttributes")
Ifthenext-hopattributeisinthesameIPsubnetasthereceivingrouter,
theattributeisunchanged;otherwise,itissettotheIPaddressofthe
sendingrouter.
Thenext-hopattributeisalwayssettotheIPaddressofthesending
router.
Thenext-hopattributeismodifiedonlywhenBGPpacketsexitanAS.
TheBGPnext-hopattributeismodifiedonlywhenBGPpacketstraverse
point-to-pointlinks.

1. WhichthreestatementsregardingtheBGPAS-pathattributeare
true?(Choosethree.)(Source:"UnderstandingBGPPath
Attributes")
ThelocalASnumberisprependedtotheASpatheachtimethattheroute
crossesanASboundary.
TheASthatoriginallyinjectedtherouteintoBGPisalwaysfoundatthe
rightmostendoftheASpath.
TheAS-pathattributecanbeusedtoavoidroutingloops.
BGProuteswithanemptyASpathwereinjectedintoBGPfromoutside
thelocalAS.
ThelocalASnumberisappendedtotheendoftheASpatheachtimethat
theroutecrossesanASboundary.
TheASthatoriginallyinjectedtherouteintoBGPisalwaysfoundatthe
leftmostendoftheASpath.

1. Whichdescriptionappliestothelocalpreferenceattribute?(Source:
"UnderstandingBGPPathAttributes")
well-knownmandatory
well-knowndiscretionary
optionaltransitive
optionalnontransitive

1. WhichtwoattributesareBGPoptionaltransitiveattributes?(Choose
two.)(Source:"UnderstandingBGPPathAttributes")
MED
weight
aggregator
atomicaggregate
community

1. Whatisindicatedbyastateof"Idle"intheoutputofthe showip
bgpsummarycommand?(Source:"EstablishingBGPSessions")
Therouteriscurrentlynotattemptingtoestablishaconnectionwitha
neighbor.
Theconnectiontotheconfiguredneighborhastimedout.
TheconnectiontoaBGPneighborhasbeenestablished,andnoerrors
havebeenreceivedontheconnection.
TheconnectiontoaBGPneighborhasbeenestablished,andnopackets
havebeensent.

1. HowareneighborsdetectedinBGP?(Source:"EstablishingBGP
Sessions")
Theyarediscoveredautomatically
Theymustbeconfiguredmanually.

1. Router-IDisanumberthatuniquelyidentifiestherouter.Howisit
selected?(Source:"EstablishingBGPSessions")
Router-IDisthehighestIPaddressofanyloopbackinterface.Ifthereisno
loopbackinterface,therouter-IDmustbeconfiguredmanually.
Router-IDmustbeconfiguredmanually.
Router-IDisthehighestIPaddressofanyloopbackinterface.Ifthereisno
loopbackinterface,therouterusesthehighestIPaddressofanyinterface.
Router-IDisthelowestIPaddressofanyloopbackinterface.Ifthereisno
loopbackinterface,therouterusesthelowestIPaddressofanyinterface.

1. WhathappensiftwoTCPconnectionattemptsbetweenconfigured
BGPneighborssucceed?(Source:"EstablishingBGPSessions")
Bothconnectionswillbeterminated,andtheneighborswillre-establisha
neighborrelationship.
Oneconnectionwillbemaintainedasprimaryandtheotherasbackup.
Oneofthetwoconnectionswillbetorndown
Therouterwiththelowerrouter-IDwilldetermineifthesecondconnection
istorndownorusedasabackupTCPconnection.

1. GiventhefollowingBGPsessionstates,inwhichstateistherouter
whilewaitingfortheotherroutertorespondtotheBGPOpen
message?(Source:"EstablishingBGPSessions")
OpenConfirm
Established
Idle
OpenSent
Active

1. GiventhefollowingBGPsessionstates,whatistheirorderof
progressionduringthecreationofasuccessfulneighborsession?
(Source:"EstablishingBGPSessions")
Idle 1
Active 2
OpenSent 3
OpenConfirm 4
Established 5

1. BGPsessionsareestablishedoverTCPusingportnumber179.
Trueorfalse?(Source:"EstablishingBGPSessions")
true
false

1. Whatdoesthefield"TblVer"indicateintheoutputofthe showip
bgpsummarycommand?(Source:"EstablishingBGPSessions")
thecurrentversionofBGPinusebytherouter
thenumberofrouteprefixesthatarecontainedintheBGPupdateofthe
router
BGPmessagesthathavebeenreceivedfromthatneighbor
thelastversionoftheBGPdatabasethatwassenttothatneighbor

1. WhatoccurswhenyouuseMD5betweentwoBGPneighbors?
(Source:"EstablishingBGPSessions")
EverypacketisencryptedwithMD5.
TheIPheaderisencryptedusingMD5.
AnMD5checksumiscalculatedandsentwitheachpacketsothatits
sourcecanbeverified.
AusernameandpasswordareembeddedinanIPdatagramthatis
matchedtoausernameandpasswordontheremoteneighbor.

1. WhatdoesarouterthatisrunningBGPdowithaBGPupdatethat
containsitsownASpath?(Source:"ProcessingBGPRoutes")
Theroutercheckstoseewhethertheinformationthatiscontainedinthe
updateisbetterthanitscurrentinformation.Ifitis,itwillupdateitsBGP
table.
Therouteracceptstherouteupdate.
Theroutersilentlydiscards(denies)theroute.
Therouterreturnsanerrortotherouterthatsenttheupdate.

1. Whichthreeattributesmustalwaysbepresentintherouting
update?(Choosethree.)(Source:"ProcessingBGPRoutes")
MED
AS-path
local-preference
next-hop
origin

1. Whenarouterhasmorethanonealternativeroutetoreachthe
samedestination,localpreferenceischeckedbeforetheweight
attribute.Trueorfalse?(Source:"ProcessingBGPRoutes")
true
false

1. HowmanyalternatepathstoasingledestinationwillaBGProuter
maintainintheBGPtable?(Source:"ProcessingBGPRoutes")
Therouterwillmaintainonlythebestpathtothedestination.
Therouterwillmaintaintwopaths,thebestpathandabackuproute.
TheBGPtablewillholduptofourroutesbydefaultandamaximumofsix
configurableroutes.
TheBGPtablewillstoreallvalid,advertisedroutestothedestinationin
theBGPtable.

1. Whenarouterhasmorethanonealternativeroutetoreachthe
sameIPsubnet(networkandmask),therouterhastoselectoneof
themasbestinitsdefaultmodeofoperationMatchthefollowing
stepstothecorrectstepintheprocess.(Source:"ProcessingBGP
Routes")
TheroutercomparesMEDvalues,butonlyif
itreceivestheupdatesfromthesame
neighboringAS.RouteswithalowerMED
arepreferred.
Step7
Theroutercheckswhetherthenext-hop
attributeindicatesanIPaddressthatis
reachableaccordingtothecurrentrouting
table.Ifthenexthopisnotreachable,the
routerdoesnotconsidertheBGProuteasa
candidatetobecomeselectedasthebest.
Step1
Therouterpreferstheroutewiththehigher
weight. Step2
Ifthelocalpreferenceattributesaredifferent,
theroutewiththehighestvalueisselected
asbest.
Step3
ThelengthsoftheASpathsarecompared
(thecontentisnotchecked;onlythenumber
ofautonomoussystemsineachASpathis
counted).Theroutewiththeshortestlength
isselected.
Step5
IfoneoftheroutesisinjectedintotheBGP
tablebythelocalrouter,thelocalrouter
prefersittoanyroutesthatitreceivesfrom
otherBGProuters.
Step4
IftheAS-pathlengthsarethesame,the
origincodeischecked.BGPprefersthepath
withthelowestorigintype:IGPislowerthan
EGP,andEGPislowerthanIncomplete.
Step6

1. Whataretwowaysinwhichlocalnetworksareadvertisedintothe
BGProutingprotocolprocess?(Choosetwo.)(Source:"Processing
BGPRoutes")
automatically,afteraBGPneighborsessionisestablished
manually,withthenetworkcommand
throughredistributionintotheBGPprocess
byadvertisingthemtotheBGPtableontherouterafterCiscoDiscovery
Protocoldiscoversconnectednetworks

1. Whataretwosituationswhenisitappropriatetodisableautomatic
summarizationinBGP?(Choosetwo.)(Source:"ProcessingBGP
Routes")
whenBGPneighborsarenotconfiguredtoadvertiseaggregateroutesto
upstreamproviders
whentheclasslessvariantofthenetworkcommandisused
whenyouareusingaclasslessIGPintheAS
whentheeffectsofautomaticsummarizationofIGP-to-BGPredistribution
arenotdesired

1. WhatistheADofBGProutesintheIProutingtablethatwere
learnedfromBGPneighborsinadifferentAS?(Source:"Processing
BGPRoutes")
1
20
90
120

1. WhichthreeBGPattributesaredisplayedforeachrouteintheBGP
tablewhenyouareusingtheshowipbgpcommand?(Choose
three.)(Source:"ProcessingBGPRoutes")
weight
communities
origin
AS-path

1. WhatisthevalidASnumberrangeforaBGPprocessonaCisco
router?(Source:"ConfiguringBasicBGP")
1to256
1to32768
1to65535
1to131072

1. Whichtwoparametersmustyouconfigurewiththeneighbor
commandtoestablishaBGPsessionwithanexternalneighbor?
(Choosetwo.)(Source:"ConfiguringBasicBGP")
neighborIPaddress
subnetmaskoftheIPnetwork
remoteASnumber
localASnumber
descriptionoftheneighbor

1. WhatisthebestmethodtotemporarilydisableaBGPneighbor
session?(Source:"ConfiguringBasicBGP")
RemovetheneighborcommandfromtheBGProuterprocess.
RemovetheBGProuterprocessfromtheconfiguration.
Terminatetheneighborconnectionwiththeneighborshutdown
command
Disconnecttheneighborbyinitiatingarouterreload.

1. WhichtwoofthefollowingstatementsaboutconfiguringBGPtimers
areaccurate?(Choosetwo.)(Source:"ConfiguringBasicBGP")
ChangingtheBGPdefaultholdtimeandkeepalivetimersisusuallynot
recommended.
TheneighbortimerscommandsetsthetimersforaspecificBGPpeeror
peergroup.
ThetimersbgpcommandsetsthetimersforaspecificBGPpeerorpeer
group.
Holdtimeindicatesthefrequency(inseconds)withwhichtheCiscoIOS
softwaresendsmessagestoitspeer.

1. Whichtwoofthefollowingarecharacteristicsofthestring
componentoftheneighbor{ip-address|peer-group-name}
passwordstringcommand?(Choosetwo.)(Source:"Configuring
BasicBGP")
cancontainanyalphanumericcharacters,includingspaces
case-sensitivepasswordofupto100characters
firstcharactercanbeanumber
cannotspecifyapasswordintheformat"number-space-anything"

1. Whichthreestepsmustyoucompletetoadvertiseaclasslessprefix
intoBGP?(Choosethree.)(Source:"ConfiguringBasicBGP")
Configuretheprefixwiththenetworkcommand.
Specifythemaskkeywordwiththelocallyadvertisedroute.
ConfiguretheredistributeconnectedcommandundertheBGProuter
process.
Useastaticroutepointingtonull0thatmatchestheprefix.

1. Whichorigincodeiscarriedwithroutesthatareredistributedinto
BGP?(Source:"ConfiguringBasicBGP")
internal
external
unknown
incomplete

1. Whichtwoofthefollowingstatementsabouttheclasslessbehavior
ofBGParecorrect?(Choosetwo.)(Source:"ConfiguringBasic
BGP")
WhenanexactmatchisnotfoundintheIProutingtableamatchingprefix
isautomaticallyconfiguredontherouter.
Inthenetworkip-prefix-addressmasksubnet-maskcommand,theprefix
doesnothavetomatchanentryintheIProutingtable.
ToadvertiseclasslessnetworksintoBGP(asubnetorasupernet),you
canusethenetworkcommandwiththemaskkeywordandthesubnet
maskspecified.
Ifthekeywordmaskandthesubnetmaskareomitted,thenetworkis
assumedtohaveitsnaturalmaskaccordingtothenetworkclass.

1. WhataretwobenefitsofusingrouteaggregationinBGP?(Choose
two.)(Source:"ConfiguringBasicBGP")
Itensuresthatevenifaggregatenetworksaredown,theaggregateis
advertised,whicheliminatesblackholes.
Itreducestheamountofmemorythatisusedintheroutertostorethe
BGPtable.
ItreducesrouteflappinganditseffectsonrouterCPUresources.
BGPattributegranularityismaintained,whichensuresoptimalpath
selection.

1. WhichtwoofthefollowingarecharacteristicsoftheBGPConditional
RouteInjectionfeature?(Choosetwo.)(Source:"ConfiguringBasic
BGP")
allowsyoutooriginateaprefixintoaBGProutingtablewithoutthe
correspondingmatch
enabledwiththebgpinject-mapexist-mapcommand
allowsconditionalinjectingorreplacingmorespecificprefixeswithless
specificprefixes
allowsoriginationofaprefixintoaBGProutingtableonlywiththe
correspondingmatch

1. WhichtwoofthefollowingarecharacteristicsoftheBGPSupportfor
TTLSecurityCheckfeature?(Choosetwo.)(Source:"Configuring
BasicBGP")
shouldbeconfiguredononlyoneparticipatingrouter
preventsBGPsessionsfromexpiringevenifkeepalivepacketsarenot
receivedbeforethesessiontimerexpires
protectstheEBGPpeeringsessionbycomparingthevalueintheTTL
fieldofreceivedIPpacketsagainstahopcountthatisconfiguredlocally
foreachEBGPpeeringsession
supportsbothdirectlyconnectedpeeringsessionsandmultihopEBGP
peeringsessions

1. Whichtwoofthefollowingarefunctionsoftheshowipbgp
summarycommand?(Choosetwo.)
displaysBGPmemoryuse
displaysBGPneighborsandstatusofcommunicationwiththem
locatesproblemsinBGPsessionsthatareupandestablished
displaystheBGProutingtable

1. WhichcommanddoyouusetodisplaydetailedBGPneighbor
information?(Source:"MonitoringandTroubleshootingBGP")
showipbgpsummary
showipbgp
showipbgpneighborsaddress
showipbgpdetail

1. TogetinformationabouttheTCPsessionandBGPparametersof
thesession,youcanissueshowipbgpsummarycommand.True
orfalse?(Source:"MonitoringandTroubleshootingBGP")
true
false

1. Whichtwoofthefollowingstatementsabouttheshowipbgp
commandthatisusedtomonitortheBGProutingtableare
accurate?(Choosetwo.)(Source:"MonitoringandTroubleshooting
BGP")
Theshowipbgpcommandshowsanabbreviatedlistofinformation
abouteachroute,displayingonelineperprefix.
Theshowipbgpcommandshowsafulllistofinformationabouteach
route,displayingonelineperprefix.
AlloftheBGPattributesthatareassociatedwiththeroutearedisplayed
ontheline.
IftheBGPtablecontainsmorethanoneroutetothesamenetwork,the
routesaredisplayedonsuccessivelinesofthecommandoutput.

1. WhichdebugcommandshouldyouenabletotroubleshootBGP
sessionstartupissueswheretheTCPconnectionneversucceeds?
(Source:"MonitoringandTroubleshootingBGP")
ipbgpupdates
ippackets
ipbgpkeepalives
iptcptransactions

1. Whendebugginganexchangeofupdates,youshouldusedebugip
bgpkeepalivecommand.TrueorFalse?
true
false

1. Whatarethethreemostcommonsessionstartupissuesthatyou
canexperiencewhenconfiguringbasicBGP?(Choosethree.)
(Source:"MonitoringandTroubleshootingBGP")
BGPneighborsdonotbecomeactive.
BGProutingloopscauseblackholes.
ABGPneighborisactive,buttheBGPsessionisnotestablished.
TheBGPneighborstateoscillatesbetweenIdleandActive.
TheBGPsessionisactive,buttheneighborcannotbereached.
BGPkeepalivesexperienceintermittentfailures.

1. WhatisthemostcommonreasonforaBGPsessionnotleavingthe
Idlestate?(Source:"MonitoringandTroubleshootingBGP")
TheTCPportfortheconnectionisnotconfigured.
Theexternalneighborisnotdirectlyconnected.
TheTCPSYNpacketisansweredwithanRSTpacket.
TheneighborshavebeenconfiguredwiththesameASnumber.

1. WhatwillresultfromattemptingtoopenaBGPconnectionwitha
neighborthathasnotbeenproperlyconfiguredforBGP?(Source:
"MonitoringandTroubleshootingBGP")
TheBGPsessionwillremainintheIdlestate.
Theneighborsessionwillbeestablished,andthesessionstartup
parameterswillbenegotiatedovertheTCPsession.
TheBGPsessionwillbeimmediatelyterminatedwithaTCPRSTpacket.
TheBGPsessionwillbecome"stuckinActivestate."

1. WhenaBGPneighboroscillatesbetweenActiveandIdle,whatis
thelikelydiagnosis?(Source:"MonitoringandTroubleshooting
BGP")
Therearemismatchedkeepaliveintervals.
ThereisanASnumbermismatchbetweenBGPneighbors.
OnerouterisnotconfiguredastheBGPneighborontheneighboring
router.
TheBGPneighborisnotreachable.

Introduction
ThismoduleisoneofthefocalpointsoftheBGPcurriculum:adiscussionofBGP
issuesinatransitAS.InthismoduleyouwilllearnbasicBGPtransitASissues,
rangingfromsynchronizationbetweenanIGP,andBGPtoIBGPfull-meshandnext-
hoprequirements.
Uponcompletingthismodule,youwillbeableto:
DescribethefunctionofatransitASandtheneedforIBGP
DescribetheinteractioninatransitASbetweenEBGPandIBGP
DescribethefunctionofanIGPinforwardingpacketsthroughanAS
VerifyproperoperationofaconfiguredBGPtransitnetworkbyperformingthe
stepsnecessarytocorrectbasicIBGPconfigurationerrors
BGPTransitAutonomousSystems

Overview
Alltransitautonomoussystemsarerequiredtocarrytrafficoriginatingfromor
destinedforlocationsoutsideofthatAS.ForthetransitAStomeetthisrequirement,
adegreeofinteractionandcoordinationbetweenBGPandtheIGPthatthis
particularASusesisnecessary.Suchaconfigurationrequiresspecialcareto
ensureconsistencyofroutinginformationthroughouttheAS.
ThetopologyoftheInternetcanbeviewedasaseriesofconnectionsbetweenstub
networks,multihomednetworks,andtransitautonomoussystems.AmultihomedAS
containingmorethanoneconnectiontotheoutsideworldandallowingtrafficnot
originatinginthatAStotravelthroughitisatransitAS.Thislessonintroducesthe
conceptofthemultihomedtransitASandhowBGPexchangesroutinginformation
insidetheASandbetweenneighboringautonomoussystems.Italsoexplainsthe
requirementforIBGPwithinthemultihomedtransitAS.
Uponcompletingthislesson,youwillbeableto:
ListthefunctionsofatransitAS
DescribeexternalroutepropagationbetweenautonomoussystemsinaBGP
network
DescribeinternalroutepropagationwithinaBGPAS
ExplainhowtransitingpacketsareforwardedinsideatransitAS
ExplaintheneedfordeployingIBGPonallcorerouters
WorkingwithTransitAS

AtransitASisrequiredtocarrytrafficthatoriginatesfromorisdestinedforlocations
outsideofthatAS.AtransitAShastwobasicfunctions.
Propagate routes between remote autonomous systems
Route packets between remote networks
RoutersinatransitAShavetoperformtwotasks:
Receiveroutinginformationupdatesaboutreachablenetworksfromneighboring
autonomoussystems,propagatetheinformationthroughtheirownAS,andsend
ittootherneighboringautonomoussystems.
ForwardIPpacketsthattheyhavereceivedfromaneighboringASthroughtheir
ownAStoadownstreamneighboringAS.TheroutersinthetransitASperform
thistaskusingtheroutinginformationthattheyhavereceivedaspartofthefirst
task.
TransitASTasks

Twoautonomoussystemsusuallyexchangeroutinginformationaboutreachable
networksusingBGP.Thereiscurrentlynoalternativeroutingprotocolthathasthe
scalabilityandsecuritycharacteristicsofBGP.
Inthefigure,theBGPsessionbetweenISP1andR1iscalledanEBGPsession
becauseISP1andR1areindifferentautonomoussystems.
BGProutinginformationupdatesconsistofthenetworkaddress,subnetmask,and
anynumberofBGPattributes.Nootherroutingprotocolprovidesthesamerichness
ofrouteattributesasBGP.TranslatingBGProuteattributeinformationintoanyother
protocolwouldlikelycausealossofinformation.Therefore,theEBGPinformation
thatR1receivesisnottranslated;itisjustforwardedtootherBGP-speakingrouters
(R2,R3,andR4inthefigure)withintheAS.
Likewise,R4hasBGPinformationandcanpropagateittoISP3BinAS300overthe
EBGPsession.
EBGPsessionsare,ingeneral,establishedbetweendirectlyconnectedneighbors.
BGP-speakingrouters,therefore,neednoadditionalroutinginformationtoestablish
asession.
ExternalRoutePropagation

Inthisexample,theBGPsessionbetweenR1andR4,whicharebothinthesame
AS,isanIBGPsession.
The only protocol that can transport all BGP attributes across the backbone is BGP
inside an AS, called Internal BGP (IBGP).
IBGPsessionsare,ingeneral,establishedbetweendistantroutersinthesameAS.
Theseroutersneedextraroutinginformationtoestablishthesession,becausethere
isnorequirementthatIBGPneighborsbedirectlyconnected.Thisinformation
typicallycomesfromtheIGP,whichisrunningwithintheASindependentlyofBGP.
InternalRoutePropagation

Inthisexample,afterAS300hasreceivedtheroutinginformationaboutreachable
networksinsideAS100,IPpacketscanstarttoflow.Inthefigure,IPpacketsflow
fromAS300towardAS100.ISP3B,theegressrouterinAS300,forwardsIP
packetswithdestinationsinAS100towardR4,accordingtoinformationreceived
throughEBGP.
Conclusions:
R2 needs external routes for proper packet forwarding. R2 must receive BGP
routes.
R4nowusestheIBGPinformationthatitreceivedfromR1andforwardsthepackets
inthedirectionofR1,whichinthiscasemeansviaR2.
WhentheIPpacketsreachR2,therouterchecksitsroutingtableforamatching
entry,butitfailstofindone.Thepacketisdroppedbecausethedestinationnetwork
isunreachablefromtheperspectiveofR2.
Thissituationis,ofcourse,unacceptable.Topreventdroppedpacketsresultingfrom
unreachablenetworks,R2mustalsohaveroutinginformationaboutthenetworks
reachableinsideAS100.ThesameinformationthatR4receivedfromR1overthe
IBGPsessionmustbepropagatedtoR2.
R3hasthesamenetworkreachabilityrequirementsasR2,
becauseR4couldforwardthepacketsviaR3aswellas
viaR2.
PacketForwardinginAS

WithinatransitAS,allroutersthatareinatheoreticaltransitpathbetweenexternal
destinationsshouldhaveinformationaboutallexternalroutesthatarereceivedfrom
anyneighboringAS.Ifasinglerouteronatransitpathdoesnothavethis
information,thereisalwaysapossibilitythatanIPpacketthatisreceivedfroma
neighboringASwillnotbeabletobeforwardedbythatrouterthroughthetransitAS.
TherouterlackingroutinginformationaboutthefinaldestinationoftheIPpacket
dropsitintowhateffectivelybecomesablackhole.
All core routers must have all external routes.
Core routers must receive BGP routes.
Redistribution of BGP routes into IGP is not scalable.
Default routing is not applicable in transit AS core.
Theonlyfeasiblewayfortheroutertodistributeallexternalroutinginformationisby
usingIBGP.RedistributionoftheEBGProutesintoanIGPisnotviablebecauseno
IGPcancarrythevolumeofinformationthatBGPcurrentlycarriesintheInternet.
Theriskoflosinginformationduringredistributionof
EBGProutesintoanIGPisnotthereasonwhyBGPis
usedtoupdateintermediateroutersinthetransitpath
insteadofanIGP.RedistributionintoanIGPisnotused
becauseofthescalabilityissuesthatwouldarisefrom
doingso.
Defaultroutingoragatewayoflastresortcannotbeusedbyrouterswithinthe
transitpathwhentransitservicesareprovidedtootherautonomoussystems.If
someroutesarefilteredoutandthedefaultrouteisusedinstead,fullrouting
flexibilityislost.Inthiscase,thetransitASisnotabletoforwardpacketstoall
destinationsatalltimes.Infact,routingloopsandblackholesmightbeeasily
introduced.
CoreRouterIBGPRequirementsinTransitAS

Overview
Throughthisdiscovery,youwilllearnhowtheBGProutesarepropagatedbetween
differentautonomoussystemsthatareconnecteddirectlyandneedforfullmesh
withinanAS.
Discovery4:BGPRoutePropagation

Topology

Ifyoushutdownaninterfaceonarealrouterorswitch,the
connecteddevicewillseeitas"down/down."Dueto
virtualizationspecifics,IOLbehaviorisslightlydifferent.If
youshutdownaninterfaceonarouterorswitch,the
connecteddevicewillseeitas"up/up."InIOL,thestatus
ofaninterfacecanonlybe"up/up"or"administratively
down/down."
DeviceInformation
Device Interface IPaddress Description
ISP1 Ethernet0/0 172.16.11.11/24 ConnectiontoR1
ISP1 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
10.0.1.1/28
10.0.1.17/28
10.0.1.33/28
10.0.1.49/28
10.0.1.65/28
10.0.1.81/28
Loopbackssimulate
LANnetworks
R1 Ethernet0/0 172.16.11.1/24 ConnectiontoISP1
R1 Ethernet0/2 192.168.12.1/24 ConnectiontoR2
R1 Ethernet0/3 192.168.13.1/24 ConnectiontoR3
R1 Loopback1 10.0.0.1/28 Loopbacksimulates
LANnetwork
R2 Ethernet0/2 192.168.12.2/24 ConnectiontoR1
R2 Ethernet0/3 192.168.24.2/24 ConnectiontoR4
R2 Loopback1 10.0.0.33/28 Loopbacksimulates
LANnetwork
R3 Ethernet0/2 192.168.34.3/24 ConnectiontoR4
R3 Ethernet0/3 192.168.13.3/24 ConnectiontoR1
R3 Loopback1 10.0.0.17/28 Loopbacksimulates
LANnetwork
R4 Ethernet0/0 172.16.34.4/24 ConnectiontoISP3B
R4 Ethernet0/2 192.168.34.4/24 ConnectiontoR3
R4 Ethernet0/3 192.168.24.4/24 ConnectiontoR2
R4 Loopback1 10.0.0.49/28 Loopbacksimulates
LANnetwork
ISP3B Ethernet0/0 172.16.34.34/24 ConnectiontoR4
ISP3B Loopback1
Loopback2
Loopback3
Loopback4
10.0.3.1/28
10.0.3.17/28
10.0.3.33/28
10.0.3.49/28
Loopbackssimulate
LANnetworks
JobAids

Step1
Youwillverifyroute10.0.1.0/28ispropagatedfromAS100intoAS300.
IPaddresses,IGPandBGParepreconfiguredasshowninthetopologybelow:
OntheISP1router,verifyroute10.0.1.0/28ispresentintheIProutingtable.
ISP1# show ip route
< output omitted >
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 20 subnets, 2 masks
B 10.0.0.0/28 [20/0] via 172.16.11.1, 01:49:30
B 10.0.0.16/28 [20/0] via 172.16.11.1, 01:49:30
B 10.0.0.32/28 [20/0] via 172.16.11.1, 01:49:30
B 10.0.0.48/28 [20/0] via 172.16.11.1, 01:49:30
C 10.0.1.0/28 is directly connected, Loopback1
L 10.0.1.1/32 is directly connected, Loopback1
C 10.0.1.16/28 is directly connected, Loopback2
L 10.0.1.17/32 is directly connected, Loopback2
C 10.0.1.32/28 is directly connected, Loopback3
<... output omitted ...>
IPaddress10.0.1.1/28isconfiguredontheLoopback1interface.
Step2
OntheISP1router,verifyroute10.0.1.0/28ispresentintheBGProutingtable
aslocallyoriginated.
ISP1# show ip bgp
< ouput omitted >
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 172.16.11.1 0 0 1 i
*> 10.0.0.16/28 172.16.11.1 0 1 i
*> 10.0.0.32/28 172.16.11.1 0 1 i
*> 10.0.0.48/28 172.16.11.1 0 1 i
*> 10.0.1.0/28 0.0.0.0 0 32768 i
*> 10.0.1.16/28 0.0.0.0 0 32768 i
*> 10.0.1.32/28 0.0.0.0 0 32768 i
*> 10.0.1.48/28 0.0.0.0 0 32768 i
*> 10.0.1.64/28 0.0.0.0 0 32768 i
*> 10.0.1.80/28 0.0.0.0 0 32768 i
*> 10.0.3.0/28 172.16.11.1 0 1 300 i
*> 10.0.3.16/28 172.16.11.1 0 1 300 i
*> 10.0.3.32/28 172.16.11.1 0 1 300 i
*> 10.0.3.48/28 172.16.11.1 0 1 300 i
Theroute10.0.1.0/28islocallyoriginated,becausenexthopIPaddressis
0.0.0.0andASpathattributeisempty.
Step3
OntheR1router,verifyroute10.0.1.0/28ispresentintheBGProutingtable.
BGPRoutePropagation
DiscoverySteps

R1# show ip bgp
< output omitted >
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 0.0.0.0 0 32768 i
*>i 10.0.0.16/28 10.0.0.17 0 100 0 i
*>i 10.0.0.32/28 10.0.0.33 0 100 0 i
*>i 10.0.0.48/28 10.0.0.49 0 100 0 i
*> 10.0.1.0/28 172.16.11.11 0 0 100 i
*> 10.0.1.16/28 172.16.11.11 0 0 100 i
*> 10.0.1.32/28 172.16.11.11 0 0 100 i
*> 10.0.1.48/28 172.16.11.11 0 0 100 i
*> 10.0.1.64/28 172.16.11.11 0 0 100 i
*> 10.0.1.80/28 172.16.11.11 0 0 100 i
*>i 10.0.3.0/28 172.16.34.34 0 100 0 300 i
*>i 10.0.3.16/28 172.16.34.34 0 100 0 300 i
*>i 10.0.3.32/28 172.16.34.34 0 100 0 300 i
*>i 10.0.3.48/28 172.16.34.34 0 100 0 300 i
Theroute10.0.1.0/28hasnexthopIPaddress172.16.11.11andASpath
attribute100.
Step4
OntheR4router,verifyroute10.0.1.0/28ispresentintheBGProutingtable.
R4# show ip bgp
< text omitted >
Network Next Hop Metric LocPrf Weight Path
*>i 10.0.0.0/28 10.0.0.1 0 100 0 i
*>i 10.0.0.16/28 10.0.0.17 0 100 0 i
*>i 10.0.0.32/28 10.0.0.33 0 100 0 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*>i 10.0.1.0/28 172.16.11.11 0 100 0 100 i
*>i 10.0.1.16/28 172.16.11.11 0 100 0 100 i
*>i 10.0.1.32/28 172.16.11.11 0 100 0 100 i
*>i 10.0.1.48/28 172.16.11.11 0 100 0 100 i
*>i 10.0.1.64/28 172.16.11.11 0 100 0 100 i
*>i 10.0.1.80/28 172.16.11.11 0 100 0 100 i
*> 10.0.3.0/28 172.16.34.34 0 0 300 i
*> 10.0.3.16/28 172.16.34.34 0 0 300 i
*> 10.0.3.32/28 172.16.34.34 0 0 300 i
*> 10.0.3.48/28 172.16.34.34 0 0 300 i
Theroute10.0.1.0/28hasnexthopIPaddress172.16.11.11andASpath
attribute100.YoucanseerouteislearnedviainternalBGP.
Step5
OntheR4router,verifywhatisthebestpathtoreachroutenexthopIPaddress
172.16.11.11.
R4# show ip route
< output omitted >
172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
O 172.16.11.0/24 [110/30] via 192.168.34.3, 02:13:15, Ethernet0/2
[110/30] via 192.168.24.2, 02:13:15, Ethernet0/3
<... output omitted ...>
OutputshowsthatnexthopIPaddress172.16.11.11isreachableviatwoOSPF
routes.RouterR4willloadsharebetweentwoOSPFroutes.Somepacketswill
besenttotheR2routerandsometotheR3router.
So,R2andR3routersneedIProutinginformationtoreachnexthop
172.16.11.11.
Step6
OntheISP3Brouter,verifyroute10.0.1.0/28ispresentintheBGProutingtable.
ISP3B# show ip bgp
< output omitted >
Network Next Hop Metric LocPrf Weight Path

*> 10.0.0.0/28 172.16.34.4 0 1 i
*> 10.0.0.16/28 172.16.34.4 0 1 i
*> 10.0.0.32/28 172.16.34.4 0 1 i
*> 10.0.0.48/28 172.16.34.4 0 0 1 i
*> 10.0.1.0/28 172.16.34.4 0 1 100 i
*> 10.0.1.16/28 172.16.34.4 0 1 100 i
*> 10.0.1.32/28 172.16.34.4 0 1 100 i
*> 10.0.1.48/28 172.16.34.4 0 1 100 i
*> 10.0.1.64/28 172.16.34.4 0 1 100 i
*> 10.0.1.80/28 172.16.34.4 0 1 100 i
*> 10.0.3.0/28 0.0.0.0 0 32768 i
*> 10.0.3.16/28 0.0.0.0 0 32768 i
*> 10.0.3.32/28 0.0.0.0 0 32768 i
*> 10.0.3.48/28 0.0.0.0 0 32768 i
Theroute10.0.1.0/28hasnexthopIPaddress172.16.34.4andASpath
attribute1100.
Step7
Youwillverify,howpacketsareforwardedfromAS300totheIP10.0.1.1inthe
AS100.OntheISP3Brouter,pingnexthopIPaddressoftheBGProute
10.0.1.0/24.
Inthepreviousstep,youhavelearnednexthopIPaddressis172.16.34.4.
SourcepingfromtheISP3Brouter'sLoopback1interface.
ISP3B# ping 172.16.34.4 source Loopback 1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.34.4, timeout is 2 seconds:
Packet sent with a source address of 10.0.3.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
FromtheISP3Brouter,youcansuccessfullyreachnexthop172.16.34.4(router
R4).
Step8
FromtheR4router,toreachIPaddress10.0.1.1,nexthopIPaddressis
172.16.11.11.FromtheR4router,pingnexthopIPaddressfromtheBGProute
10.0.1.0/24.
SourcepingfromtheR4router'sLoopback1interface.
R4# ping 172.16.11.11 source Loopback 1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.11.11, timeout is 2 seconds:
Packet sent with a source address of 10.0.0.49
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
FromtheR4router,youcansuccessfullyreachnexthop172.16.11.11(ISP1
router).
Step9
FromtheISP3Brouter,pingdirectlytotheIPaddress10.0.1.1.Sourcepingfrom
theISP3Brouter'sLoopback1interface.
Pingshouldbesuccessful.ThesuccessfulpingdemonstratesIPconnectivity
betweenAS100andAS300viaAS1.
ISP3B# ping 10.0.1.1 source Loopback 1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.1.1, timeout is 2 seconds:
Packet sent with a source address of 10.0.3.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
Routers in a transit AS receive routing information updates from neighboring
autonomous systems, propagate the information through their own AS, and send
it to other neighboring autonomous systems.
Two autonomous systems usually exchange routing information over an EBGP
session.
A BGP session between two routers in the same AS is called an IBGP session.
For packets to be properly forwarded in a transit AS, all routers must have
external routing information.
The only feasible method of distributing external routing information to all routers
in the transit AS is through IBGP.
Summary

Overview
ConfiguringaBGPnetworkinatransitservicesconfigurationrequiresspecialcare
toensureconsistencyofroutinginformationthroughouttheAS.Understandingthe
interactionbetweenEBGPandIBGPiscrucialtosuccessfullyconfiguringand
troubleshootingthetransitautonomousnetwork.
Uponcompletingthislesson,youwillbeableto:
DescribeAS-pathprocessinginIBGP
DescribeBGPmultipathloadsharing
ExplaintheneedforBGPsplithorizon
Explaintheneedforafull-meshtopologybetweenIBGProutersandthe
implicationsofthatneed
ListthebenefitsofestablishingIBGPneighborsessionsusingloopback
interfaces
Describenext-hopprocessinginIBGP
ExplainwhyallEBGPpeersmustbereachablebyallBGP-speakingrouters
withintheAS
Describehowtoconfigureedgerouterstoannouncethemselvesasthenext
hopinIBGPupdates
DescribethedifferencesbetweenEBGPandIBGPsessions
ListthescalabilitylimitationsofIBGP-basedbackbones
InteractingwithIBGPandEBGPinTransit
AS

AllBGProutingupdatescarrythemandatorywell-knownattributeAS-path,which
liststheautonomoussystemsthattheroutingupdatehasalreadycrossed.
WhenarouteroriginatesaBGPprefix(networkXinthisexample),theASpathis
empty.WheneveraBGPprefixisannouncedoveranEBGPsession,theAS
numberoftherouterthatissendingtheinformationisprependedtotheASpath.In
theexample,ISP1inserts"100"intheASpathbeforeforwardingtheroutingupdate
toR1.
TheASpathisnotchangedwhentheBGPprefixispropagatedacrossIBGP
sessionsbecausetheroutingupdatehasnotcrossedanASboundary.
Inthefigure,R1forwardstheinformationoveranIBGPsessiontoR4withtheAS-
pathunchanged.TheAS-pathinformationaboutnetworkXwillbethesameinall
routerswithinAS1,becausealltheroutersareupdatedusingIBGPsessionsfrom
R1.
WhenR4forwardstheinformationaboutnetworkXtoISP3B,R4prependsitsown
ASnumber(1)totheASpath.Thus,ISP3Breceivestheroutinginformationabout
networkXwithanAS-pathattributeof"1100."
AS-PathProcessinginIBGP

WhenaBGP-speakingrouterwithnolocalpolicyconfiguredreceivesNLRIfrom
multipleIBGPsourcesforthesamedestination,therouterchoosesoneIBGPpath
asthebestpath.ThebestpathistheninstalledintheIProutingtableoftherouter.
ThefigureillustratesthatwiththreepathstoAS200,theR2routerdeterminesthat
oneofthepathstoAS200isthebestpath.So,itusesonlythispathtoreachAS
200.
TheIBGPmultipathload-sharingfeatureenablestheBGP-speakingroutertoselect
multipleIBGPpathsasthebestpathstoadestination.Thebestpaths,ormultipaths,
aretheninstalledintheIProutingtableoftherouter.
OntheR2routerinthefigure,thepathstotheR3,R4,andR5routersare
configuredasmultipathsandcanbeusedtoreachAS200.TheloadtoAS200is
equallysharedbetweenthepaths.
Formultiplepathstothesamedestinationtobeconsideredasmultipaths,the
followingcriteriamustbemet:
Allattributesmustbethesame.Theattributesincludeweight,localpreference,
ASpath(entireattributeandnotjustlength),origincode,MED,andIGP
distance.
Thenexthoprouterforeachmultipathmustbedifferent.
Evenifthecriteriaaremetandmultiplepathsareconsideredmultipaths,theBGP-
speakingrouterstilldesignatesoneofthemultipathsasthebestpathandadvertises
thisbestpathtoitsneighbors.
ConfiguringmultipleIBGPbestpathsenablesaroutertoevenlysharethetrafficthat
isdestinedforaparticularsite.
Usethemaximum-pathsibgpcommandinrouterconfigurationmode,tocontrolthe
maximumnumberofparallelinternalBGProutesthatcanbeinstalledinarouting
table.
MultipathLoadSharinginBGP

AllrouterswithinanASmustmakeroutingdecisionsinaconsistentway.Theymust
haveaccesstothesameroutinginformationwiththesameattributesinorderto
cometothesameconclusionaboutwhichexitpointoftheAStouse.Inotherwords,
theBGPattributesshouldnotbechangedwithintheAS.
Result: Full mesh of IBGP sessions is required for proper IBGP update propagation.
TheAS-pathattributeisnotchangedoveranIBGPsession,becausetheBGP
updatehasnotcrossedtheASboundary.However,theAS-pathattributeisthe
primarymeansofdetectingroutinginformationloops.ABGProuterthatencounters
itsownASintheASpathofanincomingBGPupdatesilentlyignoresthe
information.BecausetheBGP-speakingroutersmodifyASpathonlyonEBGP
sessions,thisloop-preventingmechanismisonlyusefulbetweenautonomous
systems,notwithinthem.
IBGPsplithorizonpreventsroutinginformationloopswithintheAS.Routing
informationthatisreceivedthroughanIBGPsessionisneverforwardedtoanother
IBGPneighbor,onlytowardEBGPneighbors.BecauseofBGPsplithorizon,no
routercanrelayIBGPinformationwithintheAS—allroutersmustbedirectlyupdated
fromtheborderrouterthatreceivedtheEBGPupdate.
BGPSplitHorizon

Full mesh of IBGP sessions has to be established between all BGP-speaking
routers in the AS for proper IBGP route propagation.
The IBGP full mesh is a logical mesh of TCP sessions only; physical full mesh is
not required.
EveryrouteronthetransitpathwithintheASmusthaveroutinginformationaboutall
externalnetworksthatarereceivedbyanyoftheborderrouters.So,R2andR3
musthaveIBGPsessionstoallborderrouters.
Thislevelofcommunicationisnotenough,though,becauseanyoftheinternal
routerscouldalsocreatenewBGProutinginformation(forexample,originatea
customernetwork).TheseupdatesmustalsoreachalltherouterswithintheAS.The
conclusionisthatallBGProuterswithinanASmusthaveIBGPsessionswithevery
otherBGProuterintheAS.ThisrequirementresultsinafullmeshofBGPsessions
betweenBGP-speakingroutersinanAS.
Inthenetworkinthefigure,R1musthaveIBGPsessionswithR2,R3,andR4to
propagateroutesthatarereceivedfromAS100toallrouterswithinAS1.Similarly,
R4musthaveIBGPsessionswithR1,R2,andR3tobeabletopropagateroutes
thatarereceivedfromAS300toallrouterswithinAS1.
TheIBGPsessionbetweenR2andR3isnotstrictly
necessaryforproperforwardingofIPpacketsbetween
externaldestinations.ItdoesbecomemandatoryifR2or
R3startstooriginateBGPnetworks.Topreventpotential
futureconnectivityissues,itisagoodpracticetoestablish
afullmeshofIBGPsessionsregardlessofwhetherthey
areneededatthetimeofnetworkdeploymentornot.
TheIGPthatrunswithinAS1providesenoughinformationtoanyBGProuterwithin
AS1tosendIPpacketstoanyotherrouterintheAS.Havingenoughrouter
reachabilityinformationmakesitpossibletoestablishIBGPsessionsbetween
routerseventhoughtheyarenotphysicallyconnected.TheIBGPfullmeshisa
logicalfullmeshofTCPsessionsandwillrunonanarbitraryphysicaltopology.
IBGPFullMeshExample
ThefigureillustratesIBGPsplit-horizonandIBGPfull-meshprinciplesinasample
network.
IBGPFullMesh

ISP1issendinganupdatetoR1overanEBGPsession.Updatesthatarereceived
onanEBGPsessionshouldbeforwardedonallotherIBGPsessions,soR1
updatesR2,R3,andR4.AllrouterswithinAS1areupdateddirectlybyR1.
R2andR3arepreventedfromforwardingtheupdatethattheyreceivedfromR1
becauseofBGPsplithorizon.
R4,whichreceivedtheinformationonanIBGPsession,ispreventedfromupdating
R2andR3becauseofthesamesplit-horizonrule.ButR4willupdateISP3Boveran
EBGPsession.

Inthefigure,thetransitAS1hasaredundantphysicaltopology.TheIGPprovides
reachabilityinformationforallroutersandnetworkswithinAS1.Thisway,IGP
enablesallroutersintheAStoestablishIBGPsessionstoallotherrouters,evenif
theroutersarenotdirectlyconnected.
Because of IBGP full-mesh requirements, IBGP neighbors are usually not directly
connected. Which interfaces should be chosen as the source and destination
addresses of IBGP TCP sessions?
IftheIBGPsessionbetweenR1andR4wasestablishedusingIPaddressesthat
belongtothephysicalinterfaces,theIBGPsessionwouldgodownifeitherofthe
physicalinterfaceswentdown.TheIPaddressofaninterfacethatisinthedown
stateisinvalid.Asaresult,therouterwouldteardowntheTCPsessionthatisused
forBGPbetweentherouters.Then,allIPpacketsthatarereceivedwitha
destinationaddresspointingtothatinterfacewillalsobedropped.
Duringthenetworkdesignandimplementationphase,thenetworkdesignersmust
becarefulthatthoseIBGPsessionsremainestablishedforaslongasthetwoBGP
routershaveanyusablepathbetweenthem.
Always run IBGP sessions between loopback interfaces.
IBGP sessions can always be established, even if some physical interfaces are
down.
IBGP sessions are stable—physical interface failure will not tear down IBGP
sessions.
There is no BGP recovery after a failure inside the transit AS.
The configured IGP will re-establish the path between loopback interfaces.
IBGP sessions are not affected.
ThebestchoicewhenyouareconfiguringIBGPsessionsistoestablisheach
sessionbetweenloopbackinterfacesoneachBGProuter.
ToestablishBGPconnectivitybetweentheloopbackinterfaces,theIPaddressesof
theseinterfaceshavetobereachablebybothrouters.ItisimportantthattheIGP
carryinformationaboutthesubnetsthatareassignedtoeachloopbackinterfaceso
thattheinterfacesarereachablebyallBGProutersintheAS.
TheIBGPsessionsthatareestablishedbetweenloopbackinterfaceshave
increasedstability.Thesesessionswillnotgodownifasinglephysicalinterface
goesdown.AslongastheIGPcanfindanypathbetweenthetworouters,theIBGP
sessionwillremainup.BGPwillnotnoticethattheIGPhaschangedthetrafficpath
betweenthetworouters.
BecauseBGPsessionsrunoverTCP,theycansurvive
evenashortlossofconnectivitybetweenBGProuters
withnoimpacttotheBGProutingprotocol.Theonly
requirementplacedontheIGPisthatthenetworkmust
convergebeforetheBGPkeepalivetimerexpires.
IBGPNeighbors

EveryBGPupdatecarriesthemandatorywell-knownattributenexthop.Thenext-
hopattributespecifiestheIPaddressthattheroutershoulduseastheforwarding
nexthopforpacketsthataresenttowardtheannounceddestinationaddress.In
mostcases,thenexthopissettotheIPaddressthatthesendingrouterisusingas
itssourceIPaddressforEBGPsessions.ThereceivingBGProuterwillusethe
informationandrouteIPpacketstowardtheannounceddestinationviatheindicated
nexthop,whichisnormallydirectlyconnected.
Thenext-hopattributeisnotchangedonIBGPupdates.So,whentheborderrouter
forwardstheBGPupdateonIBGPsessions,thenext-hopaddressisstillsettothe
IPaddressofthefarendoftheEBGPsession.Therefore,thereceiverofIBGP
updateswillseethenext-hopinformationindicatingadestinationthatisnotdirectly
connected.Toresolvethisproblem,therouterwillcheckitsroutingtableandseeif
andhowitcanreachthenext-hopaddress.TheroutercanthenrouteIPpackets
withdestinationaddressesmatchingthenetworkintheBGPupdateinthesame
directionasitwouldhaveroutedanIPpacketwithadestinationaddressequalto
theIPaddressstatedinthenext-hopattribute.Thisprocessisknownasrecursive
routing.
Inthefigure,ISP1sendsaBGPupdateaboutnetworkX.Becauseitissendingthis
updateoveranEBGPsessiontoR1,thenext-hopattributeissettotheIPaddress
thatisusedattheISP1sideoftheEBGPsession,172.16.11.11.
R1canusethisinformationandroutepacketstonetworkXbyforwardingthemto
ISP1.
R1alsoforwardstheBGPupdateoverallitsIBGPsessions.Itdoesnotchangethe
next-hopattribute,soR2,R3,andR4getinformationthattheycanreachnetworkX
byforwardingpacketsto172.16.11.11.ButthatIPaddressisnotdirectlyconnected,
sotheroutersmustlookintheirroutingtablestoseeifandhowtheycanreach
172.16.11.11.Iftherecursiveroutelookupissuccessful,eachroutercanthenroute
packetstonetworkXinthesamedirectionasitwouldroutepacketsto
172.16.11.11.
R4alsoforwardstheBGPupdateaboutnetworkXtoISP3B.Theconnection
betweentheseroutersisanEBGPsession.So,R4setsthenext-hopattributetoits
ownIPaddress,172.16.34.4,whichisusedbyR4ontheEBGPsessiontoward
ISP3B.
IBGPNext-HopProcessing

Overview
Throughthisdiscovery,youwilllearnhowtheBGPsplithorizonworksandhowit
impactstheroutingtable.YouwilllearnwhyfullmeshIBGPsessionswithinanAS
arerequiredandhownext-hopisprocessedduringroutepropagationwithinanAS.
Discovery5:IBGPFullMesh

Topology

Ifyoushutdownaninterfaceonarealrouterorswitch,the
connecteddevicewillseeitas"down/down."Dueto
virtualizationspecifics,IOLbehaviorisslightlydifferent.If
youshutdownaninterfaceonarouterorswitch,the
connecteddevicewillseeitas"up/up."InIOL,thestatus
ofaninterfacecanonlybe"up/up"or"administratively
down/down."
DeviceInformation
Device Interface IPaddress Description
ISP1 Ethernet0/0 172.16.11.11/24 ConnectiontoR1
ISP1 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
10.0.1.1/28
10.0.1.17/28
10.0.1.33/28
10.0.1.49/28
10.0.1.65/28
10.0.1.81/28
Loopbackssimulate
LANnetworks
R1 Ethernet0/0 172.16.11.1/24 ConnectiontoISP1
R1 Ethernet0/2 192.168.12.1/24 ConnectiontoR2
R1 Ethernet0/3 192.168.13.1/24 ConnectiontoR3
R1 Loopback1 10.0.0.1/28 Loopbacksimulates
LANnetwork
R2 Ethernet0/2 192.168.12.2/24 ConnectiontoR1
R2 Ethernet0/3 192.168.24.2/24 ConnectiontoR4
R2 Loopback1 10.0.0.33/28 Loopbacksimulates
LANnetwork
R3 Ethernet0/2 192.168.34.3/24 ConnectiontoR4
R3 Ethernet0/3 192.168.13.3/24 ConnectiontoR1
R3 Loopback1 10.0.0.17/28 Loopbacksimulates
LANnetwork
R4 Ethernet0/0 172.16.34.4/24 ConnectiontoISP3B
R4 Ethernet0/2 192.168.34.4/24 ConnectiontoR3
R4 Ethernet0/3 192.168.24.4/24 ConnectiontoR2
R4 Loopback1 10.0.0.49/28 Loopbacksimulates
LANnetwork
ISP3B Ethernet0/0 172.16.34.34/24 ConnectiontoR4
ISP3B Loopback1
Loopback2
Loopback3
Loopback4
10.0.3.1/28
10.0.3.17/28
10.0.3.33/28
10.0.3.49/28
Loopbackssimulate
LANnetworks
IPaddressesandIGParepreconfiguredasshowninthetopologybelow:
JobAids

BGPisalsoconfiguredasEBGP(ISP1toR1andISP3BtoR4)andasIBGP(R1to
R2,R1toR3,R3toR4,andR2toR4).IBGPisnotconfiguredbetweenR1toR4or
betweenR2toR3.

Step1
OntheR1router,verifywhatBGProutesarereceivedfromISP1router.
AnexternalBGPsessionisestablishedbetweenR1andISP1routers.
R1# show ip bgp
BGP table version is 10, local router ID is 10.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 0.0.0.0 0 32768 i
*>i 10.0.0.16/28 10.0.0.17 0 100 0 i
*>i 10.0.0.32/28 10.0.0.33 0 100 0 i
*> 10.0.1.0/28 172.16.11.11 0 0 100 i
*> 10.0.1.16/28 172.16.11.11 0 0 100 i
*> 10.0.1.32/28 172.16.11.11 0 0 100 i
*> 10.0.1.48/28 172.16.11.11 0 0 100 i
*> 10.0.1.64/28 172.16.11.11 0 0 100 i
*> 10.0.1.80/28 172.16.11.11 0 0 100 i
TheR1routerreceivedsixBGPprefixesfromtheISP1router.Fortheseprefixes,thenext
hopIPaddressis172.16.11.11.
Step2
OntheR1router,verifywhatBGPprefixesaresenttointernalBGPpeerR2(10.0.0.33).
R1# show ip bgp neighbors 10.0.0.33 advertised-routes
BGP table version is 10, local router ID is 10.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 0.0.0.0 0 32768 i
*> 10.0.1.0/28 172.16.11.11 0 0 100 i
*> 10.0.1.16/28 172.16.11.11 0 0 100 i
*> 10.0.1.32/28 172.16.11.11 0 0 100 i
*> 10.0.1.48/28 172.16.11.11 0 0 100 i
*> 10.0.1.64/28 172.16.11.11 0 0 100 i
*> 10.0.1.80/28 172.16.11.11 0 0 100 i
Total number of prefixes 7
YoucanseethatalltheprefixesthatarereceivedfromtheexternalBGPpeeraresentto
theinternalBGPpeer.
Step3
OntheR2router,verifyifallsixprefixesthatareoriginatedinAS100arereceivedfromR1
router.
R2# show ip bgp
BGP table version is 16, local router ID is 10.0.0.33
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*>i 10.0.0.0/28 10.0.0.1 0 100 0 i
*> 10.0.0.32/28 0.0.0.0 0 32768 i
*>i 10.0.0.48/28 10.0.0.49 0 100 0 i
* i 10.0.1.0/28 172.16.11.11 0 100 0 100 i
* i 10.0.1.16/28 172.16.11.11 0 100 0 100 i
IBGPFullMesh
DiscoverySteps

* i 10.0.1.32/28 172.16.11.11 0 100 0 100 i
* i 10.0.1.48/28 172.16.11.11 0 100 0 100 i
* i 10.0.1.64/28 172.16.11.11 0 100 0 100 i
* i 10.0.1.80/28 172.16.11.11 0 100 0 100 i
* i 10.0.3.0/28 172.16.34.34 0 100 0 300 i
* i 10.0.3.16/28 172.16.34.34 0 100 0 300 i
* i 10.0.3.32/28 172.16.34.34 0 100 0 300 i
* i 10.0.3.48/28 172.16.34.34 0 100 0 300 i
OntheR2router,youshouldseeallsixprefixesfromAS100intheBGProutingtable.
Step4
OntheR1router,verifywhatBGPprefixesaresenttointernalBGPpeerR3(10.0.0.17).
R1# show ip bgp neighbors 10.0.0.17 advertised-routes
BGP table version is 10, local router ID is 10.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 0.0.0.0 0 32768 i
*> 10.0.1.0/28 172.16.11.11 0 0 100 i
*> 10.0.1.16/28 172.16.11.11 0 0 100 i
*> 10.0.1.32/28 172.16.11.11 0 0 100 i
*> 10.0.1.48/28 172.16.11.11 0 0 100 i
*> 10.0.1.64/28 172.16.11.11 0 0 100 i
*> 10.0.1.80/28 172.16.11.11 0 0 100 i
Total number of prefixes 7
YoucanseeallprefixesreceivedfromexternalBGPpeeraresenttointernalBGPpeer.
Step5
OntheR3router,verifyifallsixprefixesthatareoriginatedinAS100arereceivedfromR1
router.
R3# show ip bgp
BGP table version is 16, local router ID is 10.0.0.17
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*>i 10.0.0.0/28 10.0.0.1 0 100 0 i
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*>i 10.0.0.48/28 10.0.0.49 0 100 0 i
* i 10.0.1.0/28 172.16.11.11 0 100 0 100 i
* i 10.0.1.16/28 172.16.11.11 0 100 0 100 i
* i 10.0.1.32/28 172.16.11.11 0 100 0 100 i
* i 10.0.1.48/28 172.16.11.11 0 100 0 100 i
* i 10.0.1.64/28 172.16.11.11 0 100 0 100 i
* i 10.0.1.80/28 172.16.11.11 0 100 0 100 i
* i 10.0.3.0/28 172.16.34.34 0 100 0 300 i
* i 10.0.3.16/28 172.16.34.34 0 100 0 300 i
* i 10.0.3.32/28 172.16.34.34 0 100 0 300 i
* i 10.0.3.48/28 172.16.34.34 0 100 0 300 i
OntheR3router,youshouldseeallsixprefixesfromAS100intheBGProutingtable.
Step6
OntheR2router,verifywhatBGPprefixesaresenttointernalBGPpeerR4(10.0.0.49).
R2# show ip bgp neighbors 10.0.0.49 advertised-routes
BGP table version is 16, local router ID is 10.0.0.33
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,

Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.32/28 0.0.0.0 0 32768 i
Total number of prefixes 1
YoucanseethatnoprefixesarereceivedfrominternalBGPpeerandsenttointernalBGP
peer.Thereisasingleprefix,locallyoriginated,thatissenttointernalBGPpeer.
Step7
OntheR3router,verifywhatBGPprefixesaresenttointernalBGPpeerR4(10.0.0.49).
R3# show ip bgp neighbors 10.0.0.49 advertised-routes
BGP table version is 16, local router ID is 10.0.0.17
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.16/28 0.0.0.0 0 32768 i
Total number of prefixes 1
YoucanseethatnoprefixesarereceivedfrominternalBGPpeerandsenttointernalBGP
peer.Thereisasingleprefix,locallyoriginated,thatissenttointernalBGPpeer.
R4routerhasnointernalBGPsessiontotheR1router.
Step8
OntheR4router,youwillnotfindanyprefixesfromAS100.
R4# show ip bgp
BGP table version is 8, local router ID is 10.0.0.49
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*>i 10.0.0.16/28 10.0.0.17 0 100 0 i
*>i 10.0.0.32/28 10.0.0.33 0 100 0 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*> 10.0.3.0/28 172.16.34.34 0 0 300 i
*> 10.0.3.16/28 172.16.34.34 0 0 300 i
*> 10.0.3.32/28 172.16.34.34 0 0 300 i
*> 10.0.3.48/28 172.16.34.34 0 0 300 i
Step9
ConfigureBGPsessionbetweenR1andR4routers.
BGPsessionissourcedfromLoopback1interface.RouterR1Loopback1
interfacehasIPaddress10.0.0.1androuterR4Loopback1interfacehasIP
address10.0.0.49.BothroutersareintheBGPAS1.
R1(config)# router bgp 1
R1(config-router)# neighbor 10.0.0.49 remote-as 1
R1(config-router)# neighbor 10.0.0.49 update-source Loopback 1
R4(config)# router bgp 1
R4(config-router)# neighbor 10.0.0.1 remote-as 1
R4(config-router)# neighbor 10.0.0.1 update-source Loopback 1
Step10
OntheR1router,verifywhatBGPprefixesaresenttointernalBGPpeerR4(10.0.0.49).

R1# show ip bgp neighbors 10.0.0.49 advertised-routes
BGP table version is 11, local router ID is 10.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 0.0.0.0 0 32768 i
*> 10.0.1.0/28 172.16.11.11 0 0 100 i
*> 10.0.1.16/28 172.16.11.11 0 0 100 i
*> 10.0.1.32/28 172.16.11.11 0 0 100 i
*> 10.0.1.48/28 172.16.11.11 0 0 100 i
*> 10.0.1.64/28 172.16.11.11 0 0 100 i
*> 10.0.1.80/28 172.16.11.11 0 0 100 i
Total number of prefixes 7
YoucanseeallprefixesreceivedfromexternalBGPpeeraresenttointernalBGPpeer.
Step11
OntheR4router,verifyifallsixprefixesthatareoriginatedinAS100,arereceivedfrom
R1router.
OntheR4router,youshouldseeallsixprefixesfromAS100intheBGProutingtable.
R4# show ip bgp
BGP table version is 9, local router ID is 10.0.0.49
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*>i 10.0.0.0/28 10.0.0.1 0 100 0 i
*>i 10.0.0.16/28 10.0.0.17 0 100 0 i
*>i 10.0.0.32/28 10.0.0.33 0 100 0 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
* i 10.0.1.0/28 172.16.11.11 0 100 0 100 i
* i 10.0.1.16/28 172.16.11.11 0 100 0 100 i
* i 10.0.1.32/28 172.16.11.11 0 100 0 100 i
* i 10.0.1.48/28 172.16.11.11 0 100 0 100 i
* i 10.0.1.64/28 172.16.11.11 0 100 0 100 i
* i 10.0.1.80/28 172.16.11.11 0 100 0 100 i
*> 10.0.3.0/28 172.16.34.34 0 0 300 i
*> 10.0.3.16/28 172.16.34.34 0 0 300 i
*> 10.0.3.32/28 172.16.34.34 0 0 300 i
*> 10.0.3.48/28 172.16.34.34 0 0 300 i
NowallroutersintheAS1havesameBGProutes.
Step12
BGPsessionbetweenR2andR3routersisnotneededinthislabsetup,
becauseR2andR3havenoexternalBGPsessions.Butinordertobe
consistentandprepareBGPtoaccommodatefutureexpansions,configureBGP
sessionbetweenR2andR3routers.
BGPsessionissourcedfromLoopback1interface.RouterR2Loopback1
interfacehasIPaddress10.0.0.33androuterR3Loopback1interfacehasIP
address10.0.0.17.BothroutersareintheBGPAS1.
R2(config)# router bgp 1
R2(config-router)# neighbor 10.0.0.17 remote-as 1
R2(config-router)# neighbor 10.0.0.17 update-source Loopback 1
R3(config)# router bgp 1
R3(config-router)# neighbor 10.0.0.33 remote-as 1
R3(config-router)# neighbor 10.0.0.33 update-source Loopback 1
Step13

OntheR4router,verifywhatBGPprefixesaresenttoexternalBGPpeerISP3B
(172.16.34.34).
R4# show ip bgp neighbors 172.16.34.34 advertised-routes
BGP table version is 9, local router ID is 10.0.0.49
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*>i 10.0.0.0/28 10.0.0.1 0 100 0 i
*>i 10.0.0.16/28 10.0.0.17 0 100 0 i
*>i 10.0.0.32/28 10.0.0.33 0 100 0 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
Total number of prefixes 4
YoucanseetherearenoprefixesfromAS100.
Step14
OntheR4router,verifywhyroutesfromAS100arenotsenttoexternalBGP
peerISP3B(172.16.34.34).
ExaminesingleBGProutefromAS100.
R4# show ip bgp 10.0.1.0/28
BGP routing table entry for 10.0.1.0/28, version 0
Paths: (1 available, no best path)
Not advertised to any peer
Refresh Epoch 2
100
172.16.11.11 (inaccessible) from 10.0.0.1 (10.0.0.1)
Origin IGP, metric 0, localpref 100, valid, internal
Theoutputshowsthatroute10.0.1.0/28hasinaccessiblenexthop
172.16.11.11.Thisinaccessibilityisareasonthattherouteisnotmarkedasa
goodrouteandisnotadvertisedtowardexternalBGPpeer.
R4# show ip route 172.16.11.11
% Subnet not in table
OntheR4router,thereisnoroutetothenexthop172.16.11.11intheIProuting
table.
Step15
OntheR1router,verifywhatisnexthopIPaddressoftheBGProute
10.0.1.0/28.
R1# show ip bgp 10.0.1.0/28
BGP routing table entry for 10.0.1.0/28, version 3
Paths: (1 available, best #1, table default)
Advertised to update-groups:
2
Refresh Epoch 1
100
172.16.11.11 from 172.16.11.11 (10.0.1.81)
Origin IGP, metric 0, localpref 100, valid, external, best
Outputshowsthatroute10.0.1.0/28hasvalidnexthop172.16.11.11.
TransitNetworkUsingExternalNextHops
AllBGP-speakingrouterswithintheASgetinformationaboutexternalnetworkswith
thenext-hopattribute.Thenext-hopattributeissettothefarendoftheEBGP
sessionsreachingtheborderroutersoftheAS.
All EBGP peers must be reachable by all BGP-speaking routers within the AS.

EBGP next hops shall be announced using the IGP.
Redistribute connected interfaces into the IGP at the edge routers.
Include links to EBGP neighbors into the IGP and configure them as passive
interfaces.
RoutersusearecursiveroutingmechanismwhentheydeterminehowtoforwardIP
packetstowardexternaldestinations.WhenBGProutesareusedintherouting
table,theroutercheckshowitwouldhavereachedthenext-hopaddress,andit
installstheBGProutewiththesameforwardingindicationasfortheroutethatis
usedtoreachthenext-hopIPaddress.
Togettherecursiveroutingtowork,theroutermustresolveallpossiblenext-hop
referencesthatuseinformationintheroutingtable,whichisalreadythere.TheIGP
thatisusedwithintheASmustcarrythisinformation.
OnewayofmakingtheIGPcarrytheinformationthatisnecessarytoresolvethe
BGPnext-hopaddressesistomakesurethatalltheborderrouters,whichcontain
theEBGPsessions,redistributeconnectedsubnetsintotheIGPusingthe
redistributeconnectedroutingprotocolconfigurationcommand.BecauseEBGP
sessionsareestablishedbetweenroutersusingadirectlyconnectedinterface,the
farendoftheEBGPsessionsisanIPaddresswithinthedirectlyconnectedsubnet.
ByredistributingtheconnectedinterfacesintotheIGP,theborderroutersallownext-
hopreferencestoberesolvablebyallrouterswithintheAS.
ExternalsubnetsthatareredistributedintotheIGPmightappearasexternalIGP
routes,dependingonwhatIGPisconfiguredwithintheAS.Thereareseveral
scalabilityissuesthatareassociatedwithexternalroutesinsomeroutingprotocols.
Forexample,OSPFcarrieseachexternalsubnetinaseparateLSAobject.Ifroute
redistributionisnotdesirableforanyreason,analternativemethodistoincludethe
subnetonwhichtheEBGPsessionisrunningintheIGPconfigurationusingthe
networkcommand.TopreventtheborderrouterfromexchangingIGProutingwith
theborderrouteroftheotherAS,youmustconfiguretheinterfaceasapassive
interface.Failuretodosocouldcausethetwoautonomoussystemstoexchange
routesusingtheIGP.Inthatcase,allbenefitsofhavingseparateautonomous
systemswouldbelost.
Step16
OntheR1router,redistributesubnetfromtheEthernet0/0,facingtotheISP1
router,intoOSPFroutingprotocol.
BetweenroutersintheAS1(R1,R2,R3,andR4)thereisOSPFwithprocess
ID1inthearea0preconfigured.
R1(config)# route-map toISP1 permit 10
R1(config-route-map)# match interface Ethernet 0/0
R1(config-route-map)# exit
R1(config)# router ospf 1
R1(config-router)# redistribute connected subnets route-map toISP1
Youneedtousesubnetskeyword,becausesubnetofthenetwork
172.16.0.0./16isusedbetweenR1andISP1routers.
Step17
OntheR4router,examineBGProute10.0.1.0/28fromAS100again.
R4# show ip bgp 10.0.1.0/28
BGP routing table entry for 10.0.1.0/28, version 10
Paths: (1 available, best #1, table default)
Advertised to update-groups:
1
Refresh Epoch 3
100
172.16.11.11 (metric 20) from 10.0.0.1 (10.0.0.1)
Origin IGP, metric 0, localpref 100, valid, internal, best
Outputshowsthatroute10.0.1.0/28hasvalidnexthop172.16.11.11andisselectedas
bestroute.

R4# show ip route 172.16.11.11
Routing entry for 172.16.11.0/24
Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 20
Last update from 192.168.34.3 on Ethernet0/2, 00:10:23 ago
Routing Descriptor Blocks:
192.168.34.3, from 10.0.0.1, 00:10:23 ago, via Ethernet0/2
Route metric is 20, traffic share count is 1
* 192.168.24.2, from 10.0.0.1, 00:10:23 ago, via Ethernet0/3
Route metric is 20, traffic share count is 1
OntheR4router,thereisalsoroutinginformationtoreachthenexthop172.16.11.11.
Step18
OntheR4router,verifywhatBGPprefixesaresenttoexternalBGPpeerISP3B
(172.16.34.34).
R4# show ip bgp neighbors 172.16.34.34 advertised-routes
BGP table version is 15, local router ID is 10.0.0.49
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*>i 10.0.0.0/28 10.0.0.1 0 100 0 i
*>i 10.0.0.16/28 10.0.0.17 0 100 0 i
*>i 10.0.0.32/28 10.0.0.33 0 100 0 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*>i 10.0.1.0/28 172.16.11.11 0 100 0 100 i
*>i 10.0.1.16/28 172.16.11.11 0 100 0 100 i
*>i 10.0.1.32/28 172.16.11.11 0 100 0 100 i
*>i 10.0.1.48/28 172.16.11.11 0 100 0 100 i
*>i 10.0.1.64/28 172.16.11.11 0 100 0 100 i
*>i 10.0.1.80/28 172.16.11.11 0 100 0 100 i
Total number of prefixes 10
YoucanseetherearealsoprefixesfromAS100advertisedtoexternalBGPpeerISP3B.
Step19
OntheISP3Brouter,verifywhatisnexthopIPaddressoftheBGProute
10.0.1.0/28.
ISP3B# show ip bgp 10.0.1.0/28
BGP routing table entry for 10.0.1.0/28, version 10
Paths: (1 available, best #1, table default)
Not advertised to any peer
Refresh Epoch 1
1 100
172.16.34.4 from 172.16.34.4 (10.0.0.49)
Origin IGP, localpref 100, valid, external, best
Outputshowsthatroute10.0.1.0/28hasdifferentnexthopIPaddress
(172.16.34.4),asseenontheR4router(172.16.11.11).WhenBGProuteissent
toexternalBGPpeer,thenext-hopIPaddresschanges.
TransitNetworkUsingEdgeRoutersasNextHops
AnIBGPpeerusuallydoesnotmodifythenext-hopattributewhentheBGPupdate
ispropagatedacrossIBGPsessions.However,youcouldconfiguretheBGProuter
tohaveadifferentbehaviorandsetitsIPaddressasthenext-hopaddresseven
whentheBGPupdatesaresentacrossIBGPsessions(emulatingbehavioron
EBGPsessions).IfyoudoconfigureanIBGProutertoemulatethebehaviorof
EBGPsessionsontheIBGPsessionsoftheborderrouters,theBGPupdatesthat
arereceivedontheEBGPsessionswillbeforwardedontheIBGPsessionsandthe
next-hopattributewillbesettotheIPaddressthatisusedonthelocalsideofthe
IBGPsession.Theoriginalnexthop,setbythefarendoftheEBGPsession,willbe
lost.
Alternate design: Next-hop processing is modified at the edge routers.

Edge routers announce themselves as the next hop in IBGP updates.
No redistribution of external subnets is necessary.
This design might result in suboptimal routing if multiple paths to a
neighboring AS exist.
Use default next-hop processing if at all possible.
ThereceiveroftheIBGPinformationwilldorecursiveroutinginthenormalway.But
thenext-hopaddressthatisusedwillbetheIPaddressofthefarendoftheIBGP
session,becausetheborderrouterhaschangedit.TheIPaddressofthefar-end
IBGPpeerisalwaysknownintheroutingtable;otherwise,theIBGPsessionwould
nothavebeenestablished.ThereisnoneedforthereceiveroftheIBGPinformation
tohaveknowledgeofhowtoreachthefarendoftheEBGPsession,becausethat
IPaddressisnolongersetasthenexthop.
ToconfiguretherouterasthenexthopforaBGP-speakingneighbor,usethe
neighbornext-hop-selfrouterconfigurationcommand.
Step20
OntheR1router,removethepreviouslyconfiguredredistribution.
R1(config)# router ospf 1
R1(config-router)# no redistribute connected
OntheR4router,theBGProute(10.0.1.0/28)nexthopIPaddress172.16.11.11
willagainbecomeinaccessible.
R4# show ip bgp 10.0.1.0/28
BGP routing table entry for 10.0.1.0/28, version 16
Paths: (1 available, no best path)
Not advertised to any peer
Refresh Epoch 3
100
172.16.11.11 (inaccessible) from 10.0.0.1 (10.0.0.1)
Origin IGP, metric 0, localpref 100, valid, internal
Step21
ConfigureR1routertobenexthopforallIBGPspeakingrouters.
TheIBGPspeakingroutersoftheR1routerareR2(10.0.0.33),R3(10.0.0.17),
andR4(10.0.0.49).
R1(config)# router bgp 1
R1(config-router)# neighbor 10.0.0.17 next-hop-self
R1(config-router)# neighbor 10.0.0.33 next-hop-self
R1(config-router)# neighbor 10.0.0.49 next-hop-self
Step22
OntheR4router,examineBGProute10.0.1.0/28fromAS100again.
R4# show ip bgp 10.0.1.0/28
BGP routing table entry for 10.0.1.0/28, version 22
Paths: (1 available, best #1, table default)
Advertised to update-groups:
1
Refresh Epoch 3
100
10.0.0.1 (metric 21) from 10.0.0.1 (10.0.0.1)
Origin IGP, metric 0, localpref 100, valid, internal, best
Outputshowsthatroute10.0.1.0/28hasvalidnexthop10.0.0.1andisselected
asbestroute.Nexthop10.0.0.1isR1Loopback1interface.
R4# show ip route 10.0.0.1
Routing entry for 10.0.0.1/32
Known via "ospf 1", distance 110, metric 21, type intra area
Last update from 192.168.34.3 on Ethernet0/2, 00:46:42 ago

Routing Descriptor Blocks:
192.168.34.3, from 10.0.0.1, 00:46:42 ago, via Ethernet0/2
Route metric is 21, traffic share count is 1
* 192.168.24.2, from 10.0.0.1, 00:46:42 ago, via Ethernet0/3
Route metric is 21, traffic share count is 1
OntheR4router,thereisroutinginformationtoreachthenexthop10.0.0.1.
Step23
OntheISP3Brouter,verifywhatisnexthopIPaddressoftheBGProute
10.0.1.0/28.
ISP3B# show ip bgp 10.0.1.0/28
BGP routing table entry for 10.0.1.0/28, version 22
Paths: (1 available, best #1, table default)
Not advertised to any peer
Refresh Epoch 1
1 100
172.16.34.4 from 172.16.34.4 (10.0.0.49)
Origin IGP, localpref 100, valid, external, best
Theoutputshowsthatroute10.0.1.0/28hasdifferentnexthopIPaddress
(172.16.34.4),asseenontheR4router(10.0.0.1).

Thenext-hopattributeisnormallynotchangedonIBGPupdates.Whentheborder
routerforwardstheincomingEBGPupdateoveranoutgoingIBGPsession,the
borderrouterchangesthenext-hopaddresstotheIPaddressthatisusedasthe
sourceaddressoftheIBGPsession.
ThereceiverofIBGPupdateswillseenext-hopinformationthatindicatesa
destination,whichmightnotbedirectlyconnected.Toresolvethisproblem,itwill
checkitsroutingtableandseeifandhowthenext-hopaddresscanbereached.
ThenitwillrouteIPpacketswithdestinationaddressesthatmatchthenetworkinthe
BGPupdateinthesamedirectionasitwouldhaveroutedanIPpacketwiththe
destinationaddressequaltotheIPaddressinthenext-hopattribute.Inthiscase,it
isobviousthatthenext-hopaddresscanbereached,becausetheIBGPsession
wouldnothavebeenestablishedotherwise.
Inthefigure,ISP1sendsaBGPupdateaboutnetworkX.Becauseitissendinga
BGPupdateoveranEBGPsessiontoR1,thenext-hopattributeissettotheIP
addressthatisusedattheISP1sideoftheEBGPsession,172.16.11.11.R1can
usethisinformationandroutepacketstonetworkXbyforwardingthemtoISP1.
R1alsoforwardstheBGPupdateonallitsIBGPsessions.Itchangesthenext-hop
attributetotheIPaddressofitsownloopbackinterface,soR2,R3,andR4willget
informationthattheycanreachnetworkXbyforwardingpacketsto10.0.0.1.Butthat
addressisnotdirectlyconnected.Therouterswillinspecttheroutingtabletoseeif
andhowtheycanreach10.0.0.1.TheycanthenroutepacketstonetworkXinthe
samedirectionthattheywouldusetoroutepacketsto10.0.0.1.
R4alsoforwardstheBGPupdateaboutnetworkXtoISP3B.Thissessionisan
EBGPsession,whichmeansthatR4willsetthenext-hopattributetoitsownIP
addressthatisusedonthatEBGPsession,172.16.34.4.
TransitNetworkUsingEdgeRoutersasNextHops
Example

BothEBGPandIBGPsessionsforwardBGPupdates;however,theydoitinslightly
differentways.
No BGP attributes are changed in IBGP updates.
Because of BGP split horizon, routes that are learned from an IBGP peer are not
advertised to other IBGP peers.
Local preference is propagated only over IBGP sessions.
EBGP peers are directly connected; IBGP peers are usually distant.
Route selection rules slightly prefer EBGP routes.
HerearethedifferencesbetweenEBGPandIBGPsessionsinforwardingBGP
updates:
TherouterdoesnotchangeBGPattributeswhenanupdateissentacrossan
IBGPsession,unlessnext-hop-selfisconfigured.WhenaBGP-speakingrouter
sendsanupdateacrossanEBGPsession,thenext-hopattributeisalwaysset
andtheASnumberoftherouterisprependedtotheAS-pathattribute.
IBGPusessplithorizontopreventroutinginformationloops.EBGPdoesnot
usesplithorizonandinsteadusestheASpathtodetectloops.Inbothcases,a
routerforwardsonlythebestrouteandneversendsaroutebackonthesession
fromwhichitwasreceived.ButIBGPsplit-horizonrulesalsoprohibitarouter
fromforwardinganyinformationthatisreceivedonanIBGPsessiontoanother
IBGPsession.
IBGPborderroutersremovethelocalpreferenceattributefromaBGProute
beforetheBGPupdateissentoveranEBGPsession.Thisdifferencemeans
thatthelocalpreferenceattributeisdistributedonIBGPsessionsonly.
TworouterswithanEBGPsessionbetweenthemnormallyestablishthesession
usingtheIPaddressesfromacommon,sharedsubnet.Usingtheshared
subnettoestablishthesessionguaranteesthatthetworouterscanexchangeIP
packetswithoutanyIGPrunningbetweenthem.Also,recursiveroutingwill
alwayssucceedbecausethenext-hopaddressisreachableusingadirectly
connectedroute.
IBGPsessionsarenormallyestablishedbetweenallroutersintheASinafull
mesh.ButallroutersinanASmightnothavephysicalconnectionstoevery
otherrouterwithintheAS.BecauseIBGPsessionsareestablishedbetween
routersusingIPaddressesofdifferentsubnets,anIGPmustberunningwithin
theASinordertoestablishIBGPsessions.
BGProuteselectionrulesslightlyfavorEBGProutesoverequivalentIBGP
routes.
DifferencesBetweenEBGPandIBGPSessionsExample
ThisexampleillustratesthepreferenceoftheEBGProute.
Whenever identical routes are received from IBGP and EBGP peers, the route
from the EBGP peer is preferred.
DifferencesBetweenEBGPandIBGPSessions

Oneofthedefaultgoalsoftransitpacketforwardingistopropagatethetransit
packettowardthedownstreamASassoonaspossible.Aborderrouterthatreceives
otherwiseequivalentroutestothesamedestinationoverbothanEBGPsessionand
anIBGPsessionwillprefertheinformationthatisreceivedthroughtheEBGP
session.
EquivalentroutesareroutesthathaveequalBGPpath
attributesusedintheBGProuteselectionrules(weight,
localpreference,AS-pathlength,origin,MED).
Inthefigure,theupperrouterinAS300receivesBGPupdatesaboutnetwork
10.0.0.0/24overtwodifferentpaths.OneupdateisreceivedovertheEBGPsession
toAS1.TheotherupdateisreceivedovertheIBGPsessiontothelowerrouterin
AS300.Allessentialattributesarethesame,sorouteselectioncannotbemade
easily.
TheupperrouterinAS300realizesthatIPpacketswithdestinationaddresses
withinnetwork10.0.0.0/24shouldsoonerratherthanlaterleaveAS300.Itisbetter
tomakethemleavetheASrightaway.Sotheupdatethatwasreceivedonthe
EBGPsessionispreferredovertheupdatethatwasreceivedontheIBGPsession.

TherequirementsthatareassociatedwithIBGP-basedtransitbackbonescanresult
inlimitedscalability.
Transit backbone requires IBGP full mesh between all core routers.
Large number of TCP sessions
Unnecessary, duplicate routing traffic
There are two scalability solutions:
Route reflectors
BGP confederations
IBGPsplit-horizonrulesmandateanIBGPconnectionbetweeneveryborderrouter
andeveryotherBGProuterinanAS.
ThegeneraldesignruleinIBGPdesignistohaveafullmeshofIBGPsessions.But,
afullmeshofIBGPsessionsamongnnumberofrouterswouldrequire(n*(n-1))/
2IBGPsessions.Forexample,afullmeshbetween10routerswouldrequire(10*
9)/2=45IBGPsessions.
BecauseeveryIBGPsessiononarouterusesaseparateTCPsession,anupdate
thatmustbesentbytheroutertoallIBGPpeersmustbesentoneachoftheTCP
sessions.Ifarouterisattachedtotherestofthenetworkoverjustasinglelink,this
singlelinkhastocarryallTCP/IPpacketsforallIBGPsessions.Thissituation
resultsinduplicationoftheupdateoverthesinglelink.
Twosolutionsareavailable:
TheroutereflectorsolutionmodifiestheIBGPsplit-horizonrulesandallowsa
particularroutertoforward(undercertainconditions)incomingIBGPupdatesto
aselectgroupofIBGPneighbors.Therouterperformingthisfunctionisthe
"routereflector."
TheBGPconfederationssolutionintroducestheconceptofanumberofsmaller
autonomoussystemswithintheoriginalAS.Thesesmallerautonomoussystems
exchangeBGPupdatesamongthemselvesusingintraconfederationEBGP
sessions.
ScalabilityLimitationsofIBGP-BasedTransitBackbones

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
All BGP routing updates carry the mandatory well-known attribute AS-path. The
AS-path attribute is not changed when the BGP prefix is propagated across
IBGP sessions.
The IBGP multipath load sharing feature enables the BGP speaking router to
select multiple IBGP paths as the best paths to a destination.
IBGP split horizon prevents routing information loops within the AS.
All BGP routers within an AS must have IBGP sessions with every other BGP
router in the AS.
For recursive routing to work, a router must resolve all possible next-hop
references that use information in the routing table.
You can configure an edge router to set its IP address as the next-hop address
even when the BGP updates are sent across IBGP sessions.
BGP attributes are not changed when an update is sent across an IBGP session
unless next-hop-self is configured.
The full-mesh IBGP requirement in the transit AS creates scalability issues in
the number of TCP sessions and unnecessary, duplicate routing traffic. IBGP
scalability solutions to these issues exist.
Summary

Overview
AtransitASrequiresinteractionbetweenEBGPandIBGPandbetweenIBGPand
anIGPinthetransitAS.Thislessondescribespacketforwardingthroughatransit
ASanddiscussestherequirementsforsuccessfulpacketforwarding,suchas
recursiveroutelookupandanIGPinthetransitAS.Thislessonconcludeswitha
discussionoftheinteractionbetweenIBGPandanIGPrunningwithinthetransitAS.
Uponcompletingthislesson,youwillbeableto:
DescribepacketforwardinginatransitAS
ExplainhowrecursivelookupfunctionsinCiscoIOSsoftware
ExplaintheneedforanIGPinatransitbackbonethatisrunningBGPonall
routers
DescribeinteractionsbetweenBGPandIGPinatransitAS
DescribehowtochangeBGPadministrativedistances
ExplainthepotentialproblemsthatmightarisefromBGPandIGPinteraction
ForwardingPacketsinTransitAS

WhenBGPupdateshavepropagatedthroughthetransitAStoallneighboring
autonomoussystems,theIPtrafficcanstarttoflow.
All core routers need external routers for proper packet forwarding.
Redistributing can overload IGP resources.
IBGP is preferred for scalability.
Inthefigure,ISP3BrouterforwardstoR4IPpacketswiththedestinationaddress
matchinganetworkinAS100.R4checksitsroutingtableandfindsthatthereisa
BGProuteforthatdestination.TheBGProutehasanext-hopreference,which
pointstothefarendoftheEBGPsessionbetweenISP1andR1.SoR4onceagain
checkstheroutingtableandfindsthatitshouldforwardthepackettoR2inthis
case.
Thus,R2receivestheIPpacketwithadestinationaddressindicatingahostwithin
AS100.Tobeabletoforwardthispacket,R2musthaveamatchingrouteinits
routingtable.Adefaultrouteorgatewayoflastresortisnotappropriatebecausein
thenextinstantR2couldreceiveanotherpacket,comingfromtheotherdirection
anddestinedforAS300.
TheconclusionisthatbothR2andR3,tohandleallpossiblecases,musthave
routinginformationtoalltheexternalnetworksthatR1andR4have.Theonly
scalablewayofprovidingrouterswiththisinformationistoupdateR2andR3with
IBGPfrombothR1andR4.
Intheory,theexternalinformationthatR1andR4receivecouldberedistributedby
theseingressroutersintotheIGPinusewithinthetransitAS.However,noIGPcan
handlethevolumeofinformationthatBGPcan.Sotherewouldalwaysbeariskthat
theIGPwouldbreakbecauseofinformationoverload,causingatotalnetwork
meltdownintheAS.ThevolumeofroutinginformationthattheBGPcarriesinthe
contemporaryInternetlongagopassedthelimitsofwhatitispossibletocarryinany
IGP.
Routes that are learned via BGP do not have an outgoing interface associated
with them in the routing table.
Recursive lookup is performed to forward IP packets toward external
destinations.
R2# show ip route 10.0.1.0 255.255.255.240
Routing entry for 10.0.1.0/28
Known via "bgp 1", distance 200, metric 0
Tag 100, type internal
Last update from 10.0.0.1 16:37:59 ago
Routing Descriptor Blocks:
* 10.0.0.1, from 10.0.0.1, 16:37:59 ago
Route metric is 0, traffic share count is 1
AS Hops 1
Route tag 100
MPLS label: none
Observe that the route that is known via BGP has no outgoing interface, but it
has a BGP next hop.
R2# show ip route 10.0.0.1
Routing entry for 10.0.0.1/32
Known via "ospf 1", distance 110, metric 11, type intra area
Last update from 192.168.12.1 on Ethernet0/2, 17:23:10 ago
PacketForwardinginTransitAS

Routing Descriptor Blocks:
* 192.168.12.1, from 10.0.0.1, 17:23:10 ago, via Ethernet0/2
Route metric is 11, traffic share count is 1
The route toward BGP next hop is known via OSPF and has an outgoing
interface.
ABGProuteisinstalledintheIProutingtableofarouteronlyiftheIPaddressinthe
next-hopattributeisreachableaccordingtotheinformationalreadyintherouting
table.TheinstalledBGProutecontainsareferencetothatnext-hopaddress.So,the
networkwillbereachableviaanIPaddress,whichmayormaynotbedirectly
connected.Becausethereisnoclearreferencetoaphysicalinterface,theBGP
routeisinstalledintheIProutingtablewithoutanyinformationaboutoutgoing
interface.
TheroutermustevaluatetherecursivereferencetotheBGPnexthopsooneror
laterinordertoallowpacketforwardingtowardexternaldestinations.Thepointin
timewhentherecursivereferenceisresolveddependsontheIPswitching
mechanismthattherouteruses.Atthelatest,therouterperformstherecursiveroute
lookupwhenanIPpacketwithadestinationaddressthatmatchestheBGProute
shouldbeforwarded.Therouterdetermineswhichoutgoinginterfaceshouldbe
usedandwhichLayer2addresstoassign(ifapplicable).Theroutercreatesacache
entrysothatsuccessiveIPpacketstothesamedestinationcanberoutedusingthe
sameoutgoinginterfaceandLayer2address.

RecursivelookupreferstotheBGProutesforwhichanotherroutinglookupis
requiredinordertoresolvetheBGProutenexthop.
Entries in routing table are built from BGP table.
Outgoing interface is never associated with a BGP route.
ARP cache lookup is performed to build Layer 2 header.
ThefigurepresentsthestepsintherecursivelookupprocessinCiscoIOSsoftware.
TherouterhasreceivedaBGPupdateaboutnetwork10.0.1.0/28.Itwasassociated
withanAS-pathattributesetto100,anext-hopattributesettotheIPaddress
10.0.0.1.Someotherattributeswerealsocarriedwiththeupdate.
Becausethenext-hopaddress10.0.0.1isreachableaccordingtotheroutingtable,
theBGProuteisalsoinstalledintheroutingtable.Networknumber,subnetmask,
andnext-hopattributesareinheritedfromtheBGPtable.Nooutgoinginterfaceis
assigned.
WhenanIPpacketwithadestinationinnetwork10.0.1.0/28isreceived,therouter
searchestheroutingtableandfindstheinstalledBGProute.Theroutertakesthe
indicatednext-hopaddress10.0.0.1andsearchestheroutingtableagain.Itnow
findsamatchwiththeOSPFroutetosubnet10.0.0.0/24.The10.0.0.0/24routehas
anoutgoinginterfacesettointerfaceEthernet0/2andanexthopsetto
192.168.12.1.So,thepacketsthataredestinedfornetwork10.0.1.0/28shouldbe
forwardedvia192.168.12.1,whichisdirectlyreachableoverEthernet0/2.TheARP
tableisusedtofindtheMACaddressforIPaddress192.168.12.1.TheMAC
addressisusedtoforwardtheIPpackettonetwork10.0.1.0/28outtheEthernet0/2
interface.TheMACheaderisstoredinthecacheforsuccessivepacketstonetwork
10.0.1.0/28.
Theexampleillustratestherecursivelookupperformed
whentherouterusescache-basedIPswitching
mechanisms(forexample,fastswitchingoroptimum
switching).
Traditional Cisco IOS software switching mechanisms perform recursive lookup
when forwarding the first packet.
Fast switching, optimum switching.
CEF precomputes the routing table.
All recursive lookups are performed while the routing table is built.
TraditionalCiscoIOSswitchingmechanismsusedthetraffic-driven,cache-based
switchingapproach.BothfastswitchingandoptimumswitchingpopulatetheIP
switchingcacheondemand,meaningthatbeforeanyIPpacketsareforwarded,the
cacheisempty.Afterthefirstpackettoaspecificdestinationarrives,allroutingtable
lookupsaredone,includingrecursivelookupinthecaseofaBGProute.Theresult
ofthelookupiscachedforlaterusewhensuccessivepacketsforthesame
destinationarrive.Theprocessisrepeatedforeveryspecificdestination.
CiscoExpressForwarding(CEF)prebuildsacompleteIPforwardingtable,called
theFIB,thatisbasedontheIProutingtable.Aftertherouterinstallsaroutingentry
intoitsroutingtable,incomingroutinginformationupdatestriggertherecursive
lookup.Withtherecursivelookup,theoutgoinginterfaceandtheactualphysicalnext
hopoftheroutearedetermined.MACaddressresolutionandMACheader
RecursiveLookupinCiscoIOSSoftware
generationarestilltraffic-drivenandstoredinthecache.

Somenetworkdesignersbasetheirnetworkdesignonthewrongassumptionthatan
internalroutingprotocolisnotneededinatransitASwhereallroutersrunBGP.
However,theinternalroutingprotocolisstillneededinsideanASfortworeasons:
ToprovideroutinginformationthatisneededtoestablishtheIBGPsessions.
Toresolvenext-hopreferences(recursiverouting).
With BGP running on all core routers, is an IGP still needed in the core? An IGP is
needed to resolve BGP next hops and perform fast convergence after a failure in the
core network.
WhenR4inthefigurereceivesanIPpacketwiththedestinationinAS100,itdoesa
recursivelookuptofindtheoutgoinginterfacetobeusedforpacketforwarding.It
performstherecursivelookupthatisbasedontheIGPinformation.Ifthereis
suddenlyaninternalproblemwithinAS1,andthenext-hopaddressisreachablea
differentway,theIGPdeterminesthisfact.TherouterchangestheIGProutetothe
next-hopnetworkbecauseofthenewlyreceivedIGProuteinformation,andall
cacheentriesthatrelyontheoldinformationareinvalidated.Thenextrecursive
lookupthatR4performswillindicateadifferentoutgoinginterfacethanbeforethe
problemoccurred.
DuringtheIGPconvergenceprocess,theBGProutingisnotaffected.Theonly
routingupdatesthatareexchangedduringthetransitASconvergenceareIGP
updatesdescribinghowtoreachinternaldestinations(includingthefarendsofthe
EBGPsessions).
Thepacketforwardingtoexternaldestinationsthusbenefitsfromthehigh-speed
convergencethattheIGPoffers.ThefastertheIGPdeterminesthatitshouldusean
alternatepathwithintheAStoreachthenext-hopaddress,thefasteritwillre-
establishIPconnectivitytowardexternaldestinations.
TheconclusionisthatanIGPisstillneededinsideatransitAS,andthenetworkwill
workbetterifitisanIGPwithfastconvergence.
Core routers need to run BGP and an IGP.
BGP carries all external routes.
The IGP propagates BGP next hops and other core subnets only.
All customer routes are also carried in BGP.
Reduces IGP topology database.
Removes customer-caused route flaps from IGP; IGP becomes more stable.
BothBGPandtheconfiguredIGPshouldbeconfiguredonallcoreroutersinsidethe
transitAS.TheIGPshouldcarryaslittleinformationaspossible.Ideally,this
informationincludesonlythelinkswithinthecorenetwork,theloopbackinterfaces,
andtheexternalsubnetsthatareusedinEBGPsessionswiththeneighboring
autonomoussystems.ThisinformationisenoughtoestablishIBGPsessionsand
resolvenext-hopaddresses.TheIGPwillalsoworkbetterifitcarrieslessrouting
information.
NoroutesexternaltothetransitASshouldeverberedistributedbyanyrouterfrom
BGPintotheIGP.AllexternalroutesshouldbeinBGPonly.
Inautonomoussystemsthatprovidecustomerconnectivity(notonlytransitservice),
itisalsohighlyrecommendedthatthecustomernetworksbecarriedinBGP.This
RoutingProtocolsinTransitAS
approachreducestheamountofinformationintheIGPandincreasesIGPstability.

Ideally,BGPandtheIGPcarrytwodifferentsetsofroutinginformation.BGPcarries
theroutesthatarereceivedfromotherautonomoussystemsandtheroutesthat
belongtothelocalASandshouldbeannouncedtootherautonomoussystems.The
IGPcarriesonlyenoughinformationtoestablishIBGPsessionsandresolvethe
EBGPnext-hopaddressesviatheIGProutingtables.
Ideally, there will be no interaction between BGP and the IGP.
BGP carries external and customer routes.
The IGP carries only core subnets.
External route flaps do not affect IGP.
Failures internal to the network do not affect BGP as long as the BGP next hop
remains reachable.
The only link between BGP and the IGP should be the recursive lookup.
TheIGPwillprovidereachabilitytowardtheBGPnext-hopaddressesonlyifitisnot
disturbedbyexternalupdatesfromotherautonomoussystems.
BGPshouldtakecareoftheexternalinformation.AslongastheIGPfindsausable
waytotheBGPnexthops,theBGPdoesnotneedtodoanyrecalculationbecause
ofinternalproblemswithintheAS.
Sometimes, BGP and the IGP will propagate the same route.
Usually stems from bad network design.
In this case, routes are determined in EBGP/IGP/IBGP order based on
administrative distances of the routes.
Routing Protocol Default Administrative Distance
RoutingProtocol DefaultAdministrativeDistance
EBGP 20
IGP 90—170
IBGP 200
SometimestheinteractionbetweenBGPandtheIGPisnotideal,foranumberof
reasons,includingbadnetworkdesign.Intheworstcase,thesamenetworksmight
becarriedinboththeIGPandBGP.Forexample,thesubnetsconnectingtheAS
withneighboringautonomoussystemshavetobeannouncedviatheIGPtoenable
next-hopresolution.ThesesubnetsmayalsobeannouncedviaBGPbytheremote
ASorthelocalAS.Inanycase,informationaboutthesameIPprefixwillappearin
boththeIGPandtheBGPdatastructures.
Whentherouterinstallsroutinginformationintotheroutingtable,itcheckstosee
whetherthereareseveralsourcesofinformationforaparticularIPprefix.Ifso,the
routerinstallstheinformationthatitdeterminesismostreliable.TheADdetermines
whichsourcetouse.
BGPconsidersbothEBGPandIBGProutesintheBGPselectionprocess.BGPwill
thereforenevertrytoinstallbothanEBGProuteandanIBGProuteforthesame
destination.ComparisonbetweenADswillthusoccuronlywhentwodifferent
protocolscarrythesamedestinationnetwork.
IfBGPselectsanEBGProuteasthebestrouteforagivendestinationnetwork,it
willtrytoinstallthatroutewithaverylowAD.So,theroutesthatarelearnedvia
EBGPhaveahighlikelihoodofbeinginstalledintheroutingtable.
IfBGPselectsanIBGProuteasthebest,itwilltrytoinstallitwithahighAD.Thus,
theroutesthatarelearnedviaIBGPhavealowlikelihoodofbeinginstalledinthe
routingtable.
AllIGPs,suchasEIGRP,OSPF,IS-IS,andsoon,haveamediumlikelihoodof
beinginstalled.TheADsforIGPsfallbetweentheADsofEBGPandIBGP.
ThereasonforgivingEBGPalowdefaultADisbecause
EBGPindicatesroutesexternaltothelocalAS.IPpackets
withdestinationaddressestothosenetworksshouldleave
theASsoonerratherthanlater.Itis,inmostcases,better
thattheyleavetheASrightaway.
BGPandIGPInteraction

Overview
Throughthisdiscovery,youwilllearnhowtochangeBGPadministrativedistances.
Discovery6:BGPAdministrativeDistance

Topology

Ifyoushutdownaninterfaceonarealrouterorswitch,the
connecteddevicewillseeitas"down/down."Dueto
virtualizationspecifics,IOLbehaviorisslightlydifferent.If
youshutdownaninterfaceonarouterorswitch,the
connecteddevicewillseeitas"up/up."InIOL,thestatus
ofaninterfacecanonlybe"up/up"or"administratively
down/down."
DeviceInformation
Device Interface IPaddress Description
ISP1 Ethernet0/0 172.16.11.11/24 ConnectiontoR1
ISP1 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
10.0.1.1/28
10.0.1.17/28
10.0.1.33/28
10.0.1.49/28
10.0.1.65/28
10.0.1.81/28
Loopbackssimulate
LANnetworks
R1 Ethernet0/0 172.16.11.1/24 ConnectiontoISP1
R1 Ethernet0/2 192.168.12.1/24 ConnectiontoR2
R1 Ethernet0/3 192.168.13.1/24 ConnectiontoR3
R1 Loopback1 10.0.0.1/28 Loopbacksimulates
LANnetwork
R2 Ethernet0/2 192.168.12.2/24 ConnectiontoR1
R2 Ethernet0/3 192.168.24.2/24 ConnectiontoR4
R2 Loopback1 10.0.0.33/28 Loopbacksimulates
LANnetwork
R3 Ethernet0/2 192.168.34.3/24 ConnectiontoR4
R3 Ethernet0/3 192.168.13.3/24 ConnectiontoR1
R3 Loopback1 10.0.0.17/28 Loopbacksimulates
LANnetwork
R4 Ethernet0/0 172.16.34.4/24 ConnectiontoISP3B
R4 Ethernet0/2 192.168.34.4/24 ConnectiontoR3
R4 Ethernet0/3 192.168.24.4/24 ConnectiontoR2
R4 Loopback1 10.0.0.49/28 Loopbacksimulates
LANnetwork
ISP3B Ethernet0/0 172.16.34.34/24 ConnectiontoR4
ISP3B Loopback1
Loopback2
Loopback3
Loopback4
10.0.3.1/28
10.0.3.17/28
10.0.3.33/28
10.0.3.49/28
Loopbackssimulate
LANnetworks
IPaddressesandIGParepreconfiguredasshowninthetopologybelow:
JobAids
BGPisalsoconfiguredasEBGP(ISP1toR1andISP3BtoR4)andasIBGP(full
meshbetweenR1,R2,R3,andR4).

Step1
OntheR1router,verifywhatareBGPadministrativedistances.
R1# show ip protocols
*** IP Routing is NSF aware ***
Routing Protocol is "bgp 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
IGP synchronization is disabled
Automatic route summarization is disabled
Neighbor(s):
Address FiltIn FiltOut DistIn DistOut Weight RouteMap
10.0.0.17
10.0.0.33
10.0.0.49
172.16.11.11
Maximum path: 1
Routing Information Sources:
Gateway Distance Last Update
10.0.0.17 200 00:04:14
10.0.0.33 200 00:04:33
10.0.0.49 200 00:04:09
172.16.11.11 20 00:04:33
Distance: external 20 internal 200 local 200
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 10.0.0.1
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
10.0.0.0 0.0.0.255 area 0
192.168.0.0 0.0.255.255 area 0
Routing Information Sources:
Gateway Distance Last Update
10.0.0.17 110 00:09:56
10.0.0.33 110 00:10:11
10.0.0.49 110 00:09:32
Distance: (default is 110)
TheBGPexternalADis20,internalandlocalADare200.Youcanalsolearn
OSPFADvalue.
ChangingAdministrativeDistanceofBGPRoutes
YoucanchangeBGPadministrativedistances,toallowtheuseofBGProute,that
couldbeabetterroutetoanode.
router(config-router)# distance bgp external-distance internal-
distance local-distance
This command sets the AD for EBGP, IBGP, and local routes.
This change applies only to routes received after the command has been
entered (similar to filters).
Defaults: EBGP routes have a distance of 20; IBGP and local routes have a
distance of 200.
The defaults are usually correct; do not change them.
Step2
OntheR1router,changeEBGPADinto100andIBGPADinto190.
LeavedefaultBGPlocalAD.
R1(config)# router bgp 1
R1(config-router)# distance bgp 100 190 200
Step3
BGPAdministrativeDistance
DiscoverySteps

OntheR1router,verifywhatareBGPadministrativedistancesagain.
R1# show ip protocols
*** IP Routing is NSF aware ***
Routing Protocol is "bgp 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
IGP synchronization is disabled
Automatic route summarization is disabled
Neighbor(s):
Address FiltIn FiltOut DistIn DistOut Weight RouteMap
10.0.0.17
10.0.0.33
10.0.0.49
172.16.11.11
Maximum path: 1
Routing Information Sources:
Gateway Distance Last Update
10.0.0.17 200 00:19:41
10.0.0.33 200 00:20:00
10.0.0.49 200 00:19:35
172.16.11.11 20 00:19:59
Distance: external 100 internal 190 local 200
<... output omitted ...>
TheBGPEBGPandIBGPADschanged.
Step4
OntheR1router,verifyIProutingtable.
R1# show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-
IS level-2
ia - IS-IS inter area, * - candidate default, U - per-
user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 18 subnets, 2 masks
C 10.0.0.0/28 is directly connected, Loopback1
L 10.0.0.1/32 is directly connected, Loopback1
B 10.0.0.16/28 [200/0] via 10.0.0.17, 01:21:20
O 10.0.0.17/32 [110/11] via 192.168.13.3, 01:22:35, Ethernet0/3
B 10.0.0.32/28 [200/0] via 10.0.0.33, 01:21:39
O 10.0.0.33/32 [110/11] via 192.168.12.2, 01:22:50, Ethernet0/2
B 10.0.0.48/28 [200/0] via 10.0.0.49, 01:21:14
O 10.0.0.49/32 [110/21] via 192.168.13.3, 01:22:11, Ethernet0/3
[110/21] via 192.168.12.2, 01:22:11, Ethernet0/2
B 10.0.1.0/28 [20/0] via 172.16.11.11, 01:21:39
B 10.0.1.16/28 [20/0] via 172.16.11.11, 01:21:39
B 10.0.1.32/28 [20/0] via 172.16.11.11, 01:21:39
B 10.0.1.48/28 [20/0] via 172.16.11.11, 01:21:39
B 10.0.1.64/28 [20/0] via 172.16.11.11, 01:21:39
B 10.0.1.80/28 [20/0] via 172.16.11.11, 01:21:39
B 10.0.3.0/28 [200/0] via 10.0.0.49, 01:21:14
B 10.0.3.16/28 [200/0] via 10.0.0.49, 01:21:14
B 10.0.3.32/28 [200/0] via 10.0.0.49, 01:21:14
B 10.0.3.48/28 [200/0] via 10.0.0.49, 01:21:14
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.11.0/24 is directly connected, Ethernet0/0
L 172.16.11.1/32 is directly connected, Ethernet0/0
192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.12.0/24 is directly connected, Ethernet0/2
L 192.168.12.1/32 is directly connected, Ethernet0/2
192.168.13.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.13.0/24 is directly connected, Ethernet0/3
L 192.168.13.1/32 is directly connected, Ethernet0/3
O 192.168.24.0/24 [110/20] via 192.168.12.2, 01:22:21, Ethernet0/2
O 192.168.34.0/24 [110/20] via 192.168.13.3, 01:22:21, Ethernet0/3

YoucanstillseeBGProutesareusingdefaultADvalues.
Step5
OntheR1router,clearBGPsessions.
R1# clear ip bgp *
R1#
%BGP-5-ADJCHANGE: neighbor 10.0.0.17 Down User reset
%BGP_SESSION-5-
ADJCHANGE: neighbor 10.0.0.17 IPv4 Unicast topology base removed from session User reset
%BGP-5-ADJCHANGE: neighbor 10.0.0.33 Down User reset
%BGP_SESSION-5-
ADJCHANGE: neighbor 10.0.0.33 IPv4 Unicast topology base removed from session User reset
%BGP-5-ADJCHANGE: neighbor 10.0.0.49 Down User reset
%BGP_SESSION-5-
ADJCHANGE: neighbor 10.0.0.49 IPv4 Unicast topology base removed from session User reset
%BGP-5-ADJCHANGE: neighbor 172.16.11.11 Down User reset
%BGP_SESSION-5-
ADJCHANGE: neighbor 172.16.11.11 IPv4 Unicast topology base removed from session User reset
%BGP-5-ADJCHANGE: neighbor 10.0.0.33 Up
%BGP-5-ADJCHANGE: neighbor 10.0.0.17 Up
%BGP-5-ADJCHANGE: neighbor 172.16.11.11 Up
%BGP-5-ADJCHANGE: neighbor 10.0.0.49 Up
AfterallBGPneighborswillcome"Up,"proceedtothenextstep.
Step6
OntheR1router,verifyIProutingtableagain.
R1# show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-
IS level-2
ia - IS-IS inter area, * - candidate default, U - per-
user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 18 subnets, 2 masks
C 10.0.0.0/28 is directly connected, Loopback1
L 10.0.0.1/32 is directly connected, Loopback1
B 10.0.0.16/28 [190/0] via 10.0.0.17, 00:01:28
O 10.0.0.17/32 [110/11] via 192.168.13.3, 01:29:04, Ethernet0/3
B 10.0.0.32/28 [190/0] via 10.0.0.33, 00:01:28
O 10.0.0.33/32 [110/11] via 192.168.12.2, 01:29:19, Ethernet0/2
B 10.0.0.48/28 [190/0] via 10.0.0.49, 00:01:28
O 10.0.0.49/32 [110/21] via 192.168.13.3, 01:28:40, Ethernet0/3
[110/21] via 192.168.12.2, 01:28:40, Ethernet0/2
B 10.0.1.0/28 [100/0] via 172.16.11.11, 00:01:28
B 10.0.1.16/28 [100/0] via 172.16.11.11, 00:01:28
B 10.0.1.32/28 [100/0] via 172.16.11.11, 00:01:28
B 10.0.1.48/28 [100/0] via 172.16.11.11, 00:01:28
B 10.0.1.64/28 [100/0] via 172.16.11.11, 00:01:28
B 10.0.1.80/28 [100/0] via 172.16.11.11, 00:01:28
B 10.0.3.0/28 [190/0] via 10.0.0.49, 00:01:28
B 10.0.3.16/28 [190/0] via 10.0.0.49, 00:01:28
B 10.0.3.32/28 [190/0] via 10.0.0.49, 00:01:28
B 10.0.3.48/28 [190/0] via 10.0.0.49, 00:01:28
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.11.0/24 is directly connected, Ethernet0/0
L 172.16.11.1/32 is directly connected, Ethernet0/0
192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.12.0/24 is directly connected, Ethernet0/2
L 192.168.12.1/32 is directly connected, Ethernet0/2
192.168.13.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.13.0/24 is directly connected, Ethernet0/3
L 192.168.13.1/32 is directly connected, Ethernet0/3
O 192.168.24.0/24 [110/20] via 192.168.12.2, 01:28:50, Ethernet0/2
O 192.168.34.0/24 [110/20] via 192.168.13.3, 01:28:50, Ethernet0/3
Now,youcanseethatBGProutesADvalueshavechangedperconfiguration.

ThereareseveralpotentialproblemsthatmightarisefromBGPandIGPinteraction.
If an IGP route is learned through EBGP, the EBGP route will take precedence.
Potential causes include bad network design, routing problems, or denial-of-
service attack.
Protect IGP routes with inbound prefix-list filters at AS edges.
Routers should never accept information about local subnets from an external
source.
IfroutinginformationaboutthesameIPprefixislearnedviabothEBGPandanIGP,
therouterwillusetheEBGPinformation.IfanexternalASisfeedingthelocalAS
withEBGProutesthatactuallyshouldbelocal,routerswithintheASwillerroneously
forwardIPpacketsthataredestinedtothoselocalnetworksoutofthelocalAS.
Thereareseveralpotentialreasonsforthisbehavior;themostcommonisthatthe
remoteASisimproperlyconfiguredorthereisaDoSattack.ToprotectalocalAS
fromthisundesiredbehavior,networkadministratorsshouldinstallinboundfilterson
allEBGPsessionstofilterincomingroutesandrejectroutinginformationabout
networksthatareactuallylocaltotheAS.
ProblemswithBGPandIGPInteraction

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
All core routers need external routers for proper packet forwarding.
A recursive lookup is performed in BGP to resolve the forwarding path reference
of the next-hop attribute.
Packet forwarding to external destinations benefits from the high-speed
convergence that IGP offers.
The IGP should provide reachability toward BGP next-hop addresses only.
IP packets could be erroneously forwarded out of the local AS if an external AS
accidentally (or by intent: DoS) feeds the local AS with EBGP routes that should
be local.
Summary

Overview
IntroductionofatransitbackboneintoaBGPnetworkcancreateunique
troubleshootingchallenges.ThislessonintroducesIBGPmonitoringcommandsand
troubleshootingtechniquesforsolvingthemostcommonIBGPproblemsthatyou
mightencounterinatransitbackbone.CommonproblemswithIBGP,asdiscussed
inthislesson,occurwhenIBGPsessionsdonotreachtheEstablishedstate,when
routinginformationthatisreceivedviaIBGPisneverselected,andwhenthebest
BGProuteisneverinstalledintheroutingtable.
Uponcompletingthislesson,youwillbeableto:
IdentifytheCiscoIOScommandsthatarerequiredtomonitorIBGPoperation
DescribecommonIBGPconfigurationproblems
ExplainhowtotroubleshootIBGPsessionstartupissues
ExplainhowtotroubleshootIBGProuteselectionissues
ExplainhowtotroubleshootIBGPsynchronizationissues
MonitoringandTroubleshootingIBGPin
TransitAS

TodisplayinformationabouttheTCPandBGPconnectionstoneighbors,usethe
showipbgpneighborsEXECcommand.TodisplayentriesintheBGProuting
table,usetheshowipbgpEXECcommand.
router> show ip bgp neighbors
Displays whether a neighbor is an IBGP neighbor
router> show ip bgp
Uses a special marker (i) for IBGP routes
router> show ip bgp prefix
Displays whether the prefix is an IBGP route
MonitoringIBGPExample
ThisexampleshowsthecommandstomonitorIBGP.
R1# show ip bgp neighbors 10.0.0.49
BGP neighbor is 10.0.0.49, remote AS 1, internal link
BGP version 4, remote router ID 10.0.0.49
BGP state = Established, up for 00:47:57
Last read 00:00:00, last write 00:00:37, hold time is 180, keepalive int
erval is 60 seconds
Neighbor sessions:
1 active, is not multisession capable (disabled)
<... output omitted ...>
Internal BGP neighbor
R1# show ip bgp neighbors 172.16.11.11
BGP neighbor is 172.16.11.11, remote AS 100, external link
BGP version 4, remote router ID 10.0.1.81
BGP state = Established, up for 00:49:24
Last read 00:00:37, last write 00:00:51, hold time is 180, keepalive int
erval is 60 seconds
Neighbor sessions:
1 active, is not multisession capable (disabled)
<... output omitted ...>
External BGP neighbor
Theshowipbgpneighborscommanddisplayswhetherarouterisrunningan
IBGP(internal)orEBGP(external)sessionwithaBGPneighbor.The"internallink"
or"externallink"phrasesprovideyouwiththisinformation.
R1# show ip bgp 10.0.3.0
BGP routing table entry for 10.0.3.0/28, version 12
Paths: (1 available, best #1, table default)
Advertised to update-groups:
2
Refresh Epoch 1
300
10.0.0.49 (metric 21) from 10.0.0.49 (10.0.0.49)
Origin IGP, metric 0, localpref 100, valid, internal, best
Route that is received from internal BGP neighbor.
R1# show ip bgp 10.0.1.0
BGP routing table entry for 10.0.1.0/28, version 4
Paths: (1 available, best #1, table default)
Advertised to update-groups:
1
Refresh Epoch 1
100
172.16.11.11 from 172.16.11.11 (10.0.1.81)
Origin IGP, metric 0, localpref 100, valid, external, best
Route that is received from external BGP neighbor.
MonitoringIBGP
TheshowipbgpprefixcommanddisplayswhetheraBGProutewasreceivedfrom
anIBGP(internal)orEBGP(external)neighbor.Theword"internal"or"external"
providesyouwiththisinformation.

TroubleshootingtheBGPconfigurationofatransitAScanbecumbersome,because
thereareanumberofcommonpitfallsthatyoumightencounter.
Three of the most common problems are the following:
IBGP sessions do not start (do not reach the Established state).
IBGP route is in the BGP table but is not selected.
IBGP route is selected but is not entered in the routing table.
CommonIBGPProblems

ThereareseveralapproachestoIBGPsessionstartupissuestroubleshooting.
Symptom:
IBGP session does not start.
Diagnosis:
IBGP session is run between loopbacks, and update-source keyword is
missing.
Verification:
Use debug ip tcp transactions. You should see BGP sessions coming from
unexpected IP addresses.
AcommonmistakewhenyouareconfiguringIBGPsessionsistoforgetthe
neighborupdate-sourceconfigurationcommand.
WhenyouareconfiguringIBGPneighborsontherouter,itiseasytorememberto
makeacorrectreferencetotheloopbackinterfaceoftheremoterouter.Butitis
equallyimportanttomakesurethatthecorrectsourceIPaddressoftheoutgoing
TCPsessionisset.Thepeerrouterwillnotacceptthesessioniftheincoming
sourceaddressdoesnotmatchthepeerrouterlistofIBGPneighbors.
Toverifythatthisissueiscausingtheproblem,usethedebugiptcptransactions
command.Theoutputofthedebugiptcptransactionscommandshoulddisplay
TCPSYNpacketscomingfromunexpectedIPaddressesonthereceivingrouter
andTCPsessionsbeingresetwithTCPRSTpacketsonthesending
(misconfigured)router.
Symptom:
IBGP session does not start.
Diagnosis:
Loopback interfaces are not reachable.
Verification:
Do extended ping between loopback addresses to verify reachability.
AnIBGPsessionbetweentworouterscanbeestablishedfromtheloopback
interfaceofoneroutertotheloopbackinterfaceoftheotherrouteronlyifthetwo
routerscanexchangeIPpacketsusingthoseaddressesassourceanddestination.
ThisexchangeispossibleonlyiftheIGPcarriesthesubnetsthatareassignedto
eachoftheloopbackinterfaces.
Whenyouareverifyingreachabilitywiththepingcommand,makesurethattheping
packetsaresourcedfromtheloopbackinterface.Useanextendedpingand
explicitlyrefertotheIPaddressoftheloopbackinterfacetoensurethatpacketsare
sourcedfromtheloopbackinterface.
Symptom:
IBGP session does not start.
Diagnosis:
Packet filters prevent establishment of BGP sessions.
Verification:
Use debug ip tcp transactions and debug ip icmp to see whether the initial
TCP SYN packets are rejected.
PacketfilterscanstoptheBGPsessions.ThepathbetweenthetwoBGPpeer
routersmustbefreefromfiltersblockingtheBGPtraffic.
BGPrunsonthewell-knownTCPport179.Bothrouterswillmakeconnection
attemptstothatdestinationport.Theywilluseahigh-numberedTCPportassource.
Itisenoughthatoneoftheconnectionattemptssucceeds.Butforbetter
performanceduringrecoveryfromnetworkfailure,bothattemptsshouldhavethe
possibilityofsucceeding.Ifbothattemptsdosucceed,oneoftheconnectionswillbe
broughtdown.
TroubleshootingIBGPSessionStartupIssues

AroutercanuseaBGPupdatetoreachnetworkdestinationsonlyifthenext-hop
addressspecifiedintheBGPupdateisreachable.ABGPupdatethatreferstoa
nexthopthatiscurrentlynotreachableaccordingtotheroutingtablewillbesavedin
theBGPtable.However,theroutercannotinstallthisupdateinitsroutingtable.If
thenext-hopaddresslaterbecomesreachable,theBGProutewillbecomea
candidateroutethattheroutercoulduseforpacketforwardingtothatdestination.
Symptom:
An IBGP route is in the BGP table but is never selected as the best route.
Diagnosis:
The BGP next hop is not reachable.
Verification:
Use show ip bgp prefix to find the BGP next hop.
Use show ip route to verify next-hop reachability.
Toverifythenext-hopreachability,checktheBGProuteintheBGPtablebyusing
theshowipbgpprefixcommand.Thenexthopisreferredtoas"inaccessible"ifitis
notcurrentlyreachableaccordingtotheroutingtable.
AcommonmistakeistoforgettolettheIGPannouncethereachabilityofsubnets
thatphysicallyconnectthelocalASwithaneighboringAS.Therouterusesthese
subnetstoestablishtheEBGPsession.Thenexthopthatisreceivedinanincoming
BGPupdatewillbethefarendoftheEBGPsession.IfallroutersinthelocalASdo
nothaveapathtothatsubnet,thenext-hopaddresswillbeinaccessible.
YoucanpreventthisproblembyincludingthesubnetthatlinksthetransitASto
neighboringautonomoussystemsintheIGP.Toperformthisaction,useeitherthe
redistributeconnectedcommandorthenetworkandpassive-interface
configurationcommands.
TroubleshootingIBGPRouteSelectionIssues

InoldBGPdesigns,redistributionbetweenBGPandanIGPwasacommon
practice,andtheseprotocolshadtobesynchronizedtoensureproperpacket
forwarding.Inmoderndesigns,redistributionisnolongerusedandsynchronization
hastobeturnedoff.Thedefaultvalueisdisabledsynchronization.
Symptom:
An IBGP route is selected as the best route but not entered into the IP routing
table.
Diagnosis:
BGP synchronization is not disabled.
Verification:
Disable BGP synchronization, clear the BGP sessions, and re-examine the IP
routing table after the BGP table becomes stable.
RouterswithBGPsynchronizationenabledwillnotbeabletoinstallIBGProutesin
theroutingtableorpropagatethemtootherEBGPneighbors.
YoucanfixthisproblembyconfiguringnosynchronizationintherouterBGP
configuration.
TroubleshootingIBGPSynchronizationIssues

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
You can use the show ip bgp neighbors and show ip bgp prefix commands
to monitor IBGP operation.
There are a number of problems that can occur during IBGP session startup.
You can use debug ip tcp transactions to see BGP sessions coming from
unexpected IP addresses.
It is important to include the subnet linking the transit AS to an external AS in the
IGP to prevent the BGP next hop from being unreachable.
Routers with BGP synchronization enabled will not be able to install IBGP routes
in the routing table or propagate them to other EBGP neighbors. The BGP
synchronization is disabled by default.
Summary

Overview
Thistopicsummarizesthekeypointsthatwerediscussedinthismodule.
Because all transit autonomous systems are required to carry traffic originating
from or destined to locations outside of that AS, a degree of interaction and
coordination between BGP and the IGP is necessary. You should take a special
care to ensure consistency of routing information throughout the AS.
Both EBGP and IBGP sessions forward BGP updates, but they do it in slightly
different ways.
An IGP is still needed inside a transit AS. The high-speed convergence offered
by an IGP helps in the packet forwarding to external destinations.
Configuring in a transit AS involves configuring IBGP neighbors, BGP
synchronization, and IBGP sessions between loopback interfaces.
The three common IBGP configuration problems concern session startup, route
selection, and synchronization, and there are specific commands and
procedures that you can use to solve those problems.
ModuleSummary

Foradditionalinformation,refertotheseresources:
CiscoSystems,Inc.BGPCaseStudies
http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/26634-bgp-toc.html
CiscoSystems,Inc.UsingtheBorderGatewayProtocolforInterdomainRouting
http://docwiki.cisco.com/wiki/Internetworking_Case_Studies
CiscoSystems,Inc.TroubleshootingTCP/IP."TroubleshootingIPConnectivityandRouting
Problems."
http://www.cisco.com/en/US/docs/internetworking/troubleshooting/guide/tr1907.html#wp1021148
CiscoSystems,Inc.ConfiguringBGP.
http://www.cisco.com/c/en/us/td/docs/ios/12_2/ip/configuration/guide/fipr_c/1cfbgp.html
CiscoSystems,Inc.CiscoIOSIPRoutingConfigurationGuide,Release15M&T
http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_bgp/configuration/15-mt/irg-15-mt-
book.html
References
Usethequestionsheretoreviewwhatyoulearnedinthismodule.Thecorrect
answersandsolutionsarefoundintheModuleSelf-CheckAnswerKey.
ModuleSelf-Check

1. WhyisIBGPamandatorycomponentofatransitAS?(Source:
"WorkingwithaTransitAS")
ItistheonlyfeasiblewaytoensurethatallroutersintheAShave
consistentexternalroutinginformation.
IteliminatesthescalabilityissuesofrunninganIGPwithinthetransitAS.
RunningIBGPonallroutersistheonlywaytosatisfythefiltering
requirementsofthetransitAS.
AnIGPisnotcapableofhandlingthepotentialroutingloopsinthetransit
AS.

1. IBGPneighborsmustbedirectlyconnected.Trueorfalse?(Source:
"WorkingwithaTransitAS")
true
false

1. WhyisredistributingBGProutesintoanIGPforuseinatransit
backboneNOTrecommended?(Source:"WorkingwithaTransit
AS")
RedistributionremovesallBGPattributesthatareneededtoensure
optimalroutingwithinthetransitAS.
AnIGPcannotenforcecomplexadministrativepoliciesandrouteselection
rules.
IGPscannotscaletothedemandsthatarepresentedbythenumberof
routesontheInternet.
IGPsarenotstablewhenfacedwithaflappingnetwork.

1. HowisEBGPusedinatransitAS?(Source:"WorkingwithaTransit
AS")
asameansoftransportingcustomerroutesacrossthetransitbackbone
toexchangeroutesbetweendifferentautonomoussystemsandthetransit
AS
toenhancescalabilitybytransportingIGProutesforthetransitAS
asameansofinjectinglocalroutesintothetransitbackbone

1. ThereceivedEBGPinformationhastobetranslatedandthen
forwardedtootherBGP-speakingrouterswithinthetransitAS.True
orfalse?(Source:"WorkingwithaTransitAS")
true
false

1. AllrouterswithinatransitASmusthaveallexternalroutes,received
fromanyneighboringAS.Trueorfalse?(Source:"Workingwitha
TransitAS")
true
false

1. WhatarethetwokeyfunctionsofatransitAS?(Choosetwo.)
(Source:"WorkingwithaTransitAS")
tofilteroutroutesthatdonotbelongtocustomersoftheserviceprovider
toprovideInternetconnectivitytocustomersoftheserviceprovider
topropagateroutesbetweenremoteautonomoussystems
toroutepacketsbetweenremotenetworks

1. HowareBGProutessentacrossthetransitbackbone?(Source:
"WorkingwithaTransitAS")
byredistributingBGPintoanIGPandthenbackintoBGP
byusingIBGP
byestablishingEBGPsessionsbetweenallroutersinthetransitbackbone
byredistributingconnectedroutesattheedgeofthetransitbackbone

1. WhichtwostatementsaretrueregardingtheAS-pathattributeasit
relatestoIBGP?(Choosetwo.)(Source:"InteractingwithIBGPand
EBGPinaTransitAS")
EachrouterintheASappendsitsASnumbertotheASpathonoutgoing
BGPupdates.
TheASpathinsideanASwillbeemptyforroutesoriginatinginsidea
neighboringAS.
TheAS-pathattributeisnotusedtodetectroutingloopsinsideanAS.
TheAS-pathattributeisnotmodifiedwithintheAS.

1. WhatistheprimaryfunctionoftheIBGPmultipathload-sharing
feature?(Source:"InteractingwithIBGPandEBGPinaTransitAS")
tochooseoneIBGPpathasthebestpathtoadestination
tochoosemultipleIBGPpathsasthebestpathstoadestination
todesignateonepathasthebestpathandadvertisethisbestpathtoits
neighbors
toenablearoutertohandleallthetrafficdestinedforaparticularsite

1. WhichofthefollowingstatementsaboutaBGPsplithorizonis
accurate?(Source:"InteractingwithIBGPandEBGPinaTransit
AS")
BecauseoftheBGPsplithorizon,anyroutercanrelayIBGPinformation
withintheAS.
BGPsplithorizonisusefulonlywithinautonomoussystems.
RoutinginformationloopswithintheASarepreventedbyanIBGPsplit
horizon.
WithaBGPsplithorizon,routinginformationthatisreceivedthroughan
IBGPsessionisforwardedtoanotherIBGPneighbor.

1. Whyisitrecommendedthatloopbackinterfacesbeusedtoform
IBGPneighborsessions?(Source:"InteractingwithIBGPandEBGP
inaTransitAS")
reducesroutermemoryresourcerequirements
reducesrouterCPUresourcerequirements
ensuresIBGPsessionstability
ismoresecurethanusingthephysicalinterface

1. HowistheBGPnext-hopattributeprocessedoveranIBGP
connection?(Source:"InteractingwithIBGPandEBGPinaTransit
AS")
Thenext-hopaddressissettotheaddressofthereceivingrouter.
Thenext-hopaddressisnotmodifiedovertheIBGPsession.
Thenext-hopaddressissettotheIPaddressofthenearestEBGPpeer.
Thenext-hopattributeissettotheIPaddressofthenearestEBGPpeer;if
noexternalASconnectionhasbeenconfigured,thenexthopissettothe
defaultgatewaythatisconfiguredontherouter.

1. Whichtwostatementsaretrueofthefull-meshrequirementin
IBGP?(Choosetwo.)(Source:"InteractingwithIBGPandEBGPina
TransitAS")
TheIBGPmeshmustbealogicalfullmesh.
AphysicalfullmeshmustbemaintainedwithintheIBGPAS.
BecauseofBGPsplithorizon,noroutercanrelayIBGPinformationwithin
theAS.
AllrouterswithintheASmustbedirectlyconnectedtoensurecorrect
deliveryofBGProutinginformation.

1. Whichthreestatementsregardingthenext-hop-selfconfigurationin
BGParetrue?(Choosethree.)(Source:"InteractingwithIBGPand
EBGPinaTransitAS")
Changingthenext-hopattributemightcausesuboptimalrouting.
Theconfigurationchangeshowthenext-hopattributeisprocessedat
edgerouters.
TheconfigurationannouncesthelocalIPaddressastheBGPnexthopin
outgoingupdatesthataresenttothespecifiedneighbor.
TheconfigurationremovestherequirementfortheIGPtocarry
reachabilityinformationforintra-ASdestinations.

1. WhymustallEBGPpeersbereachablebyallBGP-speakingrouters
withinthetransitAS?(Source:"InteractingwithIBGPandEBGPina
TransitAS")
BGP-speakingroutersinatransitASusethenext-hop-selfattributetofind
theirEBGPneighbors.
EBGPpeersinatransitASusethelengthoftheASpathtodecidewhich
BGProutetoinstallintheroutingtable.
WhenBGProutesareusedintheroutingtable,theroutercheckshowit
wouldhavereachedthenext-hopaddress,anditinstallstheBGProute
withthesameforwardingindicationasfortheroutethatisusedtoreach
thenext-hopIPaddress.
AllBGPpeersdonotneedtospeaktoeachotherwithinatransitAS.

1. Whichcommandisusedtoconfiguretherouterasthenexthopfora
BGP-speakingneighbororpeergroup?(Source:"Interactingwith
IBGPandEBGPinaTransitAS")
neighbordescription
neighborremoteas
maximum-pathsibgp
neighbornext-hop-sf

1. WhatarethreedifferencesbetweenIBGPandEBGPsessions?
(Choosethree.)(Source:"InteractingwithIBGPandEBGPina
TransitAS")
RouteselectionrulesslightlypreferIBGProutes.
RoutesthatarelearnedfromIBGPpeersarenotadvertisedtootherIBGP
peers.
EBGPpeersaredirectlyconnected,andIBGPpeersareusuallydistant.
Bydefault,noBGPattributesarechangedinIBGPupdates.

1. WhenyouareconfiguringtheBGPneighborsession,what
differentiatesanEBGPneighborfromanIBGPneighbor?(Source:
"InteractingwithIBGPandEBGPinTransitAS")
Thekeywordinternalisattheendoftheneighborcommand.
IBGPneighborswillhavethesameASnumberspecified.
Adescriptionfortheinternalorexternalneighbormustbeattachedwith
theneighbordescriptioncommand.
DirectlyconnectedneighborswillautomaticallyformanEBGPsession.

1. Whataretwoscalabilitytoolsthatyoucanusetoovercomethefull-
meshrequirementforIBGPsessions?(Choosetwo.)(Source:
"InteractingwithIBGPandEBGPinTransitAS")
confederations
floatingstaticroutes
routereflectors
disablingBGPsynchronization

1. Whataretwonegativeramificationsofthefull-meshrequirement
thatisimposedbyIBGP?(Choosetwo.)(Source:"Interactingwith
IBGPandEBGPinTransitAS")
administrativedifficultyofapplyinganAS-wideroutingpolicy
requirementtousenext-hop-selfforproperroutingtoexternaldestinations
largenumberofTCPsessions
unnecessaryduplicationofroutingtraffic

1. Itisnotrecommendedtoredistributetheinformationfromexternal
routersintotheIGPwhichisusedwithinthetransitAS.Trueor
false?(Source:"ForwardingPacketsinaTransitAS")
true
false

1. WhataretworeasonswhyyoumustrunIBGPonallrouterswithina
transitbackbone?(Choosetwo.)(Source:"ForwardingPacketsina
TransitAS")
sorouterscanproperlyforwardpacketstowardallexternaldestinations
toensurethatafullmeshexistsamongallroutersintheAS
toallowrouterstoproperlyprocesstheBGPnext-hopattribute
becauseIGPscannotscalelargeenoughtohandleredistributionofBGP
routes

1. RouteslearnedviaBGPdonothaveanoutgoinginterface
associatedwiththemintheroutingtable,sorecursivelookupis
performedtoforwardIPpacketstowardexternaldestinations.True
orfalse?(Source:"ForwardingPacketsinaTransitAS")
true
false

1. IfatransitbackbonehasIBGPrunningonallrouters,whataretwo
reasonswhyitisstillnecessarytouseanIGP?(Choosetwo.)
(Source:"ForwardingPacketsinaTransitAS")
toprovideroutinginformationthatisneededtoestablishtheIBGP
sessions
toresolvenext-hopreferencesthatareusedinrecursiverouting
sothatBGProutescanbeproperlytransportedthroughtheAS
toprovideuserworkstationswithanetworkdefaultgateway

1. Maproutingprotocoltoitsfunction.(Source:"ForwardingPacketsin
aTransitAS")
IBGP exchanginginformationabouthowtoreach
internaldestinations
IGP exchanginginformationabouthowtoreach
externaldestinations

1. WhatistheADofthefollowingprotocols?(Source:"Forwarding
PacketsinaTransitAS")
OSPF 120
RIP 115
IS-IS 110
IBGP 20
EBGP 200

1. WhataretworeasonswhytheADisanimportantconsiderationfor
BGPnetworkdesign?(Choosetwo.)(Source:"ForwardingPackets
inaTransitAS")
TheADaffectshowroutesareselectedforuseintheIProutingtable.
TheADcontrolshowroutinginformationisenteredintotheBGPtable.
IfarouteisadvertisedbybothanIGPandthroughEBGP,therouterwill
prefertheexternalroute.
TheADisnotalargeconcerntoBGPdesign,becausetherouterwill
alwayschoosetheroutethatisadvertisedbytheprotocolthatisbest
suitedtoreachthedestination.

1. IfarouterlearnsthesameinformationviaEBGPandIGP,which
onewillituse?(Source:"ForwardingPacketsinaTransitAS")
theonefromIGP
theonefromEBGP

1. Withregardtorecursiveroutelookups,whataretwowaysinwhich
CEFisdifferentfromtraditionalCiscoIOSswitchingmechanisms
suchasroutecaching?(Choosetwo.)(Source:"ForwardingPackets
inaTransitAS")
TraditionalCiscoIOSswitchingmechanismswaitforthefirstpacketto
arrivebeforerecursivelookupcantakeplace.
NewentriesintheIProutingtablewilltriggerarecursivelookupin
traditionalCiscoIOSswitchingmechanisms.
CEFprebuildsacompleteIPforwardingtablebasedontheIProuting
table.
CEFwillbuildaFIBdirectlyfromtheentriesintheBGPtablebeforeany
BGPpacketsarriveattherouter.

1. WhichadministrativedistanceofBGProutecannotbechanged?
(Source:"ForwardingPacketsinaTransitAS")
externaldistance
internaldistance
localdistance
remotedistance

1. WhyisitimportanttodisableBGPsynchronizationinatransit
backbone?(Source:"MonitoringandTroubleshootingIBGPin
TransitAS")
IGPscansupporttheroutingrequirementsoffullInternetrouting,and
hencesynchronizationisnolongernecessary.
BecauseBGPredistributionintoanIGPisnolongerpractical,enablingthe
synchronizationfeatureisnolongerapplicable.
SynchronizationrequiresallBGPtransitroutestobeexplicitlymappedto
anexitpoint,creatingtoomuchadministrativeoverhead.
SynchronizationrequiresBGPattributestobeproperlymappedtoIGP
metricsforBGProutingacrossthetransitbackbonetofunctionproperly,
creatingtoomuchoverhead.

1. Whichtwostepsarerequiredwhenyouusealoopbackinterfacefor
IBGPpeeringsessions?(Choosetwo.)(Source:"Monitoringand
TroubleshootingIBGPinTransitAS")
EnsurethattheloopbackinterfacesarereachablethroughanIGP.
Ensurethatthetwoneighborsaredirectlyattached.
Verifythateachrouterhasmultiplephysicallyredundantpaths.
Configureaneighborstatementwiththeupdate-sourcecommand.

1. WhichCiscoIOSshowcommandindicatesthataBGProuteisan
IBGProute?(Source:"MonitoringandTroubleshootingIBGPina
TransitAS")
showiproute
showiproutebgp
showipbgp
showipbgpinternal

1. WhichCiscoIOSshowcommanddisplaystheinforbationaboutthe
TCPandBGPconnectiontoneighbors?(Source:"Monitoringand
TroubleshootingIBGPinaTransitAS")
showipbgpprefix
showipbgpneighbors
showipbgp
showipbgpinternal

1. BGPrunsonthewell-knownTCPport169.TrueorFalse?(Source:
"MonitoringandTroubleshootingIBGPinaTransitAS")
true
false

1. WhichthreeofthefollowingarethemostcommonBGP
implementationproblems?(Choosethree.)(Source:"Monitoringand
TroubleshootingIBGPinaTransitAS")
IBGPsessionsdonotreachtheEstablishedstate.
TCPwindowsizeissetincorrectly.
RoutinginformationthatisreceivedviaIBGPisneverselected.
ThebestBGProuteisneverinstalledintheroutingtable.

1. WhatarethreecommonsituationsthatpreventIBGPsessionsfrom
starting?(Choosethree.)(Source:"MonitoringandTroubleshooting
IBGPinaTransitAS")
TheIBGPsessionhasbeenconfiguredtopeertoaloopbackinterface,but
update-sourcehasnotbeenconfiguredontheneighbor.
Anaccess-listfilterisblockingaccesstoTCPport179.
TheIBGPsessionhasbeenconfiguredtopeertoaloopbackinterface,but
theloopbackinterfacehasnotbeenadministrativelyenabledwiththeno
shutdowncommand.
TheIBGPsessionhasbeenconfiguredtopeertoaloopbackinterface,but
theinterfacesarenotreachableviatheIGP.

1. WhichcommonissuecouldpreventIBGPbestroutesfrombeing
insertedintotheIProutingtable?(Source:"Monitoringand
TroubleshootingIBGPinaTransitAS")
failuretodisableBGPsynchronization
failuretodisableBGPsplithorizon
lackofaroutetotheBGPnexthopfortheIGP
failuretoinjectadefaultrouteintotheIGP

1. WhichtwoofthefollowingstatementsaboutsolvingIBGP
synchronizationproblemsareaccurate?(Choosetwo.)(Source:
"MonitoringandTroubleshootingIBGPinaTransitAS")
RouterswithBGPsynchronizationenabledwillbeabletoinstallIBGP
routesintheroutingtableandpropagatethemtootherEBGPneighbors.
RouterswithBGPsynchronizationenabledwillnotbeabletoinstallIBGP
routesintheroutingtableorpropagatethemtootherEBGPneighbors.
Thedefaultvalueistohavesynchronizationenabled.
Thedefaultvalueistohavesynchronizationdisabled.

1. WhyisIBGPamandatorycomponentofatransitAS?(Source:
"WorkingwithaTransitAS")
ItistheonlyfeasiblewaytoensurethatallroutersintheAShave
consistentexternalroutinginformation.
IteliminatesthescalabilityissuesofrunninganIGPwithinthetransitAS.
RunningIBGPonallroutersistheonlywaytosatisfythefiltering
requirementsofthetransitAS.
AnIGPisnotcapableofhandlingthepotentialroutingloopsinthetransit
AS.
AnswerKey

1. IBGPneighborsmustbedirectlyconnected.Trueorfalse?(Source:
"WorkingwithaTransitAS")
true
false

1. WhyisredistributingBGProutesintoanIGPforuseinatransit
backboneNOTrecommended?(Source:"WorkingwithaTransit
AS")
RedistributionremovesallBGPattributesthatareneededtoensure
optimalroutingwithinthetransitAS.
AnIGPcannotenforcecomplexadministrativepoliciesandrouteselection
rules.
IGPscannotscaletothedemandsthatarepresentedbythenumberof
routesontheInternet.
IGPsarenotstablewhenfacedwithaflappingnetwork.

1. HowisEBGPusedinatransitAS?(Source:"WorkingwithaTransit
AS")
asameansoftransportingcustomerroutesacrossthetransitbackbone
toexchangeroutesbetweendifferentautonomoussystemsandthetransit
AS
toenhancescalabilitybytransportingIGProutesforthetransitAS
asameansofinjectinglocalroutesintothetransitbackbone

1. ThereceivedEBGPinformationhastobetranslatedandthen
forwardedtootherBGP-speakingrouterswithinthetransitAS.True
orfalse?(Source:"WorkingwithaTransitAS")
true
false

1. AllrouterswithinatransitASmusthaveallexternalroutes,received
fromanyneighboringAS.Trueorfalse?(Source:"Workingwitha
TransitAS")
true
false

1. WhatarethetwokeyfunctionsofatransitAS?(Choosetwo.)
(Source:"WorkingwithaTransitAS")
tofilteroutroutesthatdonotbelongtocustomersoftheserviceprovider
toprovideInternetconnectivitytocustomersoftheserviceprovider
topropagateroutesbetweenremoteautonomoussystems
toroutepacketsbetweenremotenetworks

1. HowareBGProutessentacrossthetransitbackbone?(Source:
"WorkingwithaTransitAS")
byredistributingBGPintoanIGPandthenbackintoBGP
byusingIBGP
byestablishingEBGPsessionsbetweenallroutersinthetransitbackbone
byredistributingconnectedroutesattheedgeofthetransitbackbone

1. WhichtwostatementsaretrueregardingtheAS-pathattributeasit
relatestoIBGP?(Choosetwo.)(Source:"InteractingwithIBGPand
EBGPinaTransitAS")
EachrouterintheASappendsitsASnumbertotheASpathonoutgoing
BGPupdates.
TheASpathinsideanASwillbeemptyforroutesoriginatinginsidea
neighboringAS.
TheAS-pathattributeisnotusedtodetectroutingloopsinsideanAS.
TheAS-pathattributeisnotmodifiedwithintheAS.

1. WhatistheprimaryfunctionoftheIBGPmultipathload-sharing
feature?(Source:"InteractingwithIBGPandEBGPinaTransitAS")
tochooseoneIBGPpathasthebestpathtoadestination
tochoosemultipleIBGPpathsasthebestpathstoadestination
todesignateonepathasthebestpathandadvertisethisbestpathtoits
neighbors
toenablearoutertohandleallthetrafficdestinedforaparticularsite

1. WhichofthefollowingstatementsaboutaBGPsplithorizonis
accurate?(Source:"InteractingwithIBGPandEBGPinaTransit
AS")
BecauseoftheBGPsplithorizon,anyroutercanrelayIBGPinformation
withintheAS.
BGPsplithorizonisusefulonlywithinautonomoussystems.
RoutinginformationloopswithintheASarepreventedbyanIBGPsplit
horizon.
WithaBGPsplithorizon,routinginformationthatisreceivedthroughan
IBGPsessionisforwardedtoanotherIBGPneighbor.

1. Whyisitrecommendedthatloopbackinterfacesbeusedtoform
IBGPneighborsessions?(Source:"InteractingwithIBGPandEBGP
inaTransitAS")
reducesroutermemoryresourcerequirements
reducesrouterCPUresourcerequirements
ensuresIBGPsessionstability
ismoresecurethanusingthephysicalinterface

1. HowistheBGPnext-hopattributeprocessedoveranIBGP
connection?(Source:"InteractingwithIBGPandEBGPinaTransit
AS")
Thenext-hopaddressissettotheaddressofthereceivingrouter.
Thenext-hopaddressisnotmodifiedovertheIBGPsession.
Thenext-hopaddressissettotheIPaddressofthenearestEBGPpeer.
Thenext-hopattributeissettotheIPaddressofthenearestEBGPpeer;if
noexternalASconnectionhasbeenconfigured,thenexthopissettothe
defaultgatewaythatisconfiguredontherouter.

1. Whichtwostatementsaretrueofthefull-meshrequirementin
IBGP?(Choosetwo.)(Source:"InteractingwithIBGPandEBGPina
TransitAS")
TheIBGPmeshmustbealogicalfullmesh.
AphysicalfullmeshmustbemaintainedwithintheIBGPAS.
BecauseofBGPsplithorizon,noroutercanrelayIBGPinformationwithin
theAS.
AllrouterswithintheASmustbedirectlyconnectedtoensurecorrect
deliveryofBGProutinginformation.

1. Whichthreestatementsregardingthenext-hop-selfconfigurationin
BGParetrue?(Choosethree.)(Source:"InteractingwithIBGPand
EBGPinaTransitAS")
Changingthenext-hopattributemightcausesuboptimalrouting.
Theconfigurationchangeshowthenext-hopattributeisprocessedat
edgerouters.
TheconfigurationannouncesthelocalIPaddressastheBGPnexthopin
outgoingupdatesthataresenttothespecifiedneighbor.
TheconfigurationremovestherequirementfortheIGPtocarry
reachabilityinformationforintra-ASdestinations.

1. WhymustallEBGPpeersbereachablebyallBGP-speakingrouters
withinthetransitAS?(Source:"InteractingwithIBGPandEBGPina
TransitAS")
BGP-speakingroutersinatransitASusethenext-hop-selfattributetofind
theirEBGPneighbors.
EBGPpeersinatransitASusethelengthoftheASpathtodecidewhich
BGProutetoinstallintheroutingtable.
WhenBGProutesareusedintheroutingtable,theroutercheckshowit
wouldhavereachedthenext-hopaddress,anditinstallstheBGProute
withthesameforwardingindicationasfortheroutethatisusedtoreach
thenext-hopIPaddress.
AllBGPpeersdonotneedtospeaktoeachotherwithinatransitAS.

1. Whichcommandisusedtoconfiguretherouterasthenexthopfora
BGP-speakingneighbororpeergroup?(Source:"Interactingwith
IBGPandEBGPinaTransitAS")
neighbordescription
neighborremoteas
maximum-pathsibgp
neighbornext-hop-sf

1. WhatarethreedifferencesbetweenIBGPandEBGPsessions?
(Choosethree.)(Source:"InteractingwithIBGPandEBGPina
TransitAS")
RouteselectionrulesslightlypreferIBGProutes.
RoutesthatarelearnedfromIBGPpeersarenotadvertisedtootherIBGP
peers.
EBGPpeersaredirectlyconnected,andIBGPpeersareusuallydistant.
Bydefault,noBGPattributesarechangedinIBGPupdates.

1. WhenyouareconfiguringtheBGPneighborsession,what
differentiatesanEBGPneighborfromanIBGPneighbor?(Source:
"InteractingwithIBGPandEBGPinTransitAS")
Thekeywordinternalisattheendoftheneighborcommand.
IBGPneighborswillhavethesameASnumberspecified.
Adescriptionfortheinternalorexternalneighbormustbeattachedwith
theneighbordescriptioncommand.
DirectlyconnectedneighborswillautomaticallyformanEBGPsession.

1. Whataretwoscalabilitytoolsthatyoucanusetoovercomethefull-
meshrequirementforIBGPsessions?(Choosetwo.)(Source:
"InteractingwithIBGPandEBGPinTransitAS")
confederations
floatingstaticroutes
routereflectors
disablingBGPsynchronization

1. Whataretwonegativeramificationsofthefull-meshrequirement
thatisimposedbyIBGP?(Choosetwo.)(Source:"Interactingwith
IBGPandEBGPinTransitAS")
administrativedifficultyofapplyinganAS-wideroutingpolicy
requirementtousenext-hop-selfforproperroutingtoexternaldestinations
largenumberofTCPsessions
unnecessaryduplicationofroutingtraffic

1. Itisnotrecommendedtoredistributetheinformationfromexternal
routersintotheIGPwhichisusedwithinthetransitAS.Trueor
false?(Source:"ForwardingPacketsinaTransitAS")
true
false

1. WhataretworeasonswhyyoumustrunIBGPonallrouterswithina
transitbackbone?(Choosetwo.)(Source:"ForwardingPacketsina
TransitAS")
sorouterscanproperlyforwardpacketstowardallexternaldestinations
toensurethatafullmeshexistsamongallroutersintheAS
toallowrouterstoproperlyprocesstheBGPnext-hopattribute
becauseIGPscannotscalelargeenoughtohandleredistributionofBGP
routes

1. RouteslearnedviaBGPdonothaveanoutgoinginterface
associatedwiththemintheroutingtable,sorecursivelookupis
performedtoforwardIPpacketstowardexternaldestinations.True
orfalse?(Source:"ForwardingPacketsinaTransitAS")
true
false

1. IfatransitbackbonehasIBGPrunningonallrouters,whataretwo
reasonswhyitisstillnecessarytouseanIGP?(Choosetwo.)
(Source:"ForwardingPacketsinaTransitAS")
toprovideroutinginformationthatisneededtoestablishtheIBGP
sessions
toresolvenext-hopreferencesthatareusedinrecursiverouting
sothatBGProutescanbeproperlytransportedthroughtheAS
toprovideuserworkstationswithanetworkdefaultgateway

1. Maproutingprotocoltoitsfunction.(Source:"ForwardingPacketsin
aTransitAS")
IGP exchanginginformationabouthowtoreach
internaldestinations
IBGP exchanginginformationabouthowtoreach
externaldestinations

1. WhatistheADofthefollowingprotocols?(Source:"Forwarding
PacketsinaTransitAS")
IBGP 200
EBGP 20
OSPF 110
IS-IS 115
RIP 120

1. WhataretworeasonswhytheADisanimportantconsiderationfor
BGPnetworkdesign?(Choosetwo.)(Source:"ForwardingPackets
inaTransitAS")
TheADaffectshowroutesareselectedforuseintheIProutingtable.
TheADcontrolshowroutinginformationisenteredintotheBGPtable.
IfarouteisadvertisedbybothanIGPandthroughEBGP,therouterwill
prefertheexternalroute.
TheADisnotalargeconcerntoBGPdesign,becausetherouterwill
alwayschoosetheroutethatisadvertisedbytheprotocolthatisbest
suitedtoreachthedestination.

1. IfarouterlearnsthesameinformationviaEBGPandIGP,which
onewillituse?(Source:"ForwardingPacketsinaTransitAS")
theonefromIGP
theonefromEBGP

1. Withregardtorecursiveroutelookups,whataretwowaysinwhich
CEFisdifferentfromtraditionalCiscoIOSswitchingmechanisms
suchasroutecaching?(Choosetwo.)(Source:"ForwardingPackets
inaTransitAS")
TraditionalCiscoIOSswitchingmechanismswaitforthefirstpacketto
arrivebeforerecursivelookupcantakeplace.
NewentriesintheIProutingtablewilltriggerarecursivelookupin
traditionalCiscoIOSswitchingmechanisms.
CEFprebuildsacompleteIPforwardingtablebasedontheIProuting
table.
CEFwillbuildaFIBdirectlyfromtheentriesintheBGPtablebeforeany
BGPpacketsarriveattherouter.

1. WhichadministrativedistanceofBGProutecannotbechanged?
(Source:"ForwardingPacketsinaTransitAS")
externaldistance
internaldistance
localdistance
remotedistance

1. WhyisitimportanttodisableBGPsynchronizationinatransit
backbone?(Source:"MonitoringandTroubleshootingIBGPin
TransitAS")
IGPscansupporttheroutingrequirementsoffullInternetrouting,and
hencesynchronizationisnolongernecessary.
BecauseBGPredistributionintoanIGPisnolongerpractical,enablingthe
synchronizationfeatureisnolongerapplicable.
SynchronizationrequiresallBGPtransitroutestobeexplicitlymappedto
anexitpoint,creatingtoomuchadministrativeoverhead.
SynchronizationrequiresBGPattributestobeproperlymappedtoIGP
metricsforBGProutingacrossthetransitbackbonetofunctionproperly,
creatingtoomuchoverhead.

1. Whichtwostepsarerequiredwhenyouusealoopbackinterfacefor
IBGPpeeringsessions?(Choosetwo.)(Source:"Monitoringand
TroubleshootingIBGPinTransitAS")
EnsurethattheloopbackinterfacesarereachablethroughanIGP.
Ensurethatthetwoneighborsaredirectlyattached.
Verifythateachrouterhasmultiplephysicallyredundantpaths.
Configureaneighborstatementwiththeupdate-sourcecommand.

1. WhichCiscoIOSshowcommandindicatesthataBGProuteisan
IBGProute?(Source:"MonitoringandTroubleshootingIBGPina
TransitAS")
showiproute
showiproutebgp
showipbgp
showipbgpinternal

1. WhichCiscoIOSshowcommanddisplaystheinforbationaboutthe
TCPandBGPconnectiontoneighbors?(Source:"Monitoringand
TroubleshootingIBGPinaTransitAS")
showipbgpprefix
showipbgpneighbors
showipbgp
showipbgpinternal

1. BGPrunsonthewell-knownTCPport169.TrueorFalse?(Source:
"MonitoringandTroubleshootingIBGPinaTransitAS")
true
false

1. WhichthreeofthefollowingarethemostcommonBGP
implementationproblems?(Choosethree.)(Source:"Monitoringand
TroubleshootingIBGPinaTransitAS")
IBGPsessionsdonotreachtheEstablishedstate.
TCPwindowsizeissetincorrectly.
RoutinginformationthatisreceivedviaIBGPisneverselected.
ThebestBGProuteisneverinstalledintheroutingtable.

1. WhatarethreecommonsituationsthatpreventIBGPsessionsfrom
starting?(Choosethree.)(Source:"MonitoringandTroubleshooting
IBGPinaTransitAS")
TheIBGPsessionhasbeenconfiguredtopeertoaloopbackinterface,but
update-sourcehasnotbeenconfiguredontheneighbor.
Anaccess-listfilterisblockingaccesstoTCPport179.
TheIBGPsessionhasbeenconfiguredtopeertoaloopbackinterface,but
theloopbackinterfacehasnotbeenadministrativelyenabledwiththeno
shutdowncommand.
TheIBGPsessionhasbeenconfiguredtopeertoaloopbackinterface,but
theinterfacesarenotreachableviatheIGP.

1. WhichcommonissuecouldpreventIBGPbestroutesfrombeing
insertedintotheIProutingtable?(Source:"Monitoringand
TroubleshootingIBGPinaTransitAS")
failuretodisableBGPsynchronization
failuretodisableBGPsplithorizon
lackofaroutetotheBGPnexthopfortheIGP
failuretoinjectadefaultrouteintotheIGP

1. WhichtwoofthefollowingstatementsaboutsolvingIBGP
synchronizationproblemsareaccurate?(Choosetwo.)(Source:
"MonitoringandTroubleshootingIBGPinaTransitAS")
RouterswithBGPsynchronizationenabledwillbeabletoinstallIBGP
routesintheroutingtableandpropagatethemtootherEBGPneighbors.
RouterswithBGPsynchronizationenabledwillnotbeabletoinstallIBGP
routesintheroutingtableorpropagatethemtootherEBGPneighbors.
Thedefaultvalueistohavesynchronizationenabled.
Thedefaultvalueistohavesynchronizationdisabled.

Introduction
BGPenablestrafficinInternetbackbonestodetermineanoptimalpathtoits
destinationacrossnetworkscomprisingmorethanoneAS.Routesthatarelearned
viaBGPhavepropertiesthatareassociatedwiththemthataidBGPindetermining
thebestroutetoaparticulardestination.Therearemanyinstancesinwhichthe
defaultBGProuteselectiondoesnotmatchadministrativeorbusinesspolicies.
Likewise,redundantnetworkdesignsoftenrequireenterprisestorunBGPwhen
theyareconnectedtomorethanoneISP.Inthesesituations,fullBGProutingtables
anddefaultBGProuteselectionarenotdesirable.
ThismoduleprovidesinformationonhowtoconnectInternetcustomerstomultiple
serviceproviders.ItintroducestheneedforfilteringBGPupdatesandchanging
BGProuteselectionpolicies.Inaddition,thismoduledescribesdifferentCiscoIOS
mechanisms(ASpathfilters,prefix-lists,route-maps)availableforBGProute
filtering.
Uponcompletingthismodule,youwillbeableto:
InfluencingBGProuteselectioninacustomerscenariowhereconnectionsto
multipleISPsmustbesupported
ConfigureBGPtoinfluencerouteselectionusingASpathfilters
DefinehowtosuccessfullyconfigureBGPtoinfluencerouteselectionusing
prefix-listfiltersinacustomerscenarioinwhichconnectionstomultipleISPs
mustbesupported
DefineshowtouseoutboundroutefilteringtominimizetheimpactofBGP
routingupdatesonrouterresourcesinanoperationalBGPnetwork
Describeroute-mapsandhowyoucanusethemforBGPfiltering.
Definehowtoconfigurethesoftreconfigurationfeaturetominimizetheimpact
ofexpeditingBGPpolicyupdatesinatypicalBGPnetwork
RouteSelectionUsingPolicyControls

Overview
Insomecircumstances,itisimportanttohavemultiplepathstoanISP.Thereare
businessandtechnicalreasonstoconfigureaBGPnetworkinamultihomed
configuration.Mission-criticalapplicationsoftencallforredundantnetworkdesigns.
WhenaccesstoapplicationsisprovidedovertheInternet,enterprisestypicallyuse
multihomedBGPnetworkstoachievetheirgoalsofhighavailability.
FullBGProutingtablesanddefaultBGProuteselectionmightordinarilybe
considereddesirablecharacteristicsofanetwork.However,theoverheadoffull
BGProutingtablesisnotwarrantedinthesesituations.Furthermore,thedefault
routeselectioninBGPoftendoesnotmatchthebusinessandtechnical
requirementsformultihomedenterprisenetworksthatuseBGP.
Uponcompletingthislesson,youwillbeableto:
ListthebusinessrequirementsformultihomedBGPnetworksinserviceprovider
environments
DescribethetechnicalrequirementsformultihomedBGPnetworksinservice
providerenvironments
ExplaintheneedforBGPpoliciesthatinfluencerouteselectioninamultihomed
BGPnetwork
DescribetypicalroutingpoliciesformultihomedBGPcustomers
ExplaintheneedtoinfluenceBGProuteselectioninaserviceprovider
environment
ExplaintheneedforBGPfiltersinamultihomedcustomer
ExplaintheneedforBGPfiltersinaserviceprovider
Explainthereturntrafficissue
UsingMultihomedBGPNetworks

Companieswhousewebservers(orsimilarservers)andoffermission-critical
businessservicesovertheInternetoftenliketohavetheirnetworksredundantly
connectedtotheInternet.Whenthecompaniescalculatetheexpectedlossof
businessbecauseofanunexpecteddisconnectionfromtheInternet,theymay
concludethathavingtwoconnectionstotheInternetisprofitable.Insuchcases,the
companymayconsiderbeingacustomertotwodifferentISPsorhavingtwo
separateconnectionstooneISP.
Some customers need redundant Internet access for their mission-critical
applications.
Full redundancy is achieved only by connecting to two independent service
providers.
WithtwoconnectionstoonesingleISP,BGPisusuallynotrequired.Thissolution
providesabackupforalinkfailureandrouterfailure.However,thissolutiondoesnot
provideabackupforproblemsinthenetworkoftheISPortheconnectionoftheISP
totherestoftheInternet.
FullredundancyisachievedonlybyconnectingtotwoindependentISPs.Ifoneof
theISPnetworkslosesitsconnectiontotherestoftheInternet,thecustomerwillstill
reachtherestoftheInternetviatheotherserviceprovider.Atthesametime,the
customerwillstillreachthoseuserswhoaredirectlyconnectedtothefailingISPvia
itsdirectconnection.
BusinessRequirementsforMultihomedBGPNetworks

ThemultihomedcustomernetworkmustexchangeBGPinformationwithbothISP
networks.Dynamicroutingisrequiredforfullredundancy,andBGPistheonly
protocolavailablethatcanbeusedinthisscenario.
Multihomed customers have to run BGP with their ISPs.
Multihomed customers usually need a public AS number and provider-
independent address space.
Thecustomermust,inmostcases,haveitsownpublicASnumberandannounceits
ownIPnetworkstobothISPs.TheISPswillpropagatecustomerannouncementsto
therestoftheInternet,andthecustomerwillbeseenasreachableviabothISP
networks.ThecustomernetworkalsoreceivesfullInternetroutingfrombothISPs.
Thiscapabilitygivesthecustomernetworktheopportunitytochoosethebest
connectionatthattimetoreachanydestinationontheInternet.
Mostcustomersarenotmultihomed.TheydonotexchangeBGPwiththeirISP.
Instead,theyusedefaultroutingtotheISP,andtheISPdoesstaticroutingtothe
customer.ISPsusethisfacttooptimizethenumberofprefixesthattheyannounce
intotheInternet.IPnetworknumbersareusuallyassignedtocustomersfroma
rangeofIPnetworksthataredelegatedtotheISP.Thissituationmeans,intheideal
case,thatallcustomersthatareconnectedtoonesingleISPcanhavetheirIP
networkssummarizedinafewBGPupdates.
Inthemultihomedscenario,however,theISPcannotbenefitfromIPnetwork
numberassignmentfromthedelegatedrange.Thecustomerisconnectedtotwo
differentISPs,anditisnotobviousfromwhichprovider-assignedaddressspaceit
shouldgettheIPaddresses.Thebestsolutionistodotheassignmentfromarange
completelyindependentoftheproviders,aprovider-independentaddressspace.
TechnicalRequirementsforMultihomedBGPNetworks

Thesimpleapproach,whichisillustratedinthefigure,maybethesourceofmany
problems.BysimplystartingBGPsessionswithbothISPs,andannouncingthe
customernetworkstobothISPs,thecustomercouldexperiencedifficultiesasa
resultofthedefaultbehaviorsofBGP.Thefollowingexampleillustratesproblems
thatmayoccurinthisenvironment.
router bgp 1
network 10.0.0.0 mask 255.255.255.0
neighbor 172.16.12.11 remote-as 100
neighbor 172.16.22.22 remote-as 200
Customer configures two BGP sessions and announces its address space.
BGPRouteSelectionWithoutBGPPoliciesExample
The BGP routes are selected based on AS-path length.
The default BGP route selection does not always result in optimum routing.
R2# show ip bgp
BGP table version is 30, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - inte
rnal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-
Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/24 0.0.0.0 0 32768 i
*> 10.0.1.0/28 172.16.12.11 0 0 100 i
*> 10.0.2.0/28 172.16.22.22 0 0 200 i
*> 10.0.21.0/24 172.16.22.22 0 0 200 21 i
* 172.16.12.11 0 0 100 37 40 2
1 i
* 10.0.37.0/24 172.16.22.22 0 0 200 21 40 3
7 i
*> 172.16.12.11 0 0 100 37 i
*> 10.0.40.0/24 172.16.22.22 0 0 200 21 40 i
* 172.16.12.11 0 0 100 37 40 i
ThemultihomedcustomerisconnectedtotwoISPs:AS100andAS200.Thetwo
ISPsareconnectedtotheupstreamISPs:AS21,AS40,orAS37.
Thecustomerreceivesallroutesfrombothserviceproviders,givingredundancy.
ThedefaultBGProuteselectionpreferstheshortestASpath.IftheASpathlengths
areequal,BGPprefersthemoststableroute,ortheroutethatisreceivedfromthe
peerwiththelowerrouter-ID.
Inmanycases,however,thisrouteisnotthemostoptimalwaytoreachall
destinations.Forexample,thebandwidththatisavailabletoreachtheISPshasnot
beentakenintoconsideration.Tochangetherouteselectionbehavior,someBGP
parametersmustbeconfiguredtosupportmorecomplexroutingpolicies.
BGPRouteSelectionWithoutBGPPolicies

Multihomed customers could require a number of routing policies, for example:
One provider is primary; the other is backup.
Traffic to direct customers of the ISPs goes direct; all other traffic goes through
the primary provider.
All traffic to a particular part of the world goes through one ISP.
Traffic toward a specific destination goes through only one of the ISPs.
Dependingonthecircumstances,herearethedifferentpolicesthatamultihomed
customermightrequire:
OneofthetwoISPscanbeconsideredtheprimaryconnection.Thisdistinction
canbetheresultofavailablebandwidthorcommercialagreements.However,
althoughoneoftheISPsisconsideredtheprimaryconnection,someusersmay
havedirectconnectionstothesecondaryISP.Therefore,goingviatheprimary
ISPtoreachusersthatareconnectedtothesecondaryISPmaybesuboptimal.
Destinationsinonepartoftheworldmaybereachedmoreoptimallyviaoneof
theISPs,ratherthanviatheother.ThissituationoccursbecausethetwoISPs
mayhavedifferentinfrastructuresandpeeringagreementswithotherISPs.
Itisvirtuallyimpossibletoestablisharoutingpolicythatgivesoptimalroutingto
everydestinationontheInternet.Optimizationcanbedoneonlywiththemost
commondestinationsinmind.Thissituationcanresultinspecificrulesonhowto
reachspecificdestinationnetworksortheAS.
MultihomedCustomerRoutingPolicies

WhenoneofthetwoISPsisdesignatedasaprimaryISPandtheotherasa
backup,BGPattributesmustbeconfiguredtoinfluenceBGProuteselection.
Internet traffic always flows over primary ISP.
Routes that are received from primary ISP should be preferred over routes that
are received from backup ISP.
A route selection tool is needed in BGP weights or local preference.
IfbothISPconnectionsterminateinonesinglecustomerrouter,allroutesthatare
receivedfromtheprimaryISPcanbeassignedaBGPweight.Ahigherweight
indicatesamorepreferredpath.
However,theweightvalueislocaltoonerouter.Theweightvalueisnotshared
betweenrouters.IfoneISPconnectionterminatesinoneofthecustomerrouters
andtheotherISPconnectionterminatesinanother,thetwocustomerroutersmust
agreeonwhichlinktouse.Usinglocalpreferenceinsteadofweightcancausethis
situation.AllroutesthatarereceivedfromtheprimaryISPovertheprimarylinkare
assignedalocalpreferencevalue,whichishigherthanthedefaultvalueof100.The
customerrouterthatreceivestheroutesfromtheprimaryISPcompletesthe
assignmentandcommunicatestheinformationtotheotherrouterswithintheASof
thecustomer.
Whenusingeitherweightorlocalpreference,thecustomerASreachesall
destinationsontheInternetviatheprimarylinkaslongasitisavailable.Itreaches
thosedestinationswithintheASofthesecondaryISP.Ifthereisalinkfailureor
failureswithinthenetworkoftheprimaryISP,someoftheroutes,oralloftheroutes,
willnolongerbereceivedovertheprimarylink.Inthatcase,theASofthecustomer
nolongerseesthosedestinationsasreachableovertheprimarylink.Theonly
remainingchoiceisthebackuplink.Therefore,thecustomernetworkusesthe
backuplinkonlytoreachdestinationsthatarenotreachableovertheprimarylink.
Internet traffic flows over primary ISP; traffic to customers of backup ISP goes
direct.
Route selection has to be performed based on AS numbers in the AS path.
Inmostcases,itisoptimaltoreachothercustomerswhoareconnectedtothe
backupISPviathebackuplink,comparedwithreachingthemviatheprimarylink.
Theroutingpolicy,whereroutesareblindlypreferrediftheyarereceivedonthe
primarylink,caneasilybemodifiedtousethebackuplinkfordestinationsintheAS
InfluencingBGPRouteSelection
ofthebackupISP.Ontherouter,filteringtoolscanbeconfiguredtoselectrouting
informationthatisbasedonthecontentintheASpathattribute.Thoseroutes,with
anASpathattributematchingspecificselectioncriteria,canbeassignedaneven
higherweightorlocalpreference.
Thisapproachresultsinaroutingpolicythatgivesprecedencetoreaching
destinationswithintheASoftheprimaryISPandwithinallASsupstreamofthe
primaryISPovertheprimarylink.DestinationswithintheASofthebackupISP
receiveprecedenceoverthebackuplink.

WhenBGPhasselectedthebestpath,therouteradvertisestheinformationtoall
neighboringautonomoussystems,exceptforthesessionthatthepathwasreceived
on.Thisfunctionalityiscalled"BGPsplit-horizon,"whichpreventsnear-rangerouting
loops.ThissituationcausesthecustomerAStobecomeatransitASbetweenthe
twoISPs,andshouldbeavoided.
Customers could become a transit AS for the service providers.
Requirement: Do not propagate provider routes to other providers.
MostcustomersdonotintendtocreatetransittrafficbetweenISPnetworks.The
accesslinestotheISPsarenotsuitedtocarrythisvolumeoftraffic,andthe
customercertainlydoesnotwantthetransittraffictoconsumethebandwidth.
ThesolutiontothisproblemistofiltertheoutgoinginformationtobothISPs.Filtering
ofroutinginformationisperformedbasedonthecontentoftheASpathattributethat
isassignedtoeveryBGProute.OnlyrouteshavinganASpathattributethat
indicatesthattheyaresourcedbytheASofthecustomerareallowedtobesentto
eitherofthetwoISPs.
TransitTrafficIssue

Withoutsomesortoffiltering,BGProutinginformationthattheASofthecustomer
createscanpotentiallybepropagatedallovertheInternet.Inthisway,thecustomer
caninjecterroneousinformationintotheInternetroutingtables.
Customers running BGP could announce any route to the SPs.
Requirement: Service providers have to filter IP prefixes in incoming updates.
Customersaremuchlessexperiencedinavoidingthesekindsofproblemsthanare
serviceproviders.Thereismuchmoreriskoferrorsbeingintroducedwhena
customerisassigneditsownASandusesBGPwiththeISP,ascomparedwiththe
single-homedscenarioinwhichtheISPhassoleresponsibilitytoannounceBGP
routestotherestoftheInternet.
TheISPcanstopalmostalloftheInternetproblemsthatacustomercancauseby
improperlyconfiguringitsBGP.TheISPshouldalsofilterallincominginformation
fromthecustomerandacceptonlywhatissupposedtoarrive.TheISPshould
discardanythingoutsidestrictlimits.Inthisway,theISPpreventsthepropagationof
erroneousinformationtotherestoftheInternet.
TheISPcanmaintainalistoftheIPnetworknumbersthatthecustomeris
announcingandfilteroutanyotherroute.Ifthisapproachisnotpossiblebecauseof
thevolumeofthoselists,theISPshouldatleastbeabletofilteroutthemost
obviouserroneousannouncements.
Privateaddresses,accordingtoRFC1918,shouldnever
beannouncedtotheInternet.
RoutingUpdateReliabilityIssue

ThecustomercaneasilydefineapolicyabouthowtosendoutgoingIPpacketson
thecorrectlink.ItismuchhardertoinfluencetheneighboringASabouthowtodirect
theIPpacketscomingintothecustomernetwork.
Customers can influence only their outgoing traffic, not the return traffic.
Return traffic can take any path—backup ISP must also perform proper route
selection.
AcustomerthatcreatesaroutingpolicyinwhichoneofthetwoISPsisalways
preferredmayseethereturntrafficarrivingonthebackuplink.Thissituationmeans
thatthecustomerhasconfiguredtheweightorlocalpreferencetomakesurethatall
outgoingtrafficisleavingthecustomerASovertheprimarylink.Howeverthe
backupISPdoesnothaveanysuchconfiguration.Therefore,returntrafficentersthe
customerASbyusingtheshortestASpathasitsselectioncriterion.
ThebestwaytosolvethisproblemisforthecustomertoaskthebackupISPto
changeitsroutingpolicy.ThechangeshouldcausethebackupISPtoprefer
reachingthecustomerASviatheASoftheprimaryISP.ThebackupISPmust
implementthischangeinitsownAS.
SometimesthebackupISPadministratormightbe
reluctanttochangetheconfigurationforasingle
customer.Inthiscase,thecustomershoulduseanother
BGPfeature,theASpathprependingtool,toinfluencethe
selectionoftheprimaryorbackuplinkbylengtheningthe
ASpathofroutesthataresenttothebackupprovider.
ReturnTrafficIssue

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
Some customers need redundant Internet access for their mission-critical
applications and address this need by having two separate connections to one
ISP or implementing a multihomed configuration (connecting to two different
Internet service providers).
The multihomed customer network must exchange BGP information with both
ISP networks. Dynamic routing is required for full redundancy, and BGP is the
only protocol available that can be used in this scenario.
An approach to multihoming that is too simple can be a source of problems.
Starting BGP sessions and announcing customer networks to multiple ISPs by
using the default behavior of BGP may not result in optimal routing.
Depending on the circumstances, a multihomed customer may require different
polices. For example, one of the two ISPs being considered the primary
connection or reaching destinations in one part of the world more optimally via
one of the ISPs. Optimization should be done with the most common
destinations in mind, resulting in specific rules on how to reach specific
destination networks or the AS.
In BGP route selection, a routing policy may be created that gives precedence to
reaching destinations within the AS of the primary ISP and all upstream ASs
over the primary link. All destinations within the AS of the backup ISP can be
reached over the backup link.
When BGP has selected the best path and the information has been propagated
to all neighboring autonomous systems, the customer AS may become a transit
AS between the two ISPs. The customer must avoid this situation by using BGP
filters.
Summary

Overview
InnetworkimplementationsthatrequireconnectionstomultipleISPs,youwill
typicallyuseASpathfilterstoinfluenceBGProuteselection.Itisimportantforyou
asanetworkadministratortounderstandthesyntaxofanASpathregular
expression.Itisalsoimportanttounderstandhowstring-matchingoperatorsfunction
whentheyareusingASpathregularexpressionstomatchBGProutes.
BGPallowsconnectivitybetweenmultipleISPsforredundancyandscalability.You
canemployASpathfilterstoremedytheproblemsthatareassociatedwiththe
variousconnectivitymethodsthatareusedwithinBGP.Thislessonexplainsthe
methodsthatareusedtoimplementBGPASpathfilters.
Uponcompletingthislesson,youwillbeableto:
Identifynetworkscenariosinwhichyoumustsupportconnectionstomultiple
ISPsandinwhichASpathfilterscanbeusedtoinfluencerouteselection
DescribethefunctionofanASpathregularexpression
Explainhowstring-matchingoperatorsfunctionwhenyouareusingASpath
regularexpressionstomatchBGProutes
IdentifywhereyoucanapplyanASpathfilterwhenconfiguringarouterto
influencerouteselection
IdentifytheCiscoIOScommandsthatarerequiredtoconfigureASpathfiltersto
influencerouteselection
IdentifytheCiscoIOScommandsthatarerequiredtomonitortheoperationof
configuredASpathfilters
EmployingASPathFilters

Severalscenariosrequirefilteringandselectionofroutinginformation,whichis
basedonthecontentoftheASpathattribute.EachBGProutemusthaveanAS
pathattribute.Itisawell-knownmandatoryattributeandmustthereforebepresent
ineachBGPupdate.
Several scenarios require BGP route-filtering which is based on the AS path:
Announce only local routes to the ISP—AS path needs to be empty
Select routes that are based on a specific AS number in the AS path
Accept routes for specific AS only from some BGP neighbors
AS path filters use regular expressions.
UsingselectioncriteriathatarebasedontheASpathattribute,aroutercanidentify
asetofspecificroutesfromthetotalsetofroutesthatitreceives.Thoseroutes
wheretheASpathcontentsmatchthecriteriaareselected.Routesthatdonot
matchthecriteriaarenotselected.
TheASpathisasequenceofnumbers.EachnumberindicatesanAS.Whena
routeissourcedbyanetworkcommandinaBGPprocessorredistributionintoa
BGPprocess,theASpathattributeiscreatedandleftempty.Eachtimetheegress
routeradvertisestheroutetoanotherAS,itmodifiestheASpathattribute.Egress
routerprependsitsASnumbertotheASpathattribute.
WhileanewlysourcedrouteisstillwithintheASinwhichitwascreated,theAS
pathisempty.AssumethattheAShasarequirementtofilteroutallbuttheroutes
thatarelocaltoitselfbeforesendingthemtoaneighboringAS.TheASwillpermit
sendingoftherouteswiththeemptyASpathandwilldenyallothers.
RouterscanalsofilterincomingroutesthatarebasedontheirASpathattributes.
Somedestinationautonomoussystemsshouldnotbereceivedfromacertain
neighbor.Therefore,theroutesmatchingthatASintheASpathcanbefilteredon
thereceivingrouterincasetheyareaccidentallysent.
SelectionthatisbasedontheASpathisalsoatoolthatyoucanusewhenchanging
theweightorlocalpreferenceattributesonlyforsomedestinationASs.
WhenroutersfilterBGPupdatesbasedonthecontentoftheASpathattribute,they
useregularexpressions.RegularexpressionsarecommonlyfoundintheUNIX
environmentandalsoinsomeMicrosoftWindows-basedapplications.Regular
expressionsareastring-matchingtool.Aregularexpressionconsistsofastringof
characters.Someofthesecharactershavespecialmeanings,suchasfunctioningas
wildcardsandoperators.Someofthesecharacterssimplymeanthemselves,for
example,AtoZ,atoz,or0to9.Aregularexpressionissaidtomatchastringifthe
ordinarycharactersandtheappliedmeaningofthespecialoperatorcharacterscan
betranslatedintothematchedstring.Whenaregularexpressionmatches,the
selectiontestissaidtobetrue.Ifitdoesnotmatch,thetestisfalse.
ASPathFilteringScenarios

TheASpathattributethatiscarriedwithallBGProutesinaBGPupdateisavery
compactbinaryencodingofasequenceofintegernumbers.Itisnotasequencethat
canbetestedbyusingaregularexpression.
CiscoIOSsoftwareinternallytranslatesthebinaryencodingintoacharacterstring.
EachASnumberinthesequenceisconvertedintoastringusingdecimal
representation.ThespacecharacterseparateseachASnumberintheASpath
attribute.Therouterappliestheregularexpressiontesttothisinternallycreated
characterstring.
Charactersinaregularexpressionthatarenotassignedaspecificoperationmatch
themselves.Theregularexpression"31"matchesalloccurrencesofthecharacter
"3"followedbythecharacter"1"intheASpath.Inthisexample,"31"matchesattwo
occurrences.Oneoccurrenceissufficienttomakethetesttrue.Nooccurrence
meansthatthetestfailed.
ASPathRegularExpressions

HowdoesstringmatchingfunctionswhenyouareusingASpathregular
expressionstomatchBGProutes?
RegularExpressions
A string of characters in a regular expression matches any equivalent substring in
the AS path.
How many times does "31" match?
|213 317 2316 31|
Answer: Three times
|213 317 2316 31|
Theregularexpression"31"willmatchanyoccurrenceof"3"followedby"1"
regardlessofthecharactersimmediatelyprecedingthe"3"andimmediately
followingthe"1."Therefore,"31"willmatchanoccurrenceof"3"and"1"inthe
middleofanASnumber.
Theregularexpression"31"matchestheASpathstring"213317231631"three
times,because"31"matchesapartof"317,""2316,"and"31."
Alternatives
Expression expr1|expr2 matches the string if either subexpression matches the
string.
How many times does "21|31" match?
|213 317 2316 31|
Answer: Four times
|213 317 2316 31|
Thecharacter"|"(verticalbar)hasaspecialmeaning.Itisanoperatorthatmeans
"or."Theregularexpression"21|31"matchesthesequenceof"2"followedby"1"or
thesequenceof"3"followedby"1."Therefore,thissampleregularexpressionwill
matchatwo-charactersequence:the"21"orthe"31."
Theregularexpression"21|31"matchestheASpathstring"213317231631"four
times,because"21"matchesapartof"213"and"31"matchesapartofboth"317"
and"2316"andalso"31."
RangesandWildcardCharacters
A range of characters matches any single character in the range.
Example: "[1234]" or "[1-4]"
Dot "." matches any single character
How many times does "[1-3].[34]" match?
|213 317 2316 31|
Answer: Twice
|213 317 2316 31|
|213 317 2316 31|
Thepairofbrackets"["and"]"hasaspecialmeaning.Bracketssurroundasetof
charactersofwhichanyonematches.Thesetofcharactersiseitherexpressedas
thelistofthematches(forexample,"[1234]")orthesequencewiththestarting
StringMatching

character,ahyphen,andtheendingcharacter(forexample,"[1-4]").Bothexamples
matchonesinglecharacter,whichmustbeanyoneinthesetofthefourcharacters
"1,""2,""3,"and"4."
Thecharacter"."(adot)matchesanysinglecharacter.Smallregularexpressions
canbecombinedintoalargerexpression.Suchacombinationismatchingifallof
thepartsmatchoneaftertheother.Thesampleregularexpression"[1-3].[34]"
matchesasequenceofthreecharacters,ofwhichthefirstmustbeeither"1,""2,"or
"3."Thesecondcharactercanbeanycharacter,andthethirdmustbeeither"3"or
"4."
ThespacecharacterdelimitingtwoASnumbersisjusta
character.Thedot(".")forexample,matchesthis
character.
Theregularexpression"[1-3].[34]"matchestheASpathstring"213317231631"
twice.Initially,itmatches"213."Theleading"[1-3]"matchestheleading"2."Thedot,
whichmatchesanycharacter,matchesthe"1,"and"[34]"matchesthetrailing"3."
Theregularexpressionalsomatchesin"213317231631."Thematchisalittle
hardertosee,becausethedot(".")matchesthespacecharacterbetween"213"and
"317."
MatchingDelimiters
^ Matchesbeginningofstring
$ Matchesendofstring
_ Matchesanydelimiter(beginning,end,whitespace,tab,comma)
|213 317 218 31 731|
Does "^21" match?
Answer: Yes
|213 317 218 31 731|
|213 317 218 31 731|
Does "31$" match?
Answer: Yes
|213 317 218 31 731|
Does "_31_" match?
Answer: Yes
|213 317 218 31 731|
Acharacterstringmusthaveastartandanend.Thecharacterwiththespecial
meaning"^"matchesthebeginningofastring.Becauseallstringshaveabeginning,
the"^"charactermatchesallstrings.However,the"^"characterisusedtoposition
thepartoftheregularexpressionthatfollows.Thecharacterfollowingthe"^"
charactermustbethefirstcharacterofthestring;otherwise,thatcharacterwouldnot
matchthebeginningofthestring.
Thespecialcharacter"$"isusedanalogously,butitmeanstheendofthestring.
Thecharacterprecedingthe"$"mustbethelastcharacterinthestring;otherwise,
the"$"doesnotmatchtheendofthestring.
Theunderscore("_")matchesanydelimiter.ThespacecharacterbetweentwoAS
numbersisanexampleofadelimiter.Thebeginningofthestringandtheendofthe
stringarealsoconsidereddelimiters.Otherdelimitersarethetabandthecomma
(",").Theunderscore("_")isusedtoensurethatthedesiredASnumberisfoundin
anASpathstringbutnotaspartofsomeotherASnumber.Forexample,theregular

expression"31"willmatchtheASnumberstring"317,"buttheregularexpression
"_31_"willnot.Both"31"and"_31_"willmatchtheASnumberstring"31."
Theregularexpression"^21"canmatchtheASpathstring"21331721831731"
onlyonetimebecausethereisonlyonebeginningofthestring.Theregular
expression"^21"matchesonlyifthestringstartswiththesequence"21,"whichit
does.
Theregularexpression"31$"canmatchtheASpathstring"21331721831731"
onlyonetimebecausethereisonlyoneendofthestring.Theregularexpression
"31$"matchesonlyifthestringendswiththesequence"31,"whichitdoes.
Theregularexpression"_31_"can,intheory,matchanASpathstringseveraltimes.
However,inthiscase,whenmatchedagainstthestring"21331721831731,"the
regularexpression"_31_"matchesonlytheASnumber"31"intheASpath.
Grouping
Parentheses can be used to group smaller regular expressions intro larger
expressions.
How many times does "(213|218)_31" match?
|213 317 1218 316 31|
Answer: Twice
|213 317 1218 316 31|
Complicatedexpressionsmustsometimesbegroupedwithparentheses,"("and")."
Thisfeaturecanbeusefulinthefollowingexample.Youaresearchingfora
sequenceoftwoormoreASnumbersofwhichthefirstcanmatchanyofthespecific
AS(inthisexample,"213"or"218").HoweverthelastmustbeaspecificAS("31"in
thisexample).Iftheparentheseswerenotusedhere,theexpressionwouldmatch
eitherthesingleAS"213"orthesequenceofthetwo(21831).
Theregularexpression"(213|218)_31"matchestheASpathstring"2133171218
31631"twice.Thefirstmatchis"213317121831631."Thesecondmatchis"213
317121831631."
SpecialCharacters
To use the special character as single-character patterns, remove the special
meaning by preceding each character with backslash "\"
How do you match "AS 213" in the beginning of the string?
| (213 317) 1218 316 31|
Answer:
^\(213_
Sometimesthetargetstringthatyouaretryingtomatchwitharegularexpression
containssomeofthecharactersthatalsohavespecialmeaningsintheregular
expression.Tomatchthesecharactersinthetargetstring,usethebackslash"\"
togetherwiththecharacterintheregularexpression.
Thistypeofregularexpressionsyntaxisusedfor
matchingASpathstringsinsideaBGPconfederation.A
confederationisusedtoeliminatethescalingproblemof
full-meshIBGPbysplittingtheASintosmallerregional
autonomoussystems.Theexampleshowsthat213and
317werepartofaconfederationbyitsuseof"("and")."
RepeatingOperators
* Matcheszeroormoreatoms
?Matcheszerooroneatom

+ Matchesoneormoreatoms
An atom is a single character or a grouping.
How do you match AS sequences "23 45" and "23 78 45" in a single regular
expression?
Answer:
_23(_78)?_45_
Thespecialcharacters,star(asterisk),"*,"questionmark,"?,"andplus,"+,"allapply
repetitionoftheexpressionthatimmediatelyprecedesthem.
Thestar(asterisk),"*,"meansthattheexpressionthatimmediatelyprecedesitis
repeatedzeroormoretimes.Theexpressionmaynotbethere,butitmayalsobe
thereanynumberoftimes.Theexpression"1*"willmatchasequenceofno
charactersorasequenceofanynumberofthecharacter"1."
Aquestionmarkmeans,thattheexpressionthatimmediatelyprecedesitisrepeated
zerooronetime.Theexpressionmaynotbethere,butitmayalsobethereonce.
Theexpression"1?"willmatchasequenceofnocharactersorthesinglecharacter
"1."
Theplussign("+")meansthattheexpressionthatimmediatelyprecedesitis
repeatedoneormoretimes.Theexpressionmustbethereatleastonce.The
expression"1+"willmatchasequenceofoneormoreofthecharacters"1."
StringMatchingExample
_100_ GoingthroughAS100
^100$ DirectlyconnectedtoAS100
_100$ OriginatedinAS100
^100_. NetworksbehindAS100
^[0-9]+$ ASpathsoneASlong
^([0-9]+)(_\1)*$ PrependingperformedinneighboringoriginatingAS
^$ NetworksthatoriginateinlocalAS
.* Matcheseverything
Regularexpressionscanbearbitrarilycomplex.However,mostsearchingis
accomplishedusingregularexpressionssimilartotheregularexpressionsfoundin
thefollowingexamples:
IfyouaresearchingforallroutesthathaveAS100intheirASpaths,theregular
expressiontouseis"_100_."
Ifyouaresearchingforallroutesthataresourcedinyourdirectlyconnected
neighboringAS100,theregularexpressiontouseis"^100$."Usean
expressionwithbothacarat("^")anddollarsign("$")presentwhenyouare
searchingforanexactmatch.
IfyouaresearchingforallroutesthataresourcedinAS100,whichisnot
necessarilyadirectlyconnectedneighboringAS,theregularexpressiontouse
is"_100$."Thedollarsign("$")indicatesthattheASpathmustendwithAS
100.MeaningthattheroutewassourcedinAS100.Theunderscore("_")is
usedtomakesurethatitisAS100attheendofthestringandnot,forexample,
AS2100.
IfyouaresearchingforalltheroutesthatarereachablebehindAS100,the
regularexpressiontouseis"^100_."Thecarat("^")indicatesthattheASpath
muststartwithAS100.Theunderscore("_")isusedtomakesurethatthis
numberisnotmatchingwith,forexample,AS1001.Thedot(".")isusedto
indicatethattheASpathdoesnotendwithAS100,andthattheremustbe
somethingfollowingAS100.
IfyouaresearchingforallroutesthataresourcedinanyASdirectlyneighboring
yourAS,theregularexpressiontouseis"^[0-9]+$."The"[0-9]"partmeansany

digit.Theplussign("+")repetitioncharactermeansoneormoretimes.
Therefore,thecombination"[0-9]+"meansasequenceofoneormoreofdigits.
Thecarat("^")anddollarsign("$")meanthebeginningandtheendofthe
string.Therefore,thestringmayconsistonlyofasequenceofoneormore
digits.
IfyouaresearchingforallroutesthataresourcedinanyASdirectlyneighboring
yourAS,andpossiblyperformingASpathprepending(multiplicationofadirectly
connectedASnumber),theregularexpressiontouseis"^([0-9]+)(_\1)*$."The
expressioninthefirstsetofparenthesesmatchesanyASnumber.The
parenthesesstorethevalueofthematchedAS,andthesecondpartofthe
regularexpression,includingavariable,thenrecallsit.Thevariable"\1"isput
intoparenthesesforthepurposeofthemultiplieroperator"*."Imeaningthatthis
partcanmatchanynumberofsuccessiveoccurrencesofthesameASnumber
thatthe"[0-9]+"expressionmatched.Forexample,thisregularexpression
matchesASpaths"999999,""200,""101101,"or"55555,"butitdoesnot
matchtheASpath"10199."
Thecombination"^$"meansanemptystringandisusedwhenyouare
searchingforallroutesthataresourcedinthelocalAS.
Sometimesasearchismadetoselectafewspecificroutesanddosomething
specialwiththem,whiletherestoftherouteswillbehandledinadifferentway.
Tosearchforallroutes,regardlessofthecontentoftheirASpathattribute,use
theregularexpression".*".Thedot(".")matchesanysinglecharacter.The
repetitioncharacter,star(asterisk),"*,"meansthatthematchshouldbe
repeatedzeroormoretimes.Thus,thecombination(".*")matchesanystring.
CommonlyUsedCharactersinExpressionsExample
. Anysinglecharacter,includingaspace
*Zeroormoresequencesofpattern
+Oneormoresequencesofpattern
?Zerooroneoccurrenceofpattern
^Beginningofstring
$Endofstring
_Matchanydelimiter(includingbeginning,end,space,tab,comma)
\Removespecialmeaningofcharacterthatfollows
[] Matchonecharacterinarange
|LogicalOR
Thefigureliststhemostcommonlyusedcharactersinexpressions.

ASpathfiltersthatareconfiguredonarouterselectthoseroutesthatareallowed.
Routesthatareselectedbehaveasdescribedhere:
TheselectedroutesenterthelocalBGPtablewhentheselectionisappliedon
theincomingroutesfromaneighbor;routesthatarenotselectedaresilently
dropped.
Theselectedroutesaretransmittedtotheneighborwhentheselectionis
appliedontheoutgoingroutestotheneighbor.Routesthatarenotselectedare
usedlocallybutareneversenttotheneighbor.
ApplyingASPathFilters

ASpathaccesslistcreatesanASpathfilter.Thisaccesslistisappliedtoasetof
routesfromwhichtoselectasubset.Routesthattheaccesslistpermitsareincluded
inthesubset,andthoseroutesthataredeniedarenotincluded.Asinallaccess
lists,thecandidatetobepermittedordeniedmembershipinthesubsetistested
againstallthelinesintheaccesslist.Theorderoftestingistheorderinwhichthe
listisconfigured.Thefirstmatchindicates"permit"or"deny,"asspecified.Iftheend
oftheaccesslistisreachedwithoutanyexplicitmatch,thecandidateisimplicitly
denied.
router(config)# ip as-path access-list number {permit|deny} regexp
Configures AS path access-list
router(config-router)# neighbor ip-address filter-list as-path-
filter {in|out}
Configures inbound or outbound AS path filter for specified BGP neighbor
ThetestbytheASpathaccesslistisperformedbyusingregularexpressionsthat
areappliedontheASpathattributeoftheroute.
Theaccesslistcan,forexample,beappliedontheroutesreceivedfrom,orsentto,
aspecificBGPneighbor.
ipas-pathaccess-list
TodefineaBGPASpathaccess-list,usetheipas-pathaccess-listglobal
configurationcommand:
ip as-path access-list access-list-number {permit | deny} as-regular-
expression
Todisableuseoftheaccess-list,usethenoformofthiscommand.
no ip as-path access-list access-list-number {permit | deny} as-regular-
expression
SyntaxDescription
Parameter Description
access-list-number Integerfrom1to199thatindicatestheregularexpression
access-listnumber.
permit Permitsaccessformatchingconditions.
deny Deniesaccesstomatchingconditions.
as-regular-expression ASintheaccess-listusingaregularexpression(Seethe"Regular
Expressions"appendixintheCiscoIOSDialServicesCommand
Referenceforinformationaboutformingregularexpressions.)
neighborfilter-list
TosetupaBGPfilter,usetheneighborfilter-listrouterconfigurationcommand:
neighbor {ip-address | peer-group-name} filter-list access-list-
number {in | out}
Todisablethisfunction,usethenoformofthiscommand:
no neighbor {ip-address | peer-group-name} filter-list access-list-
number {in | out}
SyntaxDescription
Parameter Description
ip-address IPaddressoftheneighbor.
ConfiguringBGPASPathFilters

peer-group-name NameofaBGPpeergroup.
access-list-number NumberofanASpathaccess-list.Definethisaccess-listwiththe
ipas-pathaccess-listcommand.
in Access-listtoincomingroutes.
out Access-listtooutgoingroutes.
Parameter Description
MultihomedcustomersdonotwanttoactasatransitASbetweentheirservice
providers.Thecustomeravoidsthissituationbynottransmittingallitsroutestoits
serviceproviders.TheserviceprovidersendsIPpacketstothecustomeronlyifthe
destinationaddressesmatchoneoftheroutesthatthecustomerhassentbyBGPto
theserviceprovider.Bymakingsurethatonlylocallysourcedroutesaresent,the
customeravoidsreceivingIPpacketsfordestinationsoutsideitsownAS.
WithinthecustomerAS,thelocallysourcedrouteshaveemptyASpaths.The
regularexpression"^$"matchestheemptystrin.Thecommandipas-pathaccess-
list1permitsonlytheroutesthatarelocallysourcedandimplicitlydeniestherest.
Byapplyingthisfilter-listonoutgoinginformationtoallneighbors,thecustomerwill
announcelocalroutesonly.

Overview
Throughthisdiscovery,youwilllearnhowtoconfigureBGPASpathfiltersasa
routefilteringmechanism.Youwillpreventtransmittingroutes,thatarereceivedon
routerR2,fromoneISProutertootherISProuter.Thisway,youmakesurethat
customer'sautonomoussystemAS1doesnotbecometransitAS.
Discovery7:ConfigureNon-TransitAutonomousSystem

Topology

Ifyoushutdownaninterfaceonarealrouterorswitch,the
connecteddevicewillseeitas"down/down."Dueto
virtualizationspecifics,IOLbehaviorisslightlydifferent.If
youshutdownaninterfaceonarouterorswitch,the
connecteddevicewillseeitas"up/up."InIOL,thestatus
ofaninterfacecanonlybe"up/up"or"administratively
down/down."
DeviceInformation
Device Interface IPaddress Description
R2 Ethernet0/0 172.16.22.2/24 ConnectiontoISP2
R2 Ethernet0/1 172.16.12.2/24 ConnectiontoISP1
R2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
10.0.0.1/28
10.0.0.17/28
10.0.0.33/28
10.0.0.49/28
10.0.0.65/28
Loopbackssimulate
LANnetworks
ISP1 Ethernet0/1 172.16.12.11/24 ConnectiontoR2
ISP1 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
10.0.1.1/28
10.0.1.17/28
10.0.1.33/28
10.0.1.49/28
10.0.1.65/28
10.0.1.81/28
Loopbackssimulate
LANnetworks
ISP1 Loopback21
Loopback37
Loopback40
10.0.21.1
10.0.37.1
10.0.40.1
Loopbackssimulate
morenetworksin
differentautonomous
systems.
ISP2 Ethernet0/0 172.16.22.22/24 ConnectiontoR2
ISP2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
Loopback7
Loopback8
Loopback9
10.0.2.1/28
10.0.2.17/28
10.0.2.33/28
10.0.2.49/28
10.0.2.65/28
10.0.2.81/28
10.0.2.97/28
10.0.2.113/28
10.0.2.129/28
Loopbackssimulate
LANnetworks
ISP2 Loopback21
Loopback37
Loopback40
10.0.21.1
10.0.37.1
10.0.40.1
Loopbackssimulate
morenetworksin
differentautonomous
systems.
IPaddressesandadvertisednetworksinBGParepreconfiguredasshownbelow:
JobAids

BGPisalsopreconfiguredasEBGP(R2toISP1andR2toISP2).

Step1
OntheISP2router,verifythatyoureceiveroutesthattherouterISP1advertises.
ISP2# show ip bgp
BGP table version is 32, local router ID is 10.0.40.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/24 172.16.22.2 0 0 1 i
*> 10.0.1.0/28 172.16.22.2 0 1 100 i
*> 10.0.1.16/28 172.16.22.2 0 1 100 i
*> 10.0.1.32/28 172.16.22.2 0 1 100 i
*> 10.0.1.48/28 172.16.22.2 0 1 100 i
*> 10.0.1.64/28 172.16.22.2 0 1 100 i
*> 10.0.1.80/28 172.16.22.2 0 1 100 i
*> 10.0.2.0/28 0.0.0.0 0 32768 i
*> 10.0.2.16/28 0.0.0.0 0 32768 i
*> 10.0.2.32/28 0.0.0.0 0 32768 i
*> 10.0.2.48/28 0.0.0.0 0 32768 i
*> 10.0.2.64/28 0.0.0.0 0 32768 i
*> 10.0.2.80/28 0.0.0.0 0 32768 i
*> 10.0.2.96/28 0.0.0.0 0 32768 i
Network Next Hop Metric LocPrf Weight Path
*> 10.0.2.112/28 0.0.0.0 0 32768 i
*> 10.0.2.128/28 0.0.0.0 0 32768 i
*> 10.0.21.0/24 0.0.0.0 0 32768 i
* 10.0.37.0/24 172.16.22.2 0 1 100 37 i
*> 0.0.0.0 0 32768 i
* 10.0.40.0/24 172.16.22.2 0 1 100 37 40 i
*> 0.0.0.0 0 32768 i
YoucanseethatISP1routerinAS100eitheroriginatesoradvertisesallhighlighted
routestotherouterR2:
Networks10.0.1.0/28,10.0.1.16/28,10.0.1.32/28,10.0.1.48/28,10.0.1.64/28and
10.0.1.80/28wereoriginatedbyISP1routerinAS100andadvertisedtotherouter
R2.
RouterISP1advertisesnetworks10.0.37.0/24and10.0.40.0/24totherouterR2.
ThecustomerrouterR2originatesroute10.0.0.0/24.
AlltheserouteshavenexthopsettoIPaddress172.16.22.2,whichistheIPaddressof
theR2router.
Step2
OntheR2router,verifywhichroutesarebeingadvertisedtoEBGPneighborrouterISP2.
R2# show ip bgp neighbors 172.16.22.22 advertised-routes
BGP table version is 22, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/24 0.0.0.0 0 32768 i
*> 10.0.1.0/28 172.16.12.11 0 0 100 i
*> 10.0.1.16/28 172.16.12.11 0 0 100 i
*> 10.0.1.32/28 172.16.12.11 0 0 100 i
*> 10.0.1.48/28 172.16.12.11 0 0 100 i
*> 10.0.1.64/28 172.16.12.11 0 0 100 i
*> 10.0.1.80/28 172.16.12.11 0 0 100 i
*> 10.0.2.0/28 172.16.22.22 0 0 200 i
*> 10.0.2.16/28 172.16.22.22 0 0 200 i
*> 10.0.2.32/28 172.16.22.22 0 0 200 i
*> 10.0.2.48/28 172.16.22.22 0 0 200 i
*> 10.0.2.64/28 172.16.22.22 0 0 200 i
*> 10.0.2.80/28 172.16.22.22 0 0 200 i
ConfigureASPathFilters
DiscoverySteps

*> 10.0.2.96/28 172.16.22.22 0 0 200 i
Network Next Hop Metric LocPrf Weight Path
*> 10.0.2.112/28 172.16.22.22 0 0 200 i
*> 10.0.2.128/28 172.16.22.22 0 0 200 i
*> 10.0.21.0/24 172.16.22.22 0 0 200 21 i
*> 10.0.37.0/24 172.16.12.11 0 0 100 37 i
*> 10.0.40.0/24 172.16.12.11 0 0 100 37 40 i
Total number of prefixes 19
YoucanseethatISP1routerinAS100eitheroriginatesoradvertisesallhighlighted
routestotherouterR2:
ThecustomerrouterR2advertisesthelocallyoriginatedroute10.0.0.0/24tothe
routerISP2.
ThecustomerrouterR2advertisesnetworks10.0.1.0/28,10.0.1.16/28,10.0.1.32/28,
10.0.1.48/28,10.0.1.64/28and10.0.1.80/28totherouterISP2.
ThecustomerrouterR2advertisesnetworks10.0.37.0/24and10.0.40.0/24tothe
routerISP2.
Step3
ConfigureASpathfilteringontheR2router,sothatonlylocallyoriginated
networkwillbeadvertisedtobothISP1andISP2routers.
R2(config)# ip as-path access-list 1 permit ^$
R2(config)# router bgp 1
R2(config-router)# neighbor 172.16.12.11 filter-list 1 out
R2(config-router)# neighbor 172.16.22.22 filter-list 1 out
Step4
ClearallBGPsessionsontheR2router.
R2# clear ip bgp *
Step5
OntheISP2router,verifythatyoudonotreceiveroutesthattheISP1routeradvertises.
ISP2# show ip bgp
BGP table version is 26, local router ID is 10.0.40.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/24 172.16.22.2 0 0 1 i
*> 10.0.2.0/28 0.0.0.0 0 32768 i
*> 10.0.2.16/28 0.0.0.0 0 32768 i
*> 10.0.2.32/28 0.0.0.0 0 32768 i
*> 10.0.2.48/28 0.0.0.0 0 32768 i
*> 10.0.2.64/28 0.0.0.0 0 32768 i
*> 10.0.2.80/28 0.0.0.0 0 32768 i
*> 10.0.2.96/28 0.0.0.0 0 32768 i
*> 10.0.2.112/28 0.0.0.0 0 32768 i
*> 10.0.2.128/28 0.0.0.0 0 32768 i
*> 10.0.21.0/24 0.0.0.0 0 32768 i
*> 10.0.37.0/24 0.0.0.0 0 32768 i
*> 10.0.40.0/24 0.0.0.0 0 32768 i
TheonlyroutethatisreceivedfromtherouterR2withnexthopIPaddress172.16.22.2is
10.0.0.0/24,whichislocallyoriginatednetworkoncustomer'srouterR2.
Step6
OntheR2router,verifywhichroutesarebeingadvertisedtoEBGPneighborrouterISP2.
R2# show ip bgp neighbors 172.16.22.22 advertised-routes
BGP table version is 22, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/24 0.0.0.0 0 32768 i
Total number of prefixes 1
Youshouldonlyseethenetwork10.0.0.0/24beingadvertisedtotheEBGPneighbor
ISP2.ThisnetworkislocallyoriginatedontheR2router.YoumadethecustomerAS1a
non-transitautonomoussystem.

TheCiscoIOScommandsthataremostfrequentlyusedtomonitortheoperationof
configuredASpathfiltersincludeshowipas-path-access-list,showipbgp
regexp,andshowipbgpfilter-list.
router# show ip as-path-access-list [filter list]
Displays all routes in the BGP table matching regular-expression in one or all
filter-lists
router# show ip bgp regexp regular-expression
Displays one or all filter-lists
router# show ip bgp filter-list access-list-number
Displays all routes in the BGP table that the specified AS path access-list
permits
showipas-path-access-listCommand
Displaying configured filters:
R2# show ip as-path-access-list
AS path access list 1
permit ^$
AS path access list 7
deny _21_
permit .*
AS path access list 25
permit 40$
Theshowipas-path-access-listcommanddisplaysaspecificaccess-listorallAS
pathaccess-listsintherouter.
showipbgpregexpCommand
Routes that an expression matches:
R2# show ip bgp regexp _21_
BGP table version is 20, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - inte
rnal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-
Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.21.0/24 172.16.22.22 0 0 200 21 i
* 172.16.12.11 0 0 100 37 40 2
1 i
* 10.0.37.0/24 172.16.22.22 0 0 200 21 40 3
7 i
* 10.0.40.0/24 172.16.22.22 0 0 200 21 40 i
Becauseregularexpressionssometimesgetcomplex,thoroughtestingofthemis
required.Theshowipbgpregexpcommanddisplaysallroutescurrentlyinthe
BGPtablethathaveanASpathattributethatmatchesthetyped-inregular
expression.Usetheshowipbgpregexpcommandtotestaregularexpressionthat
istypedinonthecommandline.Theresultisaprintoutonthescreenofallthose
routescurrentlyintheBGPtablethathadanASpathattributematchingthetyped-in
regularexpression.
Intheexample,youwishtofindallBGProutespassingthroughAS21.
showipbgpregexpCommand
TodisplayroutesthatmatchanASpathregularexpression,usetheshowipbgp
regexpprivilegedEXECcommand:
MonitoringASPathFilters

show ip bgp regexp regular-expression
SyntaxDescription
Parameter Description
regular-expression RegularexpressiontomatchtheBGPASpaths
Routes that a filter-list matches:
R2# show ip as-path-access-list 25
AS path access list 25
permit 40$
R2# show ip bgp filter-list 25
BGP table version is 20, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - inte
rnal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-
Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
* 10.0.40.0/24 172.16.22.22 0 0 200 21 40 i
*> 172.16.12.11 0 0 100 37 40 i
AnASpathaccess-listisevenmorecomplexbecauseitisacombinationofseveral
regularexpressions.Thereisoneexpressiononeachaccess-listline.Usetheshow
ipbgpfilter-listcommandtotesttheentireASpathaccess-list.Theresultisa
printoutonthescreenofalltheroutescurrentlyintheBGPtablethattheaccess-list
permitstheirASpathattribute.
TheASpathaccess-listnumber25intheexamplefigureconsistsofonesingleline.
ItpermitstheroutesthatoriginateinAS40.Theshowipbgpfilter-listcommand
displaysalltheroutescurrentlyintheBGPtablethattheASpathaccess-list25
permits.
showipbgpfilter-listCommand
Todisplayroutesthatconformtoaspecifiedfilter-list,usetheshowipbgpfilter-list
privilegedEXECcommand:
show ip bgp filter-list access-list-number
SyntaxDescription
Parameter Description
access-list-number Integerfrom1to199thatindicatestheregularexpression
access-listnumber

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
Several scenarios require BGP route-filtering that is based on AS path,
including:
Announcing only local routes to the ISP (AS path needs to be empty).
Selecting routes that are based on a specific AS number in the AS path.
Accepting routes for a specific AS only from some BGP neighbors
By applying specific selection criteria to the contents of the AS path attribute,
routers can select a subset of routes from the total set of routes that are
received.
Cisco IOS software internally translates the AS path encoding, which is carried
with all BGP routes into a character string. This string is then tested against the
regular expression.
String matching operates when you are using AS path regular expressions to
match BGP routes.
You can use AS path filters to select those routes that will be allowed.
AS path access-list creates an AS path filter, which is applied to a set of routes
from which to select a subset. The ip as-path access-list global configuration
command defines a BGP AS path access-list, and the neighbor filter-list router
configuration command sets up a BGP filter.
There are a number of Cisco IOS commands that are required to monitor the
operation of configured AS path filters, including show ip as-path-access-list,
show ip bgp regexp, and show ip bgp filter-list.
Summary

Overview
WheremultiplepathsbetweenacustomerandanISPexist,thereisarequirement
tofiltercertaininformationduringBGPupdates.Youfiltertheinformationto
influencetherouteselectionortoenforceanadministrativepolicy.Tomeetthis
requirement,youmustusefilters.Usingprefixlistsistypicallyeasierthanusing
standardIPaccesslistsandprovidesperformancebenefits.Itisimportantforyouto
understandthecommandstoapplyfilteringofinboundoroutboundupdateswith
prefixlistsandwheretheyshouldbeapplied.
Inthislesson,youwilllearntherequirementsforusingprefix-basedfiltersin
customerimplementationswhereconnectionstomultipleISPsmustbesupported.
YouwillalsolearntheadvantagesofprefixlistsoverIPaccesslists.Thecommands
toapplyfilteringofinboundoroutboundupdateswithprefixlistsandtoconfigure
prefixlistfiltersarediscussed,andalsowherenetworkadministratorsshouldapply
them.
Uponcompletingthislesson,youwillbeableto:
Identifytherequirementforprefix-basedfiltersinnetworkimplementations
wheremultipleconnectionsbetweenacustomerandISPsexist
ListtheadvantagesofprefixlistsversusIPaccesslists
IdentifytheCiscoIOScommandthatisrequiredtoconfigureprefixlistfilters
DescribewhereyoucanimplementprefixlistsinaBGPnetwork
IdentifytheCiscoIOScommandsthatarerequiredtoapplyfilteringofinbound
oroutboundupdateswithprefixlists
IdentifytheCiscoIOScommandsthatarerequiredtomodifyconfiguredprefix-
listfilters
IdentifytheCiscoIOScommandsthatarerequiredtomonitortheoperationof
configuredprefixlistfilters
FilteringwithPrefixLists

Customerswithmultihomednetworksareresponsibleforannouncingtheirown
networksusingBGP.Typically,customersarenotasexperiencedwithBGPas
serviceproviders,andthereforeproblemsaremorelikelytooccur.Aservice
providerwithamultihomedcustomermusttakeprecautionsnottoaccept,use,or
forwardanyerroneousroutinginformationthatisreceivedfromthecustomer.
Service providers have to filter customer updates to ensure that the customers
announce only their assigned address space.
ThecustomerisassignedasetofIPnetworknumbersthatitshouldannounce.Ifthe
customerannouncesanyadditionalnetworks,somethingiswrong.Thecustomer
mayhaveforgottennottoactasatransitASandmayhavestartedpropagating
routesthatithasreceivedfromtheotherserviceprovider.Or,thecustomermay
haveaccidentallystartedtoannounceitsprivateaddressspace.Thecustomermay
usethisprivateaddressspaceforaddresslinks,loopbackinterfaces,orother
devicesthatshouldneveraccesstheInternet.
Toavoidproblems,theserviceprovidercanapplyanIPprefixfilterontheincoming
informationfromthecustomer.Theserviceproviderwillacceptonlynetwork
numbersthattheaccesslistorprefixlistpermits.
RequirementsforPrefix-BasedFilters

Traditionally,thefilteringofIPnetworknumbershasbeenaccomplishedusingan
accesslist.Theaccesslististhenboundtoeithertheincomingoroutgoing
informationofaneighborbyusingtheneighbordistribute-listcommand.ABGP
updateaboutanetworknumberthattheaccesslistpermitswillbeaccepted.An
updateaboutanetworknumberthattheaccesslistdenieswillbedropped.
Traditional prefix filters
Traditional IP prefix filters were implemented with IP access lists configured with
the distribute-list command.
IP access lists used as route filters have several drawbacks:
Subnet mask cannot be easily matched.
Access lists are evaluated sequentially for every IP prefix in the routing
update.
Extended access lists can be cumbersome to configure.
However,standardaccesslistsdonotsupportthetestingofthesubnetmasks.Ifthe
accesslistpermits10.0.0.0/16,itwouldalsopermit10.0.0.0/8.
ExtendedaccesslistscandotestingonbothanIPnetworknumberandasubnet
mask,butthesyntaxiscumbersome.
Prefix lists
Route-filtering mechanism
Significant performance improvement on long filters
Inside Cisco IOS software, the prefix list is a tree structure and is not
scanned sequentially.
Support for incremental updates
Individual entries in prefix lists can be inserted or deleted.
More user-friendly CLI
The CLI for using access lists to filter BGP updates is difficult to understand
and use, because it uses the packet-filtering format.
Greater flexibility; can match on subnet masks
Theipprefix-listconfigurationcommandhasseveralbenefitsifyoucompareitto
theaccess-listcommand.Theintendeduseofprefixlistsislimitedtoroutefiltering,
whereasaccesslistswereinitiallyintendedforpacketfiltering,whichwasthen
extendedtofilterroutes.
Theprefixlistisinternallytransformedintoatreestructure,witheachbranchingof
thetreeservingasatest.CiscoIOSsoftwaredeterminesaverdictofeither"permit"
or"deny"muchfasterthisway,comparedtosequentiallyinterpretinganaccesslist.
TheconfigurationCLIthatyouusewhenconfiguringtheipprefix-listcommand,
allowsyoutoassignalinenumbertoeachlineoftheprefixlist.Therouterusesthis
numbertosorttheentriesintheprefixlist.Ifthelinesareinitiallyassignedline
numbers,withsomespacinginbetweenthem,administratorscanlaterinsertextra
lines.Individuallinescanalsoberemovedwithoutremovingtheentirelist.
Routersmatchnetworknumbersinaroutingupdateagainsttheprefixlist,usingas
manybitsasindicated.Forexample,aprefixlistcanbespecifiedtobe10.0.0.0/16,
whichwillmatch10.0.0.0routesbutnot10.1.0.0routes.
Optionally,theprefixlistcanalsospecifythesizeofthesubnetmask.Inaddition,
theprefixlistcanindicatethatthesubnetmaskmustbeinaspecifiedrange.
Key access list features are preserved.
Filtering using "permit" or "deny"
Order dependency (first match wins)
Security-focused: no match means "deny"
The matching mechanism has changed.
Matches routes in a part of address space with subnet mask longer or
shorter than a set number
Theprefixlistsharesseveralsimilaritieswiththeaccesslist.Itcanconsistofany
numberoflines,eachofwhichindicatesatestandaresult.Theroutercaninterpret
thelinesinthespecifiedorder,althoughthisprocessisoptimizedintheCiscoIOS
software.Whenarouterevaluatesarouteagainsttheprefixlist,thefirstlinethat
PrefixListsvs.IPAccessLists
matchesresultsineithera"permit"or"deny."Ifnoneofthelinesinthelistmatch,
theresultis"implicitlydeny."
Testingisdoneusingprefixes.Theindicatednumberofbitsintheprefixis
comparedwiththesamenumberofbitsinthenetworknumberintheupdate.Ifthe
bitsmatch,testingcontinueswithanexaminationofthenumberofbitssetinthe
subnetmask.Theprefixlistlinecanindicatearangewithinwhichthenumbermust
falltopassthetest.Ifnorangeisindicated,thesubnetmaskmustmatchtheprefix
size.

YoucanfiltercertaininformationduringBGPupdatesusingprefixlistfiltersto
influencerouteselectionortoenforceanadministrativepolicy.
router(config)# ip prefix-list list-
name [seq seq] {permit|deny} network/len [ge value] [le value]
Prefix lists have names and sequence numbers (like route-maps).
An entry with no le or ge parameter matches exactly the specified prefix.
An entry with an le or ge parameter matches any route within the address space
of address/prefix. But the prefix must be longer or equal to ge value and shorter
than or equal to le value.
ipprefix-listConfigurationCommand
Tocreateanentryinaprefixlist,usetheipprefix-listglobalconfiguration
command.
ip prefix-list list-name [seq seq-
value] {permit | deny} network/len [ge ge-value] [le le-value]
SyntaxDescription
Parameter Description
list-name Nameofaprefix
seq (Optional)Appliesthesequencenumbertotheprefix
seq-value (Optional)Specifiesthesequencenumberfortheprefix
permit Permitsaccessformatchingconditions
deny Deniesaccesstomatchingconditions
network/len (Mandatory)Thenetworknumberandlength(inbits)ofthe
subnetmask
ge (Optional)Appliesthege-valuetotherangespecified
ge-value (Optional)Specifiesthelesservalueofarange(the"from"portion
oftherangedescription)
le (Optional)Appliesthele-valuetotherangespecified
le-value (Optional)Specifiesthegreatervalueofarange(the"to"portion
oftherangedescription)
Whenmultipleentriesofaprefixlistmatchagivenprefix,thesequencenumberofa
prefix-listentryidentifiestheentrywiththelowestsequencenumber.Inthiscase,
theentrywiththesmallestsequencenumberisconsideredtobethe"real"match.
Youcanspecifysequencevaluesforprefixlistentriesin
anyincrementsthatyouwant(theautomaticallygenerated
numbersareincreasedinunitsof5).Ifyouspecifythe
sequencevaluesinincrementsof1,youwillnotbeableto
insertmoreentriesintotheprefixlist.Ifyouchoosevery
largeincrements,youcouldrunoutofsequencevalues.
Youcanusetheparametersgeandletospecifytherangeoftheprefixlengthtobe
matchedforprefixesthataremorespecificthannetwork/len.Theexactmatchis
assumedwhenneithergenorleisspecified.Therangeisassumedtobefromge-
valueto32onlyifthegeattributeisspecified.Therangeisassumedtobefromlen
tole-valueonlyiftheleattributeisspecified.
Prefix list matching rules
Prefix list entries with no ge or le option match only the specified route.
Similar to IP access lists with no wildcard bits
Matching also considers the subnet mask
ConfiguringPrefixLists

a)
b)
c)
d)
e)
a)
b)
c)
d)
e)
Prefixlistentrieswithoutthegeorleoptionmatchonlytheroutewiththespecified
IPaddressandsubnetmask.Intheexamplehere,theprefixlistentrypermit
192.168.0.0/16willnotmatchtheroute192.168.2.0/24becauseofthemismatchin
theIPaddress.Itwillalsonotmatchtheroute192.168.0.0/20becauseofthe
mismatchinthesubnetmask.
A prefix list entry with ge or le option matches any prefix within specified
address space where the subnet mask falls within the specified limits.
Prefixlistentrieswiththegeorleoptionspecifiedmatchanyprefixwithinthe
addressspacethatthenetwork/lenparameterspecifies,underonecondition.The
subnetmasklengthoftheroutemustfallwithintherangethattheleandge
parametersspecify.
Inthefirstexampleinthefigure,theroute192.168.2.0/24isnotmatchedbythe
prefixlistentrypermit192.168.0.0/16eventhoughtheIPaddressfallswithinthe
specifiedaddressrange.Itisbecausethesubnetmaskistoolong.
Inthesecondexample,theroute192.168.0.0/16isnotmatchedbyprefixlistentry
permit192.168.0.0/18becausethesubnetmaskistooshort.
ConfiguringPrefixListsExample
What will be matched by:
ipprefix-listApermit0.0.0.0/0ge32
ipprefix-listBpermit128.0.0.0/2ge17
ipprefix-listCpermit0.0.0.0/0le32
ipprefix-listDpermit0.0.0.0/0
ipprefix-listEpermit0.0.0.0/1le24
Allhostroutes
AnysubnetinclassBaddressspace
Allroutes
Justthedefaultroute
AnyprefixinclassAaddressspacecoveringatleast256addresses
Thelistcontainssomecommonlyusedprefixlistexamples.
Inthelist,prefixlistApermit0.0.0./0ge32willmatchallhostroutes.PrefixlistB
permit128.0.0.0/2ge17willmatchanysubnetinaclassBaddressspace.Prefix
listCpermit0.0.0.0/0le32willmatchallroutes,butonlythedefaultroutewillbe
matchedbyprefixlistDpermit0.0.0.0/0.Finally,anyprefixinaclassAaddress
spacethatcoversatleast256addresseswillbematchedtoprefixlistEpermit
0.0.0.0/1le24.

Youcanoptionallyapplyfilterlistsandprefixlistsoneitherincomingoroutgoing
neighborsinanycombination.Boththeincomingprefixlistandtheincomingfilterlist
mustpermittheroutesthatarereceivedfromaneighborbeforetheyareaccepted
intotheBGPtable.Outgoingroutesmustpassboththeoutgoingfilterlistandthe
outgoingprefixlistbeforebeingtransmittedtotheneighbor.
WhenarouterisconfiguredtoredistributeroutinginformationfromanIGPintoBGP,
thefollowingmustbetruebeforearouteisinjectedintotheBGPtable:
Theroutesmustsuccessfullypassanyprefixlistoraccesslistthatisappliedto
theredistribution.
BGPFiltersImplementation

YoucanuseprefixliststofilterincomingoroutgoingBGPupdatestoneighbors.You
canalsouseprefixliststofilterroutesthatarebeingredistributedintotheBGP
processfromotherroutingprotocols.
router(config-router)# neighbor {ip-address|peer-group-name} prefix-
list prefix-listname {in|out}
Filters inbound or outbound BGP routing updates for a configured neighbor
session
router(config-router)# distribute-list prefix-list prefix-
list out routing-process
Filters routes redistributed from specified routing process into BGP
neighborprefix-listCommand
TodistributeBGPneighborinformationasspecifiedinaprefixlist,usetheneighbor
prefix-listrouterconfigurationcommand:
neighbor {ip-address | peer-group-name} prefix-list prefix-
listname {in | out}
Toremoveanentry,usethenoformofthiscommand:
no neighbor {ip-address | peer-group-name} prefix-list prefix-
listname {in | out}
SyntaxDescription
Parameter Description
ip-address IPaddressofneighbor
peer-group-name NameofaBGPpeergroup
prefix-listname Nameofaprefixlist
in Accesslistisappliedtoincomingadvertisementstothatneighbor
out Accesslistisappliedtooutgoingadvertisementsfromthat
neighbor
ABGPpeergroupisagroupofBGPneighborswiththe
sameupdatepolicies.Routemaps,distributelists,filter
lists,andsoonusuallysetupdatepolicies.Insteadof
definingthesamepoliciesforeachseparateneighbor,a
peergroupnameisconfiguredontherouter,andthese
policiesareassignedtothepeergroup.
distribute-listoutCommand
Tosuppressnetworksfrombeingadvertisedinupdates,usethedistribute-listout
routerconfigurationcommand:
distribute-list {access-list-number | name | prefix-list prefix-
listname} out [interface-name | routing-process | autonomous-system-
number]
Todisablethisfunction,usethenoformofthiscommand:
no distribute-list {access-list-number | name | prefix-list prefix-
listname} out [interface-name| routing-process | autonomous-system-number]
SyntaxDescription
Parameter Description
access-list-number|name StandardIPaccesslistnumberorname.
ImplementingPrefixListsintheBGPProcess

Thelistdefineswhichnetworksshouldbereceivedandwhich
shouldbesuppressedinroutingupdates.
prefix-listname Nameofaprefixlist.
Thelistdefineswhichnetworksshouldbereceivedandwhich
shouldbesuppressedinroutingupdates.Thisdecisionisbased
onmatchingofthenetworkprefixtotheprefixesinthelist.
out Appliestheaccesslisttooutgoingroutingupdates.
interface-name (Optional)Nameofaparticularinterface.
routing-process (Optional)Nameofaparticularroutingprocess,orthekeyword
staticorconnected.
autonomous-system-number (Optional)ASnumber.
Parameter Description
Althoughyoucanusetheneighborprefix-listrouter
configurationcommandasanalternativetotheneighbor
distribute-listcommand,donotuseboththeneighbor
prefix-listandneighbordistribute-listcommandfiltering
forthesameneighborinanygivendirection.Thesetwo
commandsaremutuallyexclusive,andonlyonecommand
(neighborprefix-listorneighbordistribute-list)canbe
appliedforeachinboundoroutbounddirection.
PrefixListExample:FilteringCustomerPrefixes
Thefigureillustratesfilteringcustomerprefixes.
Requirement: The customer will announce prefixes only from assigned address
space (10.0.0.0/16), with subnet masks no longer than /24.
router bgp Primary-ISP-AS
neighbor Customer prefix-list Cust-A in
!
ip prefix-list Cust-A permit 10.0.0.0/16 le 24
Inthisexample,amultihomedcustomerhasbeenassignedtheaddressspace
10.0.0.0/16.Thecustomermaysubnetthisaddressspacebutmaynotannounce
subnetssmallerthanasubnetmaskof255.255.255.0.Largersubnetsareaccepted.
Ifthecustomerhassubnettedthenetworkintosmallersubnets,itmustsummarize
theroutinginformationaboutthosesubnetsintoatleast/24prefixesbefore
announcingthem.
TheprimaryISPimplementsaprefixlistwithaCust-Aname,toperformthefiltering
ofincominginformationfromthemultihomedcustomer.Theprefixlistpermitsall
routesthatarereceivedfromthecustomerthathave10.0inthefirst16bitsand
haveasubnetmaskof24bitsorless.Anyotherroutesfromthecustomerare
deniedandsilentlyignored.
PrefixListExample:FilteringPeerPrefixes

Requirement: The ISP will not accept routes with subnet masks longer than /24;
subnet masks from class B address space will be no longer than /20.
router bgp Primary-ISP-AS
neighbor Backup-ISP prefix-list Peer in
!
ip prefix-list Peer seq 5 permit 128.0.0.0/2 le 20
ip prefix-list Peer seq 10 permit 0.0.0.0/0 le 24
Inthisexample,theprimaryISPwillnotacceptanyroutefromthecustomerthat
indicatesasubnetsmallerthana255.255.255.0subnetmask.TheclassBnetwork,
however,mustnotbesubnettedintosubnetssmallerthana255.255.240.0subnet
mask.
TheprimaryISPimplementsthisroutebyusingaprefixlistnamedPeer.Thefirst
lineintheprefixlistcheckswhetheritisaclassBnetwork.RememberthataclassB
addressalwayshasthebinarysequence10asthefirst2bitsinthefirstbyte.The
secondlinematchesanyprefix.
WhentheprimaryISPreceivesaroutefromthecustomer,itcomparestheroutewith
bothlines.IftherouteisaclassBnetwork,bothlinesmatch.Testingcontinueswith
checkingthesubnetmask.Anupperboundisexplicitlyindicated,givingamaximum
prefixlengthof20bits.
IfthereceivedrouteisnotaclassBnetwork,onlythesecondlinematches.Inthis
case,thesubnetmasklengthmustbegreaterthanorequalto0andlessthanor
equalto24.Thisruleprovidesaroutelessexplicitthana/24prefix.

Overview
Throughthisdiscovery,youwilllearnhowtoconfigureaprefixlisttofiltercustomer
prefixes.YouasanISP1serviceproviderwillallowthecustomerontherouterR2to
announceprefixesonlyfromtheassignedaddressspace(10.0.0.0/24).Youwillnot
allowthecustomertofurthersubnettheassignedaddressspace,thussubnetmask
shouldbe24.
Discovery8:FilteringCustomerPrefixes

Topology

Ifyoushutdownaninterfaceonarealrouterorswitch,the
connecteddevicewillseeitas"down/down."Dueto
virtualizationspecifics,IOLbehaviorisslightlydifferent.If
youshutdownaninterfaceonarouterorswitch,the
connecteddevicewillseeitas"up/up."InIOL,thestatus
ofaninterfacecanonlybe"up/up"or"administratively
down/down."
DeviceInformation
Device Interface IPaddress Description
R2 Ethernet0/0 172.16.22.2/24 ConnectiontoISP2
R2 Ethernet0/1 172.16.12.2/24 ConnectiontoISP1
R2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
10.0.0.1/28
10.0.0.17/28
10.0.0.33/28
10.0.0.49/28
10.0.0.65/28
Loopbackssimulate
LANnetworks
ISP1 Ethernet0/1 172.16.12.11/24 ConnectiontoR2
ISP1 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
10.0.1.1/28
10.0.1.17/28
10.0.1.33/28
10.0.1.49/28
10.0.1.65/28
10.0.1.81/28
Loopbackssimulate
LANnetworks
ISP1 Loopback21
Loopback37
Loopback40
10.0.21.1
10.0.37.1
10.0.40.1
Loopbackssimulate
additionalnetworksin
differentautonomous
systems.
ISP2 Ethernet0/0 172.16.22.22/24 ConnectiontoR2
ISP2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
10.0.2.1/28
10.0.2.17/28
10.0.2.33/28
10.0.2.49/28
10.0.2.65/28
10.0.2.81/28
Loopbackssimulate
LANnetworks
ISP2 Loopback21
Loopback37
Loopback40
10.0.21.1
10.0.37.1
10.0.40.1
Loopbackssimulate
additionalnetworksin
differentautonomous
systems.
IPaddressesandadvertisednetworksinBGParepreconfiguredasshownbelow:
JobAids

BGPisalsopreconfiguredasEBGP(R2toISP1andR2toISP2).
TheR2routerannouncesthesenetworks:
10.0.0.0/24(assignedaddressspacetotheCustomer)
10.0.0.16/28
10.0.0.32/28
10.0.0.48/28
10.0.0.64/28

Step1
OntheISP1router,verifythatyoureceiverouteswithmasklargerthan/24fromthe
customerrouterR2.
ISP1# show ip bgp
BGP table version is 15, local router ID is 10.0.40.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/24 172.16.12.2 0 0 1 i
*> 10.0.0.16/28 172.16.12.2 0 0 1 i
*> 10.0.0.32/28 172.16.12.2 0 0 1 i
*> 10.0.0.48/28 172.16.12.2 0 0 1 i
*> 10.0.0.64/28 172.16.12.2 0 0 1 i
*> 10.0.1.0/28 0.0.0.0 0 32768 i
*> 10.0.1.16/28 0.0.0.0 0 32768 i
*> 10.0.1.32/28 0.0.0.0 0 32768 i
*> 10.0.1.48/28 0.0.0.0 0 32768 i
*> 10.0.1.64/28 0.0.0.0 0 32768 i
*> 10.0.1.80/28 0.0.0.0 0 32768 i
*> 10.0.21.0/24 0.0.0.0 0 32768 i
*> 10.0.37.0/24 0.0.0.0 0 32768 i
*> 10.0.40.0/24 0.0.0.0 0 32768 i
Youcanseethatcustomerannouncesfournetworkswithmask/28.
Step2
OntheR2router,verifythatcustomerrouterR2originatesassignednetwork10.0.0.0/24
andfoursubnetsfromthisassignedaddressspacewithmask/28.
R2# show ip bgp neighbors 172.16.12.11 advertised-routes
BGP table version is 58, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/24 0.0.0.0 0 32768 i
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*> 10.0.0.32/28 0.0.0.0 0 32768 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*> 10.0.0.64/28 0.0.0.0 0 32768 i
Total number of prefixes 5
Customerassignedaddressspaceis10.0.0.0/24,whichisfurthersubnettedtofour/28
subnets,whicharealsoannouncedinBGPupdates.
Step3
ConfigureprefixlistfilteringontheISP1routertoallowthecustomerontheR2
routertoannounceprefixesonlyfromtheassignedaddressspace(10.0.0.0/24).
Youshouldnotallowthecustomertofurthersubnettheassignedaddress
space,thussubnetmaskshouldbe24.
ISP1(config)# ip prefix-list Customer permit 10.0.0.0/24
ISP1(config)# router bgp 100
ISP1(config-router)# neighbor 172.16.12.2 prefix-list Customer in
Step4
ClearallBGPsessionsontheR2router.
FilteringCustomerPrefixes
DiscoverySteps

R2# clear ip bgp *
Step5
OntheISP1router,verifythatyoureceiverouteswithmask/24onlyfromthecustomer
routerR2.
ISP1# show ip bgp
BGP table version is 21, local router ID is 10.0.40.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/24 172.16.12.2 0 0 1 i
*> 10.0.1.0/28 0.0.0.0 0 32768 i
*> 10.0.1.16/28 0.0.0.0 0 32768 i
*> 10.0.1.32/28 0.0.0.0 0 32768 i
*> 10.0.1.48/28 0.0.0.0 0 32768 i
*> 10.0.1.64/28 0.0.0.0 0 32768 i
*> 10.0.1.80/28 0.0.0.0 0 32768 i
*> 10.0.21.0/24 0.0.0.0 0 32768 i
*> 10.0.37.0/24 0.0.0.0 0 32768 i
*> 10.0.40.0/24 0.0.0.0 0 32768 i
Youcanseethatonlycustomernetwork10.0.0.0withmask/24isputintotheBGPtable
becauseoftheprefixlistfilteringconfigured.
Step6
OntheR2router,verifythatcustomerrouterR2stilloriginatesassignednetwork
10.0.0.0/24andfoursubnetsfromthisassignedaddressspacewithmask/28.
R2# show ip bgp neighbors 172.16.12.11 advertised-routes
BGP table version is 58, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/24 0.0.0.0 0 32768 i
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*> 10.0.0.32/28 0.0.0.0 0 32768 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*> 10.0.0.64/28 0.0.0.0 0 32768 i
Total number of prefixes 5
Thisway,youconfirmthatfilteringofBGPupdatesoccursontheISP1router.

Linesinaprefixlistareassignedsequencenumbers.Theseassignments
significantlyimprovethemanageabilityofthelist.Thesesequencenumber
assignmentsprovidetheopportunitytoremoveaspecificline.Ifthespacing
betweenthesequencenumbersallows,theyalsogiveyoutheabilitytoinsertaline
betweentwoexistinglines.
router# show ip prefix-list list-name [detail|summary]
Displays the prefix list and the sequence numbers
router(config)# no ip prefix-list seq seq condition
Erases the line with the specified sequence number from the prefix list
router(config)# ip prefix-list seq seq condition
Inserts the line into the prefix list at the specified point
Todisplayacurrentlyconfiguredprefixlistanditssequencenumbers,usetheshow
ipprefix-listcommandwiththedetailkeyword.
Youcanspecifysequencevaluesforprefixlistentriesinanyincrementsthatyou
want(theautomaticallygeneratednumbersareincreasedinunitsof5).Ifyou
specifythesequencevaluesinincrementsof1,youwillnotbeabletoinsertmore
entriesintotheprefixlist.Ifyouchooseverylargeincrements,youcouldrunoutof
sequencevalues.
ModifyingPrefixLists

1.
2.
Youcanmonitorprefixlistsbydisplayinginformationaboutaprefixlistorbyusing
prefixlistsforselectivefilteringofBGPtableoutputonCiscoIOSdevices.
router# show ip prefix-list [detail | summary] prefix-list-
name [network/length] [seq sequence-number] [longer] [first-match]
To display information about a prefix list or prefix-list entries
router# show ip bgp prefix-list prefix-list-name
Displays all routes in the BGP table matching the prefix list.
Used for easier monitoring of a desired network prefix group in the BGP table.
showipprefix-listCommand
Todisplayinformationaboutaprefixlistorprefixlistentries,usetheshowipprefix-
listEXECcommand:
show ip prefix-list [detail | summary] name [network/len] [seq seq-
num] [longer] [first-match]
SyntaxDescription
Parameter Description
detail|summary (Optional)Displaysdetailedorsummarizedinformationaboutall
prefixlists
name (Optional)Thenameofaspecificprefixlist
network/len (Optional)Thenetworknumberandlength(inbits)ofthenetwork
mask
seq (Optional)Appliesthesequencenumbertotheprefix-listentry
seq-num Thesequencenumberoftheprefix
longer Displaysallentriesofaprefixthataremorespecificthanthe
givennetwork/len
first-match Displaystheentryofaprefixthatmatchesthegivennetwork/len
Youcanuseshowipbgpprefix-listcommandtodisplayselectedroutesfroma
BGProutingtablebasedonthecontentsofaprefixlist.Usethiscommandfor
selectivefilteringofBGPtableoutputonCiscoIOSdevicesbasedonnetworkprefix
groups.
Toperformprefixlist-basedBGPtablefiltering,followthesesteps:
Configureaprefixlistthatpermitsrangesofnetworksthataremeanttobe
displayedintheBGPtableoutput.
Includeareferencetoaconfiguredprefixlistintheshowipbgpprefix-list
command.
ThesupportforprefixlistBGPtablefilteringwasaddedin
CiscoIOSSoftwareRelease12.2(11)Tand12.0(14)ST.
ISP1# show ip prefix-list detail InFilter
ip prefix-list InFilter:
count: 4, range entries: 3, sequences: 5 - 20, refcount: 2
seq 5 deny 128.0.0.0/2 le 15 (hit count: 0, refcount: 1)
seq 10 deny 192.0.0.0/3 ge 25 (hit count: 0, refcount: 2)
seq 15 deny 193.0.0.0/8 ge 21 (hit count: 0, refcount: 1)
seq 20 permit 0.0.0.0/0 (hit count: 0, refcount: 1)
Displays details about InFilter prefix list
Inthisexample,theshowipprefix-listcommandhasbeenissuedwiththedetail
keyword.Theoutputofthecommanddisplaysdetailedinformationaboutconfigured
prefixlists.Thesequencenumbers,theprefixlistentries,andthenumberoftimes
thatthecorrespondingprefixmatchedeachentry.
MonitoringPrefixLists

ISP1(config)# ip prefix-list MyFilter permit 10.0.1.0/24 ge 28
ISP1# show ip bgp prefix-list MyFilter
BGP table version is 21, local router ID is 10.0.40.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - inte
rnal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-
Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.1.0/28 0.0.0.0 0 32768 i
*> 10.0.1.16/28 0.0.0.0 0 32768 i
*> 10.0.1.32/28 0.0.0.0 0 32768 i
*> 10.0.1.48/28 0.0.0.0 0 32768 i
*> 10.0.1.64/28 0.0.0.0 0 32768 i
*> 10.0.1.80/28 0.0.0.0 0 32768 i
Displays all entries in BGP table with the first three octets equal to 10.0.1 and
with length of a subnet greater or equal to 28
Thisexampleshowsasimpleprefixlist-basedfilteringoftheBGPtable.Theprefix
listfilterpermitsallnetworkswiththefirstthreeoctetsequalto10.0.1andwithlength
ofasubnetgreaterorequalto28.Theshowipbgpprefix-listcommandoutput
displaysonlythenetworksthattheprefixlistfilterpermits.

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
Customers with multihomed networks are responsible for announcing their own
networks using BGP. Service providers with multihomed customers must take
precautions not to accept, use, or forward any erroneous routing information that
is received from their customers.
Prefix lists have a number of advantages over access lists, including faster
"permit" or "deny" determinations and easier CLI editing.
Prefix lists are configured using the ip prefix-list global configuration command.
Filter lists and prefix lists can be optionally applied on either incoming or
outgoing neighbors in any combination.
Prefix lists can filter incoming or outgoing BGP updates to neighbors and filter
routes that are being redistributed into the BGP process from other routing
protocols. Use the neighbor prefix-list router configuration command to
distribute BGP neighbor information as specified in a prefix list.
Certain Cisco IOS commands (such as the show ip prefix-list command) are
used to modify configured prefix list filters.
To display or monitor statistics about a prefix list or prefix list entries, you can
use the show ip prefix-list EXEC command.
Summary

Overview
YoucanuseORFasanextramechanismtominimizethenumberofupdatesthat
arerequestedfromaneighbor.Itwillreducethelinkbandwidthconsumptionand
CPUusewhenarouterrequestsarouterefresh.AnORFalsoallowsfilteringof
informationthatexternalnetworksshouldnotreceive(suchasRFC1918
information).Understandinghowtomonitoroutboundroutefilteringcapabilitiesis
alsoimportant.ABGPneighborthatsupportsspecificORFcapabilitieswillreport
thosecapabilitiestoamonitoringneighborandcanthensendafilterofthe
supportedtypetotheneighbor.
ThislessondiscussesthefunctionofoutboundroutefilteringinaBGPnetwork.The
formatandfunctionofORFmessagesarediscussed,aswellasthecommandsthat
enableORFnegotiationsandtheactivationofanORFprefixlist.Thecommands
thatareusedtotriggerarouterefresharealsodetailed.Finally,thereisa
discussiononhowtomonitortheoperationsofaconfiguredORFinaBGPnetwork.
Uponcompletingthislesson,youwillbeableto:
DescribethefunctionofoutboundroutefilteringinaBGPnetwork
Comparestandardinboundfilteringandoutboundroutefiltering
DescribethefunctionofBGPprefix-basedoutboundroutefiltering
DescribetheformatandfunctionofanORFmessage
IdentifytheCiscoIOScommandthatisrequiredtoenableORFnegotiationsand
activateanORFprefixlist
IdentifytheCiscoIOScommandthatisusedtotriggerarouterefreshmessage
IdentifytheCiscoIOScommandthatisrequiredtomonitortheoperationofa
configuredORF
UsingOutboundRouteFiltering

Outboundroutefilteringisaprefix-basedBGPfeaturethatisenabledthroughthe
advertisementofORFcapabilitiestopeerroutersandisintegratedinCiscoIOS
SoftwareRelease12.2(4)T.TheadvertisementoftheORFcapabilityindicatesthata
BGP-speakingrouterwillacceptaprefixlistfromaneighbor.Itwillapplytheprefix
listtolocallyconfiguredORFs(ifanyexist).Whenthiscapabilityisenabled,theBGP
speakercaninstallaninboundprefixlistfiltertotheremotepeerasanoutbound
filter,whichreducesunwantedroutingupdates.
The purpose of outbound route filtering is to reduce the amount of BGP traffic
and CPU use needed to process routing updates.
Routers exchange inbound filter configurations, which are used as outbound
filters on neighboring routers.
Filters are described in ORF entries.
ORF entries are part of the route refresh message.
ThestandardrouterefreshmessagecontainstheAFIforwhichtherefreshis
needed.Outboundroutefilteringisanextramechanismthatisusedtominimizethe
numberofupdatesthatarerequestedfromaneighbor.
ThismechanismreducesthelinkbandwidthconsumptionandCPUusewhena
routerrequestsarouterefresh.Filtersthattheroutersshouldusewiththeroute
refresharedescribedinORFentriesthatarepartoftherouterefreshmessage.
YoucanconfiguretheORFfeaturewithsend,receive,orsendandreceive
capabilities.ThelocalpeeradvertisestheORFcapabilityinthesendmode.The
remotepeerreceivestheORFcapabilityinreceivemodeandappliesthefilterasthe
outboundpolicy.ThelocalandremotepeersexchangeupdatestomaintaintheORF
foreachrouter.PeerroutersexchangeupdatesdependingontheORFprefixlist
capabilitythatisadvertised.Theremotepeerstartssendingupdatestothelocal
peerafteritreceivesarouterefreshrequestoranORFprefixlistwithanimmediate
status.
OutboundRouteFiltering

Thefigureillustratesthecomparisonbetweenstandardinboundfilteringand
outboundroutefiltering.
Outboundroutefilteringcanlimitthenumberofunwantedroutingupdates,whichwill
reducetheamountofresourcesthatarerequiredforroutingupdategenerationand
processing.Thisfeaturealsoreducestheamountofresourcesthatarerequiredto
receiveanddiscardroutes.Thereceivingrouterwouldotherwisefilteroutthese
routes,iftheORFfeaturewerenotavailable.
Theexampleshowstwoscenarios:
Thefirstexampleshowsthat600,000routesaresentfromAS1toAS2
neighbor,andtheinputfilteronAS2permitsonly100oftheseroutes.
ThesecondexampleshowshowarouterefreshwithafilterissentfromAS2to
theAS1neighbor.TheAS1neighborthenusesthefilterbeforesendingthe
updates.Thisway,only100updatesaresentfromAS1toAS2.
Inboundvs.OutboundFilteringExample

TheBGPprefix-basedoutboundroutefilteringfeatureusesBGPORFsendand
receivecapabilitiestominimizethenumberofBGPupdatesthataresentbetween
BGPpeers.Configuringthisfeaturecanhelpreducetheamountofsystem
resourcesthatarerequiredforgeneratingandprocessingroutingupdatesbyfiltering
outunwantedroutingupdatesatthesource.
Uses BGP ORF send and receive capabilities to minimize the number of BGP
updates that are sent between BGP peers
Helps to reduce the amount of system resources that are required for generating
and processing routing updates by filtering out unwanted routing updates at the
source
Limits the number of unwanted routing updates, which will reduce the amount of
resources that are required for routing update generation and processing
Reduces the amount of resources that are queried to receive and discard routes
that would otherwise be filtered out
TheBGPprefix-basedoutboundroutefilteringfeatureisenabledthroughthe
advertisementofORFcapabilitiestopeerrouters.TheadvertisementoftheORF
capabilityindicatesthataBGPspeakerwillacceptaprefixlistfromaneighbor.Itwill
applytheprefixlisttolocallyconfiguredORFs(ifanyexist).Whenthiscapabilityis
enabled,theBGPspeakercaninstalltheinboundprefixlistfiltertotheremotepeer
asanoutboundfilter,whichreducesunwantedroutingupdates.
TheBGPprefix-basedoutboundroutefilteringfeaturecanbeconfiguredwithsend,
receive,orsendandreceiveORFcapabilities.ThelocalpeeradvertisestheORF
capabilityinsendmode.TheremotepeerreceivestheORFcapabilityinreceive
modeandappliesthefilterasanoutboundpolicy.Thelocalandremotepeers
exchangeupdatestomaintaintheORFoneachrouter.Updatesareexchanged
betweenpeerroutersbyaddressfamilydependingontheORFprefixlistcapability
thatisadvertised.Theremotepeerstartssendingupdatestothelocalpeeraftera
routerefreshhasbeenconfiguredwiththeclearipbgpcommand.OrafteranORF
prefixlistwithimmediatestatusisprocessed.TheBGPspeakerwillcontinueto
applytheinboundprefixlisttoreceivedupdatesafterthespeakerpushesthe
inboundprefixlisttotheremotepeer.
BGPPrefix-BasedOutboundRouteFiltering

ItisimportanttounderstandthefieldsORFmessage.
ORF format
An ORF message consists of the following fields:
AFI/SAFI
ORF type
When to refresh
List of ORF entries
ORF entries depend on the ORF type.
The ORF capability needs to be negotiated for every supported ORF type.
AnORFmessagecontainsthefollowinginformation:
AFIandSAFI,forwhichthefiltershouldbeused.
ORFtype,whichidentifiesthetypeoffilter.
Whentorefresh(immediateordeferredrefresh).
ListofORFentrieswheretheactualfilterisdefined.
YoucanusetheAFI/SAFIcomponentoftheORFmessagetoprovideacoarselevel
ofgranularcontrolbylimitingtheORFtoonlytherouteswhoseNLRImatchesthe
configuredAFI/SAFIcomponent.
TherouterhastonegotiatetheORFcapabilityforeachORFtypethatissupported
intheORFmessage.
ORF types:
NLRI (ORF type = 1)
Filters that are based on the prefix
Communities (ORF type = 2)
Filters that are based on standard BGP community attributes
Extended communities (ORF type = 3)
Filters that are based on extended BGP community attributes
Prefix list (ORF type = 128)
Filters that are based on Cisco implementation of prefix filtering
ThevaluethatiscontainedintheORFtypedeterminesthecontentthatiscontained
intheORFmessage.
Currently,ORFtype0isreserved,ORFtypes1to127areassignedbytheIANA,
andORFtypes128to255arevendor-specific(andnotassignedbytheIANA).
CommonlyusedORFtypesareasfollows:
ORFtype1isusedtofilterbasedontheNLRI.
ORFtype2isusedtofilterbasedonstandardBGPcommunityattributes.
ORFtype3isusedtofilterbasedonextendedBGPcommunityattributes.
ORFtype128isusedtofilterbasedontheCiscoproprietaryimplementationof
prefixfiltering(prefixlists).
AFI/SAFI is IPv4 unicast.
ORF type is NLRI:
Action: ADD, DELETE, or DELETE ALL
Match: PERMIT or DENY
Scope: EXACT or REFINE
NLRI: Prefix
When: IMMEDIATE or DEFER
TheORF-typesettingdeterminesthecontentoftheORFvalue.AnORFtypeof
NLRI-basedfiltering(type1)usesthefollowingactions:
ADD:Addsalinetoaprefixlistfilterontheremotepeer
DELETE:Removesalinefromafilterthatwaspreviouslyinstalledonaremote
peer
DELETEALL:Removesallpreviouslyinstalledfiltersontheremotepeer
Foreachfilterentry,thereisamatchcomponentthatspecifieseitherPERMITor
OutboundRouteFilterMessage
DENY.APERMITasksthepeertosendupdateswithroutesthatmatchthesetof
entriesasspecifiedintheORF.DENYspecifiesthattheremotepeershouldnot
sendupdatesfortheentriesmatchingtheentriesthatarespecifiedintheORF.
ForprefixesspecifiedwithamatchcomponentofPERMIT,theremotepeerisasked
topassaprefixwithascopeofEXACT(anexactmatch)orREFINE(itssubnets).
AlsocontainedwithintheORFmessageisthewhen-to-refreshfield.Aroutercanset
thisfieldtoIMMEDIATE—askingtheremotepeertorefreshassoonasithas
finishedprocessingtheORFmessage.OritcansetittoDEFER—askingtheremote
peertowaituntilitreceivesasubsequentrouterefreshmessagewiththesame
AFI/SAFI.

YouneedtoenableORFnegotiationsandactivateanORFprefixlistwhen
configuringoutboundroutefiltering.
router(config-router)# neighbor ip-address capability orf prefix-
list [receive|send|both]
This command enables negotiation of prefix list ORF capability during session
setup.
The ORF-capable BGP speaker will install ORFs per neighbor.
Option:
"Both" allows sending and receiving of prefix lists.
"Send" allows only sending of prefix lists.
"Receive" allows only receiving of prefix lists.
Ciscorouterssupporttheuploadingoftheirprefixliststoaneighbor.Youneedto
usetheneighborip-addresscapabilityorfprefix-listreceivecommandto
advertisethiscapability.Youneedtouseneighborip-addresscapabilityorf
prefix-listsendcommandtouploadtheinboundprefixfiltertotheneighbor.The
uploadedfilteristhenusedontheneighboringrouterafterastaticallyconfigured
outboundprefixlist(ifitexists)isapplied.
Theneighborip-addresscapabilityorfprefix-listcommandenablesthe
negotiationoftheprefix-listORFcapabilityduringBGPsessionsetup.Theprefix-
list-basedORF(ORFtype=128)istheonlyORFtypethatCiscoIOSsoftware
supports.
neighbororfprefix-listCommand
ToadvertiseORFcapabilitiestoapeerrouter,usetheneighbororfprefix-list
commandinaddressfamilyorrouterconfigurationmode:
neighbor {ip-address} [capability] orf prefix-list [receive | send | both]
TodisableORFcapabilities,usethenoformofthiscommand.
no neighbor {ip-address} [capability] orf prefix-
list [receive | send | both]
SyntaxDescription
Parameter Description
ip-address TheIPaddressoftheneighborrouter
capability (Optional)InformsthespecifiedneighborthatthisrouterhasORF
capabilities
receive (Optional)EnablestheORFprefixlistcapabilityinreceivemode
send (Optional)EnablestheORFprefixlistcapabilityinsendmode
both (Optional)EnablestheORFprefixlistcapabilityinbothreceive
andsendmodes
AS1:
router bgp 100
neighbor 172.16.12.2 capability orf prefix-list receive
AS2:
ip prefix-list FILTER seq 5 permit 10.0.1.16/28
!
router bgp 1
neighbor 172.16.12.11 capability orf prefix-list send
ConfiguringOutboundRouteFiltering

1.
2.
3.
neighbor 172.16.12.11 prefix-list FILTER in
!
The command capability orf prefix-list send on one router requires capability
orf prefix-list receive on a neighboring router.
Theexampleshowstheconfigurationoftworouterswhereonerouterhasuploaded
aninputprefixlisttotheneighbortobeusedasanoutputfilter.
Thefollowingconfigurationstepsarenecessarytoenableoutboundroutefiltering:
Enablenegotiationofoutboundfilteringbasedonprefixlists.
Attachaninputprefixlisttoaneighbor.
Enablesendingofinputprefixlisttotheneighbor.
Intheexample,anORFhasbeenconfiguredonAS2toadvertisethefiltertoAS1.
AnIPprefixlistwiththenameFILTERiscreatedtospecifythe10.0.1.16/28subnet
foroutboundroutefiltering.TheORFsendcapabilityisconfiguredonAS2sothat
AS2canadvertisetheORFtoAS1.
AS1isconfiguredtoadvertisetheORFreceivecapabilitytoAS2.AS1willinstallthe
ORF,definedintheFILTERprefixlist,aftertheORFcapabilitieshavebeen
exchanged.AninboundsoftresetneedstobeinitiatedonAS1attheendofthis
configurationtoactivatetheORF.

IdentifytheCiscoIOScommandthatisusedtotriggerarouterefreshmessage.
router# clear ip bgp neighbor in [prefix-filter]
This command triggers a route refresh message.
This command includes a prefix list in the route refresh message if configured
and supported on both ends.
The prefix list is sent at session setup.
Use the prefix-filter option to refresh the remote filter.
Usetheclearipbgpneighborcommandwiththeprefix-filterkeywordtopushout
theexistingORFprefixlistsothatanewrouterefreshwillbereceivedfroma
neighbor.TheneighborwillusetheORFprefixlistthatwaspreviouslynegotiated.
Youneedtousetheclearipbgpneighborcommandonlywhenthefilterhasbeen
modifiedbecausetheneighborwillstorethefilterforsubsequentrouterefresh
requests.Theneighborwillthenusethefilteronallupdatestowardtherouterthat
originatedthefilter.
Youshouldentertheinkeywordwhenyouareusingthe
clearipbgpneighborcommandbecauseinboundroute
refreshisdesired;onlytheinboundprefixlistfilteris
pushedtotheneighborandusedbytheneighborinthe
outbounddirection.
Therouterwillignoretheprefix-filterkeywordifORFcapabilityhasnotbeen
received,orthesendcapabilityhasnotbeenenabled.
Whentheclearipbgpneighborcommandisusedwithouttheprefix-filterkeyword,
anormalrouterefreshisperformed.Youshouldalwaysusetheprefix-filter
keywordwhenORFinboundroutingpolicychangesoccur.
UsingOutboundRouteFiltering

Overview
Throughthisdiscovery,youwilllearnhowtoconfigureprefix-basedoutboundroute
filtering.YouwillcreateanoutboundroutefilterandconfiguretheR2routerto
advertisethefiltertotheISP1router.ThefilterwillallowtheISP1routertoadvertise
10.0.1.16/28networkonlytotheR2router.
Discovery9:Prefix-BasedOutboundRouteFiltering

Topology

Ifyoushutdownaninterfaceonarealrouterorswitch,the
connecteddevicewillseeitas"down/down."Dueto
virtualizationspecifics,IOLbehaviorisslightlydifferent.If
youshutdownaninterfaceonarouterorswitch,the
connecteddevicewillseeitas"up/up."InIOL,thestatus
ofaninterfacecanonlybe"up/up"or"administratively
down/down."
DeviceInformation
Device Interface IPaddress Description
R2 Ethernet0/0 172.16.22.2/24 ConnectiontoISP2
R2 Ethernet0/1 172.16.12.2/24 ConnectiontoISP1
R2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
10.0.0.1/28
10.0.0.17/28
10.0.0.33/28
10.0.0.49/28
10.0.0.65/28
Loopbackssimulate
LANnetworks
ISP1 Ethernet0/1 172.16.12.11/24 ConnectiontoR2
ISP1 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
10.0.1.1/28
10.0.1.17/28
10.0.1.33/28
10.0.1.49/28
10.0.1.65/28
10.0.1.81/28
Loopbackssimulate
LANnetworks
ISP1 Loopback21
Loopback37
Loopback40
10.0.21.1
10.0.37.1
10.0.40.1
Loopbackssimulate
extranetworksin
differentautonomous
systems.
ISP2 Ethernet0/0 172.16.22.22/24 ConnectiontoR2
ISP2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
Loopback7
Loopback8
Loopback9
10.0.2.1/28
10.0.2.17/28
10.0.2.33/28
10.0.2.49/28
10.0.2.65/28
10.0.2.81/28
10.0.2.97/28
10.0.2.113/28
10.0.2.129/28
Loopbackssimulate
LANnetworks
ISP2 Loopback21
Loopback37
Loopback40
10.0.21.1
10.0.37.1
10.0.40.1
Loopbackssimulate
extranetworksin
differentautonomous
systems.
IPaddressesandadvertisednetworksinBGParepreconfiguredasshownbelow:
JobAids

BGPisalsopreconfiguredasEBGP(R2toISP1andR2toISP2).TheISP1router
announcesthesenetworks:
10.0.1.0/28(assignedaddressspacetotheCustomer)
10.0.1.16/28
10.0.1.32/28
10.0.1.48/28
10.0.1.64/28
10.0.1.80/28

Step1
OntheISP1router,verifywhichnetworksareadvertisedviaBGPtotheR2router.
ISP1# show ip bgp neighbor 172.16.12.2 advertised-routes
BGP table version is 15, local router ID is 10.0.40.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.1.0/28 0.0.0.0 0 32768 i
*> 10.0.1.16/28 0.0.0.0 0 32768 i
*> 10.0.1.32/28 0.0.0.0 0 32768 i
*> 10.0.1.48/28 0.0.0.0 0 32768 i
*> 10.0.1.64/28 0.0.0.0 0 32768 i
*> 10.0.1.80/28 0.0.0.0 0 32768 i
*> 10.0.21.0/24 0.0.0.0 0 32768 i
*> 10.0.37.0/24 0.0.0.0 0 32768 i
*> 10.0.40.0/24 0.0.0.0 0 32768 i
YoushouldseetheseBGProutesbeingadvertisedtotheR2router:
Anysubnetsin10.0.1.0/24range.
Networks10.0.21.0/24,10.0.37.0/24and10.0.40.0/24.
Step2
OntheR2router,verifywhichroutesarereceivedviaBGPfromtheISP1router.
R2# show ip bgp
BGP table version is 162, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/24 0.0.0.0 0 32768 i
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*> 10.0.0.32/28 0.0.0.0 0 32768 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*> 10.0.0.64/28 0.0.0.0 0 32768 i
*> 10.0.1.0/28 172.16.12.11 0 0 100 i
*> 10.0.1.16/28 172.16.12.11 0 0 100 i
*> 10.0.1.32/28 172.16.12.11 0 0 100 i
*> 10.0.1.48/28 172.16.12.11 0 0 100 i
*> 10.0.1.64/28 172.16.12.11 0 0 100 i
*> 10.0.1.80/28 172.16.12.11 0 0 100 i
*> 10.0.2.0/28 172.16.22.22 0 0 200 i
*> 10.0.2.16/28 172.16.22.22 0 0 200 i
*> 10.0.2.32/28 172.16.22.22 0 0 200 i
Network Next Hop Metric LocPrf Weight Path
*> 10.0.2.48/28 172.16.22.22 0 0 200 i
*> 10.0.2.64/28 172.16.22.22 0 0 200 i
*> 10.0.2.80/28 172.16.22.22 0 0 200 i
*> 10.0.2.96/28 172.16.22.22 0 0 200 i
*> 10.0.2.112/28 172.16.22.22 0 0 200 i
*> 10.0.2.128/28 172.16.22.22 0 0 200 i
* 10.0.21.0/24 172.16.12.11 0 0 100 37 40 21 i
*> 172.16.22.22 0 0 200 21 i
*> 10.0.37.0/24 172.16.12.11 0 0 100 37 i
* 172.16.22.22 0 0 200 21 40 37 i
*> 10.0.40.0/24 172.16.12.11 0 0 100 37 40 i
* 172.16.22.22 0 0 200 21 40
YoushouldseetheseBGProutesbeingreceivedontheR2routerfromtheISP1router:
Anysubnetsin10.0.1.0/24range.
Networks10.0.21.0/24,10.0.37.0/24and10.0.40.0/24.
Prefix-BasedOutboundRouteFiltering
DiscoverySteps

Step3
ConfiguretheISP1routertoadvertiseORFreceivecapabilityfromtheR2
neighbor.
ISP1(config)# router bgp 100
ISP1(config-router)# neighbor 172.16.12.2 capability orf prefix-
list receive
Step4
ConfiguretheR2routertoadvertiseORFsendcapabilitytotheISP1router.
R2(config)# router bgp 1
R2(config-router)# neighbor 172.16.12.11 capability orf prefix-
list send
Step5
OntheR2router,configuretheprefixlistwiththenameFILTER,whichwillonly
permit10.0.1.16/28network.Thisprefixlistwillbeusedforprefix-based
outboundroutefiltering.
R2(config)# ip prefix-list FILTER seq 5 permit 10.0.1.16/28
Step6
OntheR2router,applythe"FILTER"prefixlisttoincomingadvertisementsfrom
theISP1neighbor.
R2(config)# router bgp 1
R2(config-router)# neighbor 172.16.12.11 prefix-list FILTER in
Step7
ClearallBGPsessionsontherouterISP1.
ISP1# clear ip bgp *
Step8
OntheISP1router,verifythattheORFcapabilityexchangeisenabled.
ISP1# show ip bgp neighbors 172.16.12.2
BGP neighbor is 172.16.12.2, remote AS 1, external link
BGP version 4, remote router ID 10.0.0.65
BGP state = Established, up for 00:15:44
Last read 00:00:27, last write 00:00:09, hold time is 180, keepalive interval is 60 seconds
Neighbor sessions:
1 active, is not multisession capable (disabled)
Neighbor capabilities:
Route refresh: advertised and received(new)
Four-octets ASN Capability: advertised and received
Address family IPv4 Unicast: advertised and received
Enhanced Refresh Capability: advertised and received
Multisession Capability:
Stateful switchover support enabled: NO for session 1
Message statistics:
InQ depth is 0
OutQ depth is 0
Sent Rcvd
Opens: 1 1
Notifications: 0 0
Updates: 2 2
Keepalives: 18 19
Route Refresh: 0 0
Total: 21 25
Default minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
Session: 172.16.12.2

BGP table version 15, neighbor version 15/0
Output queue size : 0
Index 28, Advertise bit 0
28 update-group member
AF-dependant capabilities:
Outbound Route Filter (ORF) type (128) Prefix-list:
Send-mode: received
Receive-mode: advertised
<...output omitted...>
YoushouldseethattheORFsendmodecapabilitywasreceivedandtheORFreceivemodecapability
wasadvertised.
Step9
OntheISP1router,verifythatithasreceivedanIPprefixlistthatdefinesan
outboundroutefilterforthe10.0.1.16/28subnet.
ISP1# show ip bgp neighbors 172.16.12.2 received prefix-filter
Address family: IPv4 Unicast
ip prefix-list 172.16.12.2: 1 entries
seq 5 permit 10.0.1.16/28
Step10
OntheISP1router,verifythatBGPisadvertising10.0.1.16/28subnetonlytotheR2
router.
ISP1# show ip bgp neighbor 172.16.12.2 advertised-routes
BGP table version is 16, local router ID is 10.0.40.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.1.16/28 0.0.0.0 0 32768 i
Step11
OntheR2router,verifythatonly10.0.1.16/28wasreceivedfromtheISP1router.
R2# show ip bgp
BGP table version is 137, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/24 0.0.0.0 0 32768 i
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*> 10.0.0.32/28 0.0.0.0 0 32768 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*> 10.0.0.64/28 0.0.0.0 0 32768 i
*> 10.0.1.16/28 172.16.12.11 0 0 100 i
*> 10.0.2.0/28 172.16.22.22 0 0 200 i
*> 10.0.2.16/28 172.16.22.22 0 0 200 i
*> 10.0.2.32/28 172.16.22.22 0 0 200 i
*> 10.0.2.48/28 172.16.22.22 0 0 200 i
*> 10.0.2.64/28 172.16.22.22 0 0 200 i
*> 10.0.2.80/28 172.16.22.22 0 0 200 i
*> 10.0.2.96/28 172.16.22.22 0 0 200 i
*> 10.0.2.112/28 172.16.22.22 0 0 200 i
Network Next Hop Metric LocPrf Weight Path
*> 10.0.2.128/28 172.16.22.22 0 0 200 i
*> 10.0.21.0/24 172.16.22.22 0 0 200 21 i
*> 10.0.37.0/24 172.16.22.22 0 0 200 21 40 37 i
*> 10.0.40.0/24 172.16.22.22 0 0 200 21 40 i

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
The BGP prefix-based outbound route filtering feature uses BGP ORF send and
receive capabilities to minimize the number of BGP updates that are sent
between BGP peers.
Configuring ORF helps you to reduce the amount of system resources that are
required for generating and processing routing updates by filtering out unwanted
routing updates at the source.
The ORF message contains the information that is used to determine which
updates will be passed.
The neighbor ip-address capability orf prefix-list command with the send and
receive keywords enables ORF negotiations and activates an ORF prefix-list.
Use the clear ip bgp neighbor command to trigger a BGP route refresh.
With the show ip bgp neighbors command, neighbor-supported ORF
capabilities are displayed as "advertised, received," and a filter of the supported
type can be sent to the neighbor.
You can verify that prefix list was received on ORF receiver using the show ip
bgp neighbors ip-address received prefix command.
Summary

Overview
BGPisapowerfulroutingprotocolthatsupportsawidevarietyofadministrative
policycontrolsandrouteselectionfeatures.Youcannotachievemanycomplex
filteringgoalsandadministrativepoliciesbyusingonlysingle-purposefiltering
methodsorbycompoundingmultiplefilteringmethodstogether.Routemapsprovide
amethodtoperformvariouscompound,complexfilteringoperationswithinasingle
tool.Understandingtheoperationanduseofroutemapsisacriticalcomponentin
thesuccessfulimplementationofanylarge-scaleBGPdeployment.
Inthislesson,youwilllearnaboutroutemapsandhowyoucanusethemforBGP
filtering.Youwilllearnthecommandsthatarerequiredtouseroutemapswithprefix
lists.YouwillalsolearnhowtouseprefixlistsasBGPfiltersandhowtomonitor
previouslyconfiguredroutemaps.
Uponcompletingthislesson,youwillbeableto:
Describethehigh-levelfunctionofaroute-map
DescribethefunctionoftheBGPRoute-MapPolicyListSupportfeature
DescribethefunctionoftheBGPRoute-MapContinuefeature
IdentifytheCiscoIOScommandsthatarerequiredtoconfigurearoutemapto
matchagainstaprefixlist
IdentifywhereyoucanapplyroutemapsasroutefiltersinaBGPnetwork
IdentifytheCiscoIOScommandthatisrequiredtoenablearoutemapasa
BGProutefilter
IdentifytheCiscoIOScommandsthatarerequiredtomonitortheoperationofa
configuredroutemapthatisusedasaBGPfilter
ApplyingRouteMapsasBGPFilters

Aroutemapisafilter,andwhattheroutemapdeniesisdropped.Additionally,you
canusetheroutemaptomodifyattributesofthepermittedroutes.
Route maps are very complex access lists:
Access lists have lines.
Route maps contain statements.
Access lists use addresses and masks.
Route maps use match conditions.
With access lists, there is an access list number.
With route maps, there is a route map name.
Statements in route maps are numbered.
You can insert and delete statements in a route map.
You can edit match conditions in a statement.
Route map statements can modify matched routes with "set" options.
Routemapsaresimilartoaccesslists.Bothhaveasetofteststobeperformed,and
severaltestscanbedoneinsequence.Thefirstmatchproducestheresultofeither
"permit"or"deny."
Anaccesslisthasanumberoflines,eachindicatingatestingcondition.Theroute
mapismorecomplexthantheaccesslist.Theroutemapconsistsofseveralgroups
ofconfigurationlines;eachgroupiscalledastatement.Thestatementhasa
sequencenumberthatprovidestheopportunitytoremoveormodifyanexplicit
statementwithoutremovingtheentireroutemap.Thereisalsoanopportunitytoadd
anewstatementbetweentwoexistingstatements.
Eachroutemapstatementstartswithaconfigurationlineindicatingthenameofthe
routemap,thesequencenumber,andwhethertheresultshouldbepermittedor
deniedifthetestingmatches.Thestatementthencontinues,followingconfiguration
lineswiththematchclauses.Matchingcanbedoneinseveralways:testingonthe
prefix,theASpath,orsomeotherattribute.Thestatementconcludeswithoptional
"set"statements,whereattributesmaybemodifiedorset.
route-map name [permit|deny sequence]
match condition
match condition
set parameter
The default statement action is "permit."
A route that is not matched by any statement is dropped.
"Permit all" is achieved by specifying "permit" without a "match" clause.
Match conditions in one statement are ANDed together.
The first matching statement permits or denies the route.
Aroutemapconsistsofseveralstatements.Eachstatementstartswiththeroute
mapconfigurationline,onwhichthenameoftheroutemapmustbeindicated.A
goodpracticeistoalwaysindicatethepermitordenykeywordfollowedbya
sequencenumber.
Thematchingclausesforthestatementsarelistedonthematchlinesfollowingthe
routemapline.Theremaybeseveralmatchlines,eachreferringtoadifferenttestto
beperformed.Alltestsmustbepassedforthestatementtobematched.Ifanyofthe
matchlinetestsfails,thenextroutemapstatementistried.Statementsaretriedin
sequencenumberorder.Iftherearenomorestatementsintheroutemap,theresult
is,implicitly,"deny."
Ifallofthematchclausessucceed,thereisamatchforthestatementandthe
indicatedresultisused.Iftheresultistodeny,therouteisthensilentlyignored.If
theresultistopermit,therouteisacceptedandthesetclausesareapplied.Theset
clausesallowoneormoreattributestobechangedorsettospecificvaluesbefore
therouteisaccepted.
Route map conditions are specified in the match statement.
Route maps can match on:
Network number and subnet mask that are matched with an IP prefix list
Route originator
RouteMapOverview

BGP next-hop address
BGP origin
Tag attached to IGP route
AS path
BGP community that is attached to BGP route
IGP route type (internal/external ...)
Eachroutemapstatementcanhaveseveralmatchclauses,andeachmatchclause
isgivenitsownconfigurationline.Thematchclausereferstotheteststhatwillbe
madeonthecandidateroute.Testsofthecandidateroutecanbebasedonthe
followingcriteria:
IPnetworknumbersandsubnetmasks,byreferringtoaprefixlistoraccesslist
thatwillbeappliedontheroute.
Routeoriginator,byreferringtoaprefixlistoraccesslistthatwillbeappliedon
thevalueoftheoriginatorBGPattribute.
Nexthop,byreferringtoaprefixlistoraccesslistthatwillbeappliedonthe
valueofthenext-hopBGPattribute.
Origincode,bytestingthevalueoftheoriginBGPattribute.
TagvaluethatisattachedtoanIGProute—usedonlywhenredistributionfrom
anIGPintoBGPoccurs.
ASpath,byreferringtoanASpathaccesslistthatwillbeappliedonthevalue
oftheASpathBGPattribute.
Community,byreferringtoacommunitylistthatwillbeappliedonthevalueof
theCommunityBGPattribute.
IGProutetype,bytestingiftheIGProuteisinternalorexternal—usedonly
whenredistributionfromanIGPtoBGPoccurs.
Route maps can also change the attributes of BGP routes.
Route maps can set:
Origin
BGP next-hop
Weight
BGP community
Local preference
MED
Eachroutemapstatementmayhaveseveralsetclauses.Eachsetclauseisapplied
totheroutewhentheroutemapstatementpermitstheroute.Witharoutemap,the
followingcanbeset:
OriginBGPattribute
Next-hopBGPattribute
Weight
CommunityBGPattribute
LocalpreferenceBGPattribute
MEDBGPattribute,bysettingthemetric

TheBGPRoute-MapPolicyListSupportfeatureintroducesnewfunctionalitytoBGP
routemaps,allowingyoutogrouproutemapmatchclausesintonamedlists—policy
lists.Apolicylistfunctionslikeamacro.
Adds the capability for a network operator to group route map match clauses
into named lists that are called policy lists.
Simplifies the configuration of BGP routing policy in medium-size and large
networks. You can preconfigure policy lists with groups of match clauses and
then reference these policy lists within different route maps.
Eliminates need to manually reconfigure each recurring group of match clauses
that occur in multiple route map entries.
Whenapolicylistisreferencedinaroutemap,allofthematchclausesare
evaluatedandprocessedasiftheyhadbeenconfigureddirectlyintheroutemap.
TheBGPRouteMapPolicyListSupportfeaturesimplifiestheconfigurationofBGP
routingpolicyinmedium-sizeandlargenetworks.Anetworkoperatorcan
preconfigurepolicylistswithgroupsofmatchclausesandthenreferencethese
policylistswithindifferentroutemaps.Younolongerneedtomanuallyreconfigure
eachrecurringgroupofmatchclausesinmultipleroutemapentries.
Apolicylistislikearoutemapthatcontainsonlymatchclauses.Thepolicylistis
createdandthenreferencedwithinaroutemap.Therearenochangestomatch
clausesemanticsandroutemapfunctions.Matchclausesareconfiguredinpolicy
listswithpermitanddenystatements.Theroutemapevaluatesandprocesseseach
matchclauseandpermitsordeniesroutesbasedontheconfiguration.ANDandOR
semanticsintheroutemapfunctionthesamewayforpolicylistsastheydofor
matchandsetclauses.TherearesomecommandsthatarerelatedtotheBGP
Route-MapPolicyListSupportfeature:theippolicy-listcommand,thematch
policy-listcommand,andtheshowippolicy-listcommand.
router# ip policy-list policy-list-name {permit | deny}
Creates a BGP policy list
router# match policy-list policy-list-name
Configures a route map to evaluate and process a BGP policy list in a route map
router# show ip policy-list policy-list-name
Displays one or all filter lists
TocreateaBGPpolicylist,usetheippolicy-listcommandinthepolicymap
configurationmode.
ip policy-list policy-list-name {permit | deny}
Toremoveapolicy-list,usethenoformofthiscommand
no ip policy-list policy-list-name
SyntaxDescription
Parameter Description
policy-list-name Nameoftheconfiguredpolicylist
permit Permitsaccessformatchingconditions
deny Deniesaccesstomatchingconditions
ToconfigurearoutemaptoevaluateandprocessaBGPpolicylistinaroutemap,
usethematchpolicy-listcommandintheroutemapconfigurationmode.
match policy-list policy-list-name
Toremoveapathlistentry,usethenoformofthiscommand.
BGPRoute-MapPolicyListSupport

no match policy-list policy-list-name
SyntaxDescription
Parameter Description
policy-list-name Nameoftheconfiguredpolicylist
Todisplayinformationaboutaconfiguredpolicylistandpolicylistentries,usethe
showippolicy-listcommandintheuserEXECmode.
show ip policy-list policy-list-name
SyntaxDescription
Parameter Description
policy-list-name Nameoftheconfiguredpolicylist
ConfiguringPolicyListExamples
ThefollowingconfigurationexamplecreatesaBGPpolicy-listthatpermitsmatches
ontheASpathandMEDofarouter:
Router(config)# ip policy-list POLICY-LIST-NAME-1 permit
Router(config-policy-list)# match as-path 1
Router(config-policy-list)# match metric 10
Router(config-policy-list)# end
ThefollowingconfigurationexamplecreatesaBGPpolicylistthatpermitsmatches
onthespecifiedBGPcommunityandthenexthopofarouter:
Router(config)# ip policy-list POLICY-LIST-NAME-2 permit
Router(config-policy-list)# match community 20
Router(config-policy-list)# match metric 10
Router(config-policy-list)# ip community-list 20 permit 20:1
Router(config-policy-list)# end
ThefollowingconfigurationexamplecreatesaBGPpolicylistthatdeniesmatches
onthespecifiedBGPcommunityandthenexthopofarouter:
Router(config)# ip policy-list POLICY-LIST-NAME-3 deny
Router(config-policy-list)# match community 20
Router(config-policy-list)# match metric 10
Router(config-policy-list)# end
ConfiguringRouteMapstoReferencePolicyListExamples
TheconfigurationexamplesinthissectioncreateBGProutemapsthatreference
BGPpolicylistswiththeroute-maproutemapconfigurationcommand.
Thefollowingconfigurationexamplecreatesaroutemapthatreferencespolicylists
andseparatematchandsetclausesinthesameconfiguration.Thisexampleuses
ANDsemanticsbetweenPOLICY-LIST-NAME-1andPOLICY-LIST-NAME-2.
Router(config)# route-map MAP-NAME-1 10
Router(config-route-map)# match ip-address 1
Router(config-route-map)# match policy-list POLICY-LIST-NAME-1
Router(config-route-map)# match policy-list POLICY-LIST-NAME-2
Router(config-route-map)# set community 10:1
Router(config-route-map)# set local-preference 140
Router(config-route-map)# end
Thefollowingconfigurationexamplecreatesaroutemapthatreferencespolicylists
andseparatematchandsetclausesinthesameconfiguration.Thisexampleuses
ORsemanticsbetweenPOLICY-LIST-NAME-3andPOLICY-LIST-NAME-4.
Router(config)# route-map MAP-NAME-2 10
Router(config-route-map)# match policy-list POLICY-LIST-NAME-3 POLICY-
LIST-NAME-4
Router(config-route-map)# set community 10:1
Router(config-route-map)# set local-preference 140

Router(config-route-map)# end
VerifyingBGPRoute-MapPolicyListSupport
Toverifythatapolicylisthasbeencreated,usetheshowippolicy-listcommand.
Theoutputofthiscommanddisplaysthepolicylistnameandconfiguredmatch
clauses.Thefollowingsampleoutputissimilartotheoutputthatwillbedisplayed:
Router# show ip policy-list
policy-list POLICY-LIST-NAME-1 permit
Match clauses:
metric 20
policy-list POLICY-LIST-NAME-2 permit
Match clauses:
as-path (as-path filter): 1
Apolicylistnamecanbespecifiedwhentheshowip
policy-listcommandisentered.Thisoptioncanbeuseful
forfilteringtheoutputofthiscommandandverifyinga
singlepolicylist
Toverifythataroutemaphasbeencreatedandapolicylistisreferenced,usethe
showroute-mapcommand.Theoutputofthiscommanddisplaystheroutemap
nameandpolicy-liststhattheconfiguredroutemapsreference.Thefollowing
sampleoutputissimilartotheoutputthatwillbedisplayed:
Router# show route-map
route-map ROUTE-MAP-NAME-1, deny, sequence 10
Match clauses:
Set clauses:
Policy routing matches: 0 packets, 0 bytes
route-map ROUTE-MAP-NAME-1, permit, sequence 10
Match clauses:
IP Policy lists:
POLICY-LIST-NAME-1
Set clauses:
Policy routing matches: 0 packets, 0 bytes

TheBGPRoute-MapContinuefeatureintroducesthecontinueclausetotheBGP
routemapconfiguration.Thecontinueclauseprovidesmoreprogrammablepolicy
configurationandroutefiltering.Itintroducestheabilitytoexecuteextraentriesina
routemapafteranentryisexecutedwithsuccessfulmatchandsetclauses.
Continueclausesallowyoutoconfigureandorganizemoremodularpolicy
definitionstoreducethenumberofpolicyconfigurationsthatarerepeatedwithinthe
sameroutemap.
Introduces the continue clause to the BGP route map configuration, providing
more programmable policy configuration and route filtering
Enables you to execute extra entries in a route map after an entry is executed
with successful match and set clauses
Allows configuration and organization of more modular policy definitions to
reduce the number of policy configurations that are repeated within the same
route map
Allows modularization of network policy configuration so that repeated policy
definitions can be reduced within the same route map
Continueclausesprovideaprogrammablemethodtoorganizeandcontroltheflow
ofaroutemap.Routemapconfigurationwaslinearbeforethisfeaturewas
introduced.Continueclausesalsoallowyoutomodularizenetworkpolicy
configurationsothatrepeatedpolicydefinitionscanbereducedwithinthesame
routemap.
RouteMapOperationWithoutContinueClauses
Aroutemapevaluatesmatchclausesuntilasuccessfulmatchoccurs.Afterthe
matchoccurs,theroutemapstopsevaluatingmatchclausesandstartsexecuting
setclauses,intheorderinwhichtheywereconfigured.Ifasuccessfulmatchdoes
notoccur,theroutemap"fallsthrough"andevaluatesthenextsequencenumberof
theroutemap.Itrepeatsuntilallconfiguredroutemapentrieshavebeenevaluated
orasuccessfulmatchoccurs.Eachroutemapsequenceistaggedwithasequence
numbertoidentifytheentry.Routemapentriesareevaluatedinorder,startingwith
thelowestsequencenumberandendingwiththehighestsequencenumber.Ifthe
routemapcontainsonlysetclauses,thesetclausesareexecutedautomatically,and
theroutemapdoesnotevaluateanyotherroutemapentries.
RouteMapOperationwithContinueClauses
Whenacontinueclauseisconfigured,theroutemapcontinuestoevaluateand
executematchclausesinthespecifiedroutemapentryafterasuccessfulmatch
occurs.Thecontinueclausecanbeconfiguredtogoto(orjumpto)aspecificroute
mapentrybyspecifyingthesequencenumber.Or,ifasequencenumberisnot
specified,togotothenextsequencenumber.Thisbehavioriscalledan"implied
continue."Ifamatchclauseexists,thecontinueclauseisexecutedonlyifamatch
occurs.Ifnosuccessfulmatchesoccur,thecontinueclauseisignored.
Ifamatchclausedoesnotexistintheroutemapentrybutacontinueclausedoes,
thecontinueclauseisautomaticallyexecutedandgoestothespecifiedroutemap
entry.Ifamatchclauseexistsinaroutemapentry,thecontinueclauseisexecuted
onlywhenasuccessfulmatchoccurs.Whenasuccessfulmatchoccursanda
continueclauseexists,theroutemapexecutesthesetclausesandthengoestothe
specifiedroutemapentry.Ifthenextroutemapcontainsacontinueclause,theroute
mapexecutesthecontinueclauseifasuccessfulmatchoccurs.Ifacontinueclause
doesnotexistinthenextroutemap,theroutemapisevaluatednormally.Ifa
continueclauseexistsinthenextroutemapbutamatchdoesnotoccur,theroute
mapdoesnotcontinue.Itfallsthroughtothenextsequencenumber,ifoneexists.
Acontinueclausecanbeexecutedwithoutasuccessful
matchifaroutemapentrydoesnotcontainamatch
clause.
router# continue sequence-number
Configures a route map to go to a route map entry with a higher sequence
number
BGPRouteMapContinue

router# show route-map [map-name]
Displays configured route maps
YouwillusetwocommandswiththeBGPRoute-MapContinuefeature,the
continuecommandandtheshowroute-mapcommand.
Toconfigurearoutemaptogotoaroutemapentrywithahighersequencenumber,
usethecontinuecommandinroutemapconfigurationmode.
continue sequence-number
Toremoveacontinueclausefromaroutemap,usethenoformofthiscommand.
no continue
SyntaxDescription
Parameter Description
sequence-number (Optional)Routemapsequencenumber.
Ifaroutemapsequencenumberisnotspecifiedwhenconfiguringacontinue
clause,thecontinueclausecontinuestotheroutemapentrywiththenext
sequencenumber.Thisbehaviorisreferredtoasan"impliedcontinue"
Todisplaytheconfiguredroutemaps,usetheshowroute-mapcommandinthe
EXECmode.
show route-map [map-name]
SyntaxDescription
Parameter Description
map-name (Optional)Nameofaspecificroutemap
BGPRoute-MapContinueClauseConfigurationExample
Thefollowingexampleshowsthecontinueclauseconfigurationinaroutemap
sequence.
Thefirstcontinueclauseinroutemapentry10indicatesthattheroutemapwillgoto
routemapentry30ifasuccessfulmatchoccurs.Ifamatchdoesnotoccur,theroute
mapwillfallthroughtoroutemapentry20.Ifasuccessfulmatchoccursinroute
mapentry20,thesetactionwillbeexecutedandtheroutemapwillnotevaluateany
additionalroutemapentries.
Ifasuccessfulmatchdoesnotoccurinroutemapentry20,theroutemapwillfall
throughtoroutemapentry30.Thissequencedoesnotcontainamatchclause,so
thesetclausewillbeautomaticallyexecuted.Thecontinueclausewillgotothenext
routemapentrybecauseasequencenumberisnotspecified.
Iftherearenosuccessfulmatches,theroutemapwillfallthroughtoroutemapentry
30andexecutethesetclause,androutemapentry40willnotbeevaluated.
route-map ROUTE-MAP-NAME permit 10
match ip address 1
match metric 10
set as-path prepend 10
continue 30
!
route-map ROUTE-MAP-NAME permit 20
match ip address 2
match metric 20
set as-path prepend 10 10
!
route-map ROUTE-MAP-NAME permit 30
set as-path prepend 10 10 10
continue
!
route-map ROUTE-MAP-NAME permit 40
match community 10:1
set local-preference 104

BGPRoute-MapContinueClauseVerificationExample
Toverifytheconfigurationofcontinueclauses,usetheshowroute-mapcommand.
Theoutputofthiscommanddisplaysconfiguredroutemaps,match,set,and
continueclauses.Thefollowingsampleoutputissimilartotheoutputthatwillbe
displayed:
Router# show route-map
route-map ROUTE-MAP-NAME, permit, sequence 10
Match clauses:
ip address (access-lists): 1
metric 10
Continue: sequence 40
Set clauses:
as-path prepend 10
Policy routing matches: 0 packets, 0 bytes
route-map ROUTE-MAP-NAME, permit, sequence 20
Match clauses:
ip address (access-lists): 2
metric 20
Set clauses:
as-path prepend 10 10
Policy routing matches: 0 packets, 0 bytes
route-map ROUTE-MAP-NAME, permit, sequence 30
Match clauses:
Continue: to next entry 40
Set clauses:
as-path prepend 10 10 10
Policy routing matches: 0 packets, 0 bytes
route-map ROUTE-MAP-NAME, permit, sequence 40
Match clauses:
community (community-list filter): 10:1
Set clauses:
local-preference 104
Policy routing matches: 0 packets, 0 bytes
route-map LOCAL-POLICY-MAP, permit, sequence 10
Match clauses:
Set clauses:
community 655370
Policy routing matches: 0 packets, 0 bytes

Youcanuseprefixlistsasmatchcriteriainseveralmatchingstatementsintheroute
map.
router(config-route-map)# match ip address prefix-list list-name
Uses prefix list to match routes in route-map match condition
router(config-route-map)#match ip next-hop prefix-list list-name
Matches routes where the next hop matches the conditions in the prefix list
router(config-route-map)# match ip route-source prefix-list list-name
Matches routes that are received from BGP peer that matches the prefix list
Youcanusethematchipaddresscommandintheroutemapconfigurationmode
toperformpolicyroutingonpackets.Youcanusethesamecommandtodistribute
anyroutesthathaveadestinationnetworknumberaddressthatastandardaccess
list,anextendedaccesslist,oraprefixlistpermits.
match ip address {access-list-number [access-list-number... | access-list-
name...] | access-list-name [access-list-number...| access-list-
name] | prefix-list prefix-list-name [prefix-list-name...]}
Toremovethematchipaddressentry,usethenoformofthiscommand.
no match ip address {access-list-number [access-list-number... | access-
list-name...] | access-list-name [access-list-number...| access-list-
name] | prefix-list prefix-list-name [prefix-list-name...]}
SyntaxDescription
Parameter Description
access-list-
number...
Numberofastandardorextendedaccesslist.
Itcanbeanintegerfrom1to199.Theellipsisindicatesthatmultiplevaluescan
beentered.
access-list-name... Nameofastandardorextendedaccesslist.
Itcanbeanintegerfrom1to199.Theellipsisindicatesthatmultiplevaluescan
beentered.
prefix-list Distributesroutesbasedonaprefixlist.
prefix-list-name... Nameofaspecificprefixlist.
Theellipsisindicatesthatmultiplevaluescanbeentered.
Toredistributeanyroutesthathaveanext-hoprouteraddressthatispassedbyone
ofthespecifiedaccesslists,usethematchipnext-hopcommandintheroutemap
configurationmode.
match ip next-hop {access-list-number | access-list-name}[...access-list-
number | ...access-list-name]
Toremovethenexthopentry,usethenoformofthiscommand.
no match ip next-hop {access-list-number | access-list-name}[...access-
list-number | ...access-list-name]
SyntaxDescription
Parameter Description
access-list-number Numberofastandardorextendedaccess-list.
Itcanbeanintegerfrom1to199.
access-list-name Nameofastandardorextendedaccess-list.
Itcanbeanintegerfrom1to199.
Toredistributeroutesthathavebeenadvertisedbyroutersandaccessserversat
PrefixListUseinRouteMaps

theaddressthattheaccesslistsspecify,usethematchiproute-sourcecommand
intheroutemapconfigurationmode.
match ip route-source {access-list-number | access-list-name}[...access-
list-number | ...access-list-name]
Toremovetheroute-sourceentry,usethenoformofthiscommand.
no match ip route-source {access-list-number | access-list-name}
[...access-list-number | ...access-list-name]
SyntaxDescription
Parameter Description
access-list-number Numberofastandardorextendedaccesslist.
Itcanbeanintegerfrom1to199.
access-list-name Nameofastandardorextendedaccesslist.
Itcanbeanintegerfrom1to199.

Youcanoptionallyapplyfilterlists,prefixlists,androutemapstoeitherincomingor
outgoinginformationoranycombinationofthetwo.
Theincomingprefixlist,theincomingfilterlist,andtheincomingroutemapmustall
permittheroutesthatarereceivedfromaneighborbeforebeingacceptedintothe
BGPtable.Outgoingroutesmustpasstheoutgoingfilterlist,theoutgoingprefixlist,
andtheoutgoingroutemapbeforebeingtransmittedtotheneighbor.Whenarouter
isconfiguredtoredistributeroutinginformationfromanIGPintoBGP,theroutes
mustsuccessfullypassanyprefixlistorroutemapthatisappliedtothe
redistribution.ThishappensbeforearouteisinjectedintotheBGPtable.
BGPFilters

Youcanapplyaroutemaponincomingoroutgoingroutinginformationfora
neighbor.Theroutemapmustpermittheroutinginformationinordertobeaccepted.
Ifthereisnostatementintheroutemapexplicitlypermittingaroute,thentheroute
willbeimplicitlydeniedanddropped.
router(config-router)# neighbor ip-address route-map name [in | out]
This command applies a route map to incoming or outgoing BGP updates.
Prefixes not permitted by the route map are discarded.
Route maps can also change BGP attributes in incoming or outgoing updates.
Route maps, filter lists, and prefix lists are evaluated in sequence (effectively
ANDed together).
Thepermittedroutesmayhavetheirattributessetorchangedbythesetclausesin
theroutemap.Settingattributesonroutesisusefulwhenyouareinfluencingthe
routeselection.Oneofthestatementsintheroutemapcanpermitsomeroutesand
changetheirattributes.Anotherstatementintheroutemapcouldpermitotherroutes
andnotaltertheirattributes.Whenrouteselectionisperformed,theattributevalues
indicatethatonerouteispreferredovertheother.
Requirement: The customer will accept only a default route from both service
providers.
router bgp 1
neighbor Primary-ISP remote-as 100
neighbor Primary-ISP route-map filter in
neighbor Secondary-ISP remote-as 100
neighbor Secondary-ISP route-map filter in
!
route-map filter permit 10
match ip address prefix-list DefaultOnly
!
ip prefix-list DefaultOnly seq 10 permit 0.0.0.0/0
Inthisexample,thecustomerwillacceptonlyadefaultroutefrombothservice
providers.ThecustomerdoesnotwanttoputanyothernetworkintotheBGPtable
thanthedefaultroute.ThedefaultrouteisannouncedviaBGPtothecustomerfrom
bothserviceproviders.
Intheexample,theroutemapwithanamefilterisappliedininbounddirectionon
thecustomerrouterforbothserviceproviderneighbors.Theroutemapismatching
theprefixlist,whichpermitsdefaultrouteonly.
UsingRouteMapsasBGPFilters

Overview
Throughthisdiscovery,youwilllearnhowtoconfigureroutemapstofilterBGP
updates.YouasacustomerconfiguringrouterR2willacceptonlythedefaultroute
thatisannouncedviaBGPfromtheISP1router.Youwillnotacceptanyother
networksthatareannouncedviaBGPfromtheserviceprovider.
Discovery10:ConfigureRouteMapsasBGPFilters

Topology

Ifyoushutdownaninterfaceonarealrouterorswitch,the
connecteddevicewillseeitas"down/down."Dueto
virtualizationspecifics,IOLbehaviorisslightlydifferent.If
youshutdownaninterfaceonarouterorswitch,the
connecteddevicewillseeitas"up/up."InIOL,thestatus
ofaninterfacecanonlybe"up/up"or"administratively
down/down."
DeviceInformation
Device Interface IPaddress Description
R2 Ethernet0/0 172.16.22.2/24 ConnectiontoISP2
R2 Ethernet0/1 172.16.12.2/24 ConnectiontoISP1
R2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
10.0.0.1/28
10.0.0.17/28
10.0.0.33/28
10.0.0.49/28
10.0.0.65/28
Loopbackssimulate
LANnetworks
ISP1 Ethernet0/1 172.16.12.11/24 ConnectiontoR2
ISP1 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
10.0.1.1/28
10.0.1.17/28
10.0.1.33/28
10.0.1.49/28
10.0.1.65/28
10.0.1.81/28
Loopbackssimulate
LANnetworks
ISP1 Loopback21
Loopback37
Loopback40
10.0.21.1
10.0.37.1
10.0.40.1
Loopbackssimulate
extranetworksin
differentautonomous
systems.
ISP2 Ethernet0/0 172.16.22.22/24 ConnectiontoR2
ISP2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
Loopback7
Loopback8
Loopback9
10.0.2.1/28
10.0.2.17/28
10.0.2.33/28
10.0.2.49/28
10.0.2.65/28
10.0.2.81/28
10.0.2.97/28
10.0.2.113/28
10.0.2.129/28
Loopbackssimulate
LANnetworks
ISP2 Loopback21
Loopback37
Loopback40
10.0.21.1
10.0.37.1
10.0.40.1
Loopbackssimulate
extranetworksin
differentautonomous
systems.
IPaddressesandadvertisednetworksinBGParepreconfiguredasshownbelow:
JobAids

BGPisalsopreconfiguredasEBGP(R2toISP1andR2toISP2).TheISP1router
announcesthesenetworks:
Defaultroute0.0.0.0/0
10.0.1.16/28
10.0.1.32/28
10.0.1.48/28
10.0.1.64/28
10.0.1.80/28

Step1
OntheISP1router,verifythatthedefaultrouteisbeingannouncedinanEBGPsession
tothecustomerrouterR2.
ISP1# show ip bgp neighbor 172.16.12.2 advertised-routes
BGP table version is 13, local router ID is 10.0.40.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Originating default network 0.0.0.0
Network Next Hop Metric LocPrf Weight Path
*> 10.0.1.0/28 0.0.0.0 0 32768 i
*> 10.0.1.16/28 0.0.0.0 0 32768 i
*> 10.0.1.32/28 0.0.0.0 0 32768 i
*> 10.0.1.48/28 0.0.0.0 0 32768 i
*> 10.0.1.64/28 0.0.0.0 0 32768 i
*> 10.0.1.80/28 0.0.0.0 0 32768 i
*> 10.0.21.0/24 0.0.0.0 0 32768 i
*> 10.0.37.0/24 0.0.0.0 0 32768 i
*> 10.0.40.0/24 0.0.0.0 0 32768 i
YoucanseethattheISP1routeroriginatesthedefaultroute.
Step2
OntheISP2router,verifythatthedefaultrouteisbeingannouncedinanEBGPsession
tothecustomerrouterR2.
ISP2# show ip bgp neighbors 172.16.22.2 advertised-routes
BGP table version is 20, local router ID is 10.0.40.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Originating default network 0.0.0.0
Network Next Hop Metric LocPrf Weight Path
*> 10.0.2.0/28 0.0.0.0 0 32768 i
*> 10.0.2.16/28 0.0.0.0 0 32768 i
*> 10.0.2.32/28 0.0.0.0 0 32768 i
*> 10.0.2.48/28 0.0.0.0 0 32768 i
*> 10.0.2.64/28 0.0.0.0 0 32768 i
*> 10.0.2.80/28 0.0.0.0 0 32768 i
*> 10.0.2.96/28 0.0.0.0 0 32768 i
*> 10.0.2.112/28 0.0.0.0 0 32768 i
*> 10.0.2.128/28 0.0.0.0 0 32768 i
*> 10.0.21.0/24 0.0.0.0 0 32768 i
*> 10.0.37.0/24 0.0.0.0 0 32768 i
*> 10.0.40.0/24 0.0.0.0 0 32768 i
Network Next Hop Metric LocPrf Weight Path
Total number of prefixes 12
YoucanseethattheISP2routeroriginatesthedefaultroute.
Step3
OntheR2router,verifythatthecustomerrouterR2receivesdefaultroutefromboth
neighbors,theISP1andISP2routers.YoushouldalsomakesurethattheR2router
receivesseveralotherroutesfrombothISProuters.
R2# show ip bgp
BGP table version is 26, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
* 0.0.0.0 172.16.22.22 0 200 i
*> 172.16.12.11 0 100 i
*> 10.0.0.0/24 0.0.0.0 0 32768 i
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*> 10.0.0.32/28 0.0.0.0 0 32768 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*> 10.0.0.64/28 0.0.0.0 0 32768 i
*> 10.0.1.0/28 172.16.12.11 0 0 100 i
*> 10.0.1.16/28 172.16.12.11 0 0 100 i
*> 10.0.1.32/28 172.16.12.11 0 0 100 i
*> 10.0.1.48/28 172.16.12.11 0 0 100 i
*> 10.0.1.64/28 172.16.12.11 0 0 100 i
*> 10.0.1.80/28 172.16.12.11 0 0 100 i
*> 10.0.2.0/28 172.16.22.22 0 0 200 i
Network Next Hop Metric LocPrf Weight Path
*> 10.0.2.16/28 172.16.22.22 0 0 200 i
*> 10.0.2.32/28 172.16.22.22 0 0 200 i
*> 10.0.2.48/28 172.16.22.22 0 0 200 i
*> 10.0.2.64/28 172.16.22.22 0 0 200 i
*> 10.0.2.80/28 172.16.22.22 0 0 200 i
*> 10.0.2.96/28 172.16.22.22 0 0 200 i
*> 10.0.2.112/28 172.16.22.22 0 0 200 i
ConfigureRouteMapsasBGPFilters
DiscoverySteps

*> 10.0.2.112/28 172.16.22.22 0 0 200 i
*> 10.0.2.128/28 172.16.22.22 0 0 200 i
*> 10.0.21.0/24 172.16.22.22 0 0 200 21 i
* 172.16.12.11 0 0 100 37 40 21 i
* 10.0.37.0/24 172.16.22.22 0 0 200 21 40 37 i
*> 172.16.12.11 0 0 100 37 i
* 10.0.40.0/24 172.16.22.22 0 0 200 21 40 i
*> 172.16.12.11 0 0 100 37 40 i
YoucanseethatthedefaultrouteontheR2routerwasreceivedfromtwodifferentEBGP
neighbors:
OnedefaultroutewasreceivedfromtheISP1routerwiththeASpathattributesetto
100andBGPnexthopsetto172.16.12.11.ThisaddressistheIPaddressofthe
ISP1router.
AnotherdefaultroutewasreceivedfromtheISP2routerwiththeASpathattributeset
to200andBGPnexthopsetto172.16.22.22.ThisaddressistheIPaddressofISP2
router.
YoushouldreceivetheseBGProutesontheR2router:
Anysubnetsin10.0.1.0/24rangefromtheISP1router
Anysubnetsin10.0.2.0/24rangefromtheISP2router
Networks10.0.21.0/24,10.0.37.0/24,10.0.40.0/24fromboththeISP1andISP2
routers
Step4
ConfiguretheroutemapontheR2router.Theroutemapshouldpermitonlythe
defaultroute,thatisdefinedintheprefixlist,tobeacceptedfromtheISP1EBGP
neighbor.
R2(config)# ip prefix-list DefaultOnly permit 0.0.0.0/0
R2(config)# route-map ISP1 permit 10
R2(config-route-map)# match ip address prefix-list DefaultOnly
R2(config-route-map)# exit
R2(config)# router bgp 1
R2(config-router)# neighbor 172.16.12.11 route-map ISP1 in
Step5
EnabledebuggingofBGPupdatesontheR2router.
R2# debug ip bgp update
Step6
ClearallBGPsessionsontheR2router.
R2# clear ip bgp *
Step7
OntheR2router,observethatallnondefaultrouteBGPupdatesreceivedfromtheISP1routerweredeniedbecauseoftheconfiguredroutemap.Onlythe
defaultroutethatisreceivedviatheEBGPsessionfromtheISP1routershouldbeinstalledtotheroutingtable.
%BGP-5-ADJCHANGE: neighbor 172.16.12.11 Down User reset
*Mar 6 00:36:02.681: %BGP_SESSION-5-ADJCHANGE: neighbor 172.16.12.11 IPv4 Unicast topology base removed from session User reset
*Mar 6 00:36:02.681: %BGP-5-ADJCHANGE: neighbor 172.16.22.22 Down User reset
*Mar 6 00:36:02.681: %BGP_SESSION-5-ADJCHANGE: neighbor 172.16.22.22 IPv4 Unicast topology base removed from session User reset
*Mar 6 00:36:03.107: %BGP-5-ADJCHANGE: neighbor 172.16.12.11 Up
*Mar 6 00:36:03.109: %BGP-5-ADJCHANGE: neighbor 172.16.22.22 Up
*Mar 6 00:36:03.113: BGP(0): 172.16.12.11 rcvd UPDATE w/ attr: nexthop 172.16.12.11, origin i, metric 0, merged path 100 37 40, AS_PATH
*Mar 6 00:36:03.113: BGP(0): 172.16.12.11 rcvd 10.0.40.0/24 -- DENIED due to: route-map;
*Mar 6 00:36:03.113: BGP(0): 172.16.12.11 rcvd UPDATE w/ attr: nexthop 172.16.12.11, origin i, metric 0, merged path 100 37, AS_PATH
*Mar 6 00:36:03.113: BGP(0): 172.16.12.11 rcvd 10.0.37.0/24 -- DENIED due to: route-map;
*Mar 6 00:36:03.113: BGP(0): 172.16.12.11 rcvd UPDATE w/ attr: nexthop 172.16.12.11, origin i, metric 0, merged path 100 37 40 21, AS_PATH
*Mar 6 00:36:03.113: BGP(0): 172.16.12.11 rcvd 10.0.21.0/24 -- DENIED due to: route-map;
*Mar 6 00:36:03.113: BGP(0): 172.16.12.11 rcvd UPDATE w/ attr: nexthop 172.16.12.11, origin i, metric 0, merged path 100, AS_PATH
*Mar 6 00:36:03.113: BGP(0): 172.16.12.11 rcvd 10.0.1.0/28 -- DENIED due to: route-map;
*Mar 6 00:36:03.113: BGP(0): 172.16.12.11 rcvd 10.0.1.16/28 -- DENIED due to: route-map;
*Mar 6 00:36:03.113: BGP(0): 172.16.12.11 rcvd 10.0.1.32/28 -- DENIED due to: route-map;
*Mar 6 00:36:03.113: BGP(0): 172.16.12.11 rcvd 10.0.1.48/28 -- DENIED due to: route-map;
*Mar 6 00:36:03.113: BGP(0): 172.16.12.11 rcvd 10.0.1.64/28 -- DENIED due to: route-map;
*Mar 6 00:36:03.113: BGP(0): 172.16.12.11 rcvd 10.0.1.80/28 -- DENIED due to: route-map;
*Mar 6 00:36:03.114: BGP(0): 172.16.12.11 rcvd UPDATE w/ attr: nexthop 172.16.12.11, origin i, merged path 100, AS_PATH
*Mar 6 00:36:03.114: BGP(0): 172.16.12.11 rcvd 0.0.0.0/0
*Mar 6 00:36:03.114: BGP(0): 172.16.22.22 rcvd UPDATE w/ attr: nexthop 172.16.22.22, origin i, metric 0, merged path 200 21 40, AS_PATH
*Mar 6 00:36:03.114: BGP(0): 172.16.22.22 rcvd 10.0.40.0/24
*Mar 6 00:36:03.114: BGP(0): 172.16.22.22 rcvd UPDATE w/ attr: nexthop 172.16.22.22, origin i, metric 0, merged path 200 21 40 37, AS_PATH
*Mar 6 00:36:03.114: BGP(0): 172.16.22.22 rcvd 10.0.37.0/24
*Mar 6 00:36:03.114: BGP(0): 172.16.22.22 rcvd UPDATE w/ attr: nexthop 172.16.22.22, origin i, metric 0, merged path 200 21, AS_PATH
*Mar 6 00:36:03.114: BGP(0): 172.16.22.22 rcvd 10.0.21.0/24
*Mar 6 00:36:03.114: BGP(0): 172.16.22.22 rcvd UPDATE w/ attr: nexthop 172.16.22.22, origin i, metric 0, merged path 200, AS_PATH
*Mar 6 00:36:03.114: BGP(0): 172.16.22.22 rcvd 10.0.2.0/28
*Mar 6 00:36:03.114: BGP(0): 172.16.22.22 rcvd 10.0.2.16/28
*Mar 6 00:36:03.114: BGP(0): 172.16.22.22 rcvd 10.0.2.32/28
*Mar 6 00:36:03.114: BGP(0): 172.16.22.22 rcvd 10.0.2.48/28
*Mar 6 00:36:03.114: BGP(0): 172.16.22.22 rcvd 10.0.2.64/28
*Mar 6 00:36:03.114: BGP(0): 172.16.22.22 rcvd 10.0.2.80/28
*Mar 6 00:36:03.114: BGP(0): 172.16.22.22 rcvd 10.0.2.96/28
R2#
*Mar 6 00:36:03.114: BGP(0): 172.16.22.22 rcvd 10.0.2.112/28
*Mar 6 00:36:03.114: BGP(0): 172.16.22.22 rcvd 10.0.2.128/28
*Mar 6 00:36:03.114: BGP(0): 172.16.22.22 rcvd UPDATE w/ attr: nexthop 172.16.22.22, origin i, merged path 200, AS_PATH
*Mar 6 00:36:03.114: BGP(0): 172.16.22.22 rcvd 0.0.0.0/0
*Mar 6 00:36:04.130: BGP(0): Revise route installing 1 of 1 routes for 0.0.0.0/0 -> 172.16.12.11(global) to main IP table
*Mar 6 00:36:04.130: BGP(0): Revise route installing 1 of 1 routes for 10.0.2.0/28 -> 172.16.22.22(global) to main IP table
*Mar 6 00:36:04.130: BGP(0): Revise route installing 1 of 1 routes for 10.0.2.16/28 -> 172.16.22.22(global) to main IP table
*Mar 6 00:36:04.130: BGP(0): Revise route installing 1 of 1 routes for 10.0.2.32/28 -> 172.16.22.22(global) to main IP table
*Mar 6 00:36:04.130: BGP(0): Revise route installing 1 of 1 routes for 10.0.2.48/28 -> 172.16.22.22(global) to main IP table

*Mar 6 00:36:04.130: BGP(0): Revise route installing 1 of 1 routes for 10.0.2.48/28 -> 172.16.22.22(global) to main IP table
*Mar 6 00:36:04.130: BGP(0): Revise route installing 1 of 1 routes for 10.0.2.64/28 -> 172.16.22.22(global) to main IP table
*Mar 6 00:36:04.130: BGP(0): Revise route installing 1 of 1 routes for 10.0.2.80/28 -> 172.16.22.22(global) to main IP table
*Mar 6 00:36:04.130: BGP(0): Revise route installing 1 of 1 routes for 10.0.2.96/28 -> 172.16.22.22(global) to main IP table
*Mar 6 00:36:04.130: BGP(0): Revise route installing 1 of 1 routes for 10.0.2.112/28 -> 172.16.22.22(global) to main IP table
*Mar 6 00:36:04.130: BGP(0): Revise route installing 1 of 1 routes for 10.0.2.128/28 -> 172.16.22.22(global) to main IP table
Step8
OntheR2router,verifythecontentofBGPtable.
R2# show ip bgp
BGP table version is 19, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
* 0.0.0.0 172.16.22.22 0 200 i
*> 172.16.12.11 0 100 i
*> 10.0.0.0/24 0.0.0.0 0 32768 i
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*> 10.0.0.32/28 0.0.0.0 0 32768 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*> 10.0.0.64/28 0.0.0.0 0 32768 i
*> 10.0.2.0/28 172.16.22.22 0 0 200 i
*> 10.0.2.16/28 172.16.22.22 0 0 200 i
*> 10.0.2.32/28 172.16.22.22 0 0 200 i
*> 10.0.2.48/28 172.16.22.22 0 0 200 i
*> 10.0.2.64/28 172.16.22.22 0 0 200 i
*> 10.0.2.80/28 172.16.22.22 0 0 200 i
*> 10.0.2.96/28 172.16.22.22 0 0 200 i
Network Next Hop Metric LocPrf Weight Path
*> 10.0.2.112/28 172.16.22.22 0 0 200 i
*> 10.0.2.128/28 172.16.22.22 0 0 200 i
*> 10.0.21.0/24 172.16.22.22 0 0 200 21 i
*> 10.0.37.0/24 172.16.22.22 0 0 200 21 40 37 i
*> 10.0.40.0/24 172.16.22.22 0 0 200 21 40 i
YoushouldonlyseethedefaultroutethatisinstalledforBGPupdatesfromtheISP1
routerwithnexthopIPaddress172.16.12.11.Allothernetworkswerereceivedfromthe
ISP2router.
DisplayingRoutesMatchingtheRouteMap
DisplayingRoutesMatchingtheRouteMap
router# show ip bgp route-map route-map-name
Displays all routes in BGP table matching the route map
Used for filtering the show ip bgp output on basis of BGP path attributes:
Community
Local preference
Weight
Origin
Next-hop
Can also filter based on prefixes
Allows powerful combined filtering
YoucanalsouseroutemapsforselectiveandpowerfulfilteringoftheBGPtable.
Theshowipbgproute-mapcommanddisplaystheselectedroutesfromaBGP
routingtablebasedonthecontentsofaroutemap.
AroutemapcanmatchtheroutesbasedonBGPpathattributes(localpreference,
community,weight,origin,next-hop)orprefixlistsandaccesslists(matchingIP
prefixes).Thepowerofroutemapfilteringliesinthepossibilityofcombiningdifferent
filters(forexample,filteringoncommunity,prefix,andnext-hopvalues).
Step9
ConfiguretheroutemapontheR2router.Theroutemapshouldpermitonly
networkspassingthroughtheautonomoussystem40.
R2(config)# ip as-path access-list 2 permit _40_
R2(config)# route-map PassAS40 permit 10
R2(config-route-map)# match as-path 2
Step10
OntheR2router,displaythecontentofBGPtablematchingtheconfiguredroutemap.
R2# show ip bgp route-map PassAS40
BGP table version is 19, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.37.0/24 172.16.22.22 0 0 200 21 40 37 i
*> 10.0.40.0/24 172.16.22.22 0 0 200 21 40 i
Youshouldonlyseethenetworkscontaining"40"intheASpath.
Youshouldonlyseethenetworkscontaining"40"intheASpath.

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
A route map is a filter that has the ability to drop denied routes as well as modify
attributes of the permitted routes.
The BGP Route-Map Policy List Support feature introduces new functionality to
BGP route maps. It adds the ability for a network operator to group route map
match clauses into named lists that are called policy lists.
The BGP Route-Map Continue feature introduces the continue clause to BGP
route map configuration. Continue clauses provide a programmable method to
organize and control the flow of a route map.
You can configure a route map to match against a prefix list by using the match
ip address, match ip next-hop, and match ip route-source commands.
Filter lists, prefix lists, and route maps can optionally all be applied on either
incoming or outgoing information in any combination.
A route map can be applied on incoming or outgoing routing information to or
from a neighbor. However, the route map must permit the routing information in
order to be accepted.
Monitoring route maps is possible using the show ip bgp and debug ip bgp
update commands.
Summary

Overview
BecauseofthehugevolumesofroutinginformationthatBGPiscapableofhandling,
traditionalroutingupdatemethodsarenotfeasible.RoutingpoliciesforaBGP
neighbormayincludefilteringmechanismssuchasroutemaps,distributelists,prefix
lists,andASpathfilterlists.Eachofthesefiltersmayaffectinboundoroutbound
routingtableupdates.
Wheneverthereisanadministrativechangeinaroutingpolicy,theBGPsession
mustberesetbeforethenewpolicycantakeeffect.Toaccomplishthistask,you
canusetwotypesofreset:hardresetandsoftreset.ClearingaBGPsessionusing
ahardresetinvalidatesthecacheandresultsinanegativeimpactontheoperation
ofnetworks,becausetheinformationinthecachebecomesunavailable.Asoftreset
isrecommendedbecauseitallowsroutingtablestobereconfiguredandactivated
withoutclearingtheBGPsession.
ThislessondiscussesroutingupdatesinaBGPenvironmentandthetraditional
methodsofforcingBGProuteupdatesafterchangesinafilterpolicy.Thefunction
andbenefitsofsoftreconfigurationandrouterefresharealsodiscussed.Thelesson
alsopresentsthecommandsthatarerequiredtoperformasoftreconfigurationand
routerefreshandexplainshowtomonitorandtroubleshootthesefeatures.
Uponcompletingthislesson,youwillbeableto:
IdentifythelimitationsofthetraditionalmethodsofforcingBGProuteupdates
afterchangingafilterpolicy
DescribethefunctionoftheBGPSoftResetEnhancementfeature
Describethefunctionandbenefitsoftherouterefreshfunction
IdentifytheCiscoIOScommandthatisrequiredtotriggerarouterefresh
IdentifytheCiscoIOScommandsthatarerequiredtomonitorrouterefresh
operation
ImplementingChangesinBGPPolicy

BGPcanpotentiallyhandlehugevolumesofroutinginformation.Butitcannot
handleitwhenyouchangeconfigurationlinesinfiltersorroutemaps.Inthiscase,
theroutercannotgothroughthehugetableofBGPinformationandcalculatewhich
entryisnolongervalidinthelocaltable.Norcantherouterdeterminewhichrouteor
routes,alreadyadvertised,shouldbewithdrawnfromaneighbor.Thereisan
obviousriskthatthefirstconfigurationchangewillbeimmediatelyfollowedbya
second,whichwouldcausethewholeprocesstostartalloveragain.
All filters apply only to new incoming and outgoing updates.
To change the outbound routing policy, you have to resend BGP updates to your
neighbors.
To change the inbound routing policy, you have to force your neighbor to resend
the updates to you.
The traditional mechanism is to clear BGP sessions.
Toavoidsuchaproblem,CiscoIOSsoftwareapplieschangesonlyontheupdates
thatarereceivedortransmittedaftertheconfigurationchangehasbeenperformed.
Thisapproachmeansthatthenewroutingpolicy,whichthenewfiltersenforce,is
appliedonlyonroutesthatarereceivedorsentafterthechange.Ifnetwork
administratorswouldliketoapplythepolicychangeonallroutes,theyhavetoforce
theroutertoletallroutespassthroughthenewfilter.
Ifthefilterisappliedtooutgoinginformation,therouterhastoresendtheentireBGP
tablethroughthenewfilter.Ifthefilterisappliedtoincominginformation,therouter
needsitsneighbortoresenditsentireBGPtablesothatitpassesthroughthenew
filters.
Traditionally,toaccomplishthesegoals,youhavetorndowntheaffectedBGP
sessionsaftercompletingaconfigurationchange.Afterthesessionsaredown,all
informationthatisreceivedonthosesessionsisinvalidatedandremovedfromthe
BGPtable.Also,theremoteneighborwilldetectasessiondownstate,andit
likewisewillinvalidatetheroutesthatarereceivedonthesession.Afteraperiodof
30to60seconds,thesessionsarere-establishedautomaticallyandtheentireBGP
tableisexchangedagain,butthroughthenewfilters.Thisprocess,however,
disruptspacketforwarding.
TraditionalLimitationsofClearingtheBGPSession
router# clear ip bgp {* | ip-address | peer-group-name}
This command tears down the BGP session with all neighbors, a specific
neighbor, or all neighbors in a peer group.
All BGP routes are lost after the session is torn down; connectivity through the
BGP neighbor is lost.
A new session is re-established within 30 to 60 seconds.
A full routing update is exchanged once the session is re-established, resulting
in enforcement of new routing policy.
Processing the full Internet routing table can take a long time.
Clearing the BGP session is a very disruptive way to implement routing
policies.
TheEXECcommandclearipbgptearsdownoneorseveralBGPsessions.The
BGPsessionsareterminated,andtheTCPconnectionsclosed.Theneighborsgo
intotheIdlestateandstaythereforapproximately30seconds.Next,theneighbor
sessiongoesintotheActivestate,andthesessionsarere-established.
Youcanimplementtheclearipbgpcommandwiththe*(asterisk)argument,which
appliestoallsessions.Youcanalsomakeareferencetoaspecificsessionorgroup
ofsessionstoteardown.
Whenthesessionisdown,allroutesthatarereceivedoverthesessionbyboth
routersareinvalidated.WhenthesessionisonceagainintheEstablishedstate,all
BGProuteshavetoberesentbybothpeers.Allroutesalsohavetopassthrough
thenewfilters,whichenforcesthenewpolicy.
ExchangingthecompleteInternetroutingtabletakestime,bandwidth,andCPU
resources.IPpacketforwardingtoandfromtheneighborisdownforseveral
TraditionalFilteringLimitations
minutes.Also,revokingandreannouncingtherouteswillberegisteredbytherestof
theInternetasaflapforeachroute.

Previously,toperformasoftresetforinboundroutingtableupdates,theneighbor
soft-reconfigurationcommanddirectedtheCiscoIOSsoftwareinthelocalBGP
routertostoreallreceived(inbound)routingpolicyupdateswithoutmodification.
Thismethodismemory-intensiveandnotrecommendedunlessabsolutely
necessary.(Outboundupdateshaveneverrequiredtheextramemoryandthis
featuredoesnotaffectthem.)
BGP Soft Reset Enhancement provides automatic support for dynamic soft reset
of inbound BGP routing table updates that is not dependent upon stored routing
table update information.
Requires no preconfiguration (as with the neighbor soft-reconfiguration
command).
Requires much less memory than the previous soft reset method for inbound
routing table updates.
Wheneverthereisachangeintheroutingpolicy,theBGPsessionmustbecleared,
orreset,forthenewpolicytotakeeffect.Therearetwotypesofreset,hardreset,
andsoftreset.ClearingaBGPsessionusingahardresetinvalidatesthecacheand
resultsinanegativeimpactontheoperationofnetworksastheinformationinthe
cachebecomesunavailable.Softresetisrecommendedbecauseitallowsrouting
tablestobereconfiguredandactivatedwithoutclearingtheBGPsession.Softreset
isdoneonper-neighborbasis.Therearetwotypesofsoftresets:
Dynamicinboundsoftreset:Whensoftresetisusedtogenerateinbound
updatesfromaneighbor
Outboundsoftreset:Whensoftresetisusedtosendanewsetofupdatesto
aneighbor.
TheBGPSoftResetEnhancementfeature,however,providesautomaticsupportfor
dynamicsoftresetofinboundBGProutingtableupdatesthatisnotdependenton
storedroutingtableupdateinformation.Thenewmethodrequiresno
preconfiguration(aswiththeneighborsoft-reconfigurationcommand)and
requiresmuchlessmemorythantheprevioussoftresetmethodforinboundrouting
tableupdates.
ThereareanumberofbenefitstotheBGPSoftResetEnhancementfeature:
Allowsdynamicrouterefreshrequests:Thisfeatureprovidesawaytoinitiate
nondisruptiveroutingpolicychanges.Itachievesthisbyallowingthedynamic
exchangeofrouterefreshrequestsbetweenBGProuters,andthesubsequent
readvertisementoftherespectiveoutboundroutingtables.
Requiresnopreconfiguration:Becausesupportforthesoftresetusingthe
routerefreshcapabilityisincludedinthisreleaseoftheCiscoIOSsoftware,no
furtherrouterconfigurationisrequired.Youcaninitiateasoftinboundreset
usingonlytheclearipbgpincommand.
Requiresnoadditionalmemoryresources:Unlikeasoftresetusingthe
storedinboundroutingtableupdatesprovidedbytheneighborsoft-
reconfigurationcommand,whenbothBGPpeerssupporttherouterefresh
capability,inboundroutingtableupdatesarenotstoredinthelocalBGProuter.
Thesoftresetrequestsareexchangeddynamically,andnoadditionalmemoryis
required.
Providesflexibility:Therearenowtwoavailablemethodsforinboundsoft
reset.Theoldermethod,usingstoredinboundroutingtableupdates,andthe
methodthatthisfeatureprovides,usingdynamicexchangeofupdate
information.
WhentheroutingpolicyofaBGPneighborchanges,thesessionmustbereset
(cleared)forthechangestotakeeffect.BecauseresettingaBGPsessioncanbe
disruptivetonetworks,asoftresetmethodisrecommendedforreconfiguringthe
routingtable.Previously,inordertoreconfiguretheinboundroutingtable,boththe
localBGProuterandtheBGPpeerfirstneededtobeconfiguredtostoreincoming
routingpolicyupdates.BGPsoftreconfigurationusedtobeconfiguredusingthe
neighborsoft-reconfigurationcommand.Moreresources,particularlymemory,
wererequiredtostoretheinboundroutingtableupdates.Theclearipbgp
commandcouldtheninitiatethesoftreset,whichgeneratedanewsetofinbound
routingtableupdatesusingthestoredinformation.
TheBGPSoftResetEnhancementfeatureprovidesanadditionalmethodforsoft
BGPSoftResetEnhancement

reset.Itallowsthedynamicexchangeofrouterefreshrequestsandrouting
informationbetweenBGProutersandthesubsequentreadvertisementofthe
respectiveoutboundroutingtable.Softresetusingtherouterefreshcapabilitydoes
notrequirepreconfigurationandconsumesnoadditionalmemoryresources.
Tousethisnewmethod,bothBGPpeersmustsupportthesoftrouterefresh
capability.ThiscapabilityisadvertisedintheOpenmessagethatissentwhena
peersendsitsroutingtableupdate.AnyrouterrunningBGPwiththissoftware
releaseautomaticallysupportstherouterefreshcapability.Routersrunningearlier
CiscoIOSsoftwarereleasesdonotsupporttherouterefreshcapabilityandmust
usetheoldersoftresetmethod.Ifthesoftresetfails,youcanstillcleartheBGP
session.However,itwillhaveanegativeimpactonnetworkoperationsandshould
beusedonlyasalastresort.
Outboundresetshaveneverrequiredpreconfigurationor
storingofroutingtableupdatesandremainunchangedby
theBGPSoftResetEnhancementfeature.

RouterefreshisoneofthecapabilitiesofBGP.Routersusetherouterefreshfeature
torequestaneighbortoresendalltheroutinginformationwhenitisneeded.
Route refresh is a BGP capability.
It is used to request a neighbor to resend routing information.
It is typically used after configuration changes to update the BGP table (route
map, distribute list, prefix list, filter list, weight, local preference, MED, etc.).
The traditional way of accomplishing this function is to clear the BGP session.
Inbound soft reconfiguration consumes memory on the receiving router.
It is needed only because there is no mechanism in standard BGP to
request retransmission of BGP routes.
BGP route refresh is an optional BGP capability that allows a BGP router to
request retransmission of BGP routes from a neighbor.
Thereareseveralwaysofrefreshingtheroutinginformationfromaneighbor:
Clearingtheneighborrelationship
Soft-clearingtheneighborrelationship(ifsoftreconfigurationisenabledforthis
specificneighbor)
Usingrouterefresh(iftheneighborsupportsthiscapability)
Thesoft-reconfigurationinboundfeatureconsumeslargevolumesofmemoryin
theInternetenvironment.Thenumberofroutesthatcanbereceivedfromapeer
routerontheInternetissolargethatitisnotfeasibletostoreanextracopy.
Theonlyreasonformakingtheextracopyistobeabletoreplaythedatathrough
thenewroutingpolicywithouttearingdownthesessionandre-establishingit.
Whatisneededisamechanismtoasktheneighborroutertodoa"clearsoft
outbound."Ifthiswerepossible,theextracopywouldnotbeneeded.The
neighboringrouter,ofcourse,hasitsowncopyinitsBGPtable,whichitcould
resendtothelocalrouterwheneveritissignaledtodoso.
ThereisnosuchmechanisminstandardBGP,butthereisanoptionalBGP
capabilitythatallowsoneroutertorequestarefreshfromitsneighbor:routerefresh.
ThetablecomparesthevariousmethodsofBGPsessionreset,statingthe
advantagesanddisadvantagesofeach.
Tousesoftresetwithoutpreconfiguration,bothBGPpeers
mustsupportthesoftrouterefreshcapability,whichis
advertisedintheOpenmessagethatissentwhenthe
peersestablishaTCPsession.RoutersthatrunCisco
IOSsoftwarereleasesearlierthanRelease12.1donot
supporttherouterefreshcapabilityandmustclearthe
BGPsessionusingtheneighborsoft-reconfiguration
command.
TypeofReset Advantages Disadvantages
Hardreset Nomemoryoverhead. TheprefixesintheBGP,IP,andFIB
tablesthattheneighborprovides,are
lost.
Notrecommended.
Outboundsoftreset Noconfiguration,nostoringof
routingtableupdates.
Doesnotresetinboundroutingtable
updates.
Dynamicinboundsoft
reset
DoesnotcleartheBGPsessionor
cache.
Doesnotrequirestoringofrouting
tableupdates,andhasnomemory
overhead.
BothBGProutersmustsupportthe
routerefreshcapability(CiscoIOS
SoftwareRelease12.1andlater
releases).
Configuredinboundsoft
reset(usestheneighbor
soft-reconfiguration
command)
CanbeusedwhenbothBGP
routersdonotsupportthe
automaticrouterefreshcapability.
Requirespreconfiguration.
Storesallreceived(inbound)routing
policyupdateswithoutmodification,
andisthusmemory-intensive.
Recommendedonlywhenabsolutely
necessary.
RouteRefresh

Step 1—Route refresh is negotiated when the BGP session is established.
Step 2—Inbound routing policy is changed on R2.
Step 3—Operator requests inbound route refresh.
Step 4—R2 sends route refresh message to R1.
Step 5—R1 resends all BGP routes to R2.
TheroutermustnegotiatetheabilitytousetherouterefreshfeaturewhentheBGP
sessionisfirstestablished.Thelocalrouterkeepsarecordthatthecapabilityis
availablewiththeneighbor.Thereisnoneedtokeepacopyoftherouting
informationthatisreceivedfromtheneighborifithastheabilitytorefresh.
Afterreconfiguringthefiltersandroutemapsthatwillimplementanewrouting
policy,youcanissuetheclearipbgpip-addresssoftincommandinthelocal
router.Theroutercheckswhethertherouterefreshcapabilityisavailable,andifitis,
requestsresendingoftheBGPtableoftheneighborinsteadofreplayingitsown
copy.

Usetheclearipbgp*incommand,tosendarouterefreshmessagetoall
neighborsorclearipbgpip-addressintosendarouterefreshmessagetoa
specificneighbor.
router# clear ip bgp {* | ip-address | peer-group-name } in
Sends a route refresh message to the neighbor or neighbors.
Only works if the neighbor has previously advertised the route refresh capability.
Youneednotusethesoftkeyword,becausesoftresetisautomaticallyassumed
whentherouterefreshcapabilityissupported.
ToresetaBGPconnectionwithBGPsoftreconfiguration,usetheclearipbgp
privilegedEXECcommandatthesystemprompt.
clear ip bgp {* | ip-address | peer-group-name} [soft [in | out]]
SyntaxDescription
Parameter Description
* ResetsallcurrentBGPsessions.
ip-address ResetsonlytheidentifiedBGPneighbor.
peer-group-name ResetsthespecifiedBGPpeergroup.
soft (Optional)Softreset.Doesnotresetthesession
in|out (Optional)Triggersinboundoroutboundsoftreconfiguration.
Iftheinoroutoptionisnotspecified,bothinboundandoutboundsoft
reset
aretriggered.
Whendoingclearipbgp*in,ifsoft-reconfiguration
inboundisconfiguredforaneighbor,itwillcauseasoft
action.Ifsoft-reconfigurationinboundisnotconfigured,
itwillcausearouterefresh.
ConfiguringRouteRefresh

YouneedtoverifywhethertheBGPneighborsupportstherouterefreshcapability.
R2# show ip bgp neighbors 172.16.22.22
BGP neighbor is 172.16.22.22, remote AS 200, external link
BGP version 4, remote router ID 10.0.40.1
BGP state = Established, up for 02:31:21
Last read 00:00:23, last write 00:00:49, hold time is 180, keepalive int
erval is 60 seconds
Neighbor sessions:
1 active, is not multisession capable (disabled)
Neighbor capabilities:
Route refresh: advertised and received(new)
Four-octets ASN Capability: advertised and received
Address family IPv4 Unicast: advertised and received
Enhanced Refresh Capability: advertised and received
Verifies the support for route refresh capability.
Usetheshowipbgpneighborcommandtoseewhethertheneighborsupportsthe
routerefreshmessage.Intheexample,neighbor172.16.22.22supportsroute
refreshcapability.
R2# debug ip bgp
*Mar 10 05:06:53.243: BGP: ses global 172.16.22.22 (0xECFD0708:0) act Send
OPEN
*Mar 10 05:06:53.243: BGP: 172.16.22.22 active sending OPEN, version 4, my
as: 1, holdtime 180 seconds, ID A000041
*Mar 10 05:06:53.247: BGP: 172.16.22.22 active rcv message type 1, length
(excl. header) 38
*Mar 10 05:06:53.247: BGP: ses global 172.16.22.22 (0xECFD0708:0) act Rece
ive OPEN
*Mar 10 05:06:53.247: BGP: 172.16.22.22 active rcv OPEN, version 4, holdti
me 180 seconds
*Mar 10 05:06:53.247: BGP: 172.16.22.22 active OPEN has CAPABILITY code: 1
28, length 0
*Mar 10 05:06:53.247: BGP: 172.16.22.22 active OPEN has ROUTE-
REFRESH capability(old) for all address-families
*Mar 10 05:06:53.247: BGP: 172.16.22.22 active rcvd OPEN w/ optional param
eter type 2 (Capability) len 2
*Mar 10 05:06:53.247: BGP: 172.16.22.22 active OPEN has CAPABILITY code: 2
, length 0
*Mar 10 05:06:53.247: BGP: 172.16.22.22 active OPEN has ROUTE-
REFRESH capability(new) for all address-families
<... output omitted ...>
*Mar 10 05:06:53.248: BGP: 172.16.22.22 sending REFRESH_REQ(5) for afi/saf
i: 1/1, refresh code is 1
Debug output after BGP session reset
Usedebugipbgptodisplaythenegotiationofcapabilities.Debuggingdisplaysthe
receivedcapabilities.
Theexampleshowsadebuggingoutput,aftertheBGPsessionwasreset,usinga
hardreconfiguration.Youcansee,thataneighborisadvertisingbothold-styleand
standard(new-style)routerefresh.The"old"referstotheoldcapabilitycodeof128
thattheoldCiscoimplementationsofRouteRefreshused,beforetheRFC2918
wasinplace.The"new"referstotheRFC2918compliantcapabilitycode2thatall
recentBGPimplementationsthatsupporttheRouteRefreshuse,accordingtoRFC
2918.Afterthesessionhasbeenestablished,theroutersendsaninitialstandard
routerefreshmessagefortheaddressfamily1/1(IPv4unicast).
R2# debug ip bgp
R2# debug ip bgp updates
R2# clear ip bgp 172.16.22.22 in
*Mar 10 05:34:28.458: BGP: 172.16.22.22 sending REFRESH_REQ(5) for afi/saf
i: 1/1, refresh code is 0
*Mar 10 05:34:28.459: BGP: 172.16.22.22 rcv message type 5, length (excl.
header) 4
*Mar 10 05:34:28.459: BGP: 172.16.22.22 rcvd REFRESH_REQ for afi/safi: 1/1
, refresh code is 1
*Mar 10 05:34:28.459: BGP: nbr_topo global 172.16.22.22 IPv4 Unicast:base
(0xECFD0708:1) rcvd Refresh Start-of-RIB
*Mar 10 05:34:28.459: BGP: nbr_topo global 172.16.22.22 IPv4 Unicast:base
(0xECFD0708:1) refresh_epoch is 3
*Mar 10 05:34:28.460: BGP(0): 172.16.22.22 rcvd UPDATE w/ attr: nexthop 17
MonitoringRouteRefresh

2.16.22.22, origin i, metric 0, merged path 200, AS_PATH
*Mar 10 05:34:28.461: BGP(0): 172.16.22.22 rcvd 10.0.2.0/28
*Mar 10 05:34:28.461: BGP(0): 172.16.22.22 rcvd 10.0.2.16/28
*Mar 10 05:34:28.461: BGP(0): 172.16.22.22 rcvd 10.0.2.32/28
Debug output after route refresh
Debuggingalsoshowsarouterefreshmessagebeingsenttoaneighborafterthe
networkadministratorissuestheclearipbgpip-addressincommandfromthe
privilegedEXECmode.Whentheneighbor172.16.22.22receivestherouterefresh
message,itresendstheBGPupdatestotherouterR2.Updatesarethenprocessed
againsttheconfiguredBGPinboundfiltersontheR2router.

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
Because of the huge volumes of routing information, BGP cannot use traditional
routing update methods
The BGP Soft Reset Enhancement feature provides automatic support for
dynamic soft reset of inbound BGP routing table updates that is not dependent
upon stored routing table update information. This method requires no
preconfiguration and needs much less memory than the previous soft reset
method for inbound routing table updates.
Route refresh is a BGP capability that is used to request a neighbor to resend
routing information after configuration changes.
The clear ip bgp ip-address in command sends a route refresh message to the
neighboring router and executes if the neighbor has previously advertised the
route refresh capability.
To verify whether a neighbor supports route refresh, you can use the show ip
bgp neighbor command. To display the negotiation process, you can use the
debug ip bgp command.
Summary

Overview
Thistopicsummarizesthekeypointsthatwerediscussedinthismodule.
The multihomed customer network must exchange BGP information with both
ISP networks. Dynamic routing is required for full redundancy, and BGP is the
only protocol available that can be used in this scenario.
An AS-path filter is created by an AS-path access-list. The access-list is applied
to a set of routes from which to subset can be selected.
Use prefix-lists to filter incoming or outgoing BGP updates to neighbors and to
filter routes that are being redistributed into the BGP process from other routing
protocols.
Outbound route filtering is a mechanism that is used to minimize the number of
updates that are requested from a neighbor.
Route-maps provide a method to perform a variety of compound, complex
filtering operations (such as dropping denied routes and modifying attributes of
the permitted routes) within a single tool.
Soft reconfiguration provides the ability to run all routes through filters without
tearing down the sessions.
ThismodulediscussedBGProutefilteringandBGProuteselectionpolicies.The
moduledescribedmultihomedBGPnetworksandidentifiedtheneedforBGProute
selection.ThismodulealsoaddressedconfiguringBGPtoinfluencerouteselection
byusingAS-pathfilters,prefix-listfilters,androute-maps.Outboundroutefiltering
wasalsoexplained.Inaddition,detailsaboutsoftreconfigurationandrouterefresh
wereprovided.
ModuleSummary

Foradditionalinformation,refertotheseresources:
CiscoSystems,Inc.SampleConfigurationforBGPwithTwoDifferentService
Providers(Multihoming).
http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/23675-
27.html
CiscoSystems,Inc.UsingRegularExpressionsinBGP.
http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13754-
26.html
CiscoSystems,Inc.BGPCaseStudies"BGPCaseStudies1."
http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/26634-
bgp-toc.html#BGPsec1
CiscoSystems,Inc.BGPCaseStudies"BGPCaseStudies3."
http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/26634-
bgp-toc.html#sec3
CiscoSystems,Inc.ConfiguringBGP.
http://www.cisco.com/c/en/us/td/docs/ios/12_2/ip/configuration/guide/fipr_c/1cfbgp.html
CiscoSystems,Inc.BGPPrefix-BasedOutboundRouteFiltering.
http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_bgp/configuration/xe-3e/irg-
iproute-bgp-xe-3e-book/irg-oubound-route-filtering.pdf
CiscoSystems,Inc.CompatibleSystemsSetupGuides:BGPConfigurationGuide.
http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/17612-
bgp.html
CiscoSystems,Inc.BGPSoftResetEnhancement.
http://www.cisco.com/c/en/us/td/docs/ios/12_0s/feature/guide/s_sftrst.html?
mdfid=275960490
References
Usethequestionsheretoreviewwhatyoulearnedinthismodule.Thecorrect
answersandsolutionsarefoundintheModuleSelf-CheckAnswerKey.
ModuleSelf-Check

1. Whataretworeasonswhyacustomerwouldwanttoconnecttotwo
ISPs?(Choosetwo.)(Source:"UsingMultihomedBGPNetworks")
ToexpandcapacityforInternettraffic.
TobetterprotectconfidentialinformationasittravelsthroughtheInternet.
Toprovideredundancytomission-criticalservicesthatareofferedover
theInternet.
ToefficientlyrouteInternettraffictotwodifferentdivisionswithinthe
company.

1. Whatarethetwotechnicalrequirementsformultihomedcustomers?
(Choosetwo.)(Source:"UsingMultihomedBGPNetworks")
TheISPsmustassignarangeofIPnetworknumberstothecustomer.
ThecustomernetworkmustexchangeBGPinformationwitheachISP
network.
Inmostcases,thecustomermusthaveitsownpublicASnumber.
ThecustomernetworkmustnotuseASpathfilters.

1. Whichofthefollowingstatementsbestillustratestheimportanceof
BGPpoliciesthatinfluencerouteselectioninamultihomedBGP
network?(Source:"UsingMultihomedBGPNetworks")
ThedefaultBGProuteselectiondoesnotalwaysresultinoptimum
routing.
ThedefaultBGProuteselectionalwaysresultsinoptimumrouting.
Aftertherouteselectionbehaviorhasbeenset,itcannotbechanged.
Thecustomerreceivesallroutesfrombothserviceproviders,giving
redundancy;therefore,BGPpoliciesarenotnecessary.

1. ThereisnoneedforISPsandcustomerstoinfluencetheBGPpath
selectionasBGPhasbuilt-inmechanismstofindtheoptimalwayto
reachthedestination.Trueorfalse?(Source:"UsingMultihomed
BGPNetworks")
true
false

1. Whichthreeofthefollowingarepotentialcustomerroutingpolicies?
(Choosethree.)(Source:"UsingMultihomedBGPNetworks")
Oneserviceproviderisdesignatedasprimary,andtheotherisabackup.
Trafficisload-balancedacrossbothISPnetworks.
TraffictowardaspecificdestinationgoesthroughonlyoneoftheISPs.
TraffictodirectcustomersoftheISPsgoesdirect;allothertrafficgoes
throughtheprimaryISP.
ThetwoISPsmayhavesimilarpeeringagreementswithotherISPs.
TheISPsusedefaultroutingtothecustomer,andthecustomerusesstatic
routingtotheISP(orISPs).

1. WhichstatementabouttheneedtoinfluenceBGProuteselectionin
aserviceproviderenvironmentisaccurate?(Source:"Using
MultihomedBGPNetworks")
IfbothISPconnectionsterminateinonesinglecustomerrouter,onlysome
routesthatarereceivedfromtheprimaryISPcanbeassignedaBGP
weight.
Inmostcases,itismoreoptimaltoreachothercustomersconnectedto
thebackupISPviathebackuplink,comparedwithreachingthemviathe
primarylink.
AllroutesthatarereceivedfromtheprimaryISPovertheprimarylinkare
assignedalocalpreferencevalue,whichislowerthanthedefaultvalueof
100.
WhenoneISPconnectionterminatesinonesinglecustomerrouter,all
routesthatarereceivedfromthatISPareassignedaBGPweight.

1. CustomercouldbecometransitASifnofilteringtomultihomedISPs
isperformed.Trueorfalse?(Source:"UsingMultihomedBGP
Networks")
true
false

1. Whichroutesshouldcustomerannouncetoserviceprovidersin
multihomedscenario?(Source:"UsingMultihomedBGPNetworks")
Customershouldannounceonlynetworksoriginatingincustomer’sAS.
CustomershouldannounceallnetworksreceivedfromprimaryISPto
secondaryISP.
CustomershouldannounceallnetworksreceivedfromsecondaryISPto
primaryISP.
Customershouldnotannounceanynetworks.

1. ISPshouldallowcustomertoannounceanypossiblenetworksvia
BGP.Trueorfalse?(Source:"UsingMultihomedBGPNetworks")
true
false

1. WhichthreegoalsrepresentappropriatereasonstoapplyASpath
filters?(Choosethree.)(Source:"EmployingASPathFilters")
Toensurethatonlylocallyoriginatedroutesareannounced.
TolimitroutesthatareadvertisedfromIBGPneighbors.
ToselectasubsetofallroutesbasedontheiroriginatingAS.
TolimitneighborrouteupdatestospecificAS-originatedroutes.
Toensurethatalldestinationautonomoussystemsshouldbereceived
fromaspecifiedneighbor.
Tochangetheweightorlocalpreferenceattributesforalldestination
autonomoussystems.

1. WhichASpathismatchedbytheregularexpression"72$"?
(Source:"EmployingASPathFilters")
2137221831727
273172715072
315277231991
725913682087

1. WhichregularexpressionwouldyouusetomatchallBGPnetworks
originatedinAS89?(Source:"EmployingASPathFilters")
^89$
^89_
_89_
_89$

1. WhichregularexpressionwouldyouusetomatchallBGPnetworks
goingthroughAS76?(Source:"EmployingASPathFilters")
^76$
^76_
_76_
_76$

1. WhichBGPnetworksarematchedbyusingregularexpression
^54$?(Source:"EmployingASPathFilters")
AllroutesthataresourcedinyourdirectlyconnectedneighboringAS54.
AllroutesthathaveAS54intheirASpaths.
AllroutesthataresourcedinAS54.
AlltheroutesthatarereachablebehindAS54.

1. Whatisthedifferencebetweentheregularexpressions"_100_"and
"_100$"?(Source:"EmployingASPathFilters")
Thefirstexpressionreferstoroutesthathavethesubstring"100"intheir
ASpaths;thesecondexpressionrefersonlytoroutesthataredirectly
connectedtoAS100.
Thefirstexpressionreferstoroutesthathavethesubstring"100"intheir
ASpaths;thesecondexpressionrefersonlytoroutesthatoriginatedinAS
100.
ThefirstexpressionreferstoroutesthatgothroughAS100;thesecond
expressionreferstoroutesthatoriginatedinAS100.
ThefirstexpressionreferstoroutesthataredirectlyconnectedtoAS100;
thesecondexpressionreferstoroutesthatoriginatedinAS100.

1. HowdoyoumatchASpathsthatcontainexactlytwosingle-digitAS
numbers?(Source:"EmployingASPathFilters")
usetheexpression"**"
usetheexpression".."
usetheexpression"[0-9]_[0-9]"
usetheexpression"^[0-9]_[0-9]$"

1. Whichthreestepsarerequiredtoapplyanewinboundroutingpolicy
toaneighbor?(Choosethree.)(Source:"EmployingASPath
Filters")
DefineanASpathaccesslist.
AttachtheASpathfiltertoinboundoroutboundupdatesforaspecific
BGPneighbor.
SendincomingandoutgoingASpathfilterstotheBGPneighbor.
Forcetheupdatestogothroughthenewfilter.

1. Howcanyoutestyourregularexpression?(Source:"EmployingAS
PathFilters")
showipbgpaccess-listcommand
showipbgpfiltercommand
showipbgpregexpcommand
showipbgpsummarycommand

1. Whataretworeasonsthatamultihomedcustomerneedsprefix-
lists?(Choosetwo.)(Source:"FilteringwithPrefix-Lists")
ToensurethatonlyvalidIPprefixesareannouncedtotheISPs.
Tosetalimitonthenumberofprefixesthatcanbeacceptedfromthe
ISPs.
TopreventthecustomerfromreceivingitsownIPprefixesfromtheISP.
ToverifythatthecustomerhasreceivedfullInternetroutetables.

1. Whichthreeofthefollowingchoicesareadvantagesofprefixlists
overaccesslists?(Choosethree.)(Source:"FilteringwithPrefix-
Lists")
significantperformanceimprovementonlongfilters
supportforincrementalupdates
abilitytoconsistofanynumberoflines,eachofwhichindicatesatestand
aresult
flexibility
morecomplexcommand-lineinterface
sequentialscanningofprefix-listswithinCiscoIOSsoftware

1. Whenyoudefineprefixlists,whataretworeasonstousesequence
numbers?(Choosetwo.)(Source:"FilteringwithPrefix-Lists")
Toreferencetheassociatedaccesslistfortheprefixlistentry.
ToprovideameansoflinkinganASpathfilterlisttotheprefixlist.
Toprovideanexecutionorderforprefix-listentries.
Toprovideameansofinsertingordeletinglistentries.

1. Whichofthefollowingstatementsisaccurateaboutthegeandle
parametersintheipprefix-listglobalconfigurationcommand
requiredtoconfigureprefix-listfilters?(Source:"FilteringwithPrefix-
Lists")
Nomatchisassumedwhenneithergenorleisspecified.
Therangeisassumedtobefromge-valueto142onlyifthegeattributeis
specified.
Therangeisassumedtobefromlento32onlyiftheleattributeis
specified.
Anexactmatchisassumedwhenneithergenorleisspecified.

1. Whichofthefollowingrouteswillbematchedbythetheprefixlist
10.0.1.0/24ge28?(Source:"FilteringwithPrefixLists")
10.0.1.0/26
10.1.1.0/28
10.0.1.0/29
10.0.0.0/28

1. Whichofthefollowingstatementsaboutimplementingprefixlistsin
aBGPnetworkisaccurate?(Source:"FilteringwithPrefixLists")
Youcanoptionallyapplyfilterlistsandprefixlistsoneitherincomingor
outgoingneighborsinanycombination.
Youcanoptionallyapplyfilterlistsandprefixlistsonlyonoutgoing
neighborsinanycombination
Eithertheincomingprefixlistortheincomingfilterlistmustpermitthe
routesthatarereceivedfromaneighborbeforetheyareacceptedintothe
BGPtable.
Outgoingroutesmustpasstheoutgoingprefixlistbeforebeingtransmitted
totheneighbor.

1. Whichthreestepsarerequiredtoapplyanewinboundroutingpolicy
(basedonprefixlist)toaneighbor?(Choosethree.)(Source:
"FilteringwithPrefixLists")
DefineanIPprefixlist.
AttachtheprefixlisttoinboundoroutboundupdatesforaspecificBGP
neighbor.
SendincomingandoutgoingASpathfilterstotheBGPneighbor.
Forcetheupdatestogothroughthenewfilter.

1. HowcanyouapplythesameprefixlisttomultipleBGPneighborson
arouter?(Source:"FilteringwithPrefixLists")
Byconfiguringaneighborprefix-liststatementforeachBGPpeer.
Byconfiguringaneighbordistribute-liststatementforeachneighbor.
ByusingtheBGPpeer-groupoptionwiththeneighborstatement.
ByconfiguringtheprefixlistasaglobalfilterundertheBGProuting
process.

1. Howcanyouusetheshowipprefix-listcommandtodisplaythe
prefixlistentrythatmatchesaspecificprefixandlength?(Source:
"FilteringwithPrefixLists")
notafeatureoftheshowipprefix-listcommand
byspecifyingthedetailkeyword
withthelongerkeywordtodisplayallmatchesexceptthosewithmore
specificentries
byspecifyingthefirst-matchkeyword

1. Whichofthefollowingbestdescribesthecapabilitiesofthe
proprietaryORFtypethatissupportedonCiscorouters?(Source:
"UsingOutboundRouteFiltering")
standardBGPcommunitiesfiltering
extendedBGPcommunitiesfiltering
ASpathfiltering
prefixlistfiltering

1. ORFfeatureismoreeffectivethanstandardinboundfilteringwhenit
comestotheamountofresourcesthatarerequiredforrouting
updategenerationandprocessing.Trueorfalse?(Source:"Using
OutboundRouteFiltering")
true
false

1. Whataretwokeybenefitstousingoutboundroutefiltering?(Choose
two.)(Source:"UsingOutboundRouteFiltering")
conservesCPUcycles
improvessecurity
reducesbandwidththatisusedbyunnecessaryroutingupdates
increasesneighboravailability

1. WhichtwoofthefollowingstatementsaboutBGPprefix-based
outboundroutefilteringareaccurate?(Choosetwo.)(Source:"Using
OutboundRouteFiltering")
UsesBGPORFsendandreceivecapabilitiestominimizethenumberof
BGPupdatesthataresentbetweenBGPpeers.
Canlimitthenumberofunwantedroutingupdates.
Increasestheamountofresourcesrequiredtoreceiveanddiscardroutes
thatwouldotherwisebefilteredout.
Canbeusedtoincreasetheamountofprocessingonarouterthatisnot
acceptingfullroutesfromaserviceprovidernetwork.

1. Howshouldyouconfiguretheneighborcapabilityorfprefix-list
commandonarouterthatisapplyingaprefixlistfilterasan
outboundroutepolicy?(Source:"UsingOutboundRouteFiltering")
send
receive
both
prefixfilter

1. WhichofthefollowingistrueregardingORFcapabilitiesoptions?
(Choosetwo.)(Source:"UsingOutboundRouteFiltering")
“both”optionallowssendingandreceivingofprefixlists.
“send”optionallowsreceivingofprefixlists.
“receive”optionallowsreceivingofprefixlists.
“both”optionallowsonlysendingofprefixlists.

1. WhataretwomethodsofdeterminingthatarouterhasORF
capabilitiesexchangeconfigured?(Choosetwo.)(Source:"Using
OutboundRouteFiltering")
showrunning-config|beginbgpcommand
showipbgpnegotiatecommand
showipbgpneighborscommand
showipprefix-listcommand

1. WhichcommandshouldbeusedtoverifythatIPprefix-listwas
receivedontheORFreceiver?(Source:"UsingOutboundRoute
Filtering")
showipbgpneighborsIP_addressreceivedprefix-filter
showipprefix-list
showipbgpneighborsIP_addresssendprefix-filter
showorfprefix-listreceived

1. WhataretwoprerequisitesbeforeyoucanconfigureORFprefixlist
functionality?(Choosetwo.)(Source:"UsingOutboundRoute
Filtering")
Arouterefreshmustbesentusingtheclearipbgpcommand.
ABGPpeeringsessionbetweentheORFroutersmustbeupandrunning.
ORFcapabilitiesmustbeenabledonbothrouters.
Youmustconfigureaprefixlistfilteronthereceivingrouter.

1. Whichofthefollowingstatementsaboutthefunctionofaroutemap
isaccurate?(Source:"ApplyingRouteMapsasBGPFilters")
Aroutemapcannotbeusedtomodifyattributesofthepermittedroutes.
Aroutemapisafilterthatusesaseriesofmatchconditions,andthat
whichisdeniedbytheroutemapisdropped.
Aroutemapislesscomplexthantheaccesslist.
Eachroutemapstatementstartswithaseriesofmatchclauses.

1. WhichthreeofthefollowingstatementsareaccurateabouttheBGP
RouteMapPolicyListSupportfeature?(Choosethree.)(Source:
"ApplyingRouteMapsasBGPFilters")
TheBGPRouteMapPolicyListSupportfeatureallowsanetworkoperator
togrouproute-mapmatchclausesintonamedlistscalledpolicy-lists.
Thenetworkoperatormanuallyreconfigureseachrecurringgroupof
matchclausesthatoccurinmultipleroute-mapentries.
TheANDandORsemanticsintheroutemapfunctiondifferentlyfor
policy-liststhanformatchandsetclauses.
TocreateaBGPpolicy-list,usetheippolicy-listcommandinpolicy-map
configurationmode.
Toconfigurearoute-aptoevaluateandprocessaBGPpolicy-listina
routemap,usethematchpolicy-listcommandinroute-mapconfiguration
mode.
Todisplayinformationaboutaconfiguredpolicy-listandpolicy-listentries,
usetheshowippolicy-listcommandinroute-mapconfigurationmode.

1. WhichtwoofthefollowingarefunctionsoftheBGPRouteMap
Continuefeature?(Choosetwo.)(Source:"ApplyingRouteMapsas
BGPFilters")
Providestheabilitytopauseifasequencenumberisnotspecified.
Providesthecapabilitytoexecuteadditionalentriesinaroute-mapafter
anentryisexecutedwithsuccessfulmatchandsetclauses.
Allowsmodularizationofnetworkpolicyconfigurationsothatrepeated
policydefinitionscanbeexpandedwithinthesameroutemap.
Allowsconfigurationandorganizationofmoremodularpolicydefinitionsto
reducethenumberofpolicyconfigurationsthatarerepeatedwithinthe
sameroutemap.

1. Whichofthefollowingcommandsisusedtodistributeanyroutes
thathaveadestinationnetworknumberaddressthatispermittedby
astandardaccesslist,anextendedaccesslist,oraprefixlist,orto
performpolicyroutingonpackets?(Source:"ApplyingRouteMaps
asBGPFilters")
matchipnext-hop
matchiproute-source
matchipaddress
showipbgproute-map

1. Howdoyouimplementa"permitall"statementwhenyouareusing
routemaps?(Source:"ApplyingRouteMapsasBGPFilters")
Bydefault,aroute-aphasan"implicitpermitany"statementifnomatchis
found.
Youmustconfigurearoutemapwitha"permit"parameterandnomatch
clause.
Youmustconfigurearoutemapwitha"deny"parameteranda"deny
none"clause.
Youmustconfigurearoutemapwitha"permitany"matchclause.

1. WhathappenstoincomingBGPupdatesthatdonotmatchany
route-mapmatchclauses?(Source:"ApplyingRouteMapsasBGP
Filters")
TheyareenteredintotheBGPtable.
TheyareenteredintotheBGPtableandmarkedwithaweightof32768.
TheyarenotacceptedbytherouterorenteredintotheBGPtable.
TheyareenteredintotheBGPtableifamatchingrouteexistsintheIP
routingtable.

1. WhichthreeBGPattributescanyousetusingroutemaps?(Choose
three.)(Source:"ApplyingRouteMapsasBGPFilters")
MED
pathorigin
administrativedistance
weightmetric
next-hop
atomicaggregate

1. Whataretworeasonsforusingroutemapsequencenumbers?
(Choosetwo.)(Source:"ApplyingRouteMapsasBGPFilters")
Toallowinsertionordeletionofroute-mapentries.
Toordertheexecutionsequenceofroute-mapmatchclauses.
Toprovideanorderedexecutionsequencefortheroutemap.
Tomapbetweenprefix-liststatementsandroute-mapmatchclauses.

1. WhichcommandshouldbeusedonR1(IPaddress1.1.1.1)toapply
aroutemapnamedFiltertoincomingBGPupdatescomingfromR2
(IPaddress2.2.2.2)?(Source:"ApplyingRouteMapsasBGP
Filters")
neighbor2.2.2.2route-mapFilterin
neighbor1.1.1.1.route-mapFilterin
neighbor2.2.2.2route-mapFilterout
neighbor1.1.1.1.route-mapFilterout

1. WhyisclearingaBGPsessionadisruptivechangeinroutingpolicy?
(Source:"ImplementingChangesinBGPPolicy")
ClearingaBGPsessiontakesalongtimeandcandisruptpacket
forwarding.
YoucannotrecoverinformationthatissentwhiletheBGPsessionisbeing
cleared.
Youcannotautomaticallyre-establishsessionsthataretorndownduring
theclearingoperation.
YoucannotselectivelyteardownBGPsessions;youmustclearsessions
withallneighbors.

1. Usingtheclearipbgp*command,allBGPsessionswillstayup
andnoBGProutesarelost.Trueorfalse?(Source:"Implementing
ChangesinBGPPolicy")
true
false

1. WhichtwoofthefollowingarefunctionsoftheBGPSoftReset
Enhancementfeature?(Choosetwo.)(Source:"Implementing
ChangesinBGPPolicy")
allowsdynamicrouterefreshrequests
requiresnopreconfiguration
providesnewermethodforinboundsoftresetthatusesstoredinbound
routingtableupdates
usesexpandedmemory

1. BGProuterefreshisBGPcapabilitythatallowsaBGProuterto
requestretransmissionofBGProutesfromaneighbor.Trueor
false?(Source:"ImplementingChangesinBGPPolicy")
true
false

1. Whichofthefollowingstatementsaboutthecommandthatis
requiredtoperformarouterefreshisaccurate?(Source:
"ImplementingChangesinBGPPolicy")
Youwillusetheclearipbgp*incommandtosendarouterefresh
messagetoallneighbors.
Youwillusetheclearipbgpip-addressincommandtosendaroute
refreshmessagetoallneighbors.
Youmustusethesoftkeywordwiththeclearipbgpcommandbecause
softresetisnotautomaticallyassumedwhentherouterefreshcapabilityis
supported.
Theclearipbgpcommandworkseveniftheneighborhasnotpreviously
advertisedtherouterefreshcapability.

1. WhichcommandwouldyouuseonR1(IPaddress1.1.1.1)to
requestfromneighboringR2(IPaddress2.2.2.2)toresendrouting
information?(Source:"ImplementingChangesinBGPPolicy")
clearipbgp1.1.1.1out
clearipbgp1.1.1.1in
clearipbgp2.2.2.2out
clearipbgp2.2.2.2in

1. WhichRFC2918compliantcapabilitycode2usedbyallrecentBGP
implementationswilltellyouthatroutersupportstheRouteRefresh
feature?(Source:"ImplementingChangesinBGPPolicy")
1
218
4
2

1. WhichcommandshouldbeusedtodisplaythenegotiationofBGP
capabilitiesaftersessionreset?(Source:"ImplementingChangesin
BGPPolicy")
debugip
debugbgppackets
debugipbgpupdates
debugipbgp

1. HowdoyoudeterminewhetheraBGPneighborsupportsroute
refresh?(Source:"ImplementingChangesinBGPPolicy")
AflagintheBGPtableindicatesthepresenceofrouterefreshcapability
Theshowipbgpneighborcommandindicateswhethertheoptionis
supported.
Initiatethedebugipbgpnegotiationcommandtoseewhethertherouter
hascompletedarouterefreshcapabilitiesexchange.
Executetheclearipbgp*command.Command-lineBGPstatus
messageswillindicaterouterefreshsupportcapabilities.

1. Whataretworeasonswhyacustomerwouldwanttoconnecttotwo
ISPs?(Choosetwo.)(Source:"UsingMultihomedBGPNetworks")
ToexpandcapacityforInternettraffic.
TobetterprotectconfidentialinformationasittravelsthroughtheInternet.
Toprovideredundancytomission-criticalservicesthatareofferedover
theInternet.
ToefficientlyrouteInternettraffictotwodifferentdivisionswithinthe
company.
AnswerKey

1. Whatarethetwotechnicalrequirementsformultihomedcustomers?
(Choosetwo.)(Source:"UsingMultihomedBGPNetworks")
TheISPsmustassignarangeofIPnetworknumberstothecustomer.
ThecustomernetworkmustexchangeBGPinformationwitheachISP
network.
Inmostcases,thecustomermusthaveitsownpublicASnumber.
ThecustomernetworkmustnotuseASpathfilters.

1. Whichofthefollowingstatementsbestillustratestheimportanceof
BGPpoliciesthatinfluencerouteselectioninamultihomedBGP
network?(Source:"UsingMultihomedBGPNetworks")
ThedefaultBGProuteselectiondoesnotalwaysresultinoptimum
routing.
ThedefaultBGProuteselectionalwaysresultsinoptimumrouting.
Aftertherouteselectionbehaviorhasbeenset,itcannotbechanged.
Thecustomerreceivesallroutesfrombothserviceproviders,giving
redundancy;therefore,BGPpoliciesarenotnecessary.

1. ThereisnoneedforISPsandcustomerstoinfluencetheBGPpath
selectionasBGPhasbuilt-inmechanismstofindtheoptimalwayto
reachthedestination.Trueorfalse?(Source:"UsingMultihomed
BGPNetworks")
true
false

1. Whichthreeofthefollowingarepotentialcustomerroutingpolicies?
(Choosethree.)(Source:"UsingMultihomedBGPNetworks")
Oneserviceproviderisdesignatedasprimary,andtheotherisabackup.
Trafficisload-balancedacrossbothISPnetworks.
TraffictowardaspecificdestinationgoesthroughonlyoneoftheISPs.
TraffictodirectcustomersoftheISPsgoesdirect;allothertrafficgoes
throughtheprimaryISP.
ThetwoISPsmayhavesimilarpeeringagreementswithotherISPs.
TheISPsusedefaultroutingtothecustomer,andthecustomerusesstatic
routingtotheISP(orISPs).

1. WhichstatementabouttheneedtoinfluenceBGProuteselectionin
aserviceproviderenvironmentisaccurate?(Source:"Using
MultihomedBGPNetworks")
IfbothISPconnectionsterminateinonesinglecustomerrouter,onlysome
routesthatarereceivedfromtheprimaryISPcanbeassignedaBGP
weight.
Inmostcases,itismoreoptimaltoreachothercustomersconnectedto
thebackupISPviathebackuplink,comparedwithreachingthemviathe
primarylink.
AllroutesthatarereceivedfromtheprimaryISPovertheprimarylinkare
assignedalocalpreferencevalue,whichislowerthanthedefaultvalueof
100.
WhenoneISPconnectionterminatesinonesinglecustomerrouter,all
routesthatarereceivedfromthatISPareassignedaBGPweight.

1. CustomercouldbecometransitASifnofilteringtomultihomedISPs
isperformed.Trueorfalse?(Source:"UsingMultihomedBGP
Networks")
true
false

1. Whichroutesshouldcustomerannouncetoserviceprovidersin
multihomedscenario?(Source:"UsingMultihomedBGPNetworks")
Customershouldannounceonlynetworksoriginatingincustomer’sAS.
CustomershouldannounceallnetworksreceivedfromprimaryISPto
secondaryISP.
CustomershouldannounceallnetworksreceivedfromsecondaryISPto
primaryISP.
Customershouldnotannounceanynetworks.

1. ISPshouldallowcustomertoannounceanypossiblenetworksvia
BGP.Trueorfalse?(Source:"UsingMultihomedBGPNetworks")
true
false

1. WhichthreegoalsrepresentappropriatereasonstoapplyASpath
filters?(Choosethree.)(Source:"EmployingASPathFilters")
Toensurethatonlylocallyoriginatedroutesareannounced.
TolimitroutesthatareadvertisedfromIBGPneighbors.
ToselectasubsetofallroutesbasedontheiroriginatingAS.
TolimitneighborrouteupdatestospecificAS-originatedroutes.
Toensurethatalldestinationautonomoussystemsshouldbereceived
fromaspecifiedneighbor.
Tochangetheweightorlocalpreferenceattributesforalldestination
autonomoussystems.

1. WhichASpathismatchedbytheregularexpression"72$"?
(Source:"EmployingASPathFilters")
2137221831727
273172715072
315277231991
725913682087

1. WhichregularexpressionwouldyouusetomatchallBGPnetworks
originatedinAS89?(Source:"EmployingASPathFilters")
^89$
^89_
_89_
_89$

1. WhichregularexpressionwouldyouusetomatchallBGPnetworks
goingthroughAS76?(Source:"EmployingASPathFilters")
^76$
^76_
_76_
_76$

1. WhichBGPnetworksarematchedbyusingregularexpression
^54$?(Source:"EmployingASPathFilters")
AllroutesthataresourcedinyourdirectlyconnectedneighboringAS54.
AllroutesthathaveAS54intheirASpaths.
AllroutesthataresourcedinAS54.
AlltheroutesthatarereachablebehindAS54.

1. Whatisthedifferencebetweentheregularexpressions"_100_"and
"_100$"?(Source:"EmployingASPathFilters")
Thefirstexpressionreferstoroutesthathavethesubstring"100"intheir
ASpaths;thesecondexpressionrefersonlytoroutesthataredirectly
connectedtoAS100.
Thefirstexpressionreferstoroutesthathavethesubstring"100"intheir
ASpaths;thesecondexpressionrefersonlytoroutesthatoriginatedinAS
100.
ThefirstexpressionreferstoroutesthatgothroughAS100;thesecond
expressionreferstoroutesthatoriginatedinAS100.
ThefirstexpressionreferstoroutesthataredirectlyconnectedtoAS100;
thesecondexpressionreferstoroutesthatoriginatedinAS100.

1. HowdoyoumatchASpathsthatcontainexactlytwosingle-digitAS
numbers?(Source:"EmployingASPathFilters")
usetheexpression"**"
usetheexpression".."
usetheexpression"[0-9]_[0-9]"
usetheexpression"^[0-9]_[0-9]$"

1. Whichthreestepsarerequiredtoapplyanewinboundroutingpolicy
toaneighbor?(Choosethree.)(Source:"EmployingASPath
Filters")
DefineanASpathaccesslist.
AttachtheASpathfiltertoinboundoroutboundupdatesforaspecific
BGPneighbor.
SendincomingandoutgoingASpathfilterstotheBGPneighbor.
Forcetheupdatestogothroughthenewfilter.

1. Howcanyoutestyourregularexpression?(Source:"EmployingAS
PathFilters")
showipbgpaccess-listcommand
showipbgpfiltercommand
showipbgpregexpcommand
showipbgpsummarycommand

1. Whataretworeasonsthatamultihomedcustomerneedsprefix-
lists?(Choosetwo.)(Source:"FilteringwithPrefix-Lists")
ToensurethatonlyvalidIPprefixesareannouncedtotheISPs.
Tosetalimitonthenumberofprefixesthatcanbeacceptedfromthe
ISPs.
TopreventthecustomerfromreceivingitsownIPprefixesfromtheISP.
ToverifythatthecustomerhasreceivedfullInternetroutetables.

1. Whichthreeofthefollowingchoicesareadvantagesofprefixlists
overaccesslists?(Choosethree.)(Source:"FilteringwithPrefix-
Lists")
significantperformanceimprovementonlongfilters
supportforincrementalupdates
abilitytoconsistofanynumberoflines,eachofwhichindicatesatestand
aresult
flexibility
morecomplexcommand-lineinterface
sequentialscanningofprefix-listswithinCiscoIOSsoftware

1. Whenyoudefineprefixlists,whataretworeasonstousesequence
numbers?(Choosetwo.)(Source:"FilteringwithPrefix-Lists")
Toreferencetheassociatedaccesslistfortheprefixlistentry.
ToprovideameansoflinkinganASpathfilterlisttotheprefixlist.
Toprovideanexecutionorderforprefix-listentries.
Toprovideameansofinsertingordeletinglistentries.

1. Whichofthefollowingstatementsisaccurateaboutthegeandle
parametersintheipprefix-listglobalconfigurationcommand
requiredtoconfigureprefix-listfilters?(Source:"FilteringwithPrefix-
Lists")
Nomatchisassumedwhenneithergenorleisspecified.
Therangeisassumedtobefromge-valueto142onlyifthegeattributeis
specified.
Therangeisassumedtobefromlento32onlyiftheleattributeis
specified.
Anexactmatchisassumedwhenneithergenorleisspecified.

1. Whichofthefollowingrouteswillbematchedbythetheprefixlist
10.0.1.0/24ge28?(Source:"FilteringwithPrefixLists")
10.0.1.0/26
10.1.1.0/28
10.0.1.0/29
10.0.0.0/28

1. Whichofthefollowingstatementsaboutimplementingprefixlistsin
aBGPnetworkisaccurate?(Source:"FilteringwithPrefixLists")
Youcanoptionallyapplyfilterlistsandprefixlistsoneitherincomingor
outgoingneighborsinanycombination.
Youcanoptionallyapplyfilterlistsandprefixlistsonlyonoutgoing
neighborsinanycombination
Eithertheincomingprefixlistortheincomingfilterlistmustpermitthe
routesthatarereceivedfromaneighborbeforetheyareacceptedintothe
BGPtable.
Outgoingroutesmustpasstheoutgoingprefixlistbeforebeingtransmitted
totheneighbor.

1. Whichthreestepsarerequiredtoapplyanewinboundroutingpolicy
(basedonprefixlist)toaneighbor?(Choosethree.)(Source:
"FilteringwithPrefixLists")
DefineanIPprefixlist.
AttachtheprefixlisttoinboundoroutboundupdatesforaspecificBGP
neighbor.
SendincomingandoutgoingASpathfilterstotheBGPneighbor.
Forcetheupdatestogothroughthenewfilter.

1. HowcanyouapplythesameprefixlisttomultipleBGPneighborson
arouter?(Source:"FilteringwithPrefixLists")
Byconfiguringaneighborprefix-liststatementforeachBGPpeer.
Byconfiguringaneighbordistribute-liststatementforeachneighbor.
ByusingtheBGPpeer-groupoptionwiththeneighborstatement.
ByconfiguringtheprefixlistasaglobalfilterundertheBGProuting
process.

1. Howcanyouusetheshowipprefix-listcommandtodisplaythe
prefixlistentrythatmatchesaspecificprefixandlength?(Source:
"FilteringwithPrefixLists")
notafeatureoftheshowipprefix-listcommand
byspecifyingthedetailkeyword
withthelongerkeywordtodisplayallmatchesexceptthosewithmore
specificentries
byspecifyingthefirst-matchkeyword

1. Whichofthefollowingbestdescribesthecapabilitiesofthe
proprietaryORFtypethatissupportedonCiscorouters?(Source:
"UsingOutboundRouteFiltering")
standardBGPcommunitiesfiltering
extendedBGPcommunitiesfiltering
ASpathfiltering
prefixlistfiltering

1. ORFfeatureismoreeffectivethanstandardinboundfilteringwhenit
comestotheamountofresourcesthatarerequiredforrouting
updategenerationandprocessing.Trueorfalse?(Source:"Using
OutboundRouteFiltering")
true
false

1. Whataretwokeybenefitstousingoutboundroutefiltering?(Choose
two.)(Source:"UsingOutboundRouteFiltering")
conservesCPUcycles
improvessecurity
reducesbandwidththatisusedbyunnecessaryroutingupdates
increasesneighboravailability

1. WhichtwoofthefollowingstatementsaboutBGPprefix-based
outboundroutefilteringareaccurate?(Choosetwo.)(Source:"Using
OutboundRouteFiltering")
UsesBGPORFsendandreceivecapabilitiestominimizethenumberof
BGPupdatesthataresentbetweenBGPpeers.
Canlimitthenumberofunwantedroutingupdates.
Increasestheamountofresourcesrequiredtoreceiveanddiscardroutes
thatwouldotherwisebefilteredout.
Canbeusedtoincreasetheamountofprocessingonarouterthatisnot
acceptingfullroutesfromaserviceprovidernetwork.

1. Howshouldyouconfiguretheneighborcapabilityorfprefix-list
commandonarouterthatisapplyingaprefixlistfilterasan
outboundroutepolicy?(Source:"UsingOutboundRouteFiltering")
send
receive
both
prefixfilter

1. WhichofthefollowingistrueregardingORFcapabilitiesoptions?
(Choosetwo.)(Source:"UsingOutboundRouteFiltering")
“both”optionallowssendingandreceivingofprefixlists.
“send”optionallowsreceivingofprefixlists.
“receive”optionallowsreceivingofprefixlists.
“both”optionallowsonlysendingofprefixlists.

1. WhataretwomethodsofdeterminingthatarouterhasORF
capabilitiesexchangeconfigured?(Choosetwo.)(Source:"Using
OutboundRouteFiltering")
showrunning-config|beginbgpcommand
showipbgpnegotiatecommand
showipbgpneighborscommand
showipprefix-listcommand

1. WhichcommandshouldbeusedtoverifythatIPprefix-listwas
receivedontheORFreceiver?(Source:"UsingOutboundRoute
Filtering")
showipbgpneighborsIP_addressreceivedprefix-filter
showipprefix-list
showipbgpneighborsIP_addresssendprefix-filter
showorfprefix-listreceived

1. WhataretwoprerequisitesbeforeyoucanconfigureORFprefixlist
functionality?(Choosetwo.)(Source:"UsingOutboundRoute
Filtering")
Arouterefreshmustbesentusingtheclearipbgpcommand.
ABGPpeeringsessionbetweentheORFroutersmustbeupandrunning.
ORFcapabilitiesmustbeenabledonbothrouters.
Youmustconfigureaprefixlistfilteronthereceivingrouter.

1. Whichofthefollowingstatementsaboutthefunctionofaroutemap
isaccurate?(Source:"ApplyingRouteMapsasBGPFilters")
Aroutemapcannotbeusedtomodifyattributesofthepermittedroutes.
Aroutemapisafilterthatusesaseriesofmatchconditions,andthat
whichisdeniedbytheroutemapisdropped.
Aroutemapislesscomplexthantheaccesslist.
Eachroutemapstatementstartswithaseriesofmatchclauses.

1. WhichthreeofthefollowingstatementsareaccurateabouttheBGP
RouteMapPolicyListSupportfeature?(Choosethree.)(Source:
"ApplyingRouteMapsasBGPFilters")
TheBGPRouteMapPolicyListSupportfeatureallowsanetworkoperator
togrouproute-mapmatchclausesintonamedlistscalledpolicy-lists.
Thenetworkoperatormanuallyreconfigureseachrecurringgroupof
matchclausesthatoccurinmultipleroute-mapentries.
TheANDandORsemanticsintheroutemapfunctiondifferentlyfor
policy-liststhanformatchandsetclauses.
TocreateaBGPpolicy-list,usetheippolicy-listcommandinpolicy-map
configurationmode.
Toconfigurearoute-aptoevaluateandprocessaBGPpolicy-listina
routemap,usethematchpolicy-listcommandinroute-mapconfiguration
mode.
Todisplayinformationaboutaconfiguredpolicy-listandpolicy-listentries,
usetheshowippolicy-listcommandinroute-mapconfigurationmode.

1. WhichtwoofthefollowingarefunctionsoftheBGPRouteMap
Continuefeature?(Choosetwo.)(Source:"ApplyingRouteMapsas
BGPFilters")
Providestheabilitytopauseifasequencenumberisnotspecified.
Providesthecapabilitytoexecuteadditionalentriesinaroute-mapafter
anentryisexecutedwithsuccessfulmatchandsetclauses.
Allowsmodularizationofnetworkpolicyconfigurationsothatrepeated
policydefinitionscanbeexpandedwithinthesameroutemap.
Allowsconfigurationandorganizationofmoremodularpolicydefinitionsto
reducethenumberofpolicyconfigurationsthatarerepeatedwithinthe
sameroutemap.

1. Whichofthefollowingcommandsisusedtodistributeanyroutes
thathaveadestinationnetworknumberaddressthatispermittedby
astandardaccesslist,anextendedaccesslist,oraprefixlist,orto
performpolicyroutingonpackets?(Source:"ApplyingRouteMaps
asBGPFilters")
matchipnext-hop
matchiproute-source
matchipaddress
showipbgproute-map

1. Howdoyouimplementa"permitall"statementwhenyouareusing
routemaps?(Source:"ApplyingRouteMapsasBGPFilters")
Bydefault,aroute-aphasan"implicitpermitany"statementifnomatchis
found.
Youmustconfigurearoutemapwitha"permit"parameterandnomatch
clause.
Youmustconfigurearoutemapwitha"deny"parameteranda"deny
none"clause.
Youmustconfigurearoutemapwitha"permitany"matchclause.

1. WhathappenstoincomingBGPupdatesthatdonotmatchany
route-mapmatchclauses?(Source:"ApplyingRouteMapsasBGP
Filters")
TheyareenteredintotheBGPtable.
TheyareenteredintotheBGPtableandmarkedwithaweightof32768.
TheyarenotacceptedbytherouterorenteredintotheBGPtable.
TheyareenteredintotheBGPtableifamatchingrouteexistsintheIP
routingtable.

1. WhichthreeBGPattributescanyousetusingroutemaps?(Choose
three.)(Source:"ApplyingRouteMapsasBGPFilters")
MED
pathorigin
administrativedistance
weightmetric
next-hop
atomicaggregate

1. Whataretworeasonsforusingroutemapsequencenumbers?
(Choosetwo.)(Source:"ApplyingRouteMapsasBGPFilters")
Toallowinsertionordeletionofroute-mapentries.
Toordertheexecutionsequenceofroute-mapmatchclauses.
Toprovideanorderedexecutionsequencefortheroutemap.
Tomapbetweenprefix-liststatementsandroute-mapmatchclauses.

1. WhichcommandshouldbeusedonR1(IPaddress1.1.1.1)toapply
aroutemapnamedFiltertoincomingBGPupdatescomingfromR2
(IPaddress2.2.2.2)?(Source:"ApplyingRouteMapsasBGP
Filters")
neighbor2.2.2.2route-mapFilterin
neighbor1.1.1.1.route-mapFilterin
neighbor2.2.2.2route-mapFilterout
neighbor1.1.1.1.route-mapFilterout

1. WhyisclearingaBGPsessionadisruptivechangeinroutingpolicy?
(Source:"ImplementingChangesinBGPPolicy")
ClearingaBGPsessiontakesalongtimeandcandisruptpacket
forwarding.
YoucannotrecoverinformationthatissentwhiletheBGPsessionisbeing
cleared.
Youcannotautomaticallyre-establishsessionsthataretorndownduring
theclearingoperation.
YoucannotselectivelyteardownBGPsessions;youmustclearsessions
withallneighbors.

1. Usingtheclearipbgp*command,allBGPsessionswillstayup
andnoBGProutesarelost.Trueorfalse?(Source:"Implementing
ChangesinBGPPolicy")
true
false

1. WhichtwoofthefollowingarefunctionsoftheBGPSoftReset
Enhancementfeature?(Choosetwo.)(Source:"Implementing
ChangesinBGPPolicy")
allowsdynamicrouterefreshrequests
requiresnopreconfiguration
providesnewermethodforinboundsoftresetthatusesstoredinbound
routingtableupdates
usesexpandedmemory

1. BGProuterefreshisBGPcapabilitythatallowsaBGProuterto
requestretransmissionofBGProutesfromaneighbor.Trueor
false?(Source:"ImplementingChangesinBGPPolicy")
true
false

1. Whichofthefollowingstatementsaboutthecommandthatis
requiredtoperformarouterefreshisaccurate?(Source:
"ImplementingChangesinBGPPolicy")
Youwillusetheclearipbgp*incommandtosendarouterefresh
messagetoallneighbors.
Youwillusetheclearipbgpip-addressincommandtosendaroute
refreshmessagetoallneighbors.
Youmustusethesoftkeywordwiththeclearipbgpcommandbecause
softresetisnotautomaticallyassumedwhentherouterefreshcapabilityis
supported.
Theclearipbgpcommandworkseveniftheneighborhasnotpreviously
advertisedtherouterefreshcapability.

1. WhichcommandwouldyouuseonR1(IPaddress1.1.1.1)to
requestfromneighboringR2(IPaddress2.2.2.2)toresendrouting
information?(Source:"ImplementingChangesinBGPPolicy")
clearipbgp1.1.1.1out
clearipbgp1.1.1.1in
clearipbgp2.2.2.2out
clearipbgp2.2.2.2in

1. WhichRFC2918compliantcapabilitycode2usedbyallrecentBGP
implementationswilltellyouthatroutersupportstheRouteRefresh
feature?(Source:"ImplementingChangesinBGPPolicy")
1
218
4
2

1. WhichcommandshouldbeusedtodisplaythenegotiationofBGP
capabilitiesaftersessionreset?(Source:"ImplementingChangesin
BGPPolicy")
debugip
debugbgppackets
debugipbgpupdates
debugipbgp

1. HowdoyoudeterminewhetheraBGPneighborsupportsroute
refresh?(Source:"ImplementingChangesinBGPPolicy")
AflagintheBGPtableindicatesthepresenceofrouterefreshcapability
Theshowipbgpneighborcommandindicateswhethertheoptionis
supported.
Initiatethedebugipbgpnegotiationcommandtoseewhethertherouter
hascompletedarouterefreshcapabilitiesexchange.
Executetheclearipbgp*command.Command-lineBGPstatus
messageswillindicaterouterefreshsupportcapabilities.

Introduction
RoutesthatarelearnedviaBGPhavepropertiesthatareassociatedwiththem.
Theyaidarouterindeterminingthebestroutetoadestinationwhenmultiplepaths
tothatparticulardestinationexist.ThesepropertiesarereferredtoasBGP
attributes.Inthismodule,youwilllearntheroleofBGPattributes,andhowtheir
presenceinfluencesrouteselectioninBGP.
UnderstandinghowBGPattributes,includingweight,localpreference,ASpath
prepending,MED,andBGPcommunities.influencerouteselectionisrequiredfor
thedesignofrobustnetworks.
Uponcompletingthismodule,youwillbeableto:
DefinehowtouseBGPweightattributetoinfluencetherouteselection
DefinehowtouseBGPlocalpreferenceattributetoinfluencetherouteselection
DefinehowtouseBGPASpathprependingtoinfluencethereturnpaththatis
selectedbytheneighboringautonomoussystems
DefinehowtouseMEDattributetoinfluencetherouteselection
DefinehowtouseBGOcommunityattributestoinfluencetherouteselection
RouteSelectionUsingAttributes

Overview
Whenconnectionstomultipleprovidersarerequired,itisimportantthatBGPselects
theoptimumroutefortraffictouse.Theoptimum,orbest,routemaynotbewhatyou
intendedduringthedesign,basedonthedesigncriteria,administrativepolicies,or
corporatemandate.Fortunately,BGPprovidesmanytoolsforyoutoinfluenceroute
selection.Oneofthesetoolsistheweightattribute.
Inthislesson,youwilllearnhowtoinfluenceBGProuteselectionbysettingthe
weightattributeofincomingBGProutes.Twomethodsthatareusedtosetthe
weightattribute,defaultweightandroutemaps,arediscussedinthislesson.Youwill
alsolearnhowtomonitortheBGPtabletoverifycorrectweightconfigurationand
properlyinfluencepathselection.
Uponcompletingthislesson,youwillbeableto:
ListBGProuteselectioncriteriaforbest-pathrouteselection
DescribetheuseofBGPweightstoinfluencetheBGProuteselectionprocess
IdentifytheCiscoIOScommandsthatarerequiredtoconfigureper-neighbor
weights
InfluencetheBGProuteselectionprocessbyconfiguringper-neighborweights
DescribehowtoinfluencetheBGProuteselectionprocessbyconfiguringBGP
weightswithroutemaps
SummarizeBGProuteselectionandfilteringtools
InfluencingBGPRouteSelectionwith
Weights

BGProuteselectioncriteriataketheweightparameterintoconsiderationfirst.Ifa
routerhastwoalternativepathstothesamedestination,andtheirweightvaluesare
different,BGPselectstheroutewiththehighestweightvalueasthebest.Onlywhen
thetwoalternativeshaveequalweight,thenextcriterion,localpreference,is
checked.
Prefer highest weight (local to router)
Prefer highest local preference (global within AS)
Prefer routes that the router originated
Prefer shorter AS paths (only length is compared)
Prefer lowest origin code (IGP < EGP < Incomplete)
Prefer lowest MED
Prefer external (EBGP) paths over internal (IBGP)
For IBGP paths, prefer path through closest IGP neighbor
For EBGP paths, prefer oldest (most stable) path
Prefer paths from router with the lower BGP router-ID
Ahighlocalpreferencevalueispreferredoveralowvalue.Onlywhenthetwo
alternativeshaveanequallocalpreference,thenextcriterionischecked.
BGPRouteSelectionCriteria

Theweightattributeislocaltoasinglerouteronly.BGPprotocolneverpropagates
theweightvalue,andthisvalueconstitutesaroutingpolicylocaltotherouter.You
havetwodifferentwayshowtoassigntheweightattributetoaroute.
BGP routing policy can be specified by using:
Weight: provides local routing policy (within a router)
Local preference: provides AS-wide routing policy
BGP weights are specified per neighbor.
Default weight
Complex criteria with route maps
Theweightattributecanbeassignedtoarouteusingoneofthefollowing:
Assignadefaultweightvaluetoalloftheroutesthatarereceivedfromaspecific
neighbor.Thisweightvalueindicatesthattheneighborispreferredoverthe
otherneighbors.
Applyaroutemaponincomingroutesfromaneighbortoselectsomeroutes
andassignweightvaluestothem.Rememberthataroutemapalsoactsasa
filterandwillsilentlydroptheroutesthattheroutemapdoesnotpermitinany
statement.
Ifconfigured,thedefaultweightassignmentonroutesthatarereceivedfroma
neighborisappliedfirst.Allroutesthatarereceivedfromtheneighborareassigned
aweightvalueasdefinedbythedefaultweight.
Whenaroutemapisapplied,itisconfiguredontherouter.Theroutemapcanbe
arbitrarilycomplexandcanusevariousselectioncriteria,suchasanetworknumber
orASpathtoselectroutes.Youcanaltersomeattributesoftheselectedroutes.The
routemapcansettheweightvaluesofpermittedroutes.Selectioncanbedonein
severalroutemapstatements,givingtheopportunitytoassignacertainweightvalue
tosomeroutesandanotherweightvaluetoothers.Aroutemapcanalsocompletely
filteroutroutes.
Ifyouwanttheroutingpolicytobeexchangedwithinall
theroutersintheAS,assignlocalpreferenceattributetoa
route.Thisattributeiscarriedwiththerouteonallinternal
BGPsessions.InthissituationallotherBGP-speaking
routerswithintheASreceivethesameinformation.
Normally,arouterassignsalocalpreferencetoaroute
thatisreceivedonanexternalBGPsessionbeforeitis
acceptedandenteredintheBGPtableoftheborder
router.Routerspropagatethelocalpreferenceattributeon
internalBGPsessionsonly.Thispolicyconstitutesa
routingpolicyfortheentireAS.
InfluencingBGPRouteSelection

IfyouwantallroutesfromtheBGPneighbortogetthespecifiedweight,youhaveto
configureper-neighborweights.
router(config-router)# neighbor ip-address weight weight
All routes from the BGP neighbor get the specified weight.
BGP routes with higher weight are preferred.
Weight is applied only to new incoming updates.
To enforce new weights, reestablish BGP sessions with your neighbors by using
the clear ip bgp command.
Toassignaweighttoaneighborconnection,usetheneighborweightrouter
configurationcommand.Toremoveaweightassignment,usethenoformofthis
command.
Allroutesthatarouterreceivesfromtheneighboraftertheconfigurationlineisin
placegettheweightvalueassigned.Tomakesurethatallroutesfromtheneighbor
receivethenewweightvalue,youcanrestarttheBGPsessionusingclearipbgp
command,forcingtheneighbortoresendallroutes.
Ifnoweightvalueisspecified,thedefaultvalueforroutes
learnedthroughanotherBGPpeeris0andthedefault
valueforroutessourcedbythelocalrouteris32768.
ConfiguringPer-NeighborWeights

Overview
Throughthisdiscovery,youwilllearnhowtoconfigureper-neighborweightsand
howtomonitorBGProuteselection.Youwillconfigureamultihomedcustomer's
router,R2,tousethelinktotheprimaryserviceprovider,ISP1,foralldestinations.
Discovery11:ConfigurePer-NeighborWeights

Topology

Ifyoushutdownaninterfaceonarealrouterorswitch,the
connecteddevicewillseeitas"down/down."Dueto
virtualizationspecifics,IOLbehaviorisslightlydifferent.If
youshutdownaninterfaceonarouterorswitch,the
connecteddevicewillseeitas"up/up."InIOL,thestatus
ofaninterfacecanonlybe"up/up"or"administratively
down/down."
DeviceInformation
Device Interface IPaddress Description
R2 Ethernet0/0 172.16.22.2/24 ConnectiontoISP2
R2 Ethernet0/1 172.16.12.2/24 ConnectiontoISP1
R2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
10.0.0.1/28
10.0.0.17/28
10.0.0.33/28
10.0.0.49/28
10.0.0.65/28
Loopbackssimulate
LANnetworks
ISP1 Ethernet0/1 172.16.12.11/24 ConnectiontoR2
ISP1 Ethernet0/2 172.16.100.11/24 ConnectiontoISP2
ISP1 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
10.0.1.1/28
10.0.1.17/28
10.0.1.33/28
10.0.1.49/28
10.0.1.65/28
10.0.1.81/28
Loopbackssimulate
LANnetworks
ISP2 Ethernet0/0 172.16.22.22/24 ConnectiontoR2
ISP2 Ethernet0/2 172.16.100.22/24 ConnectiontoISP1
ISP2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
Loopback7
Loopback8
Loopback9
10.0.2.1/28
10.0.2.17/28
10.0.2.33/28
10.0.2.49/28
10.0.2.65/28
10.0.2.81/28
10.0.2.97/28
10.0.2.113/28
10.0.2.129/28
Loopbackssimulate
LANnetworks
IPaddressesandadvertisednetworksinBGParepreconfiguredasshownbelow:
BGPisalsopreconfiguredasEBGP:
R2toISP1
R2toISP2
ISP1toISP2
JobAids

Step1
OntheR2router,verifytheinitialstateofdefaultweightsforallreceiveddestinations.
Toverifyweights,usetheshowipbgpcommand.
R2# show ip bgp
BGP table version is 65, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 0.0.0.0 0 32768 i
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*> 10.0.0.32/28 0.0.0.0 0 32768 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*> 10.0.0.64/28 0.0.0.0 0 32768 i
* 10.0.1.0/28 172.16.22.22 0 200 100 i
*> 172.16.12.11 0 0 100 i
* 10.0.1.16/28 172.16.22.22 0 200 100 i
*> 172.16.12.11 0 0 100 i
* 10.0.1.32/28 172.16.22.22 0 200 100 i
*> 172.16.12.11 0 0 100 i
* 10.0.1.48/28 172.16.22.22 0 200 100 i
*> 172.16.12.11 0 0 100 i
* 10.0.1.64/28 172.16.22.22 0 200 100 i
*> 172.16.12.11 0 0 100 i
Network Next Hop Metric LocPrf Weight Path
* 10.0.1.80/28 172.16.22.22 0 200 100 i
*> 172.16.12.11 0 0 100 i
* 10.0.2.0/28 172.16.12.11 0 100 200 i
*> 172.16.22.22 0 0 200 i
* 10.0.2.16/28 172.16.12.11 0 100 200 i
*> 172.16.22.22 0 0 200 i
* 10.0.2.32/28 172.16.12.11 0 100 200 i
*> 172.16.22.22 0 0 200 i
* 10.0.2.48/28 172.16.12.11 0 100 200 i
*> 172.16.22.22 0 0 200 i
* 10.0.2.64/28 172.16.12.11 0 100 200 i
*> 172.16.22.22 0 0 200 i
* 10.0.2.80/28 172.16.12.11 0 100 200 i
*> 172.16.22.22 0 0 200 i
* 10.0.2.96/28 172.16.12.11 0 100 200 i
*> 172.16.22.22 0 0 200 i
* 10.0.2.112/28 172.16.12.11 0 100 200 i
*> 172.16.22.22 0 0 200 i
* 10.0.2.128/28 172.16.12.11 0 100 200 i
*> 172.16.22.22 0 0 200 i
R2hasreceivedroutestothefollowingnetworks:
10.0.0.0/24networksareinjectedintotheBGPtablebythisrouter.Bydefault,locally
sourcedroutesareassignedaweightof32768.
10.0.1.0/24networksarereceivedfromISP1andISP2.Allrouteshavedefaultweight
valueof0assigned.
10.0.2.0/24networksarereceivedfromISP1andISP2.Allrouteshavedefaultweight
valueof0assigned.
Step2
OntheR2router,makesurethatroutereceivedfromtheISP1routerwillbe
preferredoverroutesreceivedfromtheISP2router.
ForroutesthatarereceivedfromISP1,configureaweightof150andforroutes
thatarereceivedfromISP2configureaweightof100.
NotethatBGProuteswithhigherweightarepreferred.
R2(config)# router bgp 1
R2(config-router)# neighbor 172.16.12.11 weight 150
R2(config-router)# neighbor 172.16.22.22 weight 100
ConfigurePer-NeighborWeights
DiscoverySteps

TheweightisconfiguredonR2onbothBGPsessions.Ahigherweightvalueis
giventotheroutesthatarereceivedfromtheprimaryISP,ISP1,comparedto
theroutesthatarereceivedfromthebackupISP,ISP2.
AnytimethattheR2receivesroutinginformationaboutthesameIPnetwork
numberfrombothISPs,theroutercomparestheweightsthatareassignedto
theroutes.TheroutesthatarereceivedfromtheISP1willalwayswinthis
comparison.
Step3
Re-establishBGPsessionsontheR2routertoenforcenewweights.
Tore-establishBGPsession,usetheclearipbgpcommand.
R2# clear ip bgp *
The*parameterofthecommandspecifiestoclearallpeers.
MonitoringBGPRouteSelectionandWeights
router> show ip bgp
Displays all BGP routes. Best routes marked with ">"
With every displayed route, weight is associated.
router> show ip bgp ip-prefix [mask subnet-mask]
Displays detailed information about all paths for a single prefix
Withoutanyargument,theshowipbgpcommanddisplaystheentireBGPtable.
Eachrouteisdisplayedinoneline.Thenetworknumberisdisplayed,andifthe
subnetmaskdiffersfromthenaturalmask,theprefixlengthisindicated.TheBGP
next-hopattribute,MED,localpreference,weight,ASpath,andorigincodeare
displayed.Localpreferenceisdisplayedonlyifitisnotthedefaultvalue.
Theprintoutissortedinnetworknumberorder.Ifthereismorethanoneroutetothe
samenetwork,thenetworknumberisprintedonthefirstlineonly.Theotherroutes
tothesamenetworkhavetheirnetworkfieldleftblankontheoutput.Thegreater-
than(">")characterindicatestheroutesthatareselectedasthebest.
Togetmoredetailedinformationaboutroutestoaspecificdestinationnetwork,you
canusethenetworknumber,andoptionallythesubnetmask,asanargumentonthe
commandline.Theseadditionsdisplaymoredetailedinformationaboutthatspecific
network.
First,ashortsummarythatindicatesthenetworknumberandprefixlengthis
displayed,alongwiththetableversionnumberforthisroute.Thenextlineindicates
howmanyalternativerouteshavebeenreceivedandwhichoneofthemtherouter
hasselectedasthebest.Therearethenacoupleoflinesforeachofthereceived
routestoreachthenetwork.Foreachoftheroutes,allattributesaredisplayed.The
oneselectedasthebestalsohastheword“best”displayed
Step4
OntheR2router,verifyreceivedroutestodestinationnetworksandtheirweights.
Toverifyreceivedroutes,usetheshowipbgpcommand.
R2# show ip bgp
BGP table version is 20, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 0.0.0.0 0 32768 i
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*> 10.0.0.32/28 0.0.0.0 0 32768 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i

*> 10.0.0.64/28 0.0.0.0 0 32768 i
* 10.0.1.0/28 172.16.22.22 100 200 100 i
*> 172.16.12.11 0 150 100 i
* 10.0.1.16/28 172.16.22.22 100 200 100 i
*> 172.16.12.11 0 150 100 i
* 10.0.1.32/28 172.16.22.22 100 200 100 i
*> 172.16.12.11 0 150 100 i
* 10.0.1.48/28 172.16.22.22 100 200 100 i
*> 172.16.12.11 0 150 100 i
* 10.0.1.64/28 172.16.22.22 100 200 100 i
*> 172.16.12.11 0 150 100 i
Network Next Hop Metric LocPrf Weight Path
* 10.0.1.80/28 172.16.22.22 100 200 100 i
*> 172.16.12.11 0 150 100 i
* 10.0.2.0/28 172.16.22.22 0 100 200 i
*> 172.16.12.11 150 100 200 i
* 10.0.2.16/28 172.16.22.22 0 100 200 i
*> 172.16.12.11 150 100 200 i
* 10.0.2.32/28 172.16.22.22 0 100 200 i
*> 172.16.12.11 150 100 200 i
* 10.0.2.48/28 172.16.22.22 0 100 200 i
*> 172.16.12.11 150 100 200 i
* 10.0.2.64/28 172.16.22.22 0 100 200 i
*> 172.16.12.11 150 100 200 i
* 10.0.2.80/28 172.16.22.22 0 100 200 i
*> 172.16.12.11 150 100 200 i
* 10.0.2.96/28 172.16.22.22 0 100 200 i
*> 172.16.12.11 150 100 200 i
* 10.0.2.112/28 172.16.22.22 0 100 200 i
*> 172.16.12.11 150 100 200 i
* 10.0.2.128/28 172.16.22.22 0 100 200 i
*> 172.16.12.11 150 100 200 i
R2hasreceivedroutesto15differentnetworksoutsideofitsownAS.
10.0.1.0/24networksarereceivedfromISP1andISP2.
10.0.2.0/24networksarereceivedfromISP1andISP2.
WhentherouteswerereceivedfromtheISP1,theweightvalue150wasassignedto
eachoftheroutes.WhentherouteswerereceivedfromtheISP2,theweightvalue100
wasassignedtoeachoftheroutes.TheR2thenmakestherouteselection—ithastwo
alternativepathsforeachdestinationanditselectsthepathviatheISP1asthebest.It
makesthisselectionbasedontheweightparameter,regardlessofotherBGPattributes,
suchasASpathlength.
Consequently,the10.0.2.0/24networksthataredirectlyconnectedtotheISP2willalso
bereachedviatheISP1.AlthoughtheyareactuallynetworksintheASoftheISP2,AS
200.
Step5
OntheR2router,verifydetailedinformationaboutthe10.0.2.0/28network.
Toverifydetailedinformation,usetheshowipbgpcommandwithanetwork
numberasanargument.
R2# show ip bgp 10.0.2.0/28
BGP routing table entry for 10.0.2.0/28, version 8
Paths: (2 available, best #2, table default)
Advertised to update-groups:
2
Refresh Epoch 2
200
172.16.22.22 from 172.16.22.22 (10.0.2.129)
Origin IGP, metric 0, localpref 100, weight 100, valid, external
Refresh Epoch 2
100 200
172.16.12.11 from 172.16.12.11 (10.0.1.81)
Origin IGP, localpref 100, weight 150, valid, external, best
Therearetwoalternativestoreachnetwork10.0.2.0/28.Eachofthemis
receivedfromdifferentneighbors,oneinAS100andanotherinAS200.The
network10.0.2.0/28iscreatedinAS200.
Therouteselectionmechanismhasselectedthesecondroutethatislistedas
thebest.Itwaschosenbecausetheweightvalueishigher.

Theroutemapisapowerfultooltoselectandalterroutinginformation.Whenyou
applyaroutemaptoincominginformationfromaBGPneighbor,eachreceived
updateisexaminedasitpassesthroughtheroutemap.Thesequencenumberof
thestatementsspecifytheorderofexecution.
Weights can be set with route maps in complex scenarios.
Routes can be matched on any combination of prefix lists, AS path filters, or
other BGP attributes.
Routes not matched by the route-map are discarded.
router bgp as-number
neighbor ip-address route-map route-map-name in
!
route-map route-map-name permit sequence
match condition
set weight weight
Thefirststatementintheroutemapforwhichallthematchclausesindicateamatch
istheonethatisused.Iftheroutemapsays"permit,"thesetclausesareappliedto
theroute,therouteisaccepted,andtheweightischanged.
Matchclausescanbearbitrarilycomplex.OneofthemcanrefertoanASpath
accesslistthatdoesmatchingonASpaths.Anothercanrefertoaprefixlistthat
doesmatchingontheannouncednetworknumber.Onlywhenallconfiguredmatch
clausesareevaluated,theroutemapstatementisusedanditsresult,permit,or
deny,applied.
Ifareceivedrouteisnotmatchedbyanyoftheroutemapstatements,theendofthe
routemapisreached.Theroutemaplogichasan"implicitdeny"rule,whichmeans
thatifnostatementselectsaroute,therouteisdiscarded.
Ifyoudonotdesirethe"implicitdeny"rule,addan"explicitpermitall"attheendof
theroutemaptooverruleit.Toensurethatsucharoutemapstatementisthelast
statement,youshouldassignitaveryhighsequencenumber.Itshouldnothaveany
matchclauseatall.Thelackofamatchclausemeans"matchall."Bynot
configuringanysetclause,youcanensurethatthisstatementdoesnotalterany
attributes.
ChangingWeightswithRouteMapsExample
router bgp 1
neighbor 172.16.12.11 route-map SetWeight200 in
!
route-map SetWeight200 permit 10
match as-path 47
set weight 200
!
route-map SetWeight200 permit 20
set weight 100
!
ip as-path access-list 47 permit _200$
AllreceivedroutesfromISP1neighborhavetheirASpathscheckedagainsttheAS
pathaccesslist47.ASpathaccesslist47,asreferencedbyroutemapstatement
number10,permitsthoserouteswithanASpaththatindicatesthattheyoriginated
inAS200.Routesthattheroutemapstatementnumber10intheSetWeight200
routemappermitsandselects,willhavetheirweightsetto200.Thesetclausein
theroutemapindicatesthenewweightvalue..
Routemapstatementnumber20thenteststheroutesthatarenotoriginatedinAS
ChangingWeightswithRouteMaps

200(routesthattheASpathaccesslist47doesnotpermit).Thisstatementdoesnot
includeamatchclause,indicatingthatallroutesarematched.Therefore,theroute
mapstatement20matchallroutesthattheroutemapstatementdoesnot.Theroute
maphasbeenconfiguredwithan“explicitpermitall”statementattheendofthe
routemap.
Routesthattheroutemapstatement20matches,havetheirweightsetto100.The
resultisthattherouteracceptstheroutesthatoriginatedinAS200(all10.0.2.0/24
networks)andassignstheweight200.Allothersareacceptedandassignedthe
weight100.Thisroutemapdoesnotdiscardanyroute.
Specifyingweightswithfilterlistsisnolongersupportedin
CiscoIOSSoftwareRelease12.1andlater.The
commandhasalreadybeenremovedfromCiscoIOS
SoftwareRelease12.1T.Thesereleasesuseanincoming
routemap,whereyoumatchanASpathwiththematch
as-pathcommandandsettheweightwiththesetweight
command.Whenyouareusingaroutemapasa
replacementforthefilterlistwiththeweightoption,make
surethatspecifyinga“permit”entryintheroutemap
withoutanassociatedmatchconditiondoesnotfilterall
otherroutes.

Prefixlistsandfilterlists,bothinandout,filteroutroutesanddiscardtheonesthat
arenotpermitted.Weightsettingisapplicableonlyonincomingroutesbecausea
routerneverpropagatestheweightattributetoitsneighbors.Routemapscanbe
filtersthatdiscardroutesbutcanalsobeusedtomodifyandsetvariousattributes
onbothincomingandoutgoingroutes.
Thefigureshowsallthepossibleapplicationsofprefixlists,filterlists,weights,and
routemaps.Theyareappliedintheorderindicated.
BGPRouteSelectionandFilteringToolsSummary

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
BGP uses a number of criteria for best-path route selection—the weight is taken
into consideration first.
The weight attribute can be assigned to a route using one of the following:
Default weight value can be assigned to all routes that are received from a
specific neighbor.
Route maps can be applied to neighbors to set the weight attribute of
received routes.
You can use the neighbor weight command to assign a weight value to all
routes that are received from a neighbor.
You can use the show ip bgp command to display all BGP routes, the routes
that BGP selected as best, and the weight attribute setting for each route.
Summary

Overview
SometimesyouneedtoinfluenceBGProuteselection.BGPprovidesmanytoolsto
achievethis.Oneofthesetoolsisalsothelocalpreferenceattribute.
Inthislesson,youwilllearnhowtoinfluenceBGProuteselectionbysettingtheBGP
localpreferenceattributeofincomingBGProutes.Localpreferenceissimilartothe
weightattributebutdiffersfromtheBGPweightattributeinthatweightislocaltoa
specificrouteronwhichitisconfigured.Twomethodsthatareusedtosetthelocal
preferenceattribute,defaultlocalpreferenceandroutemaps,arediscussedinthis
lesson.YouwillalsolearnhowtomonitortheBGPtabletoverifycorrectlocal
preferenceconfigurationandtoproperlyinfluencepathselection.
Uponcompletingthislesson,youwillbeableto:
ExplainwhyusingBGPweightsmightnotprovideconsistentBGProute
selectioninanAS
DescribehowtheBGPlocalpreferenceattributeinfluencesBGProuteselection
IdentifytheCiscoIOScommandthatisrequiredtoconfiguredefaultBGPlocal
preferenceonarouter
IdentifytheCiscoIOScommandsthatarerequiredtomonitorBGPlocal
preference
DescribehowtoconfiguredefaultBGPlocalpreferenceonarouter
IdentifytheCiscoIOScommandsthatarerequiredtoconfigureBGPlocal
preferenceusingroutemaps
DescribehowtoconfigureBGPlocalpreferenceusingroute-maps
SettingBGPLocalPreference

UsingBGPinautonomoussystemswithasingleneighborrelationshipusuallydoes
notrequireanyadvancedfeatures.Insituationsliketheoneshowninthefigure,
however,itisimportanttoensurethatthecustomerrouterschoosethecorrectlink.
Obviously,theroutershouldchoosethe2-Mbpslinkandusethe64-kbpslinkonly
forbackuppurposes.
Q: Which routing protocol must be run in AS 1?
A: You must run IBGP in AS 1.
Youhavetomakesurethattherouterselectstheupperlink(2-Mbpslink)asits
primarylinkandhastheabilitytoswitchovertothebackupifafailureoccurs.To
assurethis,youmustconfigureanIBGPsessionbetweenthetwoborderroutersin
AS1.
Q: How will you influence the route selection on routers in AS 1 so that they select
the fastest route?
A: Use weights on EBGP and IBGP sessions.
Onewayofchangingthedefaultrouteselectionistouseweights.Weightisan
attributethatislocallysignificanttoarouter.Weightisaproperty,orparameter,and
istherefore,notseenonanyneighboringrouters.WhendesigningBGPnetworks
usingweights,youasanetworkadministratorshouldsettheweightsonevery
router.Ifthereismorethanonepathforthesamenetwork,arouterwillchoosethe
onewiththehighestweight.Thedefaultvalueforweightis0.
Inthisexample,theR1routerinAS1setsaweightof100forroutesthatare
receivedoverthe2-MbpslinkfromAS100(primarylink).R1preferstheseroutesto
possibleinternalupdatesfromthebottomrouter,wherethedefaultweightis0.The
bottomroutersetsaweightof100forinternalroutesthatarereceivedfromthe
upperrouterandprefersthemtoroutesthatarereceivedfromAS200.Asaresult,
allpacketswillleavetheASthroughtheprimary2-Mbpslink.
ConsistentRouteSelectionWithintheAS

Run the traffic over the fastest line available.
Theconfigurationsthatareshowninthefiguredemonstratehowtochangethe
defaultweightonaper-neighborbasis.Ifyouusetheneighborweightcommand,
allnewlyarrivedupdateswillhaveaweightof100.Updatescomingfromtheother
neighborwillstillhavethedefaultweightof0.
Afteryouhaveappliedtheneighborweightcommand,arefreshisneededfromthe
neighbor.Therearethreewaysofdoingthis,dependingontheCiscoIOSversion:
Usetheclearipbgpneighboraddresscommandtocleartheneighbor
relationshipandre-establishittorefreshtheBGPentriesandapplytheweight.
Configuresoftreconfigurationfortheneighborandusetheclearcommand.You
canperformallsubsequentclearingbyusingtheclearipbgpneighbor
addresssoftincommand,whichdoesnotresettheneighborrelationship.The
CiscoIOSSoftwareRelease11.2andabovesupportsthesoftreconfiguration
feature..
Usetheclearipbgpneighboraddressincommandifbothneighboring
routerssupporttherouterefresh.TheCiscoIOSSoftwareRelease12.1and
abovesupportstherouterefreshfeature.
Whenyouaretryingtoimplementthisexamplewithweights,itrequirestworoute
mapsoneachrouterwithinAS1.Luckily,BGPhasasimilarmechanismthatyou
canuseforconsistentAS-widerouteselection:localpreference.

1.
2.
3.
Localpreferenceissimilartoweight;becauseitisanattribute,youcansetitonce
andthenviewitonneighboringrouterswithouthavingtoresetit.Thisattributehasa
defaultvalueof100,whichtherouterwillapplytolocallyoriginatedroutesand
updatesthatcomeinfromexternalneighbors.Updatesthatcomefrominternal
neighborsalreadyhavethelocalpreferenceattribute.
You can use local preference to ensure AS-wide route selection policy.
Any BGP router can set local preference when processing incoming route
updates, when doing redistribution, or when sending outgoing route updates.
Local preference is used to select routes with equal weight.
Local preference is stripped in outgoing EBGP updates except in EBGP updates
with confederation peers.
Localpreferenceisthesecond-strongestcriterionintherouteselectionprocess.If
therearetwoormorepathsavailableforthesamenetwork,arouterwillfirst
compareweight.Iftheweightsareequalforallpaths,therouterwillthencompare
thelocalpreferenceattributes.Thepathwiththehighestlocalpreferencevaluewill
bepreferred.
Thelocalpreferenceattributeisautomaticallystrippedoutofoutgoingupdatesto
EBGPsessions.Thispracticemeansthatyoucanusethisattributeonlywithina
singleAStoinfluencetherouteselectionprocess.
Local preference is the second strongest BGP route selection parameter.
Remember the BGP route selection rules:
Highest weight preferred (local to router).
Highest local preference preferred (global within AS).
Other BGP route selection rules.
Weights that are configured on a router override local preference settings.
To ensure consistent AS-wide route selection:
Do not change local preference within the AS.
Do not use BGP weights.
Localpreferenceisthesecond-strongestBGProuteselectionparameter.
Remembertherouteselectionrules:
Preferthehighestweight(localtorouter).
Preferthehighestlocalpreference(globalwithinAS).
ProcessallremainingBGProuteselectionrules.
Becauseyouasanadministratorcanusebothweightandlocalpreferenceto
manipulatetherouteselectionprocess,youmustdecidewhichonetouse.Iflocal
preferenceisused,theweightshouldbethesameforallpaths.
Youcanuseweightonanindividualroutertooverridelocalpreferencesettingsthat
areusedintherestoftheAS.
Inmostcases,itisenoughtochangethedefaultlocalpreferenceonupdates
comingfromexternalneighbors.Youshouldavoidchangingthelocalpreference
attributeoninternalsessionstopreventunnecessarycomplexityandunpredictable
behavior.
BGPLocalPreference

Youcanapplylocalpreferenceinthefollowingways:
Usearoutemapwiththesetlocal-preferencecommand.Youcanusethe
routemaponincomingupdatesfromallneighborsoronoutgoingupdatesto
internalneighbors(notrecommended).
Usethebgpdefaultlocal-preferencecommandtochangethedefaultlocal
preferencevaluethatisappliedtoallupdatesthatcomefromexternalneighbors
orthatoriginatelocally.

Youcanusethebgpdefaultlocal-preferencecommandinBGPconfiguration
modetochangethedefaultvalueoflocalpreference.Thenewdefaultvalueapplies
onlytolocallyoriginatedroutesandtheroutesthatarereceivedfromexternal
neighbors.
router(config-router)# bgp default local-preference preference
This command changes the default local preference value.
The specified value is applied to all routes that do not have local preference set
(EBGP routes).
The default value of this parameter is 100, allowing you to specify more
desirable or less desirable routers.
Ifyousetavaluelowerthanthedefaultof100,therouterwillpreferinternalpathsto
external(normallyarouterwouldpreferexternalroutes).
Ifyousetavaluehigherthan100,thenexternalpathswillbepreferredtoallinternal
paths(alsotheoneswithashorterASpath).
ConfiguringDefaultLocalPreference

Display nondefault local preference with the show ip bgp command.
Local preference is displayed in the show ip bgp prefix command.
Local preference is also displayed in BPG update debugging (only for inbound
updates).
Althoughlocalpreferenceisnotamandatoryattribute,itisappliedtoeveryroute.
Whenyouareusingtheshowipbgpcommand,alocallyapplieddefaultvalueis
notshown.Allothervaluesaredisplayed.Youshouldusetheshowipbgpprefix
commandtoalsodisplaythelocallyappliedvalue.
Theoutputoftheshowipbgpcommandwillnotdisplay
thelocalpreferencevalueifthevalueisthesameasthe
bgpdefaultlocal-preferencevalueinthelocalrouter.
Theoutputthatisdisplayedfromshowanddebugcommandswillvarydepending
ontheCiscoIOSversion.Newerversionstypicallydisplaymoreinformation.In
CiscoIOSSoftwareRelease12.0andinlaterversions,enablingdebuggingof
incomingroutingupdateswillalsodisplaythelocalpreferenceattribute.
MonitoringLocalPreference

Overview
Throughthisdiscovery,youwilllearnhowtoconfigureBGPdefaultlocalpreference.
YouwillinfluenceR2routertopreferthepathtoISP1networksviaR1,insteadof
usingthedirectlyconnectedlink.
Discovery12:ConfigureandMonitorLocalPreference

Topology

Ifyoushutdownaninterfaceonarealrouterorswitch,the
connecteddevicewillseeitas"down/down."Dueto
virtualizationspecifics,IOLbehaviorisslightlydifferent.If
youshutdownaninterfaceonarouterorswitch,the
connecteddevicewillseeitas"up/up."InIOL,thestatus
ofaninterfacecanonlybe"up/up"or"administratively
down/down."
DeviceInformation
Device Interface IPaddress Description
R1 Ethernet0/0 172.16.11.1/24 ConnectiontoISP1
R1 Ethernet0/2 192.168.12.1/24 ConnectiontoR2
R2 Ethernet0/0 172.16.22.2/24 ConnectiontoISP2
R2 Ethernet0/1 172.16.12.2/24 ConnectiontoISP1
R2 Ethernet0/2 192.168.12.2/24 ConnectiontoR1
R2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
10.0.0.1/28
10.0.0.17/28
10.0.0.33/28
10.0.0.49/28
10.0.0.65/28
Loopbackssimulate
LANnetworks
ISP1 Ethernet0/0 172.16.11.11/24 ConnectiontoR1
ISP1 Ethernet0/1 172.16.12.11/24 ConnectiontoR2
ISP1 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
10.0.1.1/28
10.0.1.17/28
10.0.1.33/28
10.0.1.49/28
10.0.1.65/28
10.0.1.81/28
Loopbackssimulate
LANnetworks
ISP2 Ethernet0/0 172.16.22.22/24 ConnectiontoR2
ISP2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
Loopback7
Loopback8
Loopback9
10.0.2.1/28
10.0.2.17/28
10.0.2.33/28
10.0.2.49/28
10.0.2.65/28
10.0.2.81/28
10.0.2.97/28
10.0.2.113/28
10.0.2.129/28
Loopbackssimulate
LANnetworks
IPaddressesandadvertisednetworksinBGParepreconfiguredasshownbelow:
BGPisalsopreconfigured:
EBGP
R1toISP1
R2toISP1
R2toISP2
JobAids

IBGP
R1toR2

Step1
OntheR2router,verifytheinitialstateofdefaultlocalpreferencesforallreceived
destinations.
R2# show ip bgp
BGP table version is 21, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 0.0.0.0 0 32768 i
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*> 10.0.0.32/28 0.0.0.0 0 32768 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*> 10.0.0.64/28 0.0.0.0 0 32768 i
* i 10.0.1.0/28 192.168.12.1 0 100 0 100 i
*> 172.16.12.11 0 0 100 i
* i 10.0.1.16/28 192.168.12.1 0 100 0 100 i
*> 172.16.12.11 0 0 100 i
* i 10.0.1.32/28 192.168.12.1 0 100 0 100 i
*> 172.16.12.11 0 0 100 i
* i 10.0.1.48/28 192.168.12.1 0 100 0 100 i
*> 172.16.12.11 0 0 100 i
* i 10.0.1.64/28 192.168.12.1 0 100 0 100 i
Network Next Hop Metric LocPrf Weight Path
*> 172.16.12.11 0 0 100 i
* i 10.0.1.80/28 192.168.12.1 0 100 0 100 i
*> 172.16.12.11 0 0 100 i
*> 10.0.2.0/28 172.16.22.22 0 0 200 i
*> 10.0.2.16/28 172.16.22.22 0 0 200 i
*> 10.0.2.32/28 172.16.22.22 0 0 200 i
*> 10.0.2.48/28 172.16.22.22 0 0 200 i
*> 10.0.2.64/28 172.16.22.22 0 0 200 i
*> 10.0.2.80/28 172.16.22.22 0 0 200 i
*> 10.0.2.96/28 172.16.22.22 0 0 200 i
*> 10.0.2.112/28 172.16.22.22 0 0 200 i
*> 10.0.2.128/28 172.16.22.22 0 0 200 i
R2hasreceivedroutestothefollowingnetworks:
10.0.0.0/24networks(originatinglocallyonR2),forwhichtheapplieddefaultlocal
preferenceof100isnotdisplayed.
10.0.1.0/24networks(originatingontheISP1router)arereceivedfromR1andISP1:
ThefirstpathforthesenetworkswasreceivedfromR1(withnexthop
192.168.12.1),withlocalpreferencevalueof100.Localpreferenceofinternal
routeisdisplayedintheoutput.
ThesecondpathforthesenetworkswasreceivedfromISP1(withnexthop
172.16.12.11).Theapplieddefaultlocalpreferenceof100isnotdisplayed.
10.0.2.0/24networks(originatingontheISP2router)arereceivedfromISP2.The
applieddefaultlocalpreferenceof100isnotdisplayed.
For10.0.1.0/24networks,multiplepathsexistandthedecisionmechanismonR2prefers
theexternal(EBGP)pathsoverinternal(IBGP).
Step2
InfluencetheR2routertopreferthepathtoISP1networksviaR1router.
OnR1,applylocalpreferenceof120forallroutesthatarereceivedfrom
externalneighbor.
R1(config)# router bgp 1
R1(config-router)# bgp default local-preference 120
Step3
OntheR2router,verifyconfigureddefaultlocalpreferenceforallreceiveddestinations.
ConfigureandMonitorLocalPreference
DiscoverySteps

R2# show ip bgp
BGP table version is 20, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 0.0.0.0 0 32768 i
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*> 10.0.0.32/28 0.0.0.0 0 32768 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*> 10.0.0.64/28 0.0.0.0 0 32768 i
*>i 10.0.1.0/28 192.168.12.1 0 120 0 100 i
* 172.16.12.11 0 0 100 i
*>i 10.0.1.16/28 192.168.12.1 0 120 0 100 i
* 172.16.12.11 0 0 100 i
*>i 10.0.1.32/28 192.168.12.1 0 120 0 100 i
* 172.16.12.11 0 0 100 i
*>i 10.0.1.48/28 192.168.12.1 0 120 0 100 i
* 172.16.12.11 0 0 100 i
*>i 10.0.1.64/28 192.168.12.1 0 120 0 100 i
* 172.16.12.11 0 0 100 i
Network Next Hop Metric LocPrf Weight Path
*>i 10.0.1.80/28 192.168.12.1 0 120 0 100 i
* 172.16.12.11 0 0 100 i
*> 10.0.2.0/28 172.16.22.22 0 0 200 i
*> 10.0.2.16/28 172.16.22.22 0 0 200 i
*> 10.0.2.32/28 172.16.22.22 0 0 200 i
*> 10.0.2.48/28 172.16.22.22 0 0 200 i
*> 10.0.2.64/28 172.16.22.22 0 0 200 i
*> 10.0.2.80/28 172.16.22.22 0 0 200 i
*> 10.0.2.96/28 172.16.22.22 0 0 200 i
*> 10.0.2.112/28 172.16.22.22 0 0 200 i
*> 10.0.2.128/28 172.16.22.22 0 0 200 i
R2hasreceivedroutestothefollowingnetworks:
10.0.0.0/24networksthatoriginatelocallyonR2,andtheapplieddefaultlocal
preferenceof100isnotdisplayed.
10.0.1.0/24networksarereceivedfromR1andISP1:
ThefirstpathforthesenetworkswasreceivedfromR1(nexthop192.168.12.1),
withachangedlocalpreferencevalueof120.Localpreferenceofinternalrouteis
displayedintheoutput.Notethatthisisthebestpathfor10.0.1.0/24networks,
markedwith>sign.
ThesecondpathforthesenetworkswasreceivedfromISP1(nexthop
172.16.12.11).Theapplieddefaultlocalpreferenceof100isnotdisplayed.
10.0.2.0/24networksarereceivedfromISP2.Theapplieddefaultlocalpreferenceof
100isnotdisplayed.
For10.0.1.0/24networks,multiplepathsexistandthedecisionmechanismonR2selects
aroutewithhigherlocalpreferenceattribute(120),sinceweightvalueisleftondefault,0.

Tohavemorecontroloversettinglocalpreference,youmaybeforcedtousearoute
map.
router(config)#
route-map name permit sequence
match condition
set local-preference value
Changes BGP local preference only for routes that the route map entry matches
router(config-router)# neighbor address route-map name in | out
Applies route map to incoming updates from specified neighbor or outgoing
updates to specified neighbor
Per-neighbor local preference that is configured by using a route map with no
match condition
Aroutemapcanhavemoresequencedstatements,eachwithadifferentsetlocal-
preferencecommand,andadifferentmatchcondition.Ifthereisnomatch
command,theroutemapstatementwillapplylocalpreferencetoallroutes.Youcan
thenapplytheroutemaptoBGProuteupdatesineithertheincomingoroutgoing
direction.
Applyingaroutemaptooutgoingupdatesonexternal
sessionswillhavenoeffectonlocalpreferenceinthe
neighboringAS.
Whenyouusearoutemaptosetlocalpreference,theroutemapistypicallyapplied
toincomingBGProutesthattheEBGPneighboradvertises.Thelocalrouteruses
thelocalpreferenceattributeinBGProuteselection.Inaddition,therouteralso
propagatestheattributetoallIBGPsessionsinthelocalAS.Normally,no
modificationsoflocalpreferencearemadeonIBGPsessions.Thisrestriction
ensuresthatallroutersinthelocalASusethesamelocalpreferencevalueand
makethesamedecisionintherouteselectionprocess.
Ifanetworkisnotmatchedinanyoftheroutemap
statements,thenetworkwillbefiltered.Topermit
unmatchednetworkswithoutsettingthelocalpreference
attribute,youshouldaddanotherroutemapstatement
withoutmatchorsetcommandstotheendoftheroute
map.Thisstatementshouldsimplypermittheremaining
networks.
ConfiguringLocalPreferencewithRouteMaps

Overview
Throughthisdiscovery,youwilllearnhowtoconfigurelocalpreferenceusingroute
maps.YouwillagainconfigureR2routertopreferthepathtoISP1networksviaR1,
insteadofusingthedirectlyconnectedlink.
Discovery13:ConfigureLocalPreferenceUsingRoute
Maps

Topology

Ifyoushutdownaninterfaceonarealrouterorswitch,the
connecteddevicewillseeitas"down/down."Dueto
virtualizationspecifics,IOLbehaviorisslightlydifferent.If
youshutdownaninterfaceonarouterorswitch,the
connecteddevicewillseeitas"up/up."InIOL,thestatus
ofaninterfacecanonlybe"up/up"or"administratively
down/down."
DeviceInformation
Device Interface IPaddress Description
R1 Ethernet0/0 172.16.11.1/24 ConnectiontoISP1
R1 Ethernet0/2 192.168.12.1/24 ConnectiontoR2
R2 Ethernet0/0 172.16.22.2/24 ConnectiontoISP2
R2 Ethernet0/1 172.16.12.2/24 ConnectiontoISP1
R2 Ethernet0/2 192.168.12.2/24 ConnectiontoR1
R2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
10.0.0.1/28
10.0.0.17/28
10.0.0.33/28
10.0.0.49/28
10.0.0.65/28
Loopbackssimulate
LANnetworks
ISP1 Ethernet0/0 172.16.11.11/24 ConnectiontoR1
ISP1 Ethernet0/1 172.16.12.11/24 ConnectiontoR2
ISP1 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
10.0.1.1/28
10.0.1.17/28
10.0.1.33/28
10.0.1.49/28
10.0.1.65/28
10.0.1.81/28
Loopbackssimulate
LANnetworks
ISP2 Ethernet0/0 172.16.22.22/24 ConnectiontoR2
ISP2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
Loopback7
Loopback8
Loopback9
10.0.2.1/28
10.0.2.17/28
10.0.2.33/28
10.0.2.49/28
10.0.2.65/28
10.0.2.81/28
10.0.2.97/28
10.0.2.113/28
10.0.2.129/28
Loopbackssimulate
LANnetworks
IPaddressesandadvertisednetworksinBGParepreconfiguredasshownbelow:
BGPisalsopreconfigured:
EBGP
R1toISP1
R2toISP1
R2toISP2
JobAids

IBGP
R1toR2

Step1
OntheR2router,verifytheinitialstateofdefaultlocalpreferencesforallreceived
destinations.
Toverifylocalpreferences,usetheshowipbgpcommand.
R2# show ip bgp
BGP table version is 21, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 0.0.0.0 0 32768 i
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*> 10.0.0.32/28 0.0.0.0 0 32768 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*> 10.0.0.64/28 0.0.0.0 0 32768 i
* i 10.0.1.0/28 192.168.12.1 0 100 0 100 i
*> 172.16.12.11 0 0 100 i
* i 10.0.1.16/28 192.168.12.1 0 100 0 100 i
*> 172.16.12.11 0 0 100 i
* i 10.0.1.32/28 192.168.12.1 0 100 0 100 i
*> 172.16.12.11 0 0 100 i
* i 10.0.1.48/28 192.168.12.1 0 100 0 100 i
*> 172.16.12.11 0 0 100 i
* i 10.0.1.64/28 192.168.12.1 0 100 0 100 i
Network Next Hop Metric LocPrf Weight Path
*> 172.16.12.11 0 0 100 i
* i 10.0.1.80/28 192.168.12.1 0 100 0 100 i
*> 172.16.12.11 0 0 100 i
*> 10.0.2.0/28 172.16.22.22 0 0 200 i
*> 10.0.2.16/28 172.16.22.22 0 0 200 i
*> 10.0.2.32/28 172.16.22.22 0 0 200 i
*> 10.0.2.48/28 172.16.22.22 0 0 200 i
*> 10.0.2.64/28 172.16.22.22 0 0 200 i
*> 10.0.2.80/28 172.16.22.22 0 0 200 i
*> 10.0.2.96/28 172.16.22.22 0 0 200 i
*> 10.0.2.112/28 172.16.22.22 0 0 200 i
*> 10.0.2.128/28 172.16.22.22 0 0 200 i
R2hasreceivedroutestothefollowingnetworks:
10.0.0.0/24networksthatoriginatelocallyonR2,andtheapplieddefaultlocal
preferenceof100isnotdisplayed.
10.0.1.0/24networksarereceivedfromR1andISP1:
ThefirstpathforthesenetworkswasreceivedfromR1(nexthop192.168.12.1),
withlocalpreferencevalueof100.Localpreferenceofinternalrouteisdisplayed
intheoutput.
ThesecondpathforthesenetworkswasreceivedfromISP1(nexthop
172.16.12.11).Theapplieddefaultlocalpreferenceof100isnotdisplayed.
10.0.2.0/24networksarereceivedfromISP2.Theapplieddefaultlocalpreferenceof
100isnotdisplayed.
For10.0.1.0/24networks,multiplepathsexistandthedecisionmechanismonR2prefers
theexternal(EBGP)pathsoverinternal(IBGP).
Step2
OntheR2router,configureroutemaptosetlocalpreferenceon10.
Nametheroutemap"LP10."
R2(config)# route-map LP10 10
R2(config-route-map)# set local-preference 10
Step3
InfluencetheR2routertopreferthepathtoISP1networksviaR1router.Onthe
R2router,useconfiguredroutemaptosetlowerlocalpreferenceforroutesthat
ConfigureLocalPreferenceUsingRouteMaps
DiscoverySteps

arereceivedfromAS100.
ApplyroutemapLP10forroutesthatarereceivedfromAS100.
R2(config)# router bgp 1
R2(config-router)# neighbor 172.16.12.11 route-map LP10 in
Localpreferenceof10willnowbeappliedtoexternalupdatesfromISP1.
Consequently,R2willpreferthepathtonetworksinAS100viaR1,sinceithas
higherlocalpreferencevalue.
Step4
ClearallBGPsessionsontheR2router.
R2# clear ip bgp *
Step5
OntheR2router,verifylocalpreferenceforallreceiveddestinations.
R2# show ip bgp
BGP table version is 20, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 0.0.0.0 0 32768 i
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*> 10.0.0.32/28 0.0.0.0 0 32768 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*> 10.0.0.64/28 0.0.0.0 0 32768 i
*>i 10.0.1.0/28 192.168.12.1 0 100 0 100 i
* 172.16.12.11 0 10 0 100 i
*>i 10.0.1.16/28 192.168.12.1 0 100 0 100 i
* 172.16.12.11 0 10 0 100 i
*>i 10.0.1.32/28 192.168.12.1 0 100 0 100 i
* 172.16.12.11 0 10 0 100 i
*>i 10.0.1.48/28 192.168.12.1 0 100 0 100 i
* 172.16.12.11 0 10 0 100 i
*>i 10.0.1.64/28 192.168.12.1 0 100 0 100 i
* 172.16.12.11 0 10 0 100 i
Network Next Hop Metric LocPrf Weight Path
*>i 10.0.1.80/28 192.168.12.1 0 100 0 100 i
* 172.16.12.11 0 10 0 100 i
*> 10.0.2.0/28 172.16.22.22 0 0 200 i
*> 10.0.2.16/28 172.16.22.22 0 0 200 i
*> 10.0.2.32/28 172.16.22.22 0 0 200 i
*> 10.0.2.48/28 172.16.22.22 0 0 200 i
*> 10.0.2.64/28 172.16.22.22 0 0 200 i
*> 10.0.2.80/28 172.16.22.22 0 0 200 i
*> 10.0.2.96/28 172.16.22.22 0 0 200 i
*> 10.0.2.112/28 172.16.22.22 0 0 200 i
*> 10.0.2.128/28 172.16.22.22 0 0 200 i
R2hasreceivedroutestothefollowingnetworks:
10.0.0.0/24networksthatoriginatelocallyonR2,andtheapplieddefaultlocal
preferenceof100isnotdisplayed.
10.0.1.0/24networksarereceivedfromR1andISP1:
ThefirstpathforthesenetworkswasreceivedfromR1(nexthop192.168.12.1)
withadefaultlocalpreferencevalueof100.Localpreferenceofinternalrouteis
displayedintheoutput.
ThesecondpathforthesenetworkswasreceivedfromISP1(nexthop
172.16.12.11)withalocalpreferencevalueof10,setbytheroutemap.The
appliedlocalpreferenceisnotleftondefaultandisdisplayedintheoutput.
10.0.2.0/24networksarereceivedfromISP2.Theapplieddefaultlocalpreferenceof
100isnotdisplayed.
For10.0.1.0/24networks,multiplepathsexistandthedecisionmechanismonR2selects
theroutewithahigherlocalpreferenceattribute(100),sinceweightvalueislefton
default,0.ConsequentlythepathviaR1willbechosentoreach10.0.1.0/24networks.

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
Local preference is similar to the weight attribute. You can use both to influence
BGP path selection, but the weight is local to the specific router on which it is
configured.
You can use local preference to ensure AS-wide route selection policy because
it can be seen on neighboring routers without the need to reset it.
You should avoid mixing weight and local preference because weight has
priority when you are selecting the best path.
Configure local preference:
Using the bgp default local-preference preference command.
Using route map statements.
Summary

Overview
BGPprovidesmanytoolsforadministratorstoinfluencerouteselection.Youhave
alreadylearnedhowtoinfluenceBGProuteselectionforoutgoingtrafficbysetting
weightorlocalpreference.
Problemscanarisewhenadministrativepoliciesmandateaspecificreturnpathtobe
usedfortrafficreturningtotheAS.ASpathprependingpotentiallyallowsthe
customertoinfluencetherouteselectionofitsserviceproviders,sothepathfor
returningtraffic.Inthislesson,youwilllearnaboutASpathprependingandthe
CiscoIOScommandsthatarerequiredtoproperlyconfigureandmonitorASpath
configurations.Youwillalsolearnfilteringrequirementsforinfluencingroute
selectionusingASpathprepending.
Uponcompletingthislesson,youwillbeableto:
ExplaintheneedtoinfluenceBGPreturnpathselectioninaserviceprovider
environment
DescribethefunctionofASpathprependingandhowyoucanuseittofacilitate
properreturnpathselection
IdentifydesignconsiderationswhenyouareimplementingASpathprepending
toinfluencereturnpathselection
DescribehowtoconfigureASpathprependingonthecustomersideandAS
pathfilteringontheserviceproviderside
DescribeshowtheBGPHideLocal-AutonomousSystemfeaturesimplifiesthe
taskofchangingtheASnumberinaBGPnetwork
UsingASPathPrepending

ItisfairlyeasyforanAStoselecttheappropriatepathforoutgoingtraffic.Itismuch
morecomplicatedtoinfluenceotherautonomoussystemstoselecttheappropriate
pathfortrafficthatisreturningtoaspecificAS.
Requirement: The return traffic to the customer must arrive over the highest-
speed access link.
Ifyouconfigurethepreferredpathonlyforoutgoingtrafficandnotforincoming
(return)traffic,youwilllikelygetanasymmetricaltrafficflow.Itcanaswellresultin
suboptimalperformanceofthereturntraffic.Inthefigure,outgoingtrafficisdirected
tothehigh-speedline(2Mbps)asaresultofconfiguringlocalpreferenceorweight.
However,thereturntrafficfromAS200wouldtakethedefaultpathoverthelow-
speedline(64kbps).Thelow-speedlinewouldbealimitingfactorintheoverall
performancethatthenetworkcouldachieve.
Inthisexample,AS1requestsAS200tosendpacketstowardnetwork10.0.0.0/24
viaAS100.Thereasonforthisrequestistoimprovethenetworkperformanceand
minimizedelay.Assuming,ofcourse,thattheconnectivitybetweenAS100andAS
200isbetterthanthedirect64-kbpslinkbetweenAS200andAS1.
DefaultReturnPath
Result: The return traffic flows over the path with the shortest AS path length.
IfyoudonotconfigureanyBGPpathselectiontoolsontheroutetoinfluencethe
trafficflow,AS200willusetheshortestASpath.Thisactionwillresultinunwanted
behaviorbecausethereturntraffictoAS1willbesentoverthelow-speedWANlink.
AS1announcesnetwork10.0.0.0/24overEBGPsessionstobothAS100andAS
200.WhenAS1sendsEBGPupdates,itchangestheASpathattributeaccordingto
BGPspecifications.BothAS100andAS200receiveaBGPupdatefornetwork
10.0.0.0/24withtheASpathsetto1.
AS100selectstheroutefornetwork10.0.0.0/24thatitreceivedfromAS1asits
bestroute.AS100usesthatrouteandforwardsittoAS200.AccordingtoBGP
specifications,AS100alsochangestheASpathattribute.AS200receivestheroute
tonetwork10.0.0.0/24fromAS100withanASpathsetto1001.
AS200hasnowreceivedtwoalternativeroutestonetwork10.0.0.0/24(thedirect
ReturnPathSelectioninaMultihomedAS

routefromAS1andtheroutethroughAS100).Rememberthatyoudidnoconfigure
anythinginAS200toinfluencetheflowoftraffic.So,therouterwillusetheBGP
routeselectionruleofshortestASpathtoselectthebestreturnpathtonetwork
10.0.0.0/24.
ProperReturnPathSelection
Q: How do you select the proper return path from AS 200?
A: Use local preference in AS 200.
Q: Will the administrator of AS 200 configure it?
A: Unlikely.
Rememberthattheincomingtrafficflow(fromtheperspectiveofAS1)willbea
resultoftherouteselectionforoutgoingtrafficinAS200.Thetrafficthatisgoingout
fromAS200willendupasincomingtrafficinAS1.
AS200canconfiguresomechangesthatcausetherouteselectionprocessfor
outgoingtraffictoprefertoreachnetwork10.0.0.0/24viaAS100.Thesechanges
wouldresultinbehaviormatchingthedesiredadministrativepolicyforAS1,which
specifiesthatincomingtraffictotheASshouldbereceivedoverthehigh-speedlink.
OnewaytoaccomplishthedesiredadministrativepolicyinAS1istoreconfigurethe
routerinAS200,whichisreceivingEBGPupdatesdirectlyfromAS1.Youcan
configuretherouterinAS200toassignalocalpreferencevaluelessthanthe
defaultvalue(100)toallroutesthatarereceivedfromAS1.TherouterinAS200is
alsoconfiguredspecificallynottosetlocalpreferenceonEBGProutesthatare
receivedfromAS100.Thisconfigurationresultsinassignmentofthedefaultvalue
of100toallroutesreceivedfromAS100.Thisdifferenceinlocalpreferencevalues
causesAS200routerstoselectthepathviaAS100asthebestonetoreach
10.0.0.0/24networks.
However,alltheconfigurationworktocompletethisprocessmustbeperformedin
AS200.ThenetworkadministratorsofAS200wouldberequiredtomodifythe
routerconfigurationsinAS200tosatisfytheadministrativepolicyrequirementsof
AS1.Allchangesmustbedocumentedandmaintainedaccordingtotherulesand
proceduresthathavebeenadoptedbyAS200.
IfAS200isamajorISP,thenetworkadministratorsmostlikelyaretoobusydoing
otherthingstotailorrouterconfigurationsthatarebasedonthedemandofasingle
leaf(nontransit)ASthatlacksbandwidthonaredundantconnection.
BGPRouteSelectionRules
BGP route selection uses the following criteria:
Prefer largest weight.
Prefer largest local preference.
Prefer routes that the router originated.
Prefer shorter AS paths.
Use other route selection rules.
Manipulating the outgoing AS path length could result in proper return path
selection.
RecallthatBGProuteselectionusesthefollowingcriteria:
Preferthelargestweight.
Preferthelargestlocalpreference.
Preferroutesthattherouteroriginated.

PrefershorterASpaths.
Then,preferallotherrouteselectioncriteria.
Itisunlikelythatyou,astheoperatorofanAS,requestchangesinrouter
configurationsinanotherAS.Thislimitationmakesitvirtuallyimpossibletoinfluence
anotherAStoselectthedesiredpathbasedontheweightandlocalpreference
attributes.BothoptionswouldrequireconfigurationchangesintheneighboringAS.
Butifboththeweightandthelocalpreferenceparametersareleftattheirdefault
settings,theywillnotindicateadifference.Thisconfigurationcausestheroute
selectionprocesstocontinuedownthelistofselectioncriteria.Thethirdcriterionfor
selectionwillnotinfluencerouteselectioninthisscenario,becausenoneofthe
routesoriginateattherouterthatisperformingtherouteselection.Thefourth
criterionwillapply,however,becausetheASpathshavedifferentlengths.
IfyoudonotmanuallymanipulatetheASpathbysomeadministrativemeans,the
routerselectsthepathgoingoverthefewestnumberofASs,regardlessofthe
availablebandwidth.However,iftheASthatisattemptingtoinfluencetheincoming
trafficflowissendingoutEBGPupdateswithamanipulatedASpathattributeover
thatundesiredpath,thereceiverofthisupdateislesslikelytoselectitasthebest
becausetheASpathnowappearstobelonger.
ThebenefitofmanipulatingASpathstoinfluencetherouteselectionisthatthe
configurationthatisneededisdoneintheASthatisrequestingadesiredreturn
path.

YoucanmanipulateASpathsbyprependingASnumberstoexistingASpaths.
Normally,youperformASpathprependingonoutgoingEBGPupdatesoverthe
nondesiredreturnpath.TheASpathsentoutoverthenondesiredlinkbecomes
longerthantheASpathsentoutoverthepreferredpath.So,thenondesiredlinkis
nowlesslikelytobeusedasthereturnpath.
AS path prepending is known as manual manipulation of AS path length.
The AS path should be extended with multiple copies of the AS number of the
sender.
AS path prepending is used to:
Ensure proper return path selection.
Distribute the return traffic load for multihomed customers.
ThelengthoftheASpathisextendedbecauseextracopiesoftheASnumberofthe
senderareprependedto(addedtothebeginningof)theASpathattribute.Toavoid
clasheswithBGPlooppreventionmechanisms,youshouldprependnootherAS
numbertotheASpathattribute,exceptthatofthesendingAS.
IfyouprependanotherASnumberintheASpath,theroutersintheASthathas
beenprependedwillrejecttheupdatebecauseofBGPlooppreventionmechanisms.
Youcanconfigureprependingonarouterforallroutingupdatesthatyousendtoa
neighbororonlyonasubsetofthem.
ASPathPrependingExample
AdministrativepolicyinAS1prefersthatthelow-speedlinkisusedforbackup
purposesonly.Aslongasthehigh-speedlinkbetweenAS1andAS100is
available,alltrafficshouldflowtowardAS1usingthehigh-speedlink.
Result: The return traffic flows over the desired return path.
Toaccomplishthisgoal,youcanconfiguretherouterinAS1,thatsendsEBGP
updatestoAS200,toprependtwocopiesofASnumber"1"toASpath.
AS200receivestwoalternativeroutestoreachnetwork10.0.0.0/24:
TheupdatethatithasreceiveddirectlyfromAS1andhasamanipulatedAS
pathwithalengthofthree.
TheupdatethatithasreceivedviaAS100andwasnotmanuallymanipulated,
andthereforecontainsanASpathlengthoftwo.
WhenAS200startstheselectionprocessforbestroutetoreachnetwork
10.0.0.0/24,itcheckstheASpathlengthaftertheweightandlocalpreference
parameters.Inthiscase,neitherweightnorlocalpreferencehasbeenconfigured,
thelengthoftheASpathwillbethedecidingfactorintherouteselectionprocess.
Consequently,AS200preferstheshortestASpathandthusforwardspackets
towardnetwork10.0.0.0/24viaAS100.Thedesiredadministrativepolicyhasbeen
met,andAS1willreceiveincomingtrafficoverthehigh-speedlink.
IftheforwardingpathfromAS200viaAS100toAS1andnetwork10.0.0.0/24is
laterbroken,theBGPupdatetoreachnetwork10.0.0.0/24isrevoked.Incaseof
suchanetworkfailure,AS200willhaveonlyoneremainingpathtoreachnetwork
10.0.0.0/24.Therouteselectionprocessnowhasonlyonechoice,theroutedirectly
toAS1overthelow-speedWANlink.Thelow-speedlinkwillthereforeserveas
backuptothehigh-speedWANlink.
ASPathPrepending

Prepend the AS path with the AS number of the sender, not the AS number of
the receiver.
WhenyouaremanuallymanipulatingASpaths,theonlyvalidASnumberthatyou
canprependistheASnumberofthesender.PrependinganyotherASnumberwill
causeproblems.
Intheexample,AS1isprependingASnumber200.TheegressrouterperformsAS
pathprependingwhentherouteisonitswaytobetransmittedtoAS200.Afterthe
manualmanipulation,BGPautomaticallychangestheASpathaccordingtotheBGP
specifications.ThelocalASnumbershouldalwaysbeaddedfirstwhenupdatesare
sentoveranEBGPsession.Therefore,whenAS200receivestheBGPupdate,the
ASpathcontainsthevalue1200.TheASnumber200wassetbythemanual
manipulation,andtheASnumber1wasprependedautomaticallybyBGPbecause
theupdatewassentoveranEBGPsession.
WhentheedgerouterinAS200receivestheBGPupdate,itcheckstheASpathto
verifythattheBGPupdateswerenotpropagatedaccidentallybyaroutingloop.
BecausetheedgerouterfindsitsownASnumberintheASpath,itassumesthatthe
BGPupdatehasalreadybeeninAS200.AccordingtotheBGPspecification,the
updatewillbesilentlyignored.
NowassumethatAS1had,forthemanualmanipulation,usedadifferentAS
number,notitsownandnotASnumber200.WouldAS200nowhaveacceptedthe
update?Theanswerisyes.However,inthisscenario,aproblemwouldhave
appearedatalaterstagewhentheroutefinallyreachedtheactualASbelongingto
themanuallyprependedASnumber.ThisASwouldhaverejectedtheroutebecause
itwouldhavefounditsownASnumbersomewhereintheASpath.

HowmanycopiesoftheASnumberofthesendershouldyouprependtotheAS
path?Theanswerdependsonthegoalsoftheadministrativepolicy.Inthegeneral
case,itisnoteasytodeterminetheexactnumberofrequiredASnumbersto
prepend.ThesendingASdoesnotknowwhatalternativepathsareavailableto
otherautonomoussystems.
There is no exact mechanism to calculate the required prepended AS path length.
If a primary and backup scenario is desired:
Use a long prepended AS path over the backup link to ensure that the
primary AS path will always be shorter.
A long backup AS path consumes memory on every Internet router.
Experiment with various AS path lengths until the backup link is idle.
Add a few more AS numbers for improved security (unexpected changes in
the Internet).
If traffic load distribution is desired:
Start with a short prepended AS path, monitor link use, and extend the
prepended path length as needed.
Continuously monitor the link use and change the prepended AS path length
if required.
ThefollowingaretwotypicalcasesinwhichyoucanuseASpathprependingfor
returnpathselection:
Establishingaprimary/backuplink:Asanannouncedbackup(prepended)
routepropagatesthroughtheInternet,alltheroutersalongthewaythatreceive
therouteneedtostoreittogetherwithitsASpathattribute.Ifthisinformationis
long,itwillconsumeextramemoryintheserouters.However,routersforward
onlyroutesthatareselectedasbest.SoanASthatreceivesmultiple
alternativestoadestinationwillselecttheroutewiththeshortestASpathand
forwardonlythatroute.
Whenboththeprimaryandthesecondarylinkareup,theneighboringASwill
receivetworoutestothesamedestinationthatdifferonlyintheASpathlength.
TheroutewiththeshorterASpathwillbethenadvertisedthroughtheInternet.
Inthecasewheretheprimarylinkfails,theroutewiththelongerASpathisthe
onlyremainingroute.Asaresult,theprimaryrouteiswithdrawn,andthe
prependedrouteisadvertisedthroughtheInternet.Inthiscase,extramemory
willbeconsumedineachInternetrouterbecauseofthestorageofthe
prepended(longer)ASpath.
ThelongertheannouncedASpathtotheEBGPneighborconnectedviathe
backuplink,thelesslikelyitisthatincomingtrafficwillbereceivedfromthat
neighbor.You,asanetworkadministrator,canmakeacleverguessabouthow
manycopiesoftheASnumbertoprepend.Aftertheprependingisimplemented,
youhavetoexaminetheresult.Iftheexpectedresultisnotachieved,youcan
changetheconfigurationandprependafewmorecopiesoftheASnumber.
AfterASpathprependinghasgeneratedthedesiredresults,youmaytakethe
precautionofprependingafewmorecopiesoftheASnumbertotheASpath.
Thisactionprotectsthecustomerfrompacketsbeingroutedoverthebackup
linkatapossiblelaterstagewhenthetopologybetweenremoteautonomous
systemshasunexpectedlychanged,yieldingalongerASpathtoreachthe
primarylink.
Distributingtheloadofreturntraffic:Inamultihomedscenario,thereisno
waytoexactlypredeterminethevolumeoftrafficthatwillbereceivedovera
particularlink.Thetrafficloadondifferentlinkswillchangedependingonwhere
thesendersarelocated(whichautonomoussystemstheybelongto).The
networktopologyandthewaythatdifferentremoteautonomoussystemsare
interconnectedmayalsochangewithtime,changingtheloaddistribution.Only
constantmonitoringandfine-tuningwillensurethatthedesiredresultsare
achieved.
Inafirstattempt,youcanconfigurearouterthatisconnectedtoanoverused
linktoprependonlyafewextracopiesofthelocalASnumber.Afterthenetwork
hasbeengiventimetoconverge,youmustcheckthechangeinload
distribution.Monitoringoftheloadmustbedoneforaperiodlongenoughtobe
statisticallysignificant(severaldaysormore).Ifenoughvolumeoftraffichasnot
movedfromtheoverusedlinktotheunderusedlink,youmustprependmore
ASPathPrependingDesignConsiderations
copiesofthelocalASnumber.Thentheprocessofresendinglocalroutesand
monitoringtheresultsstartsalloveragain.

Overview
Inthisdiscovery,youwillfirstconfigureASpathprependingonthecustomerside.
Thenyouwillforamomentimaginethatyouareonaserviceprovidersideandyou
willconfigureASpathfilteringontheserviceproviderside.
Discovery14:ConfigureASPathPrepending

Topology

Ifyoushutdownaninterfaceonarealrouterorswitch,the
connecteddevicewillseeitas"down/down."Dueto
virtualizationspecifics,IOLbehaviorisslightlydifferent.If
youshutdownaninterfaceonarouterorswitch,the
connecteddevicewillseeitas"up/up."InIOL,thestatus
ofaninterfacecanonlybe"up/up"or"administratively
down/down."
DeviceInformation
Device Interface IPaddress Description
R1 Ethernet0/0 172.16.11.1/24 ConnectiontoISP1
R1 Ethernet0/2 192.168.12.1/24 ConnectiontoR2
R2 Ethernet0/0 172.16.22.2/24 ConnectiontoISP2
R2 Ethernet0/2 192.168.12.2/24 ConnectiontoR1
R2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
10.0.0.1/28
10.0.0.17/28
10.0.0.33/28
10.0.0.49/28
10.0.0.65/28
Loopbackssimulate
LANnetworks
ISP1 Ethernet0/0 172.16.11.11/24 ConnectiontoR1
ISP1 Ethernet0/2 172.16.100.11/24 ConnectiontoISP2
ISP1 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
10.0.1.1/28
10.0.1.17/28
10.0.1.33/28
10.0.1.49/28
10.0.1.65/28
10.0.1.81/28
Loopbackssimulate
LANnetworks
ISP2 Ethernet0/0 172.16.22.22/24 ConnectiontoR2
ISP2 Ethernet0/2 172.16.100.22/24 ConnectiontoISP1
ISP2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
Loopback7
Loopback8
Loopback9
10.0.2.1/28
10.0.2.17/28
10.0.2.33/28
10.0.2.49/28
10.0.2.65/28
10.0.2.81/28
10.0.2.97/28
10.0.2.113/28
10.0.2.129/28
Loopbackssimulate
LANnetworks
IPaddressesandadvertisednetworksinBGParepreconfiguredasshownbelow:
BGPisalsopreconfigured:
EBGP
R1toISP1
R2toISP2
ISP1toISP2
JobAids

IBGP
R1toR2

Step1
OntheISP1router,verifyinitialbestpathtoreachthe10.0.0.0/24networksinAS1.
ISP1# show ip bgp
BGP table version is 20, local router ID is 10.0.1.81
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
* 10.0.0.0/28 172.16.100.22 0 200 1 i
*> 172.16.11.1 0 1 i
* 10.0.0.16/28 172.16.100.22 0 200 1 i
*> 172.16.11.1 0 1 i
* 10.0.0.32/28 172.16.100.22 0 200 1 i
*> 172.16.11.1 0 1 i
* 10.0.0.48/28 172.16.100.22 0 200 1 i
*> 172.16.11.1 0 1 i
* 10.0.0.64/28 172.16.100.22 0 200 1 i
*> 172.16.11.1 0 1 i
*> 10.0.1.0/28 0.0.0.0 0 32768 i
*> 10.0.1.16/28 0.0.0.0 0 32768 i
*> 10.0.1.32/28 0.0.0.0 0 32768 i
*> 10.0.1.48/28 0.0.0.0 0 32768 i
*> 10.0.1.64/28 0.0.0.0 0 32768 i
*> 10.0.1.80/28 0.0.0.0 0 32768 i
Network Next Hop Metric LocPrf Weight Path
* 10.0.2.0/28 172.16.11.1 0 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.16/28 172.16.11.1 0 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.32/28 172.16.11.1 0 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.48/28 172.16.11.1 0 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.64/28 172.16.11.1 0 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.80/28 172.16.11.1 0 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.96/28 172.16.11.1 0 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.112/28 172.16.11.1 0 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.128/28 172.16.11.1 0 1 200 i
*> 172.16.100.22 0 0 200 i
ISP1receivedtworoutesto10.0.0.0/24networks:
ThefirstrouteisreceivedfromISP2(nexthop172.16.100.22),withtheASpath200
1.
ThesecondrouteisreceivedfromR1(nexthop172.16.11.1),withtheASpath1.
Sinceweightandlocalpreferenceattributesareleftondefaultvalues,ISP1choosesthe
pathwithshortestASpathlengthasthebest(theroutethatisreceivedfromR1).
IfyouwanttoinfluencethepathfromAS100to10.0.0.0/24networksinAS1,youhave
toconfigureASpathprepending.
ConfiguringAS-PathPrepending
YoucanconfiguremanualmanipulationoftheASpathattribute(prepending)usinga
routemapwiththesetas-pathprependcommand.Theroutemapisusedto
prependthespecifiedASnumberstooutgoingEBGProuteupdatesthatare
matchedwiththematchcondition,asspecifiedintheroutemap.ASpath
prependingiscompletedfirst,andthentherouteissubjecttothenormalASpath
modificationprocedureswhenitissentoveranEBGPsession.
router(config)#
route-map name permit sequence
ConfigureASPathPrepending
DiscoverySteps

match condition
set as-path prepend as-number [ as-number ... ]
Prepends the specified AS number sequence to the routes matched by the route
map entry.
AS numbers prepended to the AS path from the BGP table; the AS number of
the sender always prepended to the end.
router(config-router)# neighbor address route-map name out
Applies the route map to outgoing updates sent to the specified BGP neighbor.
Youcanalsousetheroute-maptoselectonlyasubsetofroutesthatshouldhave
theirASpathmanuallymanipulated.Usethesetas-pathprependcommandwith
theappropriateroute-mappermitstatement.
ChanginganoutgoingroutemapaffectsonlytheBGP
updatesthataresentafterthechange.Topropagatethe
newandlongerASpathwithallannouncedroutes,the
routesmustallberesentbytherouter.Todothis,usethe
privilegedEXECcommandclearipbgpwiththesoftout
qualifier.
Step2
YouwillnowconfiguretheASpathprependingontheR1router.Firstconfigure
route-mapontheR1router.
Nametheroutemap"PREPEND."SelectallBGProutesandprependfive
copiesof"1"totheexistingASpathattributethatisattachedtoeachroute.This
willmakesurethatalltrafficfromAS100to10.0.0.0/24networksinAS1willflow
throughISP2routerinAS200.
R1(config)# route-map PREPEND permit 10
R1(config-route-map)# set as-path prepend 1 1 1 1 1
Thelackofmatchconditionsintheroute-mapindicatesthatallroutesare
matched.TheASpath-string"11111"willbeprependedtotheexistingAS
path.
Step3
OntheR1router,applythe"PREPEND"routemaptoalloutgoingupdatestothe
ISP1EBGPneighbor.
R1(config)# router bgp 1
R1(config-router)# neighbor 172.16.11.11 route-map PREPEND out
AS100willnowreceivearoutetonetwork10.0.0.0/24fromR1withanASpath
containingtheASnumber1sixtimes(111111).
Step4
OntheR1router,reestablishBGPsessionstoenforcetheapplicationofASpath
prepending.
ToreestablishBGPsession,usetheclearipbgpcommand.
R1# clear ip bgp *
Step5
OntheISP1router,verifynewbestpathtoreachthe10.0.0.0/24networksinAS1.
ISP1# show ip bgp
BGP table version is 24, local router ID is 10.0.1.81
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete

RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 172.16.100.22 0 200 1 i
* 172.16.11.1 0 1 1 1 1 1 1 i
*> 10.0.0.16/28 172.16.100.22 0 200 1 i
* 172.16.11.1 0 1 1 1 1 1 1 i
*> 10.0.0.32/28 172.16.100.22 0 200 1 i
* 172.16.11.1 0 1 1 1 1 1 1 i
*> 10.0.0.48/28 172.16.100.22 0 200 1 i
* 172.16.11.1 0 1 1 1 1 1 1 i
*> 10.0.0.64/28 172.16.100.22 0 200 1 i
* 172.16.11.1 0 1 1 1 1 1 1 i
*> 10.0.1.0/28 0.0.0.0 0 32768 i
*> 10.0.1.16/28 0.0.0.0 0 32768 i
*> 10.0.1.32/28 0.0.0.0 0 32768 i
*> 10.0.1.48/28 0.0.0.0 0 32768 i
*> 10.0.1.64/28 0.0.0.0 0 32768 i
*> 10.0.1.80/28 0.0.0.0 0 32768 i
Network Next Hop Metric LocPrf Weight Path
* 10.0.2.0/28 172.16.11.1 0 1 1 1 1 1 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.16/28 172.16.11.1 0 1 1 1 1 1 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.32/28 172.16.11.1 0 1 1 1 1 1 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.48/28 172.16.11.1 0 1 1 1 1 1 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.64/28 172.16.11.1 0 1 1 1 1 1 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.80/28 172.16.11.1 0 1 1 1 1 1 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.96/28 172.16.11.1 0 1 1 1 1 1 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.112/28 172.16.11.1 0 1 1 1 1 1 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.128/28 172.16.11.1 0 1 1 1 1 1 1 200 i
*> 172.16.100.22 0 0 200 i
ISP1receivedtworoutesto10.0.0.0/24networks:
ThefirstrouteisreceivedfromISP2(nexthop172.16.100.22),withtheASpath2001.
ThesecondrouteisreceivedfromR1(nexthop172.16.11.1),withtheASpath1111
11.
Youcanseenow,thatthereceivednetworkshavethe"11111"ASpaththatis
prependedtotheoriginalASpath.Consequently,thereceivedroutefromR1hasalonger
ASpaththantheroutereceivedfromISP2.Consequently,asweightandlocalpreference
valueareleftondefault,ISP1choosesthepaththatisreceivedfromISP2asthebest
(shortestASpathlength).
Note:WhenyouaremonitoringASpathprepending,therouterdoingtheprependingisnot
theproperpointtoobservetheresultsoftheASpathprependoperation:
Outputofthedebugipbgpupdatescommanddoesnotdisplaytheprependedpaths,
becausetheroutemapdoingtheprependingisappliedafterward.
Outputofshowroute-mapcommanddisplaystheconfigurationdetailsofaroute
map.However,thereisnoindicationofhowmanyrouteshavebeenmatchedbya
route-mapstatement.
AbetterplaceforobservingASpathprependingisontherouterreceivingtheBGPupdate
thatcontainstheprependedASpath.YoucanalsousethepatternofASnumber
sequencesinthereceivedASpathattributeofreceivedroutestofindtheroutesthathave
aprependedASpath.
ASPathFiltering
ServiceprovidersexpecttheircustomerstosendroutesthatoriginateonlyintheAS
ofthecustomer.However,becausecustomersmightnotdoso,proactivethinking
andcareoftherestoftheInternetcausetheserviceprovidertoimplementASpath
filtersonincomingupdates.
Thenetworkadministratoroftheserviceprovidercanconfigureindividualfiltersfor
eachneighbor.HoweverasingleASpathaccesslistpermittingonlyASpathswitha
lengthofexactlyoneASnumberisabettersolution.Thisaccesslistcanthenbe
uniformlyappliedtoallincomingroutesfromallcustomers.

WhenyouconfigureASpathprepending,youhaveto
agreewiththeserviceprovidersotheirASpathfilterswill
bemodifiedtosupportASpathprepending.
Step6
ImaginenowforamomentthatyouareaserviceproviderandconfigureASpath
filterstopreventASpathprepending.NOTE:Acustomernormallydoesnot
configuretheISPside.TheconfigurationonthesideofISPisdonebytheir
networkadministrator.
OntheISP1router,configureASpathfilter,afilterlist,thatwillnotsupportAS
pathprependingbutwillallowonlyASpathswithalengthofoneASnumber.
ApplythisfilerlisttoallincomingupdatesfromR1EBGPneighbor.
ISP1(config)# ip as-path access-list 10 permit ^[0-9]+$
ISP1(config)# router bgp 100
ISP1(config-router)# neighbor 172.16.11.1 filter-list 10 in
AfilterlistallowsonlyASpathswithalengthofoneASnumber—thisnumber
canbeanynumber.Consequently,allrouteswithaprependedASpathare
filteredout.
Step7
OntheISP1router,reestablishBGPsessionstoenforcetheapplicationoffilter
list.
ToreestablishBGPsession,usetheclearipbgpcommand.
ISP1# clear ip bgp *
Step8
OntheISP1router,verifyreceivedroutestoreachthe10.0.0.0/24networksinAS1.
ISP1# show ip bgp
BGP table version is 20, local router ID is 10.0.1.81
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 172.16.100.22 0 200 1 i
*> 10.0.0.16/28 172.16.100.22 0 200 1 i
*> 10.0.0.32/28 172.16.100.22 0 200 1 i
*> 10.0.0.48/28 172.16.100.22 0 200 1 i
*> 10.0.0.64/28 172.16.100.22 0 200 1 i
*> 10.0.1.0/28 0.0.0.0 0 32768 i
*> 10.0.1.16/28 0.0.0.0 0 32768 i
*> 10.0.1.32/28 0.0.0.0 0 32768 i
*> 10.0.1.48/28 0.0.0.0 0 32768 i
*> 10.0.1.64/28 0.0.0.0 0 32768 i
*> 10.0.1.80/28 0.0.0.0 0 32768 i
*> 10.0.2.0/28 172.16.100.22 0 0 200 i
*> 10.0.2.16/28 172.16.100.22 0 0 200 i
*> 10.0.2.32/28 172.16.100.22 0 0 200 i
*> 10.0.2.48/28 172.16.100.22 0 0 200 i
Network Next Hop Metric LocPrf Weight Path
*> 10.0.2.64/28 172.16.100.22 0 0 200 i
*> 10.0.2.80/28 172.16.100.22 0 0 200 i
*> 10.0.2.96/28 172.16.100.22 0 0 200 i
*> 10.0.2.112/28 172.16.100.22 0 0 200 i
*> 10.0.2.128/28 172.16.100.22 0 0 200 i
ISP1nowreceivedonlyonerouteto10.0.0.0/24networks,theonefromISP2(nexthop
172.16.100.22).SinceR1isannouncingthenetworks10.0.0.0/24withaprependedAS
path,thefiler-listforincomingroutestoAS100filteredthoseroutesout.Thisfiltering
resultsinasituationwherethenetworks10.0.0.0/24arenotreachableoverthelink
betweenR1andISP1(AS1andAS100).Therefore,thebackupfunctionisnotavailable.

Networks10.0.0.0/24are,however,stillreachableviathepathgoingthroughAS200.
Step9
Ifyouwanttohaveabackuppathavailableto10.0.0.0/24networks,youhaveto
meetanagreementwithacustomerandallowASpathprependinginyourfilters.
OntheISP1router,modifyincomingfiltertoallowoneormultiplecopiesofthe
sameASnumber.Configureafilterforallroutesthatarereceiveddirectlyfrom
AS1.
ISP1(config)# ip as-path access-list 10 permit ^1(_1)*$
ISP1(config)# router bgp 100
ISP1(config-router)# neighbor 172.16.11.1 filter-list 10 in
YouconfiguredanindividualfilterforallroutesthatarereceiveddirectlyfromAS
1.TheASpathisrequiredtostartwith1,thenmultiplecopiesof1mayfollowit.
Ifyouhadmorecustomers,theywouldallrequireanindividualfilterlist,because
thecustomerisexplicitlyindicatedintheregularexpression.Analternative
wouldbetoimplementtheASpathfilterthatallowsanyASpathcontainingone
ormultiplecopiesofthesameASnumber.Forexampleusing^([0-9]+)(_\1)*$
filter,thatmatchesanyASpathbeginningwithanyASnumberandcontinues
withnoormultiplerepetitionsofthesameASnumber.
Step10
OntheISP1router,reestablishBGPsessionstoenforcetheapplicationofnew
filterlist.
Tore-establishBGPsession,usetheclearipbgpcommand.
ISP1# clear ip bgp *
Step11
OntheISP1router,verifynewreceivedroutestoreachthe10.0.0.0/24networksinAS1.
ISP1# show ip bgp
BGP table version is 20, local router ID is 10.0.1.81
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 172.16.100.22 0 200 1 i
* 172.16.11.1 0 1 1 1 1 1 1 i
*> 10.0.0.16/28 172.16.100.22 0 200 1 i
* 172.16.11.1 0 1 1 1 1 1 1 i
*> 10.0.0.32/28 172.16.100.22 0 200 1 i
* 172.16.11.1 0 1 1 1 1 1 1 i
*> 10.0.0.48/28 172.16.100.22 0 200 1 i
* 172.16.11.1 0 1 1 1 1 1 1 i
*> 10.0.0.64/28 172.16.100.22 0 200 1 i
* 172.16.11.1 0 1 1 1 1 1 1 i
*> 10.0.1.0/28 0.0.0.0 0 32768 i
*> 10.0.1.16/28 0.0.0.0 0 32768 i
*> 10.0.1.32/28 0.0.0.0 0 32768 i
*> 10.0.1.48/28 0.0.0.0 0 32768 i
*> 10.0.1.64/28 0.0.0.0 0 32768 i
*> 10.0.1.80/28 0.0.0.0 0 32768 i
Network Next Hop Metric LocPrf Weight Path
*> 10.0.2.0/28 172.16.100.22 0 0 200 i
*> 10.0.2.16/28 172.16.100.22 0 0 200 i
*> 10.0.2.32/28 172.16.100.22 0 0 200 i
*> 10.0.2.48/28 172.16.100.22 0 0 200 i
*> 10.0.2.64/28 172.16.100.22 0 0 200 i
*> 10.0.2.80/28 172.16.100.22 0 0 200 i
*> 10.0.2.96/28 172.16.100.22 0 0 200 i
*> 10.0.2.112/28 172.16.100.22 0 0 200 i
*> 10.0.2.128/28 172.16.100.22 0 0 200 i
ISP1againreceivedtworoutesto10.0.0.0/24networks:

ThefirstrouteisreceivedfromISP2(nexthop172.16.100.22),withtheASpath200
1.
ThesecondrouteisreceivedfromR1(nexthop172.16.11.1),withtheASpath111
111.
Asweightandlocalpreferencevalueareleftondefault,ISP1choosesthepaththatis
receivedfromISP2asthebestbasedontheshortestASpathlength.

ChangingtheASnumbermaybenecessarywhentwoseparateBGPnetworksare
combinedunderasingleAS,asituationthattypicallyoccurswhenoneISP
purchasesanotherISP.HoweverchangingoftheASnumberinaBGPnetworkcan
bedifficult.Duringthetransition,IBGPpeerswillrejectexternalroutesfrompeers
withalocalASnumberintheASnumberpathtopreventroutingloops.TheBGP
HideLocal-AutonomousSystemfeatureallowsyoutotransparentlychangetheAS
numberfortheentireBGP.Italsoensuresthatroutescanbepropagatedthroughout
theAS,whiletheASnumbertransitionisincomplete.
Allows you to transparently change the AS number for the entire BGP network.
Ensures that routes can be propagated throughout the AS.
neighbor local-as command in address family or router configuration mode
allows customization of the AS number for EBGP peer groupings.
ToallowcustomizationoftheASnumberforEBGPpeergroupings,usethe
neighborlocal-ascommandinaddressfamilyorrouterconfigurationmode.To
disablethisfunction,usethenoformofthiscommand.
neighbor {ip-address | peer-group-name} local-as as-number [no-prepend]
SyntaxDescription
Parameter Description
ip-address IPaddressofthelocalBGP-speakingneighbor
peer-group-name NameofaBGPpeergroup.
as-number ValidASnumberfrom1to65535.
DonotspecifytheASnumbertowhichtheneighborbelongs.
no-prepend ConfigurestheroutertonotprependthelocalASnumbertoanyroutes
receivedfromanexternalpeer.
Theneighborlocal-ascommandisusedinitiallytoconfigureBGPpeerstosupport
twolocalASnumberstomaintainpeeringbetweentwoseparateBGPnetworks.
ThisconfigurationallowstheISPtoimmediatelymakethetransitionwithoutany
impactonexistingcustomerconfigurations.Whenthecustomerconfigurationshave
beenupdated,thenextstepistocompletethetransitionfromtheoldASnumberto
thenewASnumber.
Whentheneighborlocal-ascommandisconfiguredonaBGPpeer,thelocalAS
numberisautomaticallyprependedtoallroutesthatarelearnedfromEBGPpeers
bydefault.Thisbehavior,however,makeschangingtheASnumberforaservice
providerorlargeBGPnetworkdifficult.RouteswiththeprependedASnumberwill
berejectedbyIBGPpeersthatareconfiguredwiththesameASnumber.
Forexample,ifyouconfigureanIBGPpeerwiththeneighbor10.0.0.2local-as20
statement,allroutesthatarelearnedfromthe10.0.0.2externalpeerwill
automaticallyhavetheASnumber20prepended.Internalroutersthatare
configuredwiththeASnumber20willdetecttheseroutesasroutingloopsandreject
them.ThisbehaviorrequiresyoutochangetheASnumberforallIBGPpeersatthe
sametime.
BGPHideLocal-AutonomousSystem

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
If you do not configure the preferred path for incoming (return) traffic, the likely
result is an asymmetrical traffic flow as well as suboptimal performance of the
return traffic.
AS path prepending is performed on outgoing EBGP updates over the
nondesired return path. Configure it using a route-map with the set as-path
prepend command.
Monitor AS path prepending on the router that is receiving the prepended routes
because the prepended path will not be visible on the prepending router.
If you are a service provider with customers that use AS path prepending, you
must create new AS path filters to accommodate AS path lengths greater than
one AS number.
The BGP Hide Local-Autonomous System feature allows you to transparently
change the AS number for the entire BGP network. It also ensures that routes
can be propagated throughout the AS, while the AS number transition is
incomplete.
Summary

Overview
Whenconnectionstomultipleprovidersarerequired,itisimportantthatBGPselects
theoptimumroutefortraffictouse.Itisequallyimportantthattheselectedreturn
pathistheoptimumreturnpathintotheAS.Theoptimum,orbest,routemaynotbe
whatthenetworkdesignerintendedbasedondesigncriteria,administrativepolicies,
orcorporatemandate.Fortunately,BGPprovidesatoolforadministratorsto
influencerouteselection,theMEDattribute.
Inthislesson,youwilllearnhowtoinfluenceBGProuteselectionbysettingtheBGP
MEDattributeofoutgoingBGProutes.TwomethodsthatareusedtosettheMED
attribute,thedefaultMEDandroutemaps,arediscussed.Inaddition,youwillalso
learnthebasicMEDattributeconfiguration,advancedcommandstomanipulate
MEDproperties,aswellashowtomonitorandtroubleshoottheBGPtabletoverify
correctMEDconfigurationandtoproperlyinfluencepathselection.
Uponcompletingthislesson,youwillbeableto:
DescribehowtheMEDcanbeusedtofacilitateproperreturnpathselection
ExplainhowthevalueoftheMEDattributechangesinsideaBGPASand
betweendifferentBGPautonomoussystems
IdentifytheCiscoIOScommandthatisrequiredtoconfigureBGPMED
DescribehowtoconfigureandmonitorBGPMED
IdentifytheCiscoIOScommandsthatarerequiredtotroubleshoottheBGP
MEDconfigurations
IdentifytheCiscoIOScommandsthatarerequiredtoconfigureadvancedMED
featuresonCiscorouters
UnderstandingBGPMulti-Exit
Discriminators

Whenmultipleconnectionsbetweenprovidersarerequired,BGPattributessuchas
weightandlocalpreferencesolveonlyhalftheproblem:howtochoosetherightpath
outoftheAS.
Q: How can you make sure that the return traffic takes the right path?
Morecomplexhalfoftheproblemishowtoinfluenceneighboringautonomous
systemstochoosethecorrectreturnpathbackintotheAS.
Multi-ExitDiscriminator
TheMEDattributeisahinttoexternalneighborsaboutthepreferredpathintoanAS
whenmultipleentrypointsexist.
You can use the MED to influence path selection in neighbor autonomous systems.
An AS can specify its preferred entry point using the MED in outgoing EBGP
updates.
The MED is not propagated outside of a receiving AS.
The default value of the MED attribute is 0.
The MED is called the "metric" in Cisco IOS software.
The MED is a "weak" metric.
A lower MED value means more preferred.
YoucanapplytheMEDattributeonoutgoingupdatestoaneighboringASto
influencetherouteselectionprocessinthatAS.TheMEDattributeisusefulonly
whentherearemultipleentrypointsintoanAS.
TheMEDattribute,whichissenttoanexternalneighbor,willbeseenonlywithin
thatAS.AnASthatreceivesaroutethatcontainstheMEDattributewillnot
advertisethatMEDbeyonditslocalAS.
ThedefaultvalueoftheMEDattributeis0.AlowervalueoftheMEDattribute
indicatesamorepreferredpath.
TheMEDattributeisconsidereda"weak"metric.Incontrastwithweightandlocal
preference,arouterwillpreferapathwiththesmallestMEDvalue.Butonlyifthe
weight,localpreference,ASpath,andorigincodeattributesareequal.Usingthe
MEDmaynotyieldtheexpectedresultiftheneighboringASmodifiesanyofthe
strongerBGProuteselectionmechanisms.
ThetermthatisusedinCiscoIOSsoftwareforMEDis
"metric."Theterm"metric"alsoappliestotheset
commandthatisusedinroutemapsaswellasallshow
anddebugcommands.
SelectingtheProperReturnPath

ThefigureshowshowthevalueoftheMEDattributeisassigned,dependingupon
theroutinginformationsource.
YoumustconfigurearoutemaponaroutertomanuallyassignavaluetotheMED
attribute.ForthenetworksthatarealsopresentintheBGPtable,therouterassigns
adefaultvaluefromthemetricintheroutingtableandcopiesitintotheMED
attribute.TheMEDattributeisautomaticallyremovedonexternalsessionsifthe
attributedidnotoriginateinthelocalAS.
MEDPropagationinaBGPNetwork

TheMEDisnotamandatoryattribute,andtherenoMEDattributeisattachedtoa
routebydefault.Theonlyexceptionisiftherouterisoriginatingnetworksthathave
anexactmatchintheroutingtable(throughthenetworkcommandorthrough
redistribution).Inthatcase,therouterusesthemetricintheroutingtableasthe
MEDattributevalue.
You have two options, either you change the default MED or you change the MED
with route map.
Option 1:
router(config-router)# default-metric number
The MED is copied from the IGP cost in the router that sources the route
(through the network command or through route redistribution).
You can change the MED value for redistributed routes with the default-metric
command.
Option 2:
router(config)#
route-map name permit sequence
match condition
set metric value
Changes MED for routes that are matched by the route map entry
router(config-router)# neighbor address route-map name in | out
Applies a route map to incoming updates from a specified neighbor or to
outgoing updates to a specified neighbor.
Per-neighbor MED configured by using a route map with no match condition.
Usingthedefault-metriccommandinBGPconfigurationmodecausesall
redistributednetworkstohavethespecifiedMEDvalue.
Tosetthedefaultmetric(MED)valueforBGProutes,usethedefault-metric
numbercommandinrouterconfigurationmode.numberisadefaultmetricvaluethat
isappropriateforthespecifiedroutingprotocol.Toreturntothedefaultstate,usethe
noformofthiscommand.
YoucanalsousearoutemaptosettheMEDonincomingoroutgoingupdates.Use
thesetmetriccommandwithinroutemapconfigurationmodetosettheMED
attribute.
ChangingMED

Overview
Throughthisdiscovery,youwilllearnhowtoconfigureMEDusingroutemapsto
influencethereturnpathfromAS100to10.0.0.0/24networkinAS1.
Discovery15:ConfigureMED

Topology

Ifyoushutdownaninterfaceonarealrouterorswitch,the
connecteddevicewillseeitas"down/down."Dueto
virtualizationspecifics,IOLbehaviorisslightlydifferent.If
youshutdownaninterfaceonarouterorswitch,the
connecteddevicewillseeitas"up/up."InIOL,thestatus
ofaninterfacecanonlybe"up/up"or"administratively
down/down."
DeviceInformation
Device Interface IPaddress Description
R1 Ethernet0/0 172.16.11.1/24 ConnectiontoISP1
R1 Ethernet0/2 192.168.12.1/24 ConnectiontoR2
R2 Ethernet0/0 172.16.22.2/24 ConnectiontoISP2
R2 Ethernet0/1 172.16.12.2/24 ConnectiontoISP1
R2 Ethernet0/2 192.168.12.2/24 ConnectiontoR1
R2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
10.0.0.1/28
10.0.0.17/28
10.0.0.33/28
10.0.0.49/28
10.0.0.65/28
Loopbackssimulate
LANnetworks
ISP1 Ethernet0/0 172.16.11.11/24 ConnectiontoR1
ISP1 Ethernet0/1 172.16.12.11/24 ConnectiontoR2
ISP1 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
10.0.1.1/28
10.0.1.17/28
10.0.1.33/28
10.0.1.49/28
10.0.1.65/28
10.0.1.81/28
Loopbackssimulate
LANnetworks
ISP2 Ethernet0/0 172.16.22.22/24 ConnectiontoR2
ISP2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
Loopback7
Loopback8
Loopback9
10.0.2.1/28
10.0.2.17/28
10.0.2.33/28
10.0.2.49/28
10.0.2.65/28
10.0.2.81/28
10.0.2.97/28
10.0.2.113/28
10.0.2.129/28
Loopbackssimulate
LANnetworks
IPaddressesandadvertisednetworksinBGParepreconfiguredasshownbelow:
BGPisalsopreconfigured:
EBGP
R1toISP1
R2toISP1
R2toISP2
JobAids

IBGP
R1toR2

Step1
OntheISP1router,re-establishtheBGPsession.
Tore-establishBGPsession,usetheclearipbgpcommand.
ISP1# clear ip bgp *
Note:BecauseofthelimitationofIOL,youhavetoreestablishtheBGPsession
onISP1togetthesameresultsasdescribedinthenextstepofthelab.
Step2
OntheISP1router,verifytheinitialbestpathtoreach10.0.0.0/24network.
ISP1# show ip bgp
BGP table version is 20, local router ID is 10.0.1.81
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 172.16.11.1 0 1 i
* 172.16.12.2 0 0 1 i
*> 10.0.0.16/28 172.16.11.1 0 1 i
* 172.16.12.2 0 0 1 i
*> 10.0.0.32/28 172.16.11.1 0 1 i
* 172.16.12.2 0 0 1 i
*> 10.0.0.48/28 172.16.11.1 0 1 i
* 172.16.12.2 0 0 1 i
*> 10.0.0.64/28 172.16.11.1 0 1 i
* 172.16.12.2 0 0 1 i
*> 10.0.1.0/28 0.0.0.0 0 32768 i
*> 10.0.1.16/28 0.0.0.0 0 32768 i
*> 10.0.1.32/28 0.0.0.0 0 32768 i
*> 10.0.1.48/28 0.0.0.0 0 32768 i
*> 10.0.1.64/28 0.0.0.0 0 32768 i
*> 10.0.1.80/28 0.0.0.0 0 32768 i
Network Next Hop Metric LocPrf Weight Path
*> 10.0.2.0/28 172.16.11.1 0 1 200 i
* 172.16.12.2 0 1 200 i
*> 10.0.2.16/28 172.16.11.1 0 1 200 i
* 172.16.12.2 0 1 200 i
*> 10.0.2.32/28 172.16.11.1 0 1 200 i
* 172.16.12.2 0 1 200 i
*> 10.0.2.48/28 172.16.11.1 0 1 200 i
* 172.16.12.2 0 1 200 i
*> 10.0.2.64/28 172.16.11.1 0 1 200 i
* 172.16.12.2 0 1 200 i
*> 10.0.2.80/28 172.16.11.1 0 1 200 i
* 172.16.12.2 0 1 200 i
*> 10.0.2.96/28 172.16.11.1 0 1 200 i
* 172.16.12.2 0 1 200 i
*> 10.0.2.112/28 172.16.11.1 0 1 200 i
* 172.16.12.2 0 1 200 i
*> 10.0.2.128/28 172.16.11.1 0 1 200 i
* 172.16.12.2 0 1 200 i
ISP1hasreceived10.0.0.0/24networksfromtwodifferentneighbors:
ThefirstpathwasreceivedfromR1(nexthop172.16.11.1).
ThesecondpathwasreceivedfromR2(nexthop172.16.12.2).
ISP1choosesthefirstpath(theonereceivedfromR1)asthebestpath.
Step3
OntheISP1router,checkwhywastheroutethatwasreceivedfromR1chosenasthebestpathto
10.0.0.0/24networks.
ISP1# show ip bgp
ConfigureMED
DiscoverySteps

BGP table version is 20, local router ID is 10.0.1.81
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 172.16.11.1 0 1 i
* 172.16.12.2 0 0 1 i
*> 10.0.0.16/28 172.16.11.1 0 1 i
* 172.16.12.2 0 0 1 i
*> 10.0.0.32/28 172.16.11.1 0 1 i
* 172.16.12.2 0 0 1 i
*> 10.0.0.48/28 172.16.11.1 0 1 i
* 172.16.12.2 0 0 1 i
*> 10.0.0.64/28 172.16.11.1 0 1 i
* 172.16.12.2 0 0 1 i
<... output omitted ...>
Ifyoufollowtherouteselectioncriteria,youcandeterminethat:
Theweightisnotconfiguredforanyneighbor.
Thelocalpreferenceisnotconfiguredforanyneighbor.
Routesdonotoriginatelocally.
BothrouteshavethesamelengthofASpath.
BothroutesareEGProutes.
SincebothpathsareEBGPpaths,theoldest(moststable)pathispreferred.Nextthingthatyou
havetoverifyisthedurationofsessionbetweenISP1andR1,andISP1andR2.
ISP1# show bgp summary
BGP router identifier 10.0.1.81, local AS number 100
BGP table version is 20, main routing table version 20
19 network entries using 2812 bytes of memory
32 path entries using 2048 bytes of memory
4/3 BGP path/bestpath attribute entries using 544 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 5452 total bytes of memory
BGP activity 95/76 prefixes, 160/128 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
172.16.11.1 4 1 25 25 20 0 0 00:17:40 13
172.16.12.2 4 1 28 25 20 0 0 00:17:40 13
Thedurationofbothsessionisthesame.Soobviously,therouter-IDbreaksthetie—thepathfrom
routerwiththelowerBGProuter-IDispreferred.
ISP1# show ip bgp neighbor 172.16.11.1
BGP neighbor is 172.16.11.1, remote AS 1, external link
BGP version 4, remote router ID 10.0.7.1
BGP state = Established, up for 00:21:49
Last read 00:00:42, last write 00:00:54, hold time is 180, keepalive
<... output omitted ...>
ISP1# show ip bgp neighbor 172.16.12.2
BGP neighbor is 172.16.12.2, remote AS 1, external link
BGP version 4, remote router ID 10.0.7.17
BGP state = Established, up for 00:23:40
Last read 00:00:44, last write 00:00:50, hold time is 180, keepalive
<... output omitted ...>
Therouter-IDofR1islowerthantherouter-IDofR2,sotheroutereceivedfromR1ispreferred.
Step4
Onthecustomerside,influencethereturningtrafficflowto10.0.0.0/24networks,
sotheISP1routerwilltakethepathviaR2routerinsteadthedefaultone.
ReconfigureMEDusingroutemaps.
Configureroutemap"MED"onbothrouters,R1andR2,topreferthelowerlink

toAS1.
R1(config)# route-map MED
R1(config-route-map)# set metric 500
R2(config)# route-map MED
R2(config-route-map)# set metric 100
LowerMEDvalueispreferredwhenchoosingthebestpath.IfyouwantR2tobe
chosenforthereturningtraffic,ithastobeconfiguredwithlowerMED.
Step5
OntheR1andR2routers,applyroutemapsforISP1neighborintheoutbound
direction.
R1(config)# router bgp 1
R1(config-router)# neighbor 172.16.11.11 route-map MED out
R2(config)# router bgp 1
R2(config-router)# neighbor 172.16.12.11 route-map MED out
Donotforgetthatthesolutionofinfluencingthereturningtrafficflow,ofcourse,
reliesontheneighboringASnotchangingtheweight,localpreference,ASpath,
ororigincodeattributesinupdatesthatitreceivesfromAS1.
Step6
OntheISP1router,reestablishBGPsessionstoenforcetheapplicationofMED.
ToreestablishBGPsession,usetheclearipbgpcommand.
ISP1# clear ip bgp *
Step7
OntheISP1router,verifynewbestpathtoreach10.0.0.0/24network.
ISP1# show ip bgp
BGP table version is 46, local router ID is 10.0.1.81
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
* 10.0.0.0/28 172.16.11.1 500 0 1 i
*> 172.16.12.2 100 0 1 i
* 10.0.0.16/28 172.16.11.1 500 0 1 i
*> 172.16.12.2 100 0 1 i
* 10.0.0.32/28 172.16.11.1 500 0 1 i
*> 172.16.12.2 100 0 1 i
* 10.0.0.48/28 172.16.11.1 500 0 1 i
*> 172.16.12.2 100 0 1 i
* 10.0.0.64/28 172.16.11.1 500 0 1 i
*> 172.16.12.2 100 0 1 i
*> 10.0.1.0/28 0.0.0.0 0 32768 i
*> 10.0.1.16/28 0.0.0.0 0 32768 i
*> 10.0.1.32/28 0.0.0.0 0 32768 i
*> 10.0.1.48/28 0.0.0.0 0 32768 i
*> 10.0.1.64/28 0.0.0.0 0 32768 i
*> 10.0.1.80/28 0.0.0.0 0 32768 i
Network Next Hop Metric LocPrf Weight Path
* 10.0.2.0/28 172.16.11.1 500 0 1 200 i
*> 172.16.12.2 100 0 1 200 i
* 10.0.2.16/28 172.16.11.1 500 0 1 200 i
*> 172.16.12.2 100 0 1 200 i
* 10.0.2.32/28 172.16.11.1 500 0 1 200 i
*> 172.16.12.2 100 0 1 200 i
* 10.0.2.48/28 172.16.11.1 500 0 1 200 i

*> 172.16.12.2 100 0 1 200 i
* 10.0.2.64/28 172.16.11.1 500 0 1 200 i
*> 172.16.12.2 100 0 1 200 i
* 10.0.2.80/28 172.16.11.1 500 0 1 200 i
*> 172.16.12.2 100 0 1 200 i
* 10.0.2.96/28 172.16.11.1 500 0 1 200 i
*> 172.16.12.2 100 0 1 200 i
* 10.0.2.112/28 172.16.11.1 500 0 1 200 i
*> 172.16.12.2 100 0 1 200 i
* 10.0.2.128/28 172.16.11.1 500 0 1 200 i
*> 172.16.12.2 100 0 1 200 i
ISP1hasreceived10.0.0.0/24networksfromtwodifferentneighbors:
ThefirstpathwasreceivedfromR1(nexthop172.16.11.1),withtheMEDsetto500.
ThesecondpathwasreceivedfromR2(nexthop172.16.12.2),withtheMEDsetto
100.
ISP1choosesthepaththatwasreceivedfromR2asthebestpath,sinceithaslower
MEDconfigured.
NotethatMEDisdisplayedintheshowipbgpprintoutasthemetricfield.AllBGP-
relatedshowanddebugcommandsdisplaythevalueoftheMEDattribute.IftheMEDis
notconfigured,themetricfieldisleftblank.Whenlookingatdetailedinformationfora
specificnetwork(viatheshowipbgpprefixcommand),youwillseetheMEDonlyifthe
attributeexists.

Ifdebuggingisnecessarytotroubleshootaproblem,theMED,amongother
attributes,isdisplayedintheoutputs.
MED sent to a neighbor (after the outgoing route map) is displayed in debugging
outputs.
R1# debug ip bgp updates
BGP updates debugging is on for address family: IPv4 Unicast
R1# clear ip bgp 172.16.11.11 soft out
R1#
*Mar 9 01:58:12.497: BGP(0): (base) 172.16.11.11 send UPDATE (format) 10.
0.0.0/28, next 172.16.11.1, metric 500, path Local
*Mar 9 01:58:12.497: BGP(0): (base) 172.16.11.11 send UPDATE (format) 10.
0.0.16/28, next 172.16.11.1, metric 500, path Local
*Mar 9 01:58:12.497: BGP(0): (base) 172.16.11.11 send UPDATE (format) 10.
0.0.32/28, next 172.16.11.1, metric 500, path Local
TheMEDattributewassetwithanoutgoingroutemap.ThisMEDattribute("metric
500")isthensenttotheneighborintheupdate.
MED received from a neighbor is displayed in debugging outputs.
ISP1# debug ip bgp updates
BGP updates debugging is on for address family: IPv4 Unicast
ISP1# clear ip bgp 172.16.11.1
ISP1#
*Mar 9 02:31:35.697: BGP(0): 172.16.11.1 rcvd UPDATE w/ attr: nexthop 172
.16.11.1, origin i, metric 500, merged path 1, AS_PATH
*Mar 9 02:31:35.697: BGP(0): 172.16.11.1 rcvd 10.0.0.0/28
*Mar 9 02:31:35.697: BGP(0): 172.16.11.1 rcvd 10.0.0.16/28
*Mar 9 02:31:35.698: BGP(0): 172.16.11.1 rcvd 10.0.0.32/28
Thisdebuggingexampleshowsthereceivedupdatesfor10.0.0.0/28,10.0.0.0/16,
and10.0.0.32/28networks.TheMEDattribute("metric500")forallthreenetworksis
showninthereceivedupdate.TheMEDwassetontheneighboringrouter.
Original MED received from a neighbor (before the incoming route map
processing) is displayed in show ip bgp neighbor address received-routes.
ISP1# show ip bgp neighbor 172.16.11.1 received-routes
BGP table version is 59, local router ID is 10.0.1.81
Status codes: s suppressed, d damped, h history, * valid, > best, i - inte
rnal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-
Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
* 10.0.0.0/28 172.16.11.1 500 0 1 i
* 10.0.0.16/28 172.16.11.1 500 0 1 i
* 10.0.0.32/28 172.16.11.1 500 0 1 i
Total number of prefixes 3
YoucanchangetheMEDofthereceivedrouteonthereceivingrouter(onISP1for
thisexample).ToseetheoriginalMED,youneedtoenablesoftreconfigurationon
therouter.Theshowipbgpneighboraddressreceived-routescommanddisplays
theoriginalupdatesbeforeanyfiltersorroutemapshavefilteredorchangedthem.
Intheexample,theISP1routerreceivedthreenetworksfrom172.16.11.1neighbor
—10.0.0.0/28,10.0.0.16/28,and10.0.0.32/28.Allthreenetworkshavethemetricset
to500.
Both, original route and modified route, are displayed with a route map when
inbound soft reconfiguration is configured.
ISP1# show ip bgp 10.0.0.0/28
BGP routing table entry for 10.0.0.0/28, version 56
Paths: (3 available, best #1, table default)
Advertised to update-groups:
5
Refresh Epoch 2
1
TroubleshootingtheMED

172.16.11.1 from 172.16.11.1 (10.0.7.1)
Origin IGP, metric 50, localpref 100, valid, external, best
Refresh Epoch 2
1, (received-only)
172.16.11.1 from 172.16.11.1 (10.0.7.1)
Origin IGP, metric 500, localpref 100, valid, external
Only the modified route is displayed in the BGP table.
ISP1# show ip bgp
BGP table version is 163, local router ID is 10.0.1.81
Status codes: s suppressed, d damped, h history, * valid, > best, i - inte
rnal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-
Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 172.16.11.1 50 0 1 i
*> 10.0.0.16/28 172.16.11.1 50 0 1 i
*> 10.0.0.32/28 172.16.11.1 50 0 1 i
IfyouconfiguredtheroutemaptoinfluencetheMEDofreceivedroute,youcansee
theoriginalupdatestotheMEDattributebyusingtheshowipbgpprefixcommand.
Softreconfigurationhastobeenabled.Theoriginalversionsaremarkedwiththe
received-onlykeywordandfollowtheversionthatisintheglobalBGPtable.
Inthisexample,thereceivedupdatehadMEDattributesetto500,butavalueof50
waslaterappliedthroughaninboundroutemap.

1.
2.
3.
4.
SeveralrulesexistonwhenandhowyoushouldusetheMEDattribute.
By default, the MED is considered only during selection of routes from the same AS.
router(config-router)# bgp always-compare-med
With always-compare-med, the MED is also considered for routes coming from
a different AS.
If the MED is not attached to a BGP route, it is interpreted as value 0, and thus as
the best metric.
router(config-router)# bgp bestpath med missing-med-worst
With this command, a missing MED is interpreted as infinity (worst).
YoushouldusetheMEDintherouteselectionprocessonlyifboth(all)paths
comefromthesameAS.Usethebgpalways-compare-medcommandtoforce
theroutertocomparetheMEDevenifthepathscomefromdifferent
autonomoussystems.YouneedtoenablethisoptionintheentireAS;
otherwise,routingloopscanoccur.
AccordingtoaBGPstandarddescribingMED,youshouldregardamissing
MEDattributeasaninfinitevalue.CiscoIOSsoftware,ontheotherhand,
regardsamissingMEDattributeashavingavalueof0.Usethebgpbestpath
medmissing-med-worstcommandwhencombiningequipmentfromdifferent
vendors.Anevenbettersolutionistomakesurethateveryupdatecarriesa
MEDattribute.
By default, the MED is considered only during selection of routes from the same AS,
which does not include intra-confederation autonomous systems.
router(config-router)# bgp bestpath med confed
Use this command to allow routers to compare paths that are learned from
confederation peers.
router(config-router)# bgp deterministic-med
This command changes the BGP route selection procedure to a deterministic
but slower one.
YoumustusethebgpbestpathmedconfedcommandwhenyouusetheMED
withinaconfederationtoinfluencetherouteselectionprocess.Arouterwill
compareMEDvaluesfortheroutesthatoriginateintheconfederation.
WhenyouenableadeterministicMEDcomparison,youallowarouterto
compareMEDvaluesbeforeitconsidersBGProutetype(externalorinternal)
andIGPmetrictothenext-hopaddress.TherouterwillcompareMEDvalues
immediatelyaftertheASpathlength.
Ciscorecommendsenablingthebgpdeterministic-med
commandinallnewnetworkrollouts.Forexisting
networks,youmustdeploythecommandeitheronall
routersatthesametimeorincrementally,withcareto
avoidpossibleIBGProutingloops.
AdvancedMEDConfigurationExample
Thefollowingexampledemonstrateshowthebgpdeterministic-medandbgp
always-compare-medcommandscaninfluenceMED-basedpathselection.
ConsiderthefollowingBGProutesfornetwork172.16.0.0/16intheorderthatthey
arereceived:
entry 1: AS(PATH) 65500, med 150, external, rid 192.168.13.1
entry 2: AS(PATH) 65100, med 200, external, rid 1.1.1.1
entry 3: AS(PATH) 65500, med 100, internal, rid 192.168.8.4
BGPcomparesmultipleroutestoasingledestinationin
AdvancedMEDConfiguration

pairs,startingwiththenewestentryandmovingtoward
theoldestentry(startingatthetopofthelistandmoving
down).Forexample,entry1andentry2arecompared.
Thebetterofthesetwoisthencomparedtoentry3,and
soon.
Inthecasewherebothcommandsaredisabled,BGPcomparesentry1andentry2.
Entry2ischosenasthebetteronebecauseithasalowerrouter-ID.TheMEDisnot
checkedbecausethepathsarefromadifferentneighborAS.Next,entry2is
comparedtoentry3.BGPchoosesentry2asthebestpathbecauseitisexternal.
Inthecasewherethebgpdeterministic-medcommandhasbeendisabledandthe
bgpalways-compare-medcommandhasbeenenabled,BGPcomparesentry1to
entry2.Theseentriesarefromdifferentautonomoussystems,butbecausethebgp
always-compare-medcommandisenabled,theMEDisusedinthecomparison.
Entry1isthebetterofthesetwoentriesbecauseithasalowerMEDvalue.Next,
BGPcomparesentry1toentry3.TheMEDischeckedagainbecausetheentries
arenowfromthesameAS.BGPchoosesentry3asthebestpath.
Inthecasewherethebgpdeterministic-medcommandhasbeenenabledandthe
bgpalways-compare-medcommandhasbeendisabled,BGPgroupsroutesfrom
thesameAS.Thenitcomparesthebestentriesofeachgroup.TheBGPtablelooks
likethefollowing:
entry 1: AS(PATH) 65100, med 200, external, rid 1.1.1.1
entry 2: AS(PATH) 65500, med 100, internal, rid 192.168.8.4
entry 3: AS(PATH) 65500, med 150, external, rid 192.168.13.1
ThereisagroupforAS65100andagroupforAS65500.BGPcomparesthebest
entriesforeachgroup.Entry1isthebestofitsgroupbecauseitistheonlyroute
fromAS100.BGPcomparesentry1tothebestofgroupAS65500,entry2
(becauseithasthelowestMED).Becausethetwoentriesarenotfromthesame
neighborAS,theMEDisnotconsideredinthecomparison.TheEBGProutewins
overtheIBGProute,makingentry1thebestroute.
Ifthebgpalways-compare-medcommandwerealsoenabled,BGPwouldhave
takentheMEDintoaccountforthelastcomparisonandhaveselectedentry2asthe
bestpath.

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
The MED is a "weak" parameter in the route selection process—it is used only if
weight, local preference, AS path, and origin code are equal. By default, the
MED is compared only for paths that were received from the same AS.
There is no MED attribute that is attached to a route by default.
You can set the default metric value (MED) for BGP routes, using the
default-metric command in router configuration mode.
You can use a route map to set an arbitrary MED value to sent or received
routes.
You can configure advanced MED parameters to modify the default MED
behaviors.
Use the bgp always-compare-med to force the router to compare the MED
even if paths came from different autonomous systems.
Use the bgp bestpath med confed command when you use the MED
within a confederation to influence the route selection process
Summary

Overview
WhenconnectionstomultipleISPsarerequired,itisimportantthatBGPselectthe
optimumroutefortraffictouse.Itisequallyimportantthattheselectedreturnpathis
theoptimumreturnpathintotheAS.BGPprovidestoolsforadministratorsto
influencerouteselectionandBGPcommunityattributeisonesuchtool.
YouwilllearnhowtoinfluenceBGProuteselectionbysettingtheBGPcommunity
attributeonoutgoingBGProutestofacilitateproperreturnpathselection.Youwill
alsolearnabouttheconfigurationdetailsofBGPcommunities.
Uponcompletingthislesson,youwillbeableto:
Describetheissuesofreturnpathselectionformultihomedcustomersandwhy
youcannotusetheBGPattributesofweight,localpreference,andMEDtosolve
theseissues
DescribethebasicqualitiesofBGPcommunities
DescribehowBGPcommunitiesfacilitateproperreturnpathselection
ListthestepsthatarerequiredtosuccessfullydeploycommunitiesinaBGP-
basednetwork
IdentifytheCiscoIOScommandsthatarerequiredtodeployBGPcommunities
DescribethefunctionoftheBGPNamedCommunityListsfeature
DescribethefunctionoftheBGPCostCommunityfeature
DescribethefunctionoftheBGPLinkBandwidthfeature
DescribehowBGPsupportssequencedentriesinextendedcommunity-lists
AddressingBGPCommunities

Inthisexample,thecustomerandthebackupserviceproviderwouldliketoavoid
ASpathprependingandrelyonotherBGPtoolstoproperlyroutethereturntraffic
overthehighest-speedWANlink.
Q: How do you select the proper return path from AS 100 without using AS path
prepending in AS 1?
A: Use local preference in AS 100.
Q: Will the administrator of AS 100 configure it?
A: Unlikely.
UsingtheMEDtoinfluencethepreferredreturnpathisnotpossiblebecausethe
MEDcannotbepropagatedacrossseveralautonomoussystems.AS100would,
therefore,receivenetworksfromAS1directlywiththeMEDattributebutwould
receivenetworkswithoutaMEDattributefromAS200.Inanycase,BGProute
selectionwouldbebasedonthelengthoftheASpath.EveniftheMEDwaspresent
andusedtheshortestpath,thepathwouldstillbethroughtheslow64-kbpslink.
TheonlyoptionforresolvingthisissueistouselocalpreferenceinAS100.The
problemwiththissolutionisthatserviceprovidersnormallydonotrushtoimplement
everywishthattheircustomersmighthave.
Inthislesson,youwilllearnasolutiontothiscasestudythatusesthetransitive
optionalattributecalled"BGPcommunity"inconjunctionwithlocalpreference.
SelectingtheProperReturnPath

BGPcommunitiesareattributesthatareusedtogroupandfilterroutes.
Communitiesaredesignedtogiveyoutheabilitytoapplypoliciestolargenumbers
ofroutesbyusingmatchandsetclausesintheconfigurationofroutemaps.
Communitylistsareusedinthisprocesstoidentifyandfilterroutesbytheircommon
attributes.
BGP communities are a mean of tagging routes to ensure consistent filtering or
route selection policy.
Any BGP router can tag routes in incoming and outgoing routing updates or
when doing redistribution.
Any BGP router can filter routes in incoming or outgoing updates or select
preferred routes based on communities.
By default, communities are stripped in outgoing BGP updates.
AcommunityisanattributethatisusedtotagBGProutes.Aroutercanapplyitto
anyBGProutebyusingaroutemap.Otherrouterscanthenperformanyaction
basedonthetag(community)thatisattachedtotheroute.
TherecanbemorethanoneBGPcommunitythatisattachedtoasingleroute,but
therouters,bydefault,removecommunitiesinoutgoingBGPupdates.
The community attribute is a transitive optional attribute. Its value is a 32-bit
number (range 0 to 4,294,967,200).
Each network in a BGP routing table can be tagged with a set of communities.
The standards define several filtering-oriented communities:
no-advertise: Do not advertise routes to any peer.
no-export: Do not advertise routes to real EBGP peers.
local-as: Do not advertise routes to any EBGP peers.
internet: Advertise this route to the Internet community.
Routers that do not support communities pass them along unchanged.
Thecommunityattributeisa32-bittransitiveoptionalBGPattributethatwas
designedtogroupdestinationsandapplyroutingdecision(accept,prefer,
redistribute,andsoon)accordingtocommunities.Thisway,thecommunityattribute
allowseasyapplicationofadministrativepolicies.BGPcommunitiesprovidea
mechanismtoreduceBGPconfigurationcomplexityonaroutercontrollingthe
distributionofroutinginformation.
Asetofcommunityvalueshasbeenpredefined.Whenarouterreceivesaroutethat
hasbeenmarkedwithapredefinedcommunity,therouterwillperformaspecific,
predefinedactionthatisbasedonthatcommunitysettingasfollows:
no-advertise:Ifarouterreceivesanupdatecarryingthiscommunity,itwillnot
forwardittoanyneighbor.
no-export:Ifarouterreceivesanupdatecarryingthiscommunity,itwillnot
propagateittoanyexternalneighborsexcepttointra-confederationexternal
neighbors.Theno-exportattributeisthemostwidelyusedpredefined
communityattribute.
local-as:Thiscommunityhasasimilarmeaningtono-export,butitkeepsa
routewithinthelocalAS(ormember-ASwithintheconfederation).Therouteis
notsenttoexternalBGPneighborsortointra-confederationexternalneighbors.
internet:AdvertisethisroutetotheInternetcommunity.Allroutersbelongtoit.
Routersthatdonotsupportthecommunityattributewillpasstheattributetoother
neighborsbecauseitisatransitiveattribute.
Defining your own communities
A 32-bit community value is split into two parts:
High-order 16 bits contain the AS number of the AS that defines the
community meaning.
Low-order 16 bits have local significance.
Values of all zeroes and all ones in high-order 16 bits are reserved.
Cisco IOS parser allows you to specify a 32-bit community value as:
[AS-number]:[low-order-16-bits]
Communityattributesareusuallyusedbetweenneighboringautonomoussystems.
BGPCommunitiesOverview
FortheBGPcommunitiestobegloballyunique,apublicASnumbershouldbepart
ofthecommunityvalue.Forthisreason,youcanenterthecommunityvalueastwo
16-bitnumbersthatareseparatedbyacolon.Thefirstnumber(high-order16bits)
shouldbetheASnumberoftheASthatdefinesthecommunityvalue.Thesecond
numbershouldbeavaluethatisassignedacertainmeaning(thatis,translationofa
communityvalueintolocalpreferenceintheneighboringAS).
YoucanalsousecommunitiesinternallywithinanAS(toensureAS-widerouting
policy),inwhichcasethefirst16bitsshouldcontaintheASnumberofthelocalAS.

1.
2.
3.
4.
5.
6.
Define administrative policy goals.
Design filters and route selection policy to achieve administrative goals.
Define communities that signal individual goals.
Configure route tagging on entry points or let BGP neighbors tag the routes.
Configure community distribution.
Configure route filters and route selection parameters based on communities.
DesigningaBGPsolutionaroundBGPcommunitiesusuallyrequiresthefollowing
steps:
Defineadministrativepolicygoalsthatyouneedtoimplement.
Definethefiltersandrouteselectionpolicythatwillachievetherequiredgoals.
Assignacommunityvaluetoeachgoal.
Applycommunitiesonincomingupdatesfromneighboringautonomoussystems
ortelltheneighborstosetthecommunitiesthemselves.
EnablecommunitydistributionthroughoutyourAStoallowcommunity
propagation.
Matchcommunitieswithroutemapsandroutefilters,changeBGPattributes,or
influencetherouteselectionprocessbasedonthecommunitiesthatare
attachedtotheBGProutes.
UsingCommunitiesExample
Thisexampleshowshowyoucandefinegoalsandassigncommunitiestothem.
Define administrative policy goal:
Solve asymmetrical customer routing problems.
Design filters and path selection policy to achieve administrative goals:
Set local preference of customer routes to 50 for customers using the
backup ISP.
Define communities that signal individual goals:
Community 100:17 is used to indicate that the local preference of the route
should be lowered to 50.
Thistableliststhegoalsandthecommunityvalues.
Goal CommunityValue
Setlocalpreferenceof50. 100:17
Setlocalpreferenceof150. 100:18
PrependtheASpathoncewhensendingthenetworktoexternal
neighbors.
100:21
PrependtheASpathtwicewhensendingthenetworktoexternal
neighbors.
100:22
PrependtheASpaththreetimeswhensendingthenetworktoexternal
neighbors.
100:23
Allcustomersoftheserviceprovidershouldknowthislistsothattheycanusethe
BGPcommunitieswithouthavingtodiscusstheirusewiththeserviceprovider.
UsingCommunities

SeveralactivitiesarerequiredtosuccessfullydeployBGPcommunitiesinaBGP-
basednetwork.
Configure BGP communities as follows:
Configure route tagging with BGP communities.
Configure BGP community propagation.
Define BGP community access lists (community lists) to match BGP
communities.
Configure route maps that match on community lists and filter routes or set other
BGP attributes.
Apply route maps to incoming or outgoing updates.
ToconfigureBGPcommunitiesoncustomersside,youfirsthavetoconfigurea
routemapinwhichyouwillsetthecommunity.Alsothecommunitypropagationto
BGPneighborhastobeconfigured,otherwisethecommunityvaluesattachedto
outgoingBGPupdateswillbestripedout.
Ontheotherside,serviceproviderhastodefineBGPcommunityliststomatch
routesbasedonattachedBGPcommunities.Routemapshavetobeusedtofilteror
modifyBGProutingupdatesbasedonmatchingoncommunitylistsinincomingor
outgoingupdates.
1.ConfiguringRouteTaggingwithBGPCommunities
Firststepistosetcommunities,whichrequiresaroutemap.
router(config)#
route-map name
match condition
set community value [ value ... ] [additive]
Route tagging with communities is always done with a route map.
Communities that are specified in the set keyword overwrite existing
communities unless you specify the additive option.
router(config-router)# neighbor ip-address route-map map in | out
You have to apply a route map to inbound or outbound BGP updates.
router(config-router)# redistribute protocol route-map map
You can apply a route map to redistributed routes
Inaroute-mapconfigurationmode,youshouldusethesetcommunitycommandto
attachacommunityattribute(orasetofcommunities)toaroute.Youcanattachup
to32communitiestoasingleroutewithoneroutemapsetstatement.Ifyouusethe
keywordadditive,theoriginalcommunitiesarepreservedandtheroutersimply
appendsthenewcommunitiestotheroute.Omittingtheadditivekeywordresultsin
theoverwritingofanyoriginalcommunityattributes.
Youcanapplyaroutemaptoincomingoroutgoingupdates.Youcanalsouseit
withredistributionfromanotherroutingprotocol.
Aroutemapisafilteringmechanismthathasan"implicit
deny"forallnetworksthatarenotmatchedinanyroute
mapstatement.Ifaroutemapisnotintendedtofilter
routes,thenyoushouldaddanotherroutemapstatement
attheendtopermitallremainingnetworkswithout
changingit(nomatchandnosetcommandsareused
withinthatroutemapstatement).
Originally,CiscoIOSsoftwareacceptedanddisplayedBGPcommunityvaluesasa
single32-bitvalueinadigitalformat.NewerCiscoIOSversionssupportthenew
format,whereyoucansetorviewacommunityastwocolon-separated16-bit
numbers.Theglobalcommandipbgp-communitynew-formatisrecommendedon
allrouterswhenevercommunitiescontaintheASnumber.
ConfiguringBGPCommunities

1.
2.
3.
4.
2.ConfiguringCommunityPropagation
Secondstepistoenablingcommunitypropagationperneighborforallinternal
neighbors.Ifcommunitiesaresenttoexternalneighbors,youmustenable
communitypropagationforexternalneighbors.
router(config-router)# neighbor ip-address send-community
By default, communities are stripped in outgoing BGP updates.
You must manually configure community propagation to BGP neighbors.
BGP peer groups are ideal for configuring BGP community propagation toward
many neighbors.
AcommandthatnetworkadministratorscommonlyforgetwhenconfiguringBGP
communitiesistheneighborip-addresssend-communitycommand.This
commandisneededtopropagatecommunityattributestoBGPneighbors.Evenif
youuseanoutgoingroutemaptosetcommunities,bydefault,therouterwillstrip
outanycommunityvaluesthatareattachedtooutgoingBGPupdatesifyouhave
notconfiguredthiscommandforthespecificBGPneighbor.Youcanalsoapplythis
commandtoapeergroup.
3.DefiningBGPCommunityLists
Onaserviceproviderside,communitylistshavetobecreatedtobeusedwithin
routemapstomatchoncommunityvalues.
router(config)# ip community-list 1-99 permit|deny value [ value ... ]
This command defines a simple community list.
You can use the keyword internet to match any community.
router(config)# ip community-list 100-199 permit|deny regexp
This command defines an expanded community list.
Communities that are attached to a route are ordered, converted to string, and
matched with regular expression.
Use ".*" to match any community value.
Youcanuseastandardcommunitylisttofindcommunityattributesinrouting
updates.Astandardcommunitylistisdefinedbyitsassignedlistnumber,whichcan
rangefrom1to99.
ComparisonofCommunityListstoStandardIPAccessLists
Similarities Differences
Therouterevaluatesthelinesinthecommunity-
listsequentially.
Thekeywordinternetshouldbeusedtopermit
anycommunityvalue.
Ifnolinematchescommunitiesthatareattached
toaBGProute,therouteisimplicitlydenied.
Ifmorevaluesarelistedinasingleline,theyall
havetobeinanupdatetoproduceamatch.
Anexpandedcommunitylistisdefinedbyitsassignedlistnumber,whichcan
rangefrom100to199.Regularexpressionsareusedtomatchcommunity
attributes.Whenarouterprocessesalistofcommunitiesthatareattachedtoa
networkupdate,theyareconvertedintoanorderedstringofcharacters.This
exampleshowshowtheprocessisaccomplished:
Theoriginallistofcommunitiesinanupdate:
"10.0.0.0/24,NH=1.1.1.1,origin=I,AS-path=203040,community=10:101,
community=10:201,community=10:105,community=10:205"
Astringofcharacterscontaininganorderedlistofcommunityvalues:
"_10:101_10:105_10:201_10_205_"("_"representsaspace)
Aregularexpression:
"permit_10:.0[1-5]_"("_"representsanunderscorethatmatchesspaces)
Theresult:
Thisregularexpressionpermitstheroutebecauseitpermitsallrouteswith
communitieswherethefirst16bitscarrytheASnumber10andthesecond

5.
16bitscontain0astheseconddigitandanumberbetween1and5asthe
thirddigit;thefirstdigitcanbeanything(asindicatedbythe".").
Useregularexpression".*"topermitanycommunity.
4.MatchingBGPCommunitieswithRouteMaps
Onaserviceproviderside,routemapswherecommunitylistsareusedtomatchon
communityvalueshavetobecreated.Youcanthenuseroutemapstofilterbased
oncommunityvaluesortosetotherparametersorattributes(forexample,local
preference,MED,orASpathprepending).
Theseroutemapsarethenappliedtoincomingoroutgoingupdates.
router(config)#
route-map name permit | deny
match community clist-number [exact]
set attributes
Community lists are used in match conditions in route maps to match on
communities that are attached to BGP routes.
Route selection:
You can use route maps to set weights, local preference, or metric based on
BGP communities that are attached to the BGP route.
Normal route selection rules apply afterward. Routes not accepted by route
map are dropped.
Default filters:
Routes that are tagged with community no-export are sent to IBGP peers
and intra-confederation EBGP peers.
Routes that are tagged with local-as are sent to IBGP peers.
Routes that are tagged with no-advertise are not sent in any outgoing BGP
updates.
Useroutemapstomatchthenetworksthatcarryasubsetofcommunitiesthatthe
communitylistpermits.Otherparametersorattributescanthenbesetbasedon
communityvalues.Aroutemapwithacommunitylistmatchesarouteifatleast
somecommunitiesthatareattachedtotheroutematchthecommunitylist.Ifyou
usethekeywordexact,allcommunitiesthatareattachedtoaBGProutehavetobe
matchedbythecommunitylist.
YoucanusearoutemaptofilterormodifyBGProutingupdates.AnyBGP-related
setcommandscanbeusedtosetBGPparametersandattributes(thatis,weight,
localpreference,andMED).
Asmentionedbefore,therearesomepredefinedcommunityvaluesthatcause
routerstoautomaticallyfilterroutingupdates:
no-advertise:Ifarouterreceivesanupdatecarryingthiscommunity,therouter
willnotforwardittoanyneighbor.
local-as:Thiscommunityhasasimilarmeaningtono-export,butitkeepsa
routewithinthelocalsubautonomoussystem.Therouteisnotpropagatedto
intra-confederationexternalneighborsortoanyotherexternalneighbors.
no-export:Ifarouterreceivesanupdatecarryingthiscommunity,therouterwill
notpropagateittoanyexternalneighborsexcepttointra-confederationexternal
neighbors.
internet:ThisvalueadvertisesthisroutetotheInternetcommunity,towhichall
routersbelong.

Overview
Inthisdiscovery,youwillinfluencethereturningpath.Youwillconfigurelocal
preferencethroughthecommunities.Youwilldotheconfigurationonthecustomer
andontheserviceproviderside.
Discovery16:ConfigureLocalPreferenceUsingthe
Communities

Topology

Ifyoushutdownaninterfaceonarealrouterorswitch,the
connecteddevicewillseeitas"down/down."Dueto
virtualizationspecifics,IOLbehaviorisslightlydifferent.If
youshutdownaninterfaceonarouterorswitch,the
connecteddevicewillseeitas"up/up."InIOL,thestatus
ofaninterfacecanonlybe"up/up"or"administratively
down/down."
DeviceInformation
Device Interface IPaddress Description
R1 Ethernet0/0 172.16.11.1/24 ConnectiontoISP1
R1 Ethernet0/2 192.168.12.1/24 ConnectiontoR2
R2 Ethernet0/0 172.16.22.2/24 ConnectiontoISP2
R2 Ethernet0/2 192.168.12.2/24 ConnectiontoR1
R2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
10.0.0.1/28
10.0.0.17/28
10.0.0.33/28
10.0.0.49/28
10.0.0.65/28
Loopbackssimulate
LANnetworks
ISP1 Ethernet0/0 172.16.11.11/24 ConnectiontoR1
ISP1 Ethernet0/2 172.16.100.11/24 ConnectiontoISP2
ISP1 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
10.0.1.1/28
10.0.1.17/28
10.0.1.33/28
10.0.1.49/28
10.0.1.65/28
10.0.1.81/28
Loopbackssimulate
LANnetworks
ISP2 Ethernet0/0 172.16.22.22/24 ConnectiontoR2
ISP2 Ethernet0/2 172.16.100.22/24 ConnectiontoISP1
ISP2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
Loopback7
Loopback8
Loopback9
10.0.2.1/28
10.0.2.17/28
10.0.2.33/28
10.0.2.49/28
10.0.2.65/28
10.0.2.81/28
10.0.2.97/28
10.0.2.113/28
10.0.2.129/28
Loopbackssimulate
LANnetworks
IPaddressesandadvertisednetworksinBGParepreconfiguredasshownbelow:
BGPisalsopreconfigured:
EBGP
R1toISP1
R2toISP2
ISP1toISP2
JobAids

IBGP
R1toR2

Step1
OntheISP1router,verifyinitialbestpathtoreachthe10.0.0.0/24networksinAS1.
ISP1# show ip bgp
BGP table version is 31, local router ID is 10.0.1.81
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
* 10.0.0.0/28 172.16.100.22 0 200 1 i
*> 172.16.11.1 0 1 i
* 10.0.0.16/28 172.16.100.22 0 200 1 i
*> 172.16.11.1 0 1 i
* 10.0.0.32/28 172.16.100.22 0 200 1 i
*> 172.16.11.1 0 1 i
* 10.0.0.48/28 172.16.100.22 0 200 1 i
*> 172.16.11.1 0 1 i
* 10.0.0.64/28 172.16.100.22 0 200 1 i
*> 172.16.11.1 0 1 i
*> 10.0.1.0/28 0.0.0.0 0 32768 i
*> 10.0.1.16/28 0.0.0.0 0 32768 i
*> 10.0.1.32/28 0.0.0.0 0 32768 i
*> 10.0.1.48/28 0.0.0.0 0 32768 i
Network Next Hop Metric LocPrf Weight Path
*> 10.0.1.64/28 0.0.0.0 0 32768 i
*> 10.0.1.80/28 0.0.0.0 0 32768 i
* 10.0.2.0/28 172.16.11.1 0 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.16/28 172.16.11.1 0 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.32/28 172.16.11.1 0 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.48/28 172.16.11.1 0 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.64/28 172.16.11.1 0 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.80/28 172.16.11.1 0 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.96/28 172.16.11.1 0 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.112/28 172.16.11.1 0 1 200 i
*> 172.16.100.22 0 0 200 i
* 10.0.2.128/28 172.16.11.1 0 1 200 i
*> 172.16.100.22 0 0 200 i
ISP1receivedtworoutesto10.0.0.0/24networks:
FirstrouteisreceivedfromISP2(nexthop172.16.100.22)
SecondrouteisreceivedfromR1(nexthop172.16.11.1),
Sinceweightandlocalpreferenceattributesareleftondefaultvalues,ISP1choosesthe
pathwithshortestASpathlengthasthebest(theroutethatisreceivedfromR1).
IfyouwanttoinfluencethereturningtraffictoAS1fromAS100togoviaAS200(and
notdirectly),youcandoitbyusingcommunitylistsinAS1.IntheupdatefromthatAS,
youcansendacommunitylist.Thiscommunitylistcantheninfluencethevalueof,for
example,localpreferenceinAS100forallroutesthatarereceivedfromAS1.
Step2
ConfigurecommunitylisttoinfluencethereturningtrafficpathtoyourAS(AS1).
UsecommunityforchangingthelocalpreferencevalueonISP'sside.Firstdo
thecustomer'ssideoftheconfigurationandconfigureroutemapontheR1
routertotagrouteswithBGPcommunities.
Nametheroutemap"SetCom."SelectallBGProutesandsetcommunityvalue
of"100:17."Youhavealreadyagreedwithaserviceprovider,that"100:17"
communitywillsetlocalpreferenceof50onaserviceprovider'sside.Sincethe
defaultlocalpreferenceis100,lowerlocalpreference(50)meansthattheroute
willnotbechosenasthebestone.
ConfigureLocalPreferenceUsingtheCommunities
DiscoverySteps

R1(config)# route-map SetCom permit 10
R1(config-route-map)# set community 100:17
Becauseyoudidnotenteranymatchstatement,allnetworksarepermitted.If
youwantedtosetcommunitiesonspecificroutes,youcoulduseastandard
accesslisttomatchagainst,withthematchipaddresscommandintheroute
map.
Step3
OntheR1router,applythe"SetCom"routemaptoalloutgoingupdatestothe
ISP1EBGPneighbor.
R1(config)# router bgp 1
R1(config-router)# neighbor 172.16.11.11 route-map SetCom out
Step4
Remember,thatyouhavetoenablepropagationofcommunityattributestoBGP
neighbors.Otherwisetherouterwillstripoutanycommunityvaluesattachedto
outgoingupdates.
EnablecommunitypropagationontheR1router.
R1(config)# router bgp 1
R1(config-router)# neighbor 172.16.11.11 send-community
YouenabledcommunitypropagationfromAS1toAS100.
Step5
Nowmoveontheserviceprovider'ssideanddefineBGPcommunitylistthatwill
matchcommunitiessetinAS1.
OntheISP1router,configurecommunitylisttomatchcommunitiesthatwere
previouslysetontheR1router.
ISP1(config)# ip community-list 7 permit 100:17
Step6
ThelastthingthatyouhavetodoistotranslatereceivedcommunitiesfromAS1
intolocalpreference.OntheISP1router,configureroutemaptomatchBGP
communitiesandtochangethelocalpreferencevalueofmatchedcommunities.
OntheISP1router,configureroutemap"SetLocalPref,"thatwillusethe
configuredcommunitylisttofindacommunity100:17andwillsetlocal-
preferenceof50.Donotforgettopermitallotherroutes,thatdonotcontainthe
rightcommunity,withoutchanginganythingintheupdate.
ISP1(config)# route-map SetLocalPref permit 10
ISP1(config-route-map)# match community 7
ISP1(config-route-map)# set local-preference 50
ISP1(config-route-map)# exit
ISP1(config)# route-map SetLocalPref permit 1000
Routemapusesacommunitylist,thatwasconfiguredinpreviousstep,tofind
community100:17.Ifthecommunitylistmatchesoneofthecommunity
attributes,thesetcommandisexecuted,thelocal-preferenceischanged,and
therouteispermitted.
Iftheroutedoesnotcontaintherightcommunity,therouteissimplypermitted
byroutemapstatement1000withoutchanginganythingintheupdate.
Step7
OntheISP1router,applytheconfiguredroutemaptoallincomingupdatesfrom
R1EBGPneighbor.

ISP1(config)# router bgp 100
ISP1(config-router)# neighbor 172.16.11.1 route-map SetLocalPref in
TheresultwillbethatAS100willsetlocalpreferenceof50toallroutesreceived
fromAS1.So,itwillprefertheotherpath(thepathviaAS200)toreachAS1.
Step8
OntheISP1router,re-establishBGPsessiontoenforcetheapplicationofnew
routemap.
ToreestablishBGPsession,usetheclearipbgpcommand.
ISP1# clear ip bgp *
Step9
OntheISP1router,verifynewreceivedroutestoreachthe10.0.0.0/24networksinAS1.
ISP1# show ip bgp
BGP table version is 21, local router ID is 10.0.1.81
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 172.16.100.22 0 200 1 i
* 172.16.11.1 50 0 1 i
*> 10.0.0.16/28 172.16.100.22 0 200 1 i
* 172.16.11.1 50 0 1 i
*> 10.0.0.32/28 172.16.100.22 0 200 1 i
* 172.16.11.1 50 0 1 i
*> 10.0.0.48/28 172.16.100.22 0 200 1 i
* 172.16.11.1 50 0 1 i
*> 10.0.0.64/28 172.16.100.22 0 200 1 i
* 172.16.11.1 50 0 1 i
*> 10.0.1.0/28 0.0.0.0 0 32768 i
*> 10.0.1.16/28 0.0.0.0 0 32768 i
*> 10.0.1.32/28 0.0.0.0 0 32768 i
*> 10.0.1.48/28 0.0.0.0 0 32768 i
Network Next Hop Metric LocPrf Weight Path
*> 10.0.1.64/28 0.0.0.0 0 32768 i
*> 10.0.1.80/28 0.0.0.0 0 32768 i
*> 10.0.2.0/28 172.16.100.22 0 0 200 i
* 172.16.11.1 50 0 1 200 i
*> 10.0.2.16/28 172.16.100.22 0 0 200 i
* 172.16.11.1 50 0 1 200 i
*> 10.0.2.32/28 172.16.100.22 0 0 200 i
* 172.16.11.1 50 0 1 200 i
*> 10.0.2.48/28 172.16.100.22 0 0 200 i
* 172.16.11.1 50 0 1 200 i
*> 10.0.2.64/28 172.16.100.22 0 0 200 i
* 172.16.11.1 50 0 1 200 i
*> 10.0.2.80/28 172.16.100.22 0 0 200 i
* 172.16.11.1 50 0 1 200 i
*> 10.0.2.96/28 172.16.100.22 0 0 200 i
* 172.16.11.1 50 0 1 200 i
*> 10.0.2.112/28 172.16.100.22 0 0 200 i
* 172.16.11.1 50 0 1 200 i
*> 10.0.2.128/28 172.16.100.22 0 0 200 i
* 172.16.11.1 50 0 1 200 i
ISP1againreceivedtworoutesto10.0.0.0/24networks:
ThefirstrouteisreceivedfromISP2(nexthop172.16.100.22),withdefaultlocal
preferenceof100.(Rememberthattheapplieddefaultlocalpreferenceisnot
displayed.)
ThesecondrouteisreceivedfromR1(nexthop172.16.11.1),withchangedlocal
preferenceof50.
ISP1choosesthepaththatisreceivedfromISP2asthebestbasedonthehighestlocal-
preferencevalue.
MonitoringCommunities

Becauseacommunityisanattributethatcanappearmorethanonceinasingle
update,theshowipbgpcommanddoesnotshowit.
Communities are displayed in show ip bgp prefix printout.
Communities are not displayed in debugging outputs.
Routes in the BGP table that are tagged with a set of communities or routes that
match a community list can be displayed.
All routes in a BGP table that have at least one attached community are
displayed in show ip bgp community printout.
Ifthekeywordcommunityisincludedinshowipbgpcommand,allnetworksthat
haveatleastonecommunityattributearedisplayed.However,youcanview
communitiesonlyifyouusetheshowipbgpprefixcommand.
Ifyouusetheshowipbgpcommunity-listclistcommand,allnetworksthatthe
communitylistpermitsarelisted.Usingtheshowipbgpcommunityas:nn[as:nn
...]command,allroutesinaBGPtablehavingallthespecifiedcommunitiesthatare
attachedaredisplayed.Ifthekeywordexactisaddedattheend,onlythenetworks
thatmatchexactlyaredisplayed.
Step10
OntheISP1router,verifyallthenetworks,thathaveatleastonecommunityattribute.
ISP1# show ip bgp community
BGP table version is 21, local router ID is 10.0.1.81
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
* 10.0.0.0/28 172.16.11.1 50 0 1 i
* 10.0.0.16/28 172.16.11.1 50 0 1 i
* 10.0.0.32/28 172.16.11.1 50 0 1 i
* 10.0.0.48/28 172.16.11.1 50 0 1 i
* 10.0.0.64/28 172.16.11.1 50 0 1 i
* 10.0.2.0/28 172.16.11.1 50 0 1 200 i
* 10.0.2.16/28 172.16.11.1 50 0 1 200 i
* 10.0.2.32/28 172.16.11.1 50 0 1 200 i
* 10.0.2.48/28 172.16.11.1 50 0 1 200 i
* 10.0.2.64/28 172.16.11.1 50 0 1 200 i
* 10.0.2.80/28 172.16.11.1 50 0 1 200 i
* 10.0.2.96/28 172.16.11.1 50 0 1 200 i
* 10.0.2.112/28 172.16.11.1 50 0 1 200 i
* 10.0.2.128/28 172.16.11.1 50 0 1 200 i
Youcanseethatallnetworks,10.0.0.0/24and10.0.2.0/24,receivedfromAS1arelisted
intheoutput.TheyarelistedbecauseyouconfiguredroutetaggingwithBGP
communitiesonR1inAS1,forallupdatesthataresenttoAS100.
Step11
OntheISP1router,verifythecommunityattributeforoneofthe10.0.0.0/24
networks,the10.0.0.0/28network.
ISP1# show ip bgp 10.0.0.0/28
BGP routing table entry for 10.0.0.0/28, version 2
Paths: (2 available, best #1, table default)
Advertised to update-groups:
3
Refresh Epoch 2
200 1
172.16.100.22 from 172.16.100.22 (10.0.2.129)
Origin IGP, localpref 100, valid, external, best
Refresh Epoch 1
1
172.16.11.1 from 172.16.11.1 (172.16.11.1)
Origin IGP, localpref 50, valid, external
Community: 6553617
YoucanseethatISP1receivedtworoutesto10.0.0.0/28network:

FirstrouteisreceivedfromISP2,withdefaultlocalpreferenceof100.
SecondrouteisreceivedfromR1,withthecommunityattribute6553617
andconsequentlyithaschangedlocalpreferenceof50.
Notethatthecommunityisdisplayedasasingle32-bitvalue(6553617).Ifyou
wantittobeinaformofas:nn,youhavetoconfigurethesupportfornew-format
ontherouter,usingtheipbgp-communitynew-formatcommand.
Step12
OntheISP1router,enablenewBGPcommunityformat.
ISP1(config)# ip bgp-community new-format
Step13
OntheISP1router,againverifythecommunityattributefor10.0.0.0/28network.
ISP1# show ip bgp 10.0.0.0/28
BGP routing table entry for 10.0.0.0/28, version 2
Paths: (2 available, best #1, table default)
Advertised to update-groups:
3
Refresh Epoch 2
200 1
172.16.100.22 from 172.16.100.22 (10.0.2.129)
Origin IGP, localpref 100, valid, external, best
Refresh Epoch 1
1
172.16.11.1 from 172.16.11.1 (172.16.11.1)
Origin IGP, localpref 50, valid, external
Community: 100:17
Nowthecommunityisdisplayedastwocolon-separated16-bitnumbers,
100:17.

TheBGPNamedCommunityListsfeatureintroducesanewtypeofcommunitylist
thatiscalledthenamedcommunitylist.Anamedcommunitylistcanbeconfigured
withregularexpressionsorwithnumberedcommunitylists.
Allows you to assign meaningful names to community lists and increases the
number of community lists that can be configured.
Can be configured with regular expressions and with numbered community lists.
Increases the number of community lists that a network operator can configure
—there is no limitation on the number of named community lists that can be
configured.
Commands:
Use the ip community-list command to create a numbered or named
community list.
Use the match community command in route-map configuration mode, to
match a BGP community.
Use the set com-list delete command in route-map configuration mode to
remove communities from the community attribute of an update.
TheBGPNamedCommunityListsfeatureallowsyoutoassignmeaningfulnamesto
communitylists.Allrulesofnumberedcommunitiesapplytonamedcommunitylists,
withoneexception.Theexceptionisthatthereisnolimitationonthenumberof
communityattributesthatcanbeconfiguredforanamedcommunitylist.Both,
standardandexpanded,communitylistshavealimitationof100communitygroups
thatcanbeconfiguredwithineachtypeoflist.Anamedcommunitylistdoesnot
havethislimitation.
ipcommunity-listCommand
TocreateanumberedornamedcommunitylistforBGPandtocontrolaccesstoit,
usetheipcommunity-listcommandinglobalconfigurationmode.Todeletethe
communitylist,usethenoformofthiscommand.
ip community-list {standard-list-number | expanded-list-number [regular-
expression] | {standard | expanded} community-list-
name} {permit| deny} community-number | regular-expression
SyntaxDescription
Parameter Description
standard-list-number Specifiesastandardcommunitylistnumberfrom1to99that
identifiesoneormorepermitordenygroupsofcommunities.
expanded-list-number Specifiesanexpandedcommunitylistnumberfrom100to199
thatidentifiesoneormorepermitordenygroupsofcommunities.
standard Configuresastandardnamedcommunitylist.
expanded Configuresanexpandednamedcommunitylist.
community-list-name Thecommunitylistname.
permit Permitsaccessforamatchingcondition.
deny Deniesaccessforamatchingcondition.
community-number Communitynumberthatyouconfigurewiththesetcommunity
command.
Validvalueofcommunitynumberisoneofthefollowing:
Anumberfrom1to4294967200.Youcanspecifyasinglenumberormultiple
numbersandyouseparatethembyaspace.
internet—TheInternetcommunity.
no-export—Routeswiththiscommunityaresenttopeersinother
subautonomoussystemswithinaconfederation.Donotadvertisethisrouteto
anEBGPpeer.Externalsystemsarethesystemsoutsidetheconfederation.If
thereisnoconfederation,anexternalsystemisanyEBGPpeer.
local-as—Sendthisroutetopeersinothersubautonomoussystemswithinthe
localconfederation.Donotadvertisethisroutetoanexternalsystem.
BGPNamedCommunityLists

no-advertise—Donotadvertisethisroutetoanypeer(internalorexternal).
matchcommunityCommand
TomatchaBGPcommunity,usethematchcommunitycommandinroute-map
configurationmode.
Toremovethematchcommunitycommandfromtheconfigurationfileandrestore
thesystemtoitsdefaultconditionwherethesoftwareremovestheBGPcommunity
listentry,usethenoformofthiscommand.
match community standard-list-number | expanded-list-number | community-
list-name [exact]
SyntaxDescription
Parameter Description
standard-list-number Specifiesastandardcommunitylistnumberfrom1to99thatidentifies
oneormorepermitordenygroupsofcommunities.
expanded-list-number Specifiesanexpandedcommunitylistnumberfrom100to199that
identifiesoneormorepermitordenygroupsofcommunities.
community-list-name Thecommunitylistname.
exact (Optional)Indicatesthatanexactmatchisrequired.
Allofthecommunitiesandonlythosecommunitiesthatarespecified
mustbe
present.
setcomm-listdeleteCommand
Toremovecommunitiesfromthecommunityattributeofaninboundoroutbound
update,usethesetcomm-listdeletecommandinroute-mapconfigurationmode.
Tonegateaprevioussetcomm-listdeletecommand,usethenoformofthis
command.
set comm-list community-list-number | community-list-name delete
SyntaxDescription
Parameter Description
community-list-number Astandardorexpandedcommunitylistnumber.
community-list-name Astandardorexpandedcommunitylistname.
BGPNamedCommunityListExamples
Thefollowingexamplecreatesastandardcommunitylistthatpermitsallroutes
excepttherouteswiththecommunities5and10or10and15:
Router(config)# ip community-list 1 deny 5 10
Router(config)# ip community-list 1 deny 10 15
Router(config)# ip community-list 1 permit internet
Thefollowingexamplecreatesastandardcommunitylistthatpermitsallroutes
withinthelocalAS:
Router(config)# ip community-list 1 permit local-as
Thefollowingexamplecreatesastandardnamedcommunitylistwiththename
COMMUNITY_AthatpermitsallrouteswithinthelocalASanddeniesallrouteswith
theinternetcommunityattribute:
Router(config)# ip community-list standard COMMUNITY_A permit local-AS
Router(config)# ip community-list standard COMMUNITY_A deny internet
Thefollowingexamplecreatesanexpandednamedcommunitylistwiththename
COMMUNITY_BthatwillnotadvertiseroutestoEBGPpeers:

Router(config)# ip community-list expanded COMMUNITY_B permit no-export
Thefollowingexamplecreatesanamedcommunitylistwiththename
COMMUNITY_CthatwillnotadvertisethisroutetoanyEBGPorEBGPpeers:
Router(config)# ip community-list expanded COMMUNITY_C permit no-advertise
Thefollowingexampleusesaregularexpression.Theexamplecreatesafilterthat
willdenyallcommunitiesthatcontainanumber:
Router(config)# ip community-list 100 deny [0-9]*

Thecostcommunityisanontransitiveextendedcommunityattributethatispassed
toIBGPandconfederationpeersbutnottoEBGPpeers.
Allows you to customize the BGP best-path selection process for a local AS or
confederation.
Applied to internal routes by configuring the set extcommunity cost command
in a route map.
Influences the BGP best-path selection process at the POI.
Can be used as a "tie breaker" during the best-path selection process.
TheconfigurationoftheBGPCostCommunityfeatureallowsyoutocustomizethe
BGPbest-pathselectionprocessforalocalASorconfederationbyassigningcost
valuestospecificroutes.
Tocreateasetclausetoapplythecostcommunityattributetoroutesthatpass
througharoutemap,usethesetextcommunitycostcommandinroute-map
configurationmode.Todeletethecostcommunitysetclause,usethenoformofthis
command.
set extcommunity cost[igp] community-id cost-value
SyntaxDescription
Parameter Description
igp TheIGPPOI.
Theconfigurationofthiskeywordforcesthecostcommunitytobe
evaluatedaftertheIGPdistancetothenexthophasbeen
compared.
community-id TheIDfortheconfiguredextendedcommunity.
Therangeisfrom0to255.
cost-value Theconfiguredcostthatissetformatchingpathsintheroute
map.
Therangeisfrom0to4294967295.
ThecostcommunitysetclauseisconfiguredwithacostcommunityIDnumber(0to
255)andcostnumber(0to4294967295).Thecostnumbervaluedeterminesthe
preferenceforthepath.Thepathwiththelowestcostcommunitynumberis
preferred.Pathsthatarenotspecificallyconfiguredwiththecostcommunityattribute
areassignedadefaultcostnumbervalueof2147483647(themidpointbetween0
and4294967295)andevaluatedbythebest-pathselectionprocessaccordingly.
Whentwopathshavebeenconfiguredwiththesamecostnumbervalue,thepath
selectionprocessprefersthepathwiththelowestcostcommunityID.Thecost
extendedcommunityattributeispropagatedtoIBGPpeerswhenextended
communityexchangeisenabledwiththeneighborsend-communitycommand.
ThecostcommunityattributeinfluencestheBGPbest-pathselectionprocessatthe
POI.Bydefault,thePOIfollowstheIGPmetriccomparison.WhenBGPreceives
multiplepathstothesamedestination,itusesthebest-pathselectionprocessto
determinewhichpathisthebestpath.BGPautomaticallymakesthedecisionand
installsthebestpathintotheroutingtable.ThePOIallowsyoutoassigna
preferencetoaspecificpathwhenmultipleequal-costpathsareavailable.IfthePOI
isnotvalidforlocalbest-pathselection,thecostcommunityattributeissilently
ignored.
MultiplepathscanbeconfiguredwiththecostcommunityattributeforthesamePOI.
ThepathwiththelowestcostcommunityIDisconsideredfirst.Inotherwords,allof
thecostcommunitypathsforaspecificPOIareconsidered,startingwiththeone
withthelowestcostcommunityID.Pathsthatdonotcontainthecostcommunity(for
thePOIandcommunityIDbeingevaluated)areassignedthedefaultcommunity
costvalue(2147483647).Ifthecostcommunityvaluesareequal,thencost
communitycomparisonproceedstothenext-lowestcommunityIDforthisPOI.
ApplyingthecostcommunityattributeatthePOIallowsyoutoassignavaluetoa
pathoriginatedorlearnedbyapeerinanypartofthelocalASorconfederation.The
costcommunitycanbeusedasa"tiebreaker"duringthebestpathselection
process.Multipleinstancesofthecostcommunitycanbeconfiguredforseparate
equal-costpathswithinthesameASorconfederation.Forexample,alower-cost
communityvaluecanbeappliedtoaspecificexitpathinanetworkwithmultiple
BGPCostCommunity

equal-costexitpoints.Then,theBGPbest-pathselectionprocesswillpreferthe
specificexitpath.
BGPCostCommunityExample
Thefollowingexampleconfigurationshowstheconfigurationoftheset
extcommunitycostcommand.ThisexampleappliesthecostcommunityIDof1
andcostcommunityvalueof100totheroutesthattheroutemappermits.This
configurationwillcausethebest-pathselectionprocesstopreferthisrouteover
otherequal-costpathsthatthisroutemapsequencedoesnotpermit.
Router(config)# router bgp 50000
Router(config-router)# neighbor 10.0.0.1 remote-as 50000
Router(config-router)# neighbor 10.0.0.1 update-source Loopback 0
Router(config-router)# address-family ipv4
Router(config-router-af)# neighbor 10.0.0.1 activate
Router(config-router-af)# neighbor 10.0.0.1 route-map COST1 in
Router(config-router-af)# neighbor 10.0.0.1 send-community both
Router(config-router-af)# exit
Router(config)# route-map COST1 permit 10
Router(config-route-map)# match ip-address 1
Router(config-route-map)# set extcommunity cost 1 100

TheBGPLinkBandwidthfeatureisusedtoenablemultipathloadbalancingfor
externallinkswithunequalbandwidthcapacity.ThisfeaturesupportsIBGP,EBGP
multipathloadbalancing,andEIGRPmultipathloadbalancinginMPLSVPNs.When
thisfeatureisenabled,routeslearnedfromdirectlyconnectedexternalneighbors
arepropagatedthroughtheIBGPnetworkwiththebandwidthofthesourceexternal
link.
Use it to enable multipath load balancing for external links with unequal
bandwidth capacity.
You enable it under an IPv4 or VPNv4 address family sessions by entering the
bgp dmzlink-bw command.
Routes that are learned from directly connected external neighbor are
propagated through the IBGP network with the bandwidth of the source external
link.
YouenabletheBGPLinkBandwidthfeatureunderanIPv4orVPNv4address-family
sessionbyenteringthebgpdmzlink-bwcommand.
TheBGPLinkBandwidthfeatureallowsBGPtobeconfiguredtosendtrafficover
multipleIBGPorEBGPlearnedpaths.Thetrafficthatissentonthosepathsis
proportionaltothebandwidthofthelinksthatareusedtoexittheAS.The
configurationofthisfeaturecanbeusedwithEBGPandIBGPmultipathfeaturesto
enableunequal-costloadbalancingovermultiplelinks.Unequal-costloadbalancing
overlinkswithunequalbandwidthwasnotpossibleinBGPbeforetheBGPLink
Bandwidthfeaturewasintroduced.
ThelinkbandwidthextendedcommunityattributeindicatesthepreferenceofanAS
exitlinkintermsofbandwidth.Thisextendedcommunityisappliedtoexternallinks
betweendirectlyconnectedEBGPpeersbyenteringtheneighbordmzlink-bw
command.ThelinkbandwidthextendedcommunityattributeispropagatedtoIBGP
peerswhenextendedcommunityexchangeisenabledwiththeneighborsend-
communitycommand.
bgpdmzlink-bwCommand
ToconfigureBGPtodistributetrafficproportionallyoverexternallinkswithunequal
bandwidthwhenmultipathloadbalancingisenabled,usethebgpdmzlink-bw
commandinaddressfamilyconfigurationmode.Todisabletrafficdistribution
proportionaltothelinkbandwidth,usethenoformofthiscommand.
bgp dmzlink-bw
Thiscommandhasnokeywordsorarguments.
neighbordmzlink-bwCommand
ToconfigureBGPtoadvertisethebandwidthoflinksthatareusedtoexitanAS,use
theneighbordmzlink-bwcommandinaddressfamilyconfigurationmode.To
disablelinkbandwidthadvertisement,usethenoformofthiscommand.
neighbor ip-address dmzlink-bw
SyntaxDescription
Parameter Description
ip-address TheIPaddressthatidentifiestheexternalinterface
Thelinkbandwidthextendedcommunityattributeisa4-bytevaluethatisconfigured
foralinkontheDMZinterfacethatconnectstwosingle-hopEBGPpeers.Thelink
bandwidthextendedcommunityattributeisusedasatraffic-sharingvaluerelativeto
otherpathswhileforwardingtraffic.Twopathsaredesignatedasequalforload
balancingiftheweight,localpreference,ASpathlength,MED,andIGPcostsare
thesame.
BGPLinkBandwidthExample
Inthisexample,theBGPLinkBandwidthfeatureisconfiguredsothatBGPwill
BGPLinkBandwidthFeature

distributetrafficproportionallytothebandwidthofeachexternallink.
Thefigureshowstwoexternalautonomoussystems.Threelinksconnectthetwo
ASs,andeachAScarriesadifferentamountofbandwidth(unequal-costlinks).
Multipathloadbalancingisenabled,andtrafficisbalancedproportionally.
FirstR1isconfiguredtosupportIBGPmultipathloadbalancingandtoexchangethe
BGPextendedcommunityattributewithIBGPneighbors,R2on10.0.1.2IPaddress
andR3on10.0.1.3IPaddress.
R1(config)# router bgp 100
R1(config-router)# neighbor 10.0.1.2 remote-as 100
R1(config-router)# neighbor 10.0.1.2 update-source Loopback 0
R1(config-router)# neighbor 10.0.1.3 remote-as 100
R1(config-router)# neighbor 10.0.1.3 update-source Loopback 0
R1(config-router)# address-family ipv4
R1(config-router)# bgp dmzlink-bw
R1(config-router-af)# neighbor 10.0.1.2 activate
R1(config-router-af)# neighbor 10.0.1.2 send-community both
R1(config-router-af)# neighbor 10.0.1.3 activate
R1(config-router-af)# neighbor 10.0.1.3 send-community both
R1(config-router-af)# maximum-paths ibgp 6
R2isconfiguredtosupportmultipathloadbalancing,todistributeR4(172.16.100.1
IPaddress)andR5(172.16.200.2IPaddress)linktrafficproportionallytothe
bandwidthofeachlink,andtoadvertisethebandwidthoftheselinkstoIBGP
neighborsasanextendedcommunity:
R2(config)# router bgp 100
R2(config-router)# neighbor 10.0.1.1 remote-as 100
R2(config-router)# neighbor 10.0.1.1 update-source Loopback 0
R2(config-router)# neighbor 10.0.1.3 remote-as 100
R2(config-router)# neighbor 10.0.1.3 update-source Loopback 0
R2(config-router)# neighbor 172.16.100.1 remote-as 200
R2(config-router)# neighbor 172.16.100.1 ebgp-multihop 1
R2(config-router)# neighbor 172.16.200.2 remote-as 200
R2(config-router)# neighbor 172.16.200.2 ebgp-multihop 1
R2(config-router)# address-family ipv4
R2(config-router-af)# bgp dmzlink-bw
R2(config-router-af)# neighbor 10.0.1.1 activate
R2(config-router-af)# neighbor 10.0.1.1 next-hop-self
R2(config-router-af)# neighbor 10.0.1.1 send-community both
R2(config-router-af)# neighbor 10.0.1.3 activate
R2(config-router-af)# neighbor 10.0.1.3 next-hop-self
R2(config-router-af)# neighbor 10.0.1.3 send-community both
R2(config-router-af)# neighbor 172.16.100.1 activate
R2(config-router-af)# neighbor 172.16.100.1 dmzlink-bw
R2(config-router-af)# neighbor 172.16.200.2 activate
R2(config-router-af)# neighbor 172.16.200.2 dmzlink-bw
R2(config-router-af)# maximum-paths ibgp 6
R2(config-router-af)# maximum-paths 6
AlsoR3isconfiguredtosupportmultipathloadbalancingandtoadvertisethe
bandwidthofthelinkwithR5(172.16.300.3IPaddress)toIBGPneighborsasan
extendedcommunity:

R3(config)# router bgp 100
R3(config-router)# neighbor 10.0.1.1 remote-as 100
R3(config-router)# neighbor 10.0.1.1 update-source Loopback 0
R3(config-router)# neighbor 10.0.1.2 remote-as 100
R3(config-router)# neighbor 10.0.1.2 update-source Loopback 0
R3(config-router)# neighbor 172.16.300.3 remote-as 200
R3(config-router)# neighbor 172.16.300.3 ebgp-multihop 1
R3(config-router)# address-family ipv4
R3(config-router-af)# bgp dmzlink-bw
R3(config-router-af)# neighbor 10.0.1.1 activate
R3(config-router-af)# neighbor 10.0.1.1 send-community both
R3(config-router-af)# neighbor 10.0.1.1 next-hop-self
R3(config-router-af)# neighbor 10.0.1.2 activate
R3(config-router-af)# neighbor 10.0.1.2 send-community both
R3(config-router-af)# neighbor 10.0.1.2 next-hop-self
R3(config-router-af)# neighbor 172.16.300.3 activate
R3(config-router-af)# neighbor 172.16.300.3 dmzlink-bw
R3(config-router-af)# maximum-paths ibgp 6
R3(config-router-af)# maximum-paths 6

TheBGPSequencedEntriesinExtendedCommunityListsfeatureallowsyou
automaticsequencingofindividualentriesinBGPextendedcommunitylists.Italso
providesyoutheabilitytoremoveorresequenceextendedcommunitylistentries
withoutdeletingtheentireexistingextendedcommunitylist.
Allows you automatic sequencing of individual entries in BGP extended
community lists.
Provides you the ability to remove or resequence extended community list
entries without deleting the entire existing extended community list.
Configures sequence numbers for extended community list entries.
Resequences existing sequence numbers for extended community list entries.
Configures an extended community list to use default values.
BothnamedandnumberedextendedcommunitylistscanbeconfiguredinIP
extendedcommunitylistconfigurationmode.ToenterIPextendedcommunitylist
configurationmode,issuetheipextcommunity-listcommandwitheitherthe
expandedorstandardkeywordfollowedbytheextendedcommunitylistname.This
configurationmodesupportsallofthefunctionsthatareavailableinglobal
configurationmode.Inaddition,youcanperformthefollowingoperations:
Configuresequencenumbersforextendedcommunitylistentries.
Resequenceexistingsequencenumbersforextendedcommunitylistentries.
Configureanextendedcommunitylisttousedefaultvalues.
ipextcommunity-listCommand
Tocreateanextendedcommunitylistandcontrolaccesstoit,usetheip
extcommunity-listcommandinglobalconfigurationmode.Todeletetheentire
communitylist,usethenoformofthiscommand.
ip extcommunity-list expanded-list-number | expanded list-
name {permit| deny} [regular-expression] | standard-list-
number | standard list-name {permit| deny} [rt extcom-value] [soo extcom-
value]
SyntaxDescription
Parameter Description
expanded-list-number Anexpandedlistnumberfrom100to500thatidentifiesoneor
morepermitordenygroupsofextendedcommunities.
standard-list-number Astandardlistnumberfrom1to99thatidentifiesoneormore
permitordenygroupsofextendedcommunities.
expandedlist-name Createsanexpandednamedextendedcommunitylistandenters
IPextendedcommunitylistconfigurationmode.
standardlist-name CreatesastandardnamedextendedcommunitylistandentersIP
extendedcommunitylistconfigurationmode.
permit Permitsaccessforamatchingcondition.
deny Deniesaccessforamatchingcondition.
regular-expression (Optional)Aninputstringpatterntomatchagainst.
rt (Optional)SpecifiestheRTextendedcommunityattribute.
Thertkeywordcanbeconfiguredonlywithstandardextended
communitylistsandnotexpandedcommunitylists.
soo (Optional)SpecifiestheSOOextendedcommunityattribute.
Thesookeywordcanbeconfiguredonlywithstandardextended
communitylistsandnotexpandedcommunitylists.
extcom-value SpecifiestheRTorSOOextendedcommunityvalue.
Thevaluecanbeoneofthefollowingcombinations:autonomous-
system-number:network-numberorip-address:network-number
sequence-number (Optional)Thesequencenumberofanamedornumbered
extendedcommunitylist.
Thisvaluecanbeanumberfrom1to2147483647.
BGPSupportforSequencedEntriesinExtended
CommunityLists

default (Optional)Setsakeywordorargumenttodefaultbehavioror
value.
exit (Optional)ExitsIPextendedcommunitylistconfigurationmode.
resequence (Optional)Changesthesequencesofextendedcommunitylist
entriestothedefaultsequencenumberingortothespecified
sequencenumbering.
Extendedcommunityentriesaresequencedby10-number
incrementsbydefault.
starting-sequence (Optional)Specifiesthenumberforthefirstentryinanextended
communitylist.
sequence-increment (Optional)Specifiestheincrementrangeforeachsubsequent
extendedcommunitylistentry.
Parameter Description
SequencedandResequencedExtendedCommunityListEntry
Example
Thefollowingexamplecreatesandconfiguresanamedextendedcommunitylistthat
willpermitroutesonlyfromRT64512:10,65000:20,64535:30andSOO65535:40.
Allotherroutesareimplicitlydenied.
Router(config)# ip extcommunity-list standard NAMED_LIST
Router(config-extcom-list)# 1 permit rt 64512:10
Router(config-extcom-list)# 2 permit rt 65000:20
Router(config-extcom-list)# 3 permit rt 64535:30
Router(config-extcom-list)# 4 permit soo 65535:40
Router(config-extcom-list)# end
Resequencetheextendedcommunitylistentriesinthenamedcommunitylistthatis
configuredabove.Thefirstentryisresequencedtothenumber50andtherangefor
eachsubsequententrytofollowby100(forexample,150,250,350,andsoon).
Router(config)# ip extcommunity-list standard NAMED_LIST
Router(config-extcom-list)# resequence 50 100
Router(config-extcom-list)# end
Todisplayroutesthatthenamedextendedcommunitylistpermits,usetheshowip
extcommunity-listEXECcommand.Theoutputshowstheconfigurationfromthe
firstexampleafterithasbeenresequencedwithuser-definedvalues.
Router> show ip extcommunity-list
Standard extended community-list NAMED_LIST
50 permit RT:64512:10
150 permit RT:65000:20
250 permit RT:64535:30
350 permit SoO:65535:40

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
You can use the BGP community attribute to create an AS-wide routing policy or
to provide services to neighboring autonomous systems.
A community is an attribute that is used to tag BGP routes that you can use to
manipulate path selection and enforce administrative policies.
To configure community attribute, you should:
Configure a route map with a set community command.
Configure propagation of BGP communities on the routers on a per-neighbor
basis
Configure community lists to match against the community attribute as a
method of route selection
Configure a route map to match networks that carry communities that the
community list permits and apply policies to them.
The BGP Named Community Lists feature allows you to assign meaningful
names to community lists and increases the number of community lists that can
be configured.
The configuration of the BGP Cost Community feature allows you to assign
cost values to specific routes. This way, you customize the BGP best path
selection process for a local AS or confederation.
The BGP Link Bandwidth feature allows you multipath load balancing for
external links with unequal bandwidth capacity.
BGP Support for Sequenced Entries in Extended Community Lists allows
automatic sequencing of individual entries in BGP extended community lists. It
also enables you to remove or resequence extended community list entries
without deleting the entire existing extended community list.
Summary

Overview
Thistopicsummarizesthekeypointsthatwerediscussedinthismodule.
The following BGP attributes influence the route selection:
Weight (The first criterion in BGP route selection.)
You can configure a default weight or use route-maps to configure it.
Local preference (The second-strongest criterion in the route selection
process.)
You can configure a default local preference or use route-maps to configure
it.
AS-path
You can perform AS-path prepending on outgoing EBGP updates over the
nondesired return path.
MED (A "weak" parameter in the route selection process.)
Community
Used to tag BGP routes that you can use to manipulate path selection and
enforce administrative policies.
ModuleSummary
Usethequestionsheretoreviewwhatyoulearnedinthismodule.Thecorrect
answersandsolutionsarefoundintheModuleSelf-CheckAnswerKey.
ModuleSelf-Check

1. Numberthe10BGPselectioncriteriaintheorderinwhichtheyare
used,fromthefirsttothelast,whenselectingtheBGPpaththatis
submittedtotheIProutingtable.(Source:"InfluencingBGPRoute
SelectionwithWeights")
PrefertheshortestASpath. 5
PreferthepaththroughtheclosestIGP
neighbor. 4
Prefertheroutethatwasoriginatedbythe
localrouter. 6
PreferanEBGPpathoveranIBGPpath. 3
PreferthepathwiththelowestneighborBGP
routerID. 2
Preferthehighestweight. 8
PrefertheoldestrouteforEBGPpaths. 1
Preferthelowestorigincode(IGP<EGP<
incomplete). 7
PreferthelowestMED. 10
Preferthehighestlocalpreference. 9

1. WhatisthedefaultweightforroutesthatarereceivedfromaBGP
neighbor?(Source:"InfluencingBGPRouteSelectionwithWeights")
0
100
32768
ItdependsontheCiscoIOSrelease.

1. Whenaretheweightsthatareconfiguredonaneighborenforced?
(Source:"InfluencingBGPRouteSelectionwithWeights")
Beforethenewweightscantakeeffect,theBGPprocessontherouter
mustberemovedandreconfigured.
Theroutermustfirstberebootedforthenewweightstotakeeffect.
ThenewweightswillbeappliedaftertheBGPupdateintervalof30
minutesexpires.
Thenewweightconfigurationisappliedtoallroutesthatarereceived
followingtheconfigurationchange.

1. Ifyouwantallroutesreceivedfromtheneighbortohavethenew
weightvalueapplied,youhavetoreestablishBGPsession.Trueor
false?(Source:"InfluencingBGPRouteSelectionwithWeights")
true
false

1. Howcouldyouimplementaprimary/backupISProutingpolicyby
usingweights?(Source:"InfluencingBGPRouteSelectionwith
Weights")
AssignhigherweightstoallroutesthatarereceivedfromthebackupISP.
AssignlowerweightstoallroutesthatarereceivedfromthebackupISP.
AssignhigherweightstoallroutesthatarereceivedfromtheprimaryISP.
AssignlowerweightstoallroutesthatarereceivedfromtheprimaryISP.

1. Whenyouareusingroute-mapstomodifyweights,whathappensby
defaulttoaroutethatdoesnotmatchanyoftheroute-map
statements?(Source:"InfluencingBGPRouteSelectionwith
Weights")
Therouteisacceptedwiththeweightattributeunmodified.
Therouteisdiscarded.
TherouteisinsertedintotheBGPtablebutnotintotheIProutingtable.
Anerrorisdisplayedontherouterconsoleandinrouterdebugs.

1. Whichmethodofinfluencingrouteselectionwithweightsisthelast
tobeappliedonanincominginterface?(Source:"InfluencingBGP
RouteSelectionwithWeights")
prefix-list
route-map
filter-listweight
defaultweight

1. Youcansettheweightusingaroutemapappliedtoaneighborin
theoutgoingdirection.Trueorfalse?(Source:"InfluencingBGP
RouteSelectionwithWeights")
true
false

1. WhichtwoofthefollowingstatementsarecorrectregardingBGP
routeselection?(Choosetwo.)(Source:"InfluencingBGPRoute
SelectionwithWeights")
Iftworouteshavethesameweightattribute,theroutewiththelowestlocal
preferenceischosen.
Theroutewiththehighestweightisalwayschosenfirst.
TheweightattributeisglobalwithinanAS.
Theweightattributeisonlylocaltothelocalrouter.
Theweightvalueispropagatedbyallrouters.

1. Whatisakeydifferencebetweenthelocalpreferenceandweight
attributes?(Source:"SettingBGPLocalPreference")
Localpreferenceislocaltotherouteonwhichitisconfigured.
LocalpreferenceislocaltotheASwithinwhichithasbeenconfigured.
LocalpreferenceislocaltotheBGPadministrativedomain.
LocalpreferenceisglobaltoaBGPdomain.

1. Whatisthedefaultlocalpreferenceforroutesthatarereceivedfrom
aBGPneighbor?(Source:"SettingBGPLocalPreference")
0
100
Thereisnodefaultlocalpreferencevalue.
ItdependsontheCiscoIOSrelease.

1. Whichtwostatementsregardinglocalpreferencearetrue?(Choose
two.)(Source:"SettingBGPLocalPreference")
Thehighervalueforlocalpreferenceispreferred.
LocalpreferenceisusedonlybetweenEBGPneighbors
Thelowervalueforlocalpreferenceispreferred.
LocalpreferenceisusedonlybetweenIBGPneighbors

1. Whichtwoofthefollowingstatementsabouttheinfluenceoflocal
preferenceonBGProuteselectionisaccurate?(Choosetwo.)
(Source:"SettingBGPLocalPreference")
Whenyousetlocalpreference,youcanviewitonneighboringrouters,but
youmustresetit.
YoucanuselocalpreferencetoensureAS-widerouteselectionpolicy.
Localpreferenceisusedtoselectrouteswithunequalweights.
Localpreferenceisthesecond-strongestcriterionintherouteselection
process.

1. Letsaywehavetworoutestothesamedestination,fistonehasa
weightof50andalocalpreferenceof150,whiletheotheronehasa
weightof150andalocalpreferenceof50.Thefistroutewillbe
selectedasthebestone,sinceithashigherlocalpreferencevalue.
Trueorfalse?(Source:"SettingBGPLocalPreference")
true
false

1. WhichCiscoIOScommandisusedtochangethedefaultvalueof
localpreference?(Source:"SettingBGPLocalPreference")
setlocal-preference
bgpdefaultlocal-preference
showipbgp
showipbgpprefix

1. WhichCiscoIOScommandisusedtoconfigureBGPlocal
preferencewithroute-mapstatements?(Source:"SettingBGPLocal
Preference")
setlocal-preference
bgpdefaultlocal-preference
showipbgp
showipbgpprefix

1. Locallyapplieddefaultvaluecanbedisplayedwithshowipbgp
command.Trueorfalse?(Source:"SettingBGPLocalPreference")
true
false

1. WhichCiscoIOScommandisnecessarytodisplaythelocally
appliedBGPvalue?(Source:"SettingBGPLocalPreference")
showbgppreferencedetail
showipbgp
showipbgpdetail
showipbgpprefix

1. WhichtwostatementsregardingtheASpatharetrue?(Choose
two.)(Source:"UsingASPathPrepending")
TheshorterASpathispreferred.
ThelongerASpathispreferred.
TheASpathisprependedandexchangedbetweenautonomoussystems.
TheASpathislocaltoanAS.

1. WhatisASpathprepending?(Source:"UsingASPathPrepending")
Whenarouter,sendingaBGPupdate,addstheASnumberoftherouter
fromwhichitreceivedtheroutetotheASpathattribute.
Whenarouter,sendingaBGPupdate,addstheASnumberoftherouter
towhichitissendingtheroutetotheASpathattribute.
Whenarouter,sendingaBGPupdate,addsitsASnumbertotheASpath
attributemultipletimes.
WhenarouterusestheASpathattributeinrouteselection.

1. TheASpathwillbetherouteselectioncriterionthatisusedwhen
whichofthefollowingistrue?(Source:"UsingASPathPrepending")
ItisthefirstcriterionthatisusedinBGProuteselection.
Itisusedwhenthereisnodifferenceinweight,localpreference,orroute
origination.
ItisusedwhentheMEDisidenticalonthecandidateroutes.
Theweight,localpreference,MED,andoriginattributesmustbeidentical
beforetheASpathattributeisusedforrouteselection.

1. WhichcommanddoyouusetomanipulatetheASpathattribute?
(Source:"UsingASPathPrepending")
Theglobalconfigurationcommandsetas-pathprependas-number.
Therouterconfigurationcommandsetas-pathprependas-number.
Thesetas-pathprependas-numbercommandinaroute-map.
Theinterfaceglobalcommandsetas-pathprependas-number.

1. TheconfigurationbelowisfromarouterinAS347,whichis
advertisingnetwork11.0.0.0/8toanEBGPneighbor2.0.0.2inAS
529.WhatarethecontentsoftheASpathattributeforroute
11.0.0.0/8onarouterthatisresidinginAS529?(Source:"UsingAS
PathPrepending")route-mapaddASpermit10
setas-pathprepend347347347
routerbgp347
neighbor2.0.0.2remote-as529
neighbor2.0.0.2route-mapaddASout
347347347
347347347347
529347347347
529347347347347

1. WhydoyouneedtouseASpathprepending?(Source:"UsingAS
PathPrepending")
ASpathprependingallowsacustomertopotentiallyinfluencereturnpath
routeselection.
ASpathprependingisusedonacustomerroutertocontroloutgoingroute
updates.
ServiceprovidersuseASpathprependingtocontrolincomingupdates
fromacustomerAS.
ASpathprependingisusedbetweenserviceprovidersthatareconnected
tothesamecustomerAStodeterminewhichwillbetheprimarylinktothe
customer.

1. WhichregularexpressionwillallowanyASpathnumber,butwitha
lengthofone?(Source:"UsingASPathPrepending")
^[0-9]+$
^[0-9](_[0-9])*$
^_[0-9]$
^[1-8]+$

1. HowdoesASpathprependingaffectarouter?(Source:"UsingAS
PathPrepending")
ASpathprependingissimplyatermthatisusedtodescribewhenarouter
usestheASpathattributeinrouteselectionandhencedoesnotaffect
routerresources.
ThelongertheASpathattributeattachedtoBGPupdates,themorerouter
memoryrequirementsincrease.
ASpathprependingdoesnotimpacttherouterbecauseCiscoIOS
softwarerecognizesthatASpathprependingisinuseandstoresasingle
ASnumberwithapointertothenumberofASpathprepends.
ASpathprependingcausestheroutertooperateinprocess-switching
modebecausetheBGPupdatemustbestored,manipulated,andthen
rewrittentoaccommodatethenewASpathattribute.

1. Whichtwoofthefollowingarecharacteristicsofthefunctionofthe
BGPHideLocal-AutonomousSystemfeature?(Choosetwo.)
(Source:"UsingASPathPrepending")
AllowsyoutotransparentlychangetheASnumberfortheentireBGP
network.
EnsuresthatroutescanbepropagatedthroughouttheAS.
AllowscustomizationoftheASnumberforEBGPpeergroupingsthrough
thesetas-pathcommand.
ChangestheASnumberforallIBGPpeersatthesametime.

1. WhatisthetypicalapplicationoftheMEDattribute?(Source:
"UnderstandingBGPMulti-ExitDiscriminators")
ToinfluencepathselectionoutofanoriginatingAS.
Toprovideastrongmetrictoselectthebestpathwhenmultipleroutes
exist.
TohaveaBGPattributetraversingmanyautonomoussystemswhile
influencingpathselection.
ToinfluencethereturnpathoftrafficbackintoanAS.

1. WhatisthedefaultMEDvalue?(Source:"UnderstandingBGPMulti-
ExitDiscriminators")
0
100
ThereisnodefaultMEDvalue.
ItdependsontheCiscoIOSrelease.

1. WhatarethreeBGPattributesthatarecomparedbeforetheMED?
(Choosethree.)(Source:"UnderstandingBGPMulti-Exit
Discriminators")
largestweight
originatedroutes
ASpathlength
lowestIPaddress

1. WhichtwostatementsabouttheCiscoIOScommandthatis
requiredtoconfigurechangestothedefaultBGPMEDonaCisco
IOSrouterareaccurate?(Choosetwo.)(Source:"Understanding
BGPMulti-ExitDiscriminators")
TheMEDisamandatoryattribute.
Usingthedefault-metriccommandinBGPconfigurationmodewillcause
oneredistributednetworktohavethespecifiedMEDvalue.
ThereisnoMEDattributethatisattachedtoaroutebydefault.
Tosetthedefaultmetricvalue(MED)forBGProutes,usethedefault-
metriccommand.

1. WhichtwostatementsabouttheCiscoIOScommandsthatare
requiredtoconfigurechangestotheBGPMEDattributewithroute-
mapstatementsareaccurate?(Choosetwo.)(Source:
"UnderstandingBGPMulti-ExitDiscriminators")
Thesetmetriccommandisusedwithinroute-mapconfigurationmodeto
settheMEDattribute.
Theneighboraddressroute-mapnamein|outcommandappliesa
route-maptoincomingupdatesfromallneighbors.
Per-neighborMEDisconfiguredbyusingaroute-mapwithamatch
condition.
Youcanusearoute-maptosettheMEDonincomingoroutgoing
updates.

1. WhichtwoofthefollowingstatementsabouttheCiscoIOS
commandsthatarerequiredtoconfigureadvancedMEDfeatureson
Ciscoroutersareaccurate?(Choosetwo.)(Source:"Understanding
BGPMulti-ExitDiscriminators")
Thebgpbestpathmedconfedcommandallowsrouterstocompare
pathslearnedfromconfederationpeers.
WhenyouenableadeterministicMEDcomparison,youallowarouterto
compareMEDvaluesafteritconsidersBGProutetype(externalor
internal)andIGPmetrictothenext-hopaddress.
Usethebgpalways-compare-medcommandtoforcetherouterto
comparetheMEDevenifthepathscomefromdifferentautonomous
systems.
CiscoIOSsoftware,ontheotherhand,regardsamissingMEDattribute
ashavingavalueof1.

1. Ifyouconfigureinboundsoftreconfigurationwitharoute-mapand
issuetheshowipbgpprefixcommand,whichvalueoftheMED
attributeisdisplayed?(Source:"UnderstandingBGPMulti-Exit
Discriminators")
Onlytheoriginalroute(noMED)isdisplayed.
Boththeoriginalrouteandthemodifiedroutearedisplayed.
Onlythemodifiedrouteisdisplayed.
TheMEDattributeisnotdisplayedwiththeshowipbgpprefixcommand.

1. WhichofthefollowingstatementsabouttheCiscoIOScommands
thatarerequiredtotroubleshootBGPMEDconfigurationsona
Ciscorouterisaccurate?(Source:"UnderstandingBGPMulti-Exit
Discriminators")
ToseetheoriginalMED,youneedtoenablehardreconfigurationonthe
router.
Thecommandshowipbgpneighboraddressreceived-routesdisplays
theoriginalupdatesbeforeanyfiltersorroute-mapshavefilteredor
changedthem.
Ifhardreconfigurationisenabled,theoriginalupdatestotheMEDattribute
areavailablebyusingtheshowipbgpprefixcommand.
IssuingtheshowiproutecommandwilldisplaytheMEDvalue.

1. WhichtwostatementsregardingtheMEDaretrue?(Choosetwo.)
(Source:"UnderstandingBGPMulti-ExitDiscriminators")
ThehighervaluefortheMEDispreferred.
ThelowervaluefortheMEDispreferred.
TheMEDisexchangedbetweenautonomoussystems.
TheMEDislocaltoanAS.

1. WhataretworeasonswhyitisnotfeasibletousetheMEDto
influencereturnpathselectionwhenmultipleautonomoussystems
areinvolved?(Choosetwo.)(Source:"AddressingBGP
Communities")
TheMEDattributeisdesignedtoinfluenceoutboundpathselectiononly.
TheASpathattributewouldbeusedforpathselectionregardlessofany
configuredMEDvalue.
Theweightattributewillalwaysbeused,giventhatitisfirstintheBGP
routeselectionprocess.
TheMEDcannotbepropagatedacrossseveralautonomoussystems.

1. DoesthecommunityattributehaveanyinfluenceonBGPpath
selection?(Source:"AddressingBGPCommunities")
No,communitiesaresimplytagsthatareappliedtoBGProutes.
No,communitiesarenontransitiveattributes.
Yes,BGPpathsareselectedbasedonthevalueinthecommunitytag.
Yes,thecommunityattributeispartoftheBGProuteselectionprocess.

1. MatchthestepswiththeactionsdescribinghowBGPcommunities
canfacilitateproperreturnpathselection.(Source:"AddressingBGP
Communities")
Defineadministrativepolicygoalsthatyou
needtoimplement. Step3
Enablecommunitydistributionthroughout
yourAStoallowcommunitypropagation. Step5
Definethefiltersandrouteselectionpolicy
thatwillachievetherequiredgoals. Step2
Applycommunitiesonincomingupdates
fromneighboringautonomoussystemsortell
theneighborstosetthecommunities
themselves.
Step1
Matchcommunitieswithroute-mapsand
routefilters,changeBGPattributes,or
influencetherouteselectionprocessbased
onthecommunitiesthatareattachedtothe
BGProutes.
Step4
Assignacommunityvaluetoeachgoal. Step6

1. HowmanycommunitytagscanbeattachedtoasingleBGProute?
(Source:"AddressingBGPCommunities")
1
32
256
Itdependsonthenumberthatisconfiguredwiththeipbgpcommunity
command.

1. Whichthreeofthefollowingareactivitiesthatarerequiredto
successfullydeployBGPcommunitiesinaBGP-basednetwork?
(Choosethree.)(Source:"AddressingBGPCommunities")
Settingcommunities,whichrequiresaroute-map.
Creatingcommunity-liststobeusedwithinroute-mapstomatchon
communityvalues.
Enablingcommunitypropagationperneighborfordesignatedinternal
neighbors.
Creatingroute-mapswherecommunity-listsareusedtomatchon
communityvalues.

1. WhichtwoofthefollowingstatementsabouttheCiscoIOS
commandsthatarerequiredtoconfigureroutetaggingwithBGP
communitiesareaccurate?(Choosetwo.)(Source:"Addressing
BGPCommunities")
Youcanattachupto35communitiestoasingleroutewithoneroute-map
setstatement.
Omittingtheadditivekeywordfromthesetcommunitycommandresults
inoverwritinganyoriginalcommunityattributes.
Theglobalcommandipbgp-communitynew-formatisrecommendedon
allrouterswhenevercommunitiescontaintheASnumber.
Youcannotusearoute-mapwithredistributionfromanotherrouting
protocol.

1. WhichofthefollowingstatementsabouttheCiscoIOScommand
thatisrequiredtoenableBGPcommunitypropagationtoBGP
neighborsisaccurate?(Source:"AddressingBGPCommunities")
CommunitypropagationtoBGPneighborsisautomaticallyconfigured.
ItisnecessarytomanuallystripcommunitiesinoutgoingBGPupdates.
Theneighborip-addresssend-communitycommandcannotbeapplied
toapeergroup.
Theneighborip-addresssend-communitycommandisneededto
propagatecommunityattributestoBGPneighbors.

1. WhichmatchcriteriaarespecifiedinastandardBGPcommunity-
list?(Source:"AddressingBGPCommunities")
destinationIPaddresses
regularexpressions
communityattributevalues
ASnumbers

1. Whatistheresultoftaggingaroutewiththeno-exportcommunity?
(Source:"AddressingBGPCommunities")
TheroutewillnotbeadvertisedwithinthelocalAS.
TheupstreamASwillnotbeallowedtoexporttheroute.
Theroutecannotbeexportedtoanotherroutingprotocol.
Therouterwillnotpropagatetheroutetoanyexternalneighborsexceptto
intra-confederationexternalneighbors.

1. MatchthefunctionstotheCiscoIOScommandsthatmonitorBGP
communities.(Source:"AddressingBGPCommunities")
DisplaysallroutesinaBGPtablethathave
allthespecifiedcommunitiesattached. showipbgpcommunity
DisplaysallroutesinBGPtablethathave
exactlythespecifiedcommunitiesattached. showipbgpcommunity-listclist
DisplaysallroutesinaBGPtablethathave
atleastonecommunityattached. showipbgpcommunityas:nn[as:nn...]
DisplaysallroutesinBGPtablethatmatch
community-listclist.
showipbgpcommunityas:nn[as:nn...]
exact

1. WhichtwoofthefollowingstatementsaboutthefunctionoftheBGP
LinkBandwidthfeatureareaccurate?(Choosetwo.)(Source:
"AddressingBGPCommunities")
TheBGPLinkBandwidthfeatureisusedtoenablemultipathload
balancingforexternallinkswithunequalbandwidthcapacity.
WhentheBGPLinkBandwidthfeatureisenabled,routeslearnedfrom
directlyconnectedexternalneighborarepropagatedthroughtheIBGP
networkwiththebandwidthofthesourceexternallink.
TheconfigurationoftheBGPLinkBandwidthfeaturecanbeusedonly
withIBGPmultipathfeaturestoenableunequal-costloadbalancingover
multiplelinks.
ToconfigureBGPtoadvertisethebandwidthoflinksthatareusedtoexit
anASusethebgpdmzlink-bwcommand.

1. WhichthreeofthefollowingfunctionsofBGPnamedcommunity-
listsareaccurate?(Choosethree.)(Source:"AddressingBGP
Communities")
Allowsthenetworkoperatortoassignmeaningfulnamestocommunity-
lists
Setslimitsonthenumberofnamedcommunity-listthatcanbeconfigured
Cannotbeconfiguredwithregularexpressionsandwithnumbered
community-lists.
Increasesthenumberofcommunity-liststhatcanbeconfiguredbya
networkoperator.
Appliespoliciestolargenumbersofroutesbyusingmatchandset
clausesintheconfigurationofroutemaps.
Setslimitof200communitygroupsthatcanbeconfiguredwithineach
typeoflist.

1. WhichtwoofthefollowingstatementsabouttheBGPCost
Communityfeatureareaccurate?(Choosetwo.)(Source:
"AddressingBGPCommunities")
Thepathwiththehighestcostcommunitynumberispreferred.
ThecostcommunityattributeinfluencestheBGPbestpathselection
processatthePOI.
Thecostcommunitycanbeusedasa"tiebreaker"duringthebest-path
selectionprocess.
Ifthecostcommunityvaluesareequal,thencostcommunitycomparison
proceedstothenexthighestcommunityIDforthisPOI.

1. WhichthreeofthefollowingarefunctionsoftheBGPSupportfor
SequencedEntriesinExtendedCommunityLists?(Choosethree.)
(Source:"AddressingBGPCommunities")
AllowsautomaticsequencingofindividualentriesinBGPextended
community-lists.
Providestheabilitytoremoveorresequenceextendedcommunity-list
entrieswithoutdeletingtheentireexistingextendedcommunity-list.
Configuresanextendedcommunity-listtousecustomvalues.
Removesorresequencesextendedcommunity-listentrieswhiledeleting
theentireexistingextendedcommunity-list.
Isactivatedbytheipextcommunity-listcommandinglobalconfiguration
mode.
Configuressequencenumbersforstandardcommunity-listentries.

1. Numberthe10BGPselectioncriteriaintheorderinwhichtheyare
used,fromthefirsttothelast,whenselectingtheBGPpaththatis
submittedtotheIProutingtable.(Source:"InfluencingBGPRoute
SelectionwithWeights")
AnswerKey
Preferthehighestweight. 1
PrefertheshortestASpath. 4
PreferanEBGPpathoveranIBGPpath. 7
Preferthehighestlocalpreference. 2
Preferthelowestorigincode(IGP<EGP<
incomplete). 5
PreferthepaththroughtheclosestIGP
neighbor. 8
Prefertheroutethatwasoriginatedbythe
localrouter. 3
PreferthepathwiththelowestneighborBGP
routerID. 10
PrefertheoldestrouteforEBGPpaths. 9
PreferthelowestMED. 6

1. WhatisthedefaultweightforroutesthatarereceivedfromaBGP
neighbor?(Source:"InfluencingBGPRouteSelectionwithWeights")
0
100
32768
ItdependsontheCiscoIOSrelease.

1. Whenaretheweightsthatareconfiguredonaneighborenforced?
(Source:"InfluencingBGPRouteSelectionwithWeights")
Beforethenewweightscantakeeffect,theBGPprocessontherouter
mustberemovedandreconfigured.
Theroutermustfirstberebootedforthenewweightstotakeeffect.
ThenewweightswillbeappliedaftertheBGPupdateintervalof30
minutesexpires.
Thenewweightconfigurationisappliedtoallroutesthatarereceived
followingtheconfigurationchange.

1. Ifyouwantallroutesreceivedfromtheneighbortohavethenew
weightvalueapplied,youhavetoreestablishBGPsession.Trueor
false?(Source:"InfluencingBGPRouteSelectionwithWeights")
true
false

1. Howcouldyouimplementaprimary/backupISProutingpolicyby
usingweights?(Source:"InfluencingBGPRouteSelectionwith
Weights")
AssignhigherweightstoallroutesthatarereceivedfromthebackupISP.
AssignlowerweightstoallroutesthatarereceivedfromthebackupISP.
AssignhigherweightstoallroutesthatarereceivedfromtheprimaryISP.
AssignlowerweightstoallroutesthatarereceivedfromtheprimaryISP.

1. Whenyouareusingroute-mapstomodifyweights,whathappensby
defaulttoaroutethatdoesnotmatchanyoftheroute-map
statements?(Source:"InfluencingBGPRouteSelectionwith
Weights")
Therouteisacceptedwiththeweightattributeunmodified.
Therouteisdiscarded.
TherouteisinsertedintotheBGPtablebutnotintotheIProutingtable.
Anerrorisdisplayedontherouterconsoleandinrouterdebugs.

1. Whichmethodofinfluencingrouteselectionwithweightsisthelast
tobeappliedonanincominginterface?(Source:"InfluencingBGP
RouteSelectionwithWeights")
prefix-list
route-map
filter-listweight
defaultweight

1. Youcansettheweightusingaroutemapappliedtoaneighborin
theoutgoingdirection.Trueorfalse?(Source:"InfluencingBGP
RouteSelectionwithWeights")
true
false

1. WhichtwoofthefollowingstatementsarecorrectregardingBGP
routeselection?(Choosetwo.)(Source:"InfluencingBGPRoute
SelectionwithWeights")
Iftworouteshavethesameweightattribute,theroutewiththelowestlocal
preferenceischosen.
Theroutewiththehighestweightisalwayschosenfirst.
TheweightattributeisglobalwithinanAS.
Theweightattributeisonlylocaltothelocalrouter.
Theweightvalueispropagatedbyallrouters.

1. Whatisakeydifferencebetweenthelocalpreferenceandweight
attributes?(Source:"SettingBGPLocalPreference")
Localpreferenceislocaltotherouteonwhichitisconfigured.
LocalpreferenceislocaltotheASwithinwhichithasbeenconfigured.
LocalpreferenceislocaltotheBGPadministrativedomain.
LocalpreferenceisglobaltoaBGPdomain.

1. Whatisthedefaultlocalpreferenceforroutesthatarereceivedfrom
aBGPneighbor?(Source:"SettingBGPLocalPreference")
0
100
Thereisnodefaultlocalpreferencevalue.
ItdependsontheCiscoIOSrelease.

1. Whichtwostatementsregardinglocalpreferencearetrue?(Choose
two.)(Source:"SettingBGPLocalPreference")
Thehighervalueforlocalpreferenceispreferred.
LocalpreferenceisusedonlybetweenEBGPneighbors
Thelowervalueforlocalpreferenceispreferred.
LocalpreferenceisusedonlybetweenIBGPneighbors

1. Whichtwoofthefollowingstatementsabouttheinfluenceoflocal
preferenceonBGProuteselectionisaccurate?(Choosetwo.)
(Source:"SettingBGPLocalPreference")
Whenyousetlocalpreference,youcanviewitonneighboringrouters,but
youmustresetit.
YoucanuselocalpreferencetoensureAS-widerouteselectionpolicy.
Localpreferenceisusedtoselectrouteswithunequalweights.
Localpreferenceisthesecond-strongestcriterionintherouteselection
process.

1. Letsaywehavetworoutestothesamedestination,fistonehasa
weightof50andalocalpreferenceof150,whiletheotheronehasa
weightof150andalocalpreferenceof50.Thefistroutewillbe
selectedasthebestone,sinceithashigherlocalpreferencevalue.
Trueorfalse?(Source:"SettingBGPLocalPreference")
true
false

1. WhichCiscoIOScommandisusedtochangethedefaultvalueof
localpreference?(Source:"SettingBGPLocalPreference")
setlocal-preference
bgpdefaultlocal-preference
showipbgp
showipbgpprefix

1. WhichCiscoIOScommandisusedtoconfigureBGPlocal
preferencewithroute-mapstatements?(Source:"SettingBGPLocal
Preference")
setlocal-preference
bgpdefaultlocal-preference
showipbgp
showipbgpprefix

1. Locallyapplieddefaultvaluecanbedisplayedwithshowipbgp
command.Trueorfalse?(Source:"SettingBGPLocalPreference")
true
false

1. WhichCiscoIOScommandisnecessarytodisplaythelocally
appliedBGPvalue?(Source:"SettingBGPLocalPreference")
showbgppreferencedetail
showipbgp
showipbgpdetail
showipbgpprefix

1. WhichtwostatementsregardingtheASpatharetrue?(Choose
two.)(Source:"UsingASPathPrepending")
TheshorterASpathispreferred.
ThelongerASpathispreferred.
TheASpathisprependedandexchangedbetweenautonomoussystems.
TheASpathislocaltoanAS.

1. WhatisASpathprepending?(Source:"UsingASPathPrepending")
Whenarouter,sendingaBGPupdate,addstheASnumberoftherouter
fromwhichitreceivedtheroutetotheASpathattribute.
Whenarouter,sendingaBGPupdate,addstheASnumberoftherouter
towhichitissendingtheroutetotheASpathattribute.
Whenarouter,sendingaBGPupdate,addsitsASnumbertotheASpath
attributemultipletimes.
WhenarouterusestheASpathattributeinrouteselection.

1. TheASpathwillbetherouteselectioncriterionthatisusedwhen
whichofthefollowingistrue?(Source:"UsingASPathPrepending")
ItisthefirstcriterionthatisusedinBGProuteselection.
Itisusedwhenthereisnodifferenceinweight,localpreference,orroute
origination.
ItisusedwhentheMEDisidenticalonthecandidateroutes.
Theweight,localpreference,MED,andoriginattributesmustbeidentical
beforetheASpathattributeisusedforrouteselection.

1. WhichcommanddoyouusetomanipulatetheASpathattribute?
(Source:"UsingASPathPrepending")
Theglobalconfigurationcommandsetas-pathprependas-number.
Therouterconfigurationcommandsetas-pathprependas-number.
Thesetas-pathprependas-numbercommandinaroute-map.
Theinterfaceglobalcommandsetas-pathprependas-number.

1. TheconfigurationbelowisfromarouterinAS347,whichis
advertisingnetwork11.0.0.0/8toanEBGPneighbor2.0.0.2inAS
529.WhatarethecontentsoftheASpathattributeforroute
11.0.0.0/8onarouterthatisresidinginAS529?(Source:"UsingAS
PathPrepending")route-mapaddASpermit10
setas-pathprepend347347347
routerbgp347
neighbor2.0.0.2remote-as529
neighbor2.0.0.2route-mapaddASout
347347347
347347347347
529347347347
529347347347347

1. WhydoyouneedtouseASpathprepending?(Source:"UsingAS
PathPrepending")
ASpathprependingallowsacustomertopotentiallyinfluencereturnpath
routeselection.
ASpathprependingisusedonacustomerroutertocontroloutgoingroute
updates.
ServiceprovidersuseASpathprependingtocontrolincomingupdates
fromacustomerAS.
ASpathprependingisusedbetweenserviceprovidersthatareconnected
tothesamecustomerAStodeterminewhichwillbetheprimarylinktothe
customer.

1. WhichregularexpressionwillallowanyASpathnumber,butwitha
lengthofone?(Source:"UsingASPathPrepending")
^[0-9]+$
^[0-9](_[0-9])*$
^_[0-9]$
^[1-8]+$

1. HowdoesASpathprependingaffectarouter?(Source:"UsingAS
PathPrepending")
ASpathprependingissimplyatermthatisusedtodescribewhenarouter
usestheASpathattributeinrouteselectionandhencedoesnotaffect
routerresources.
ThelongertheASpathattributeattachedtoBGPupdates,themorerouter
memoryrequirementsincrease.
ASpathprependingdoesnotimpacttherouterbecauseCiscoIOS
softwarerecognizesthatASpathprependingisinuseandstoresasingle
ASnumberwithapointertothenumberofASpathprepends.
ASpathprependingcausestheroutertooperateinprocess-switching
modebecausetheBGPupdatemustbestored,manipulated,andthen
rewrittentoaccommodatethenewASpathattribute.

1. Whichtwoofthefollowingarecharacteristicsofthefunctionofthe
BGPHideLocal-AutonomousSystemfeature?(Choosetwo.)
(Source:"UsingASPathPrepending")
AllowsyoutotransparentlychangetheASnumberfortheentireBGP
network.
EnsuresthatroutescanbepropagatedthroughouttheAS.
AllowscustomizationoftheASnumberforEBGPpeergroupingsthrough
thesetas-pathcommand.
ChangestheASnumberforallIBGPpeersatthesametime.

1. WhatisthetypicalapplicationoftheMEDattribute?(Source:
"UnderstandingBGPMulti-ExitDiscriminators")
ToinfluencepathselectionoutofanoriginatingAS.
Toprovideastrongmetrictoselectthebestpathwhenmultipleroutes
exist.
TohaveaBGPattributetraversingmanyautonomoussystemswhile
influencingpathselection.
ToinfluencethereturnpathoftrafficbackintoanAS.

1. WhatisthedefaultMEDvalue?(Source:"UnderstandingBGPMulti-
ExitDiscriminators")
0
100
ThereisnodefaultMEDvalue.
ItdependsontheCiscoIOSrelease.

1. WhatarethreeBGPattributesthatarecomparedbeforetheMED?
(Choosethree.)(Source:"UnderstandingBGPMulti-Exit
Discriminators")
largestweight
originatedroutes
ASpathlength
lowestIPaddress

1. WhichtwostatementsabouttheCiscoIOScommandthatis
requiredtoconfigurechangestothedefaultBGPMEDonaCisco
IOSrouterareaccurate?(Choosetwo.)(Source:"Understanding
BGPMulti-ExitDiscriminators")
TheMEDisamandatoryattribute.
Usingthedefault-metriccommandinBGPconfigurationmodewillcause
oneredistributednetworktohavethespecifiedMEDvalue.
ThereisnoMEDattributethatisattachedtoaroutebydefault.
Tosetthedefaultmetricvalue(MED)forBGProutes,usethedefault-
metriccommand.

1. WhichtwostatementsabouttheCiscoIOScommandsthatare
requiredtoconfigurechangestotheBGPMEDattributewithroute-
mapstatementsareaccurate?(Choosetwo.)(Source:
"UnderstandingBGPMulti-ExitDiscriminators")
Thesetmetriccommandisusedwithinroute-mapconfigurationmodeto
settheMEDattribute.
Theneighboraddressroute-mapnamein|outcommandappliesa
route-maptoincomingupdatesfromallneighbors.
Per-neighborMEDisconfiguredbyusingaroute-mapwithamatch
condition.
Youcanusearoute-maptosettheMEDonincomingoroutgoing
updates.

1. WhichtwoofthefollowingstatementsabouttheCiscoIOS
commandsthatarerequiredtoconfigureadvancedMEDfeatureson
Ciscoroutersareaccurate?(Choosetwo.)(Source:"Understanding
BGPMulti-ExitDiscriminators")
Thebgpbestpathmedconfedcommandallowsrouterstocompare
pathslearnedfromconfederationpeers.
WhenyouenableadeterministicMEDcomparison,youallowarouterto
compareMEDvaluesafteritconsidersBGProutetype(externalor
internal)andIGPmetrictothenext-hopaddress.
Usethebgpalways-compare-medcommandtoforcetherouterto
comparetheMEDevenifthepathscomefromdifferentautonomous
systems.
CiscoIOSsoftware,ontheotherhand,regardsamissingMEDattribute
ashavingavalueof1.

1. Ifyouconfigureinboundsoftreconfigurationwitharoute-mapand
issuetheshowipbgpprefixcommand,whichvalueoftheMED
attributeisdisplayed?(Source:"UnderstandingBGPMulti-Exit
Discriminators")
Onlytheoriginalroute(noMED)isdisplayed.
Boththeoriginalrouteandthemodifiedroutearedisplayed.
Onlythemodifiedrouteisdisplayed.
TheMEDattributeisnotdisplayedwiththeshowipbgpprefixcommand.

1. WhichofthefollowingstatementsabouttheCiscoIOScommands
thatarerequiredtotroubleshootBGPMEDconfigurationsona
Ciscorouterisaccurate?(Source:"UnderstandingBGPMulti-Exit
Discriminators")
ToseetheoriginalMED,youneedtoenablehardreconfigurationonthe
router.
Thecommandshowipbgpneighboraddressreceived-routesdisplays
theoriginalupdatesbeforeanyfiltersorroute-mapshavefilteredor
changedthem.
Ifhardreconfigurationisenabled,theoriginalupdatestotheMEDattribute
areavailablebyusingtheshowipbgpprefixcommand.
IssuingtheshowiproutecommandwilldisplaytheMEDvalue.

1. WhichtwostatementsregardingtheMEDaretrue?(Choosetwo.)
(Source:"UnderstandingBGPMulti-ExitDiscriminators")
ThehighervaluefortheMEDispreferred.
ThelowervaluefortheMEDispreferred.
TheMEDisexchangedbetweenautonomoussystems.
TheMEDislocaltoanAS.

1. WhataretworeasonswhyitisnotfeasibletousetheMEDto
influencereturnpathselectionwhenmultipleautonomoussystems
areinvolved?(Choosetwo.)(Source:"AddressingBGP
Communities")
TheMEDattributeisdesignedtoinfluenceoutboundpathselectiononly.
TheASpathattributewouldbeusedforpathselectionregardlessofany
configuredMEDvalue.
Theweightattributewillalwaysbeused,giventhatitisfirstintheBGP
routeselectionprocess.
TheMEDcannotbepropagatedacrossseveralautonomoussystems.

1. DoesthecommunityattributehaveanyinfluenceonBGPpath
selection?(Source:"AddressingBGPCommunities")
No,communitiesaresimplytagsthatareappliedtoBGProutes.
No,communitiesarenontransitiveattributes.
Yes,BGPpathsareselectedbasedonthevalueinthecommunitytag.
Yes,thecommunityattributeispartoftheBGProuteselectionprocess.

1. MatchthestepswiththeactionsdescribinghowBGPcommunities
canfacilitateproperreturnpathselection.(Source:"AddressingBGP
Communities")
Defineadministrativepolicygoalsthatyou
needtoimplement. Step1
Definethefiltersandrouteselectionpolicy
thatwillachievetherequiredgoals. Step2
Assignacommunityvaluetoeachgoal. Step3
Applycommunitiesonincomingupdates
fromneighboringautonomoussystemsortell
theneighborstosetthecommunities
themselves.
Step4
Matchcommunitieswithroute-mapsand
routefilters,changeBGPattributes,or
influencetherouteselectionprocessbased
onthecommunitiesthatareattachedtothe
BGProutes.
Step5
Enablecommunitydistributionthroughout
yourAStoallowcommunitypropagation. Step6

1. HowmanycommunitytagscanbeattachedtoasingleBGProute?
(Source:"AddressingBGPCommunities")
1
32
256
Itdependsonthenumberthatisconfiguredwiththeipbgpcommunity
command.

1. Whichthreeofthefollowingareactivitiesthatarerequiredto
successfullydeployBGPcommunitiesinaBGP-basednetwork?
(Choosethree.)(Source:"AddressingBGPCommunities")
Settingcommunities,whichrequiresaroute-map.
Creatingcommunity-liststobeusedwithinroute-mapstomatchon
communityvalues.
Enablingcommunitypropagationperneighborfordesignatedinternal
neighbors.
Creatingroute-mapswherecommunity-listsareusedtomatchon
communityvalues.

1. WhichtwoofthefollowingstatementsabouttheCiscoIOS
commandsthatarerequiredtoconfigureroutetaggingwithBGP
communitiesareaccurate?(Choosetwo.)(Source:"Addressing
BGPCommunities")
Youcanattachupto35communitiestoasingleroutewithoneroute-map
setstatement.
Omittingtheadditivekeywordfromthesetcommunitycommandresults
inoverwritinganyoriginalcommunityattributes.
Theglobalcommandipbgp-communitynew-formatisrecommendedon
allrouterswhenevercommunitiescontaintheASnumber.
Youcannotusearoute-mapwithredistributionfromanotherrouting
protocol.

1. WhichofthefollowingstatementsabouttheCiscoIOScommand
thatisrequiredtoenableBGPcommunitypropagationtoBGP
neighborsisaccurate?(Source:"AddressingBGPCommunities")
CommunitypropagationtoBGPneighborsisautomaticallyconfigured.
ItisnecessarytomanuallystripcommunitiesinoutgoingBGPupdates.
Theneighborip-addresssend-communitycommandcannotbeapplied
toapeergroup.
Theneighborip-addresssend-communitycommandisneededto
propagatecommunityattributestoBGPneighbors.

1. WhichmatchcriteriaarespecifiedinastandardBGPcommunity-
list?(Source:"AddressingBGPCommunities")
destinationIPaddresses
regularexpressions
communityattributevalues
ASnumbers

1. Whatistheresultoftaggingaroutewiththeno-exportcommunity?
(Source:"AddressingBGPCommunities")
TheroutewillnotbeadvertisedwithinthelocalAS.
TheupstreamASwillnotbeallowedtoexporttheroute.
Theroutecannotbeexportedtoanotherroutingprotocol.
Therouterwillnotpropagatetheroutetoanyexternalneighborsexceptto
intra-confederationexternalneighbors.

1. MatchthefunctionstotheCiscoIOScommandsthatmonitorBGP
communities.(Source:"AddressingBGPCommunities")
DisplaysallroutesinaBGPtablethathave
atleastonecommunityattached. showipbgpcommunity
DisplaysallroutesinaBGPtablethathave
allthespecifiedcommunitiesattached. showipbgpcommunityas:nn[as:nn...]
DisplaysallroutesinBGPtablethathave
exactlythespecifiedcommunitiesattached.
showipbgpcommunityas:nn[as:nn...]
exact
DisplaysallroutesinBGPtablethatmatch
community-listclist.showipbgpcommunity-listclist

1. WhichtwoofthefollowingstatementsaboutthefunctionoftheBGP
LinkBandwidthfeatureareaccurate?(Choosetwo.)(Source:
"AddressingBGPCommunities")
TheBGPLinkBandwidthfeatureisusedtoenablemultipathload
balancingforexternallinkswithunequalbandwidthcapacity.
WhentheBGPLinkBandwidthfeatureisenabled,routeslearnedfrom
directlyconnectedexternalneighborarepropagatedthroughtheIBGP
networkwiththebandwidthofthesourceexternallink.
TheconfigurationoftheBGPLinkBandwidthfeaturecanbeusedonly
withIBGPmultipathfeaturestoenableunequal-costloadbalancingover
multiplelinks.
ToconfigureBGPtoadvertisethebandwidthoflinksthatareusedtoexit
anASusethebgpdmzlink-bwcommand.

1. WhichthreeofthefollowingfunctionsofBGPnamedcommunity-
listsareaccurate?(Choosethree.)(Source:"AddressingBGP
Communities")
Allowsthenetworkoperatortoassignmeaningfulnamestocommunity-
lists
Setslimitsonthenumberofnamedcommunity-listthatcanbeconfigured
Cannotbeconfiguredwithregularexpressionsandwithnumbered
community-lists.
Increasesthenumberofcommunity-liststhatcanbeconfiguredbya
networkoperator.
Appliespoliciestolargenumbersofroutesbyusingmatchandset
clausesintheconfigurationofroutemaps.
Setslimitof200communitygroupsthatcanbeconfiguredwithineach
typeoflist.

1. WhichtwoofthefollowingstatementsabouttheBGPCost
Communityfeatureareaccurate?(Choosetwo.)(Source:
"AddressingBGPCommunities")
Thepathwiththehighestcostcommunitynumberispreferred.
ThecostcommunityattributeinfluencestheBGPbestpathselection
processatthePOI.
Thecostcommunitycanbeusedasa"tiebreaker"duringthebest-path
selectionprocess.
Ifthecostcommunityvaluesareequal,thencostcommunitycomparison
proceedstothenexthighestcommunityIDforthisPOI.

1. WhichthreeofthefollowingarefunctionsoftheBGPSupportfor
SequencedEntriesinExtendedCommunityLists?(Choosethree.)
(Source:"AddressingBGPCommunities")
AllowsautomaticsequencingofindividualentriesinBGPextended
community-lists.
Providestheabilitytoremoveorresequenceextendedcommunity-list
entrieswithoutdeletingtheentireexistingextendedcommunity-list.
Configuresanextendedcommunity-listtousecustomvalues.
Removesorresequencesextendedcommunity-listentrieswhiledeleting
theentireexistingextendedcommunity-list.
Isactivatedbytheipextcommunity-listcommandinglobalconfiguration
mode.
Configuressequencenumbersforstandardcommunity-listentries.

Introduction
Customerswhoareconnectingtoaserviceprovidermustconsidervarious
requirementsandchoosetheproperconnectivitytype.Ingeneral,threetypesof
connectivityareavailable:connectingtoasingleserviceprovider,connectingtoa
singleserviceproviderusingtwolinks,andconnectingtotwoindependentservice
providers.Basedontheconnectivitytypetheproperroutingmethods,IPaddressing,
andASnumberhavetobechosen.Afteralloftheseinputparametersareknownthe
customerandserviceprovidercanimplementthedesiredconnectivitytype.
Uponcompletingthismodule,youwillbeableto:
DescribetherequirementstoconnectcustomernetworkstotheInternetina
serviceproviderenvironment
Toimplementcustomerconnectivitybyusingstaticrouting
DefineshowtoimplementMultihomedcustomerconnectivityusingBGPtoa
singleISP
DefinehowtoimplementMultihomedcustomerconnectivityusingBGPto
multipleISPs
Customer-to-ProviderConnectivitywith
BGP

Overview
CustomersconnecttotheInternetbyusingserviceproviderstoenableapplications
suchasintranetconnectivitywithVPNs,extranetconnectivitywithsuppliers,and
otherInternetapplications.WhenplanningnetworkconnectivitytoanISP,youasa
networkdesignermustgivecarefulconsiderationtothevariousaspectsofthe
connectivity.Theseaspectsincludephysicalconnectiontypes,theredundancythat
thechosenconnectionmethodprovides,IPaddressingrequirements,andAS
numberingconsiderations,ifthenetworkdesignisgoingtomeetbothbusinessand
technicalrequirementsoftheapplicationsthatareplannedforthenetwork.
Inthislesson,youwilldiscusssolutionsforconnectingcustomernetworkstoservice
providers.Youwillalsodiscusscustomernetworkredundancyrequirements,routing
requirements,IPaddressingrequirements,andASnumberingrequirements.
Uponcompletingthislesson,youwillbeableto:
Identifyvariousphysicalconnectionsthatthecustomersusetoconnecttoa
serviceprovider
Describethelevelsofredundancythatisprovidedbyeachphysicalconnection
typethatthecustomersusetoconnecttoaserviceprovider
Identifyvariousroutingschemesthatthecustomersusetoconnecttoaservice
provider
Describeroutingschemesthatareappropriateforeachphysicalconnectiontype
thatthecustomersusetoconnecttoaserviceprovider
Describetheaddressingschemesthatthecustomersusetoconnecttoa
serviceprovider
DescribetheASnumberingschemesthatthecustomersusetoconnecttoa
serviceprovider
UnderstandingCustomer-to-Provider
ConnectivityRequirements

Internet customers have a wide range of connectivity and redundancy requirements:
Single-homed customers:
Single permanent connection to a single service provider.
Multiple permanent connections to a single provider in primary and backup
configuration.
Multiple permanent connections to a single provider used for load sharing of
traffic.
Multihomed customers:
Multiple permanent connections to multiple service providers for maximum
redundancy.
Serviceprovidercustomershavedifferentrequirements,suchasredundancy,
stability,security,flexibility,fortheirInternetconnectivity.Thesedifferent
requirementsresultindifferentsolutions:
AsinglepermanentconnectiontooneISP.Thissolutionmeetstherequirements
formostofthecustomers.
MultiplepermanentconnectionstooneISP,inwhichoneofthelinesisprimary
andtheotherlineisusedforbackuponly.Thissetupalsoprovidesredundancy
onthelinks.Comparedtoadial-upbackup,apermanentbackuplinkis
preferredforvariousreasons.Forexample,theseverebandwidthlimitationson
dial-uplinesandthetimethatisrequiredtoestablishadial-upconnection.
MultiplepermanentconnectionstooneISP,whichisusedforloadsharingof
traffic.Thissolutiongivesredundancyonthelinksbutalsoprovidesextra
bandwidth.
MultiplepermanentconnectionstomorethanoneISP.Thissolutionprovides
thehighestlevelofredundancy,becausenotonlydoesitcopewithlink-level
failuresbutalsowithfailureswithinthenetworkofaserviceprovider.
Customer-to-ProviderConnectivityTypes

Thelevelofredundancydependsonaphysicalconnectiontypethatthecustomers
usetoconnecttoaserviceprovider.
SinglePermanentConnection
The simplest setup is a single link between the customer network and the
service provider.
There is no redundancy for link, equipment, or service provider failure.
AsinglepermanentconnectiontooneISPisthemostcommonsetup.Thissetupis
alsothesimplesttoimplement.
Thecustomerconnectstoasingleserviceproviderusingasinglelink.Thecustomer
hasanedgerouterthatisconnectedtotheedgeroutersoftheISP.Thisconnection
ispermanentandcouldbealeasedline,aFrameRelay,orATMPVC,DSL,FFTx,
cable,orsomethingequivalent.
Youdonothaveredundancyinthissolution.Anyfailureonthepermanentlinkor
eitherofthetwoedgerouterscausesacompleteoutageoftheservice.Serious
failureswithintheISPnetworkthataffectallcustomersofthisISPalsoaffectthe
customerinthisexample.
MultiplePermanentConnectionsProvidingRedundancy
To increase redundancy, customers install several physical links to the service
provider.
Redundant links are used as follows:
Primary and backup.
For load sharing.
Redundancy is for link or equipment failure.
There is no redundancy for service provider failure.
Inthissetup,youhaveoneCErouterthatisconnectedtoonePErouter,and
anotherCEthatisconnectedtoanotherPErouter.Ifoneoftheseroutersfails,only
oneoftheconnectionsbreaksdown;theotherconnectionisstillavailable.
Thesetwolinksmaybeimplementedintwoscenarios:
Primaryandbackup:Onelinkisalwaysactive,whileanotheroneisthebackup
andisusedonlywhentheprimarylinkfails.BackupPVCsinFrameRelayor
ATMnetworkscanbeverycost-efficientincasethatthesePVCscarryonlya
verysmallvolumeoftrafficandthattheprimarypathisavailable.
Loadsharing:Bothlinksareusedatthesametimetoprovideloadbalancing.
Thedistributionoftheloadoverthelinksismorecomplicatedthanwhenboth
linksterminateinthesamerouter.
Again,becausethecustomerisconnectedtoasingleISP,redundancyisprovided
forlink,andcustomer,orISPdevicefailure.ThefailuresintheISPnetworkwillstill
CustomerRedundantConnectivity

affectthecustomer.Thissolutioncanmitigaterouterandlinkfailures,butitcannot
mitigateISPfailures.
MultiplePermanentConnectionsProvidingLoadSharing
Customers wanting to increase their access speed can install several physical links
between a pair of routers.
There is redundancy for link failure.
There is no redundancy for equipment failure.
Load sharing in this setup is optimal.
Inthissetup,youhaveasinglerouterinthecustomernetworkthatisconnectedtoa
singlerouterintheISPnetwork.Theredundancyislimitedtothelinklevelbecause
routerfailuresarenotcovered.Usingtwoparallellinksbetweentworoutersallows
foranoptimaldistributionofloadoverthelinks.
DependingontheswitchingpaththatisusedinthecustomerandtheISProuters,
loadsharingcanbeperformedbasedonvariousoptions.Onthedestinationaddress
only(fastswitching),onsource-destinationaddresspairs(defaultbehaviorforCEF),
oronapacket-by-packetbasis(processswitchingorCEF).
Asinthepreviousexamples,becausethecustomerisconnectedtoasingleISP,
seriousISPnetworkfailurewillaffectthecustomerregardlessofthelinkbackup.
ConnectionstoMultipleServiceProviders
Customers with maximum redundancy requirements install physical links to multiple
service providers.
Redundant links are used as follows:
Primary and backup.
Primary and backup with direct traffic.
For load sharing.
There is redundancy for link, equipment, or service provider failure.
Intheexample,twoCEroutershaveonepermanentconnectioneachtoadifferent
ISP.Linkanddevicefailuresarecoveredinthesamewayasintheprevious
examples.However,becausethetwoconnectionsinthisexamplegototwodifferent
ISPs,theredundancyalsocoversproblemswithinoneISPnetwork.Ifoneservice
providerfails,trafficwillstillflowthroughanotherserviceprovider,andthehighest
levelofredundancyisachieved.
Inthissetup,threescenariosarepossible:
Primaryandbackup:Onelinkisalwaysactive,whileanotheroneisthebackup
andisusedonlywhentheprimarylinkfails.
Primaryandbackupwithdirecttraffictothebackupserviceprovider:One
linkisactive,andanotheroneisthebackup.Exceptforthetrafficthatshouldgo
directlytoserviceprovider2.
Loadsharing:Bothlinksareusedatthesametimetoprovideloadbalancing.
Inallscenarios,thecustomerhastocooperatewithaserviceprovidertoachievethe
desiredsetup.Loadsharingbetweenthelinkscanneverbeoptimal.Equal
distributionofthereturntrafficloadfromtheInternetoverthetwoseparatelinks
cannotbeachieved.Distributionoftheloadofoutgoingtrafficisdonebasedon
destinationaddresses.Slowlyadjustingtherouterconfigurationparametersand
observingthelinktrafficloadchangescanhelpyouachieveanacceptable
distributionoftrafficbetweentwolinks.
AvoidinganyloadonthebackuplinkmayrequireassistancefromtheISPtowhich
thebackuplinkisconnected.

DifferentsolutionsforconnectingacustomernetworktothenetworkofanISP
requiredifferentmethodsofroutinginformationexchange.
Static or dynamic routing can be used between an Internet customer and a
service provider.
BGP is the only acceptable dynamic routing protocol.
Because of its lower complexity, static routing is preferred where possible.
Routingoptions:
Staticrouting:Staticroutingispreferredbecauseofitslowercomplexity.Ina
normalcase,thecustomernetworkmusthaveadefaultroutetotheISPnetwork
andtheISPnetworkmusthavearoutetotheIPprefixesthatthecustomerhas
initsnetwork.Asalways,staticroutingprovidesverylowredundancy,ifany.
Dynamicrouting:Dynamicroutingprovidesredundancy.Thecustomerandthe
ISPnetworksmustbeconfiguredtoexchangeacommonroutingprotocol.BGP
istheonlychoicebecauseofthelargevolumesofroutinginformation,the
inherentsecuritymechanismsofBGP,andtheabilityofBGPtohandlerouting
policies.
Customer-to-ProviderRoutingSchemes

Differentroutingschemesareappropriateforeachphysicalconnectiontypethatthe
customersusetoconnecttoaserviceprovider.
RoutingScheme:CustomerwithaSingleConnectiontoa
ServiceProvider
Whenthecustomerhasasingleconnectiontotheserviceprovider,staticroutingis
usuallyadequate.Thephysicaltopologydoesnotprovideanyredundancy,anditis
thereforeunnecessarytoaddthecomplexityofdynamicrouting.
Customers with a single connection to a service provider typically do not require
BGP:
Static routing is usually adequate.
The static route for the provider-assigned address space of the customer is
on the PE router.
The static default route is on the CE router.
BGP should not be used in this setup.
Inthiscase,keepthenetworksimplebyavoidingtheuseofBGP.Ifthereisstatic
routing,adefaultrouteisneededontheCErouterthatpointstothePErouter.A
staticrouteforthecustomernetworkisneededonthePErouter,whichpointstothe
CErouter.
IfyouuseBGP,theserviceprovidersendsadefaultroutetothecustomer,andthe
customeradvertisesitsownaddressspacetotheserviceprovider.
RoutingScheme:CustomerwithMultipleConnectionstoa
ServiceProvider
Static routing is preferred if physical link failure can be detected.
Traffic will enter a "black hole" if the physical link failure is not detected.
Multiplepermanentconnectionsbetweenasinglerouteronthecustomernetwork
andasinglerouterontheserviceprovidernetworkshouldbeconfiguredwithstatic
routing.Thisconfigurationenablesthelink-levelprocedurestodetectalinkfailure.
Withthistypeofconnection,twodefaultroutesareconfiguredontheCErouterthat
pointtothePErouter.TwostaticroutesareconfiguredonPErouter,pointingtoboth
linksbetweenthecustomerandtheISP.Ifeitherofthelinksfails,thelink-level
proceduresshoulddetectthisfailureandplacetheinterfaceinadownstate.Inthis
case,thestaticrouteisinvalidandisnotusedforforwardingpackets.Therouterwill
thenforwardallpacketsovertheremaininglink.
Ifthelink-levelprocedurescannotdetectalinkfailure,thestaticroutepointingout
overthefailedlinkisstillvalid.Theroutercontinuestousethisstaticroutetosend
someofthetrafficoutonthefailedinterface.Thissituationeffectivelycreatesa
"blackhole"forsomeofthetraffic.
CustomerRoutingSchemes

You can still use static routing if link and service provider equipment failure can
be detected.
BGP between the customer and the service provider is usually used in this
setup.
The service provider originates the default route (in the primary or secondary
scenario) or specific routes (in the load-balancing scenario).
The customer originates its address space.
Youcanalsousestaticroutingformultiplepermanentconnectionsbetweentwo
differentroutersonthecustomernetworktotwodifferentroutersontheservice
providernetwork.However,youcanusestaticroutingonlyifthelink-level
procedurescandetectlinkfailures.Whenoneoftheconnectionsislost,thelink-
levelproceduredetectsthislossandplacestheinterfaceinadownstate.Because
theinterfaceisinthedownstate,thestaticroutethatpointsoutofthedown
interfacebecomesinvalid.Asaresult,thecustomer'srouterstopstheredistribution
ofthedefaultrouteintothecustomerIGP.Theprovider'srouterstopsthe
redistributionofthestaticroute,thatpointsthecustomernetwork,intotheservice
providerBGP.
However,customersthatrequiretheuseofmultipleconnectionsandmultiplerouters
veryoftendonotrelyonthelink-levelprocedures.Abetteroptiontodetectlink
failuresisusingBGPbetweenCEandPErouters.BecauseBGPuseshandshaking
andreliabletransfer,italwaysdetectsafailedlinkorfailedremoterouter.BGPcan
alsobeusedtoachieveaprimaryorsecondaryscenarioorloadbalancingoftraffic
overbothlinks.
RoutingScheme:CustomerwithConnectionstoMultiple
ServiceProviders
Static routing is not possible.
BGP must be used:
The service provider originates the default route (in the primary or secondary
scenario), the default route, and service provider-owned routes (in the
primary or secondary scenario with different traffic scenario), or all routers
(in the load-balancing scenario).
The customer originates its address space.
MultiplepermanentconnectionstomorethanoneISPalwaysrequiretheuseof
dynamicroutingwithBGP.Thecustomersthatrequirethistypeofconnectiondonot
wantonlytoprotectthenetworkconnectivityfromlinkfailuresorremoterouter
failures.Theyalsowanttoprotecttheirnetworkconnectivityfromseriousproblems
intheISPnetwork.
MonitoringthelinkstatuscannotdetectaprobleminsideoneoftheISPnetworks.If
thelinkisstillupandtheISPedgerouterisstillup,thelink-levelproceduresdonot
indicateanyproblems.However,theISPnetworkmaysufferfromsevereproblems.
AnISPnetworkcanbepartitionedordisconnectedfromtherestoftheInternet
withouthavinganyproblemswiththeedgerouterandtheaccesslinetothe
customernetwork.
TheonlywaytodetectthissituationistouseBGPwithbothISPsandreceivefull
Internetroutingfrombothofthem.WhenoneoftheISPshasproblems,theedge
router,beingtheBGPneighborofthecustomer,withdrawstheroutesthatitcanno
longerreach.ThisactionmeansthatthecustomerroutersknowwhichInternet
routeseachISPcanreachatthemoment.
CEroutersadvertisethecustomernetworktotheserviceprovider.PErouters
advertiseonlythedefaultrouteorthedefaultrouteplustheserviceprovider-owned
networksorallroutestotheCErouters.Thelevelofroutesthattheserviceprovider
advertisesisdeterminedbasedontherequiredcustomerscenario.

Customerswhoareconnectedtoasingleserviceproviderusuallyhavetheir
addressspaceassignedbytheserviceprovider,whichisknownasPAaddresses.
CustomersthatareconnectedtomorethanoneISPshould,ifpossible,assigntheir
ownaddressspaceandnothaveaddressesthataredelegatedfromanyoftheir
ISPs.SuchassignedaddressesarecalledPIaddresses.
Single-homed customers:
Customer gets the address space from the provider—PA address space.
Single (link) IP address or multiple (subnet) IP address.
If service provider changes, readdressing is needed.
Inside the customer network, private addresses are used, with a combination of
NAT.
Multihomed customers:
Customer assigns its own address space—PI address space
Customer has to advertise address space to all service providers.
If service provider changes, readdressing is not needed.
Single-HomedCustomers:CustomersthatareconnectedtoasingleISPusually
gettheiraddressspaceassignedbytheISP.Customerscaneitherrequestasingle
IPaddress,whichisusedontheaccesslinkaswell,ortheycanrequestanentireIP
subnet.Aserviceproviderisusuallyassignedalargeaddressspacetodelegateto
itscustomers.AllcustomersofoneISPgettheiraddressesfromoneaddressspace
orafewaddressspaces.ItisverylikelythattheISPisabletoaggregatethe
customeraddressesbeforesendingtheroutestotherestoftheInternet.
Ifthecustomershoulddecidetochangeitsserviceprovider,thecustomermust
returnitsPAaddressestotheoldISP.Thecustomerthenreceivesanew
assignmentofPAaddressesfromthenewISP.Otherwise,theISPsarenolonger
abletoperformefficientaddressaggregation.Theconsequenceforthecustomeris
thatthecustomerhastorenumberitsnetworkwhenitchangesitsserviceprovider.
MultihomedCustomers:CustomersthatareconnectedtomultipleISPsusually
assigntheirownaddressspace.Noneoftheserviceprovidersadvertisesthe
address,andthecustomerhastoadvertiseittobothserviceproviders.This
arrangementmeansthatnoISPcanaggregatethecustomerroutesbeforesending
themtotherestoftheInternet.TheroutespropagatethroughtheInternetwiththe
prefixlengthsgiven.
SomelargeISPsfilteroutrouteswithlongprefixes.ISPsdonotwanttopopulate
theirroutingtableswithmanyexplicitroutesthatshouldhavebeenaggregatedinto
aroutesummarybeforetheyweresenttothem.Asaresult,thecustomer
announcingsmallblocksofPIaddresses,whichcannotbeaggregated,maynotbe
reachablefromallpartsoftheInternet.AlargerblockofPIaddressessolvesthe
problem.
Ifthecustomershoulddecidetochangeitsserviceprovider,renumberingofthe
networkisnotneeded.
AmultihomedcustomercaninsomecasesusePA
addresses.Theaddressspacemustbeassignedfrom
oneoftheISPs.Whenthecustomerannouncestheblock
ofPAaddressestobothISPs,bothshouldpropagatethe
addressestotherestoftheInternet.Theproviderthat
assignedtheaddressspaceshouldalsoannouncethe
largerblockofaddresses,ofwhichthecustomeris
announcingasubset.OtherISPsnowreceivetwo
alternateexplicitroutesandanoverlappingroute
summary.Filteringoutexplicitroutesismorelikelyatthis
timebecausetheotherISPsrecognizetheseasroutes
thatcanbeaggregated.IftheotherISPsfilteroutthe
moreexplicitroutes,thecustomerisstillreachableaslong
asbothprovidersareannouncingtheoverlappingroute
summary.
CustomerAddressingRequirements

SomecustomersdecidetouseprivateaddresseswithintheirnetworkanddoNATat
theconnectionpointtotheISP.Thissetupmeansthatcustomersrequireonlyavery
smallportionofpublicaddressesfromtheISP.Inthefigure,onlycustomerDMZhas
beenassignedpublicaddresses.Thecustomernetworkisconnectedtothe
customerDMZusingtwoalternatefirewallswithbothfirewallsdoingNAT.
Inthiscase,thecustomerrequiresonlyaverysmallblockofpublicaddresses.
TheseaddressescanbePAaddresses.Ifthecustomerdecidestochangeits
serviceprovider,addressesarerenumberedonlyattheNATpoint.Therestofthe
customernetworkdoesnotneedtoberenumbered.

Dependingonacustomerconnectivitytosingleserviceproviderortomultiple
serviceproviders,theassignedASnumbershouldbeprivateorpublic.
Single-homed customers:
If static routing is used, the AS number is not needed.
If BGP is desired, private AS number (64512 - 65535) can be used.
Multihomed customers:
Public AS number has to be used.
CustomerswhoareconnectedtoasingleserviceproviderusuallydonotuseBGP,
soanASnumberisnotneeded.IfacustomerneedsaBGPtodetectlinkfailures,
theserviceprovidercanassignaprivateASnumbertothecustomer.
CustomerswhoareconnectedtomultipleserviceprovidersuseBGPandthey
shouldbeassignedapublicASnumber.
ASNumberAllocation:Single-HomedCustomers
Customers running BGP with the service provider need their own BGP AS
number.
Private AS numbers (64512-65535) can be used for customers who are
connected to a single service provider.
BGPrequirestheuseofASnumbers.WhenBGPisconfigured,theASnumberis
mandatoryinformation.PublicASnumbersareascarceresource,however.
CustomersshouldusepublicASnumbersonlywhentheyarerequired.Acustomer
thatusesBGPtoexchangeroutinginformationwithonlyoneISPdoesnotrequirea
publicASnumber.ThiscustomercanuseaprivateASnumber.
AnISPnetworkthatisrunningBGPwithsomeofitscustomersmustdetermine
whetherapublicoraprivateASnumberisrequiredforeachcustomer.Whenthe
customercanuseaprivateASnumber,theISPmustallocateonefromtherangeof
privateASnumbers(64512to65535).TheISPmustmakesurenottoassignanyof
theprivateASnumberstomorethanonecustomer.
WhentheISPreceivesBGProutesfromthecustomer,theISProutersseethe
privateASnumberintheASpath.TheISPtreatsthisprivatenumberasanyother
ASnumber.However,beforetheISPpropagatesanyoftheseroutestotherestof
theInternet,itmustremovetheprivateASnumbersfromtheASpath.ThesameAS
numbermaybeinusebysomeoneelse.AftertheprivateASnumberisremoved,
therouteappearsasbelongingtothepublicASoftheISP.
ASNumberAllocation:MultihomedCustomers
Multihomed customers must run BGP with their service providers.
CustomerASNumberAllocation

Multihomed customers must use public AS numbers for their autonomous
systems.
AmultihomedcustomerrequiresapublicASnumberandmustrunBGPwithbothof
itsISPs.ThecustomershouldnotuseaprivateASnumberbecausebothISPsmust
propagatethecustomerroutestotherestoftheInternet.Ifthecustomerdoesusea
privateASnumber,andbothISPsremovethenumberbeforesendingittotherest
oftheInternet,thenthecustomerrouteswillappeartobelocalinthepublicASof
bothISPs.TomakeBGPworkcorrectly,multihomedcustomersneedtoavoidthis
situation.
WiththehelpoftheASnumbertranslationfeature,private
ASnumberscanalsobeusedformultihomedcustomers,
butthistypeofconfigurationisnotencouraged.
MultihomedcustomersarecorrectlyconnectedtotheInternetbyassigningapublic
ASnumbertothecustomernetwork.ThispublicASnumberappearsintheASpath
andserviceprovidershouldpropagateittotherestoftheInternet.Thecustomer
networkisnowreachablebytherestoftheInternetthroughbothproviders.Internet
endpointsusetheroutewiththeshortestASpathasthebestroutetothecustomer
network.

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
Different customers have different requirements, especially for redundancy for
their Internet connections. These connectivity options include:
Single-homed: One or multiple connections to a single ISP.
Multihomed: Multiple connections to different ISPs.
Routing, static or dynamic, that is used between a customer and service
provider depends on the selected connectivity type.
If dynamic routing is required, BGP is the only option.
IP addressing assignment depends on the selected connectivity type:
Single-homed: PA address space.
Multihomed: PI address space.
AS numbering depends on the selected connectivity type:
Single-homed: No AS number, or private AS number
Multihomed: Public AS number.
Summary

Overview
WhenacustomercanconnecttotheInternetthrougheitherasingleconnectiontoa
serviceproviderormultipleconnectionstothesameISP,staticroutingisthe
simplestroutingapproachtoimplementbetweenthecustomerandprovider.When
networkadministratorsareimplementingcustomer-to-providerconnectivitywith
staticroutes,knowledgeofstaticroutingimplementationguidelineswillaidin
successfullydeployingstaticroutingnetworkconfigurations.
Uponcompletingthislesson,youwillbeableto:
Identifywhentousestaticroutingbetweenacustomerandaserviceproviderin
aBGPenvironment
Describethecharacteristicsofstaticroutingbetweenacustomerandaservice
providerinaBGPenvironment
Identifydesignconsiderationsforpropagatingstaticroutesinaserviceprovider
network
ConfigurestaticroutepropagationinaBGPenvironmentwithdifferentservice
levels
Configureatypicalbackupsetupthatusesstaticroutingbetweenacustomer
andaserviceproviderinaBGPenvironment
Describethelimitationsoffloatingstaticrouteswhentheyareusedintypical
backupstaticroutingscenariosandthecorrectiveactionstoovercomethese
limitations
Describethecharacteristicsofloadsharingwhenyouareconfiguringstatic
routingbetweenacustomerandaserviceprovider
ImplementingCustomerConnectivityUsing
StaticRouting

Staticroutingisthebestsolutiontoimplementwhenyoudonothaveredundancyin
thenetworktopology.
Static routing should be used only with single-homed customers in the following
examples:
Customers with a single connection to the Internet.
Customers with multiple connections to the same service provider in
environments where link and equipment failure can be detected.
Dynamic routing with BGP must be used with multihomed customers.
Asingleconnectionbetweenthecustomernetworkandtheserviceprovidernetwork
doesnotprovideanyredundancy.Ifthelinkgoesdown,theconnectionislost
regardlessofwhichroutingprotocolisconfiguredinthecustomerorprovider
network.Whenthereareredundantconnectionsbetweenthecustomernetworkand
thenetworkofasingleserviceprovider,staticroutingcanbeusedunderspecific
circumstances.
TheCErouterthatisusinganIGPmustconditionallyannounceastaticdefault
route.IfthelinktooneoftheCEroutersgoesdown,thentheroutermustbeableto
detectthefailureandinvalidatethestaticdefaultroute.Announcementofthisrouter
asadefaultgatewaythatisusinganIGPmustnowcease.Likewise,onthePE
routers,thestaticroutesthatarepointingtothecustomernetworksmustbe
invalidatedifthelinkbetweenthemgoesdown,andredistributiontoBGPis
thereforestopped.
Iflink-levelprocedurescannotdetectalinkfailure,theinterfaceremainsintheup
state.Thestaticroutesarenotinvalidated,andpacketsareforwardedintoa"black
hole."Sincetheroutercannotdetectafailureatthelinklevelinthesecases,BGP
mustbeusedbetweenthecustomerandtheprovider.
BGPmustalsobeusedbetweenthecustomerandtheserviceprovidernetworks
whenthecustomerismultihomed.Thisistrueregardlessofwhichlinkfailure
detectionmechanismsareinuse.
WhentoUseStaticRouting?

WhenstaticroutingisimplementedbetweenthecustomernetworkandtheISP
network,theCEmustannounceitselfasadefaultgatewayoragatewayoflast
resort.ThisproceduremustbedoneusingtheIGPwithinthecustomernetwork.
Differentrouterswithinthecustomernetworkmustbeabletoselectthebestrouteto
theexitpointofthenetwork.
The customer network must announce a default route:
Redistribute default route into customer IGP if the customer is running
EIGRP.
Use default-information originate if the customer is running OSPF or RIP.
Customer-connected routes should be redistributed into service provider BGP.
Redistribute static routes into BGP, not core IGP.
Specific customer routes should not be advertised to other autonomous
systems:
Mark customer routes with the no-export community when redistributed into
BGP.
Use static route tags for consistent tagging.
DifferentIGPsusedifferentmethodsofannouncingarouterasagatewayoflast
resort.EIGRPusestheconceptofadefaultnetwork,whileOSPFandRIPsend
reachabilityinformationaboutnetwork0.0.0.0/0.Ineithercase,thenetwork
operatorsofthecustomernetworkareresponsibleforconfiguringtheirnetworkto
usetheCErouterasagatewayoflastresort.
Whenstaticroutingisusedbetweenthecustomerandtheprovider,thePEmust
propagateastaticroutethatpointstothecustomernetwork.Itmustpropagateitto
allotherrouterswithintheISPnetwork,andalsototherestoftheInternet.Theroute
isredistributedintoBGP.
CustomerroutesshouldnotberedistributedintotheIGPoftheISPnetwork.Care
shouldbetakenthattheIGPoftheISPnetworkdoesnotcarrytoomanyroutes.
RedistributingcustomerroutesintotheIGPcouldpotentiallycausepoor
performanceandmighteventuallycauseacompleteshutdownofIGProutingatthe
serviceprovider.
ImaginethatacustomerusesPAaddressesandtheISPannouncesalargeblockof
addressesforwhichthenetworkofthiscustomerisonlyasmallportionoftheblock.
Theserviceprovidershouldnotpropagatetheroutesofthiscustomertotherestof
theInternet.TheISPshouldcarefullyredistributeonlythoseconnectedroutesthata
singleIPaddresscustomeruses.TherestoftheInternetshouldreceiveonlyan
announcementcontainingthelargerblockofaddresses,asummaryroute.
AneasywayofachievingthissetupistousecommunitieswithintheISPnetwork.
YoucanmakeindividualroutesineligibleforadvertisingoutsideofthelocalASby
settingthepredefinedBGPno-exportcommunity.ToensurethattheBGP
communitiesarepropagated,atleastoverallIBGPsessions,thenetworkoperators
oftheISPnetworkmustconfigureasend-communityoptionforallIBGPneighbors.
Ifarouterinaprovidernetworkreceivesanupdatecarryingtheno-export
community,therouterwillnotpropagatetheupdatetoanyexternalBGPneighbors.
Meaningtheupdateisnotpropagatedtootherserviceproviders.
Communitiesaresetbyusingroutemaps.Aroutemap
canselectroutesbasedonvariousattributes.Oneof
theseattributesistheroutetag.Throughconfiguration,the
routercanassignaroutetagtospecificstaticroutes.This
optionmeansthatthenetworkoperatorsoftheISP
networkcaninventaschemeoftagging.Forexampleall
staticroutesthatshouldnotbepropagatedtoother
autonomoussystemsareassignedaspecifictag.Thena
routemapcanselectallrouteswiththattagandassign
themtheno-exportcommunity.
CharacteristicsofStaticRoutingExample
Inthefigure,thecustomernetworkisconnectedtotheInternetbyusingasingle
permanentconnectiontoasingleserviceprovider.
CharacteristicsofStaticRouting

Inthiscase,aroutingprotocoldoesnotaddanyredundancyandwouldonlyadd
complexity.
TheconfigurationofCEandPErouterisshownintheexample.Accesslinkisused,
anddirectlyconnectedroutesareredistributedintoBGPonthePErouter.TheCE
routerisconfiguredwithstaticdefaultroute,whichpointstotheserial0interface.If
theserialinterfacegoesdown,theroutebecomesinvalid.Thedefaultrouteisalso
redistributedintoOSPF,whichisusedinthecustomernetwork.Thereforetherouter
announcesadefaultrouteintoOSPFaslongasithasavaliddefaultrouteitself.
ThePErouteralsohasastaticroute,declaringthecustomerIPnetworknumber
209.165.201.0/24asreachableovertheserial0interface.Italsobecomesinvalidif
theinterfacegoesintothedownstate.ThePEroutermustforwardthisinformation
toallotherISProutersandtotherestoftheInternet.Thisactionisaccomplishedby
redistributingthestaticrouteintoBGP.Aslongasthestaticrouteisvalid,theBGP
announcesit.TotherestoftheInternet,thecustomernetworkappearsasreachable
withintheASoftheISP.AsfarastherestoftheInternetisconcerned,thecustomer
isapartoftheserviceproviderAS.

1.
2.
3.
4.
Youcaneasilyextendtheprincipleofusingtagswhenyouareconfiguringstatic
routes.Basedonthosetags,youcanassigndifferentcommunitiestoimplementa
morecomplexroutingpolicy.
Identify all possible combination of services that are offered to a customer,
including QoS services.
Assign a tag to each combination of services.
Configure a route map that matches the defined tags and sets BGP
communities or other BGP attributes.
Redistribute static routes into BGP through a route map.
For each customer, configure a static route toward the customer with the proper
tag.
Topropagatestaticroutesinaserviceprovidernetwork,completethesesteps:
Identifyalldifferentservicelevelsthatareofferedtocustomersandthenallthe
differentcombinationsoftheseservicelevels.
Assigneachcombinationitsowntagvalueanditsowncommunity.
Configurearoutemap,whichselectsrouteswitheachoftheassignedtagsand
setsthecorrespondingcommunityvalue.Becausetheprocessingofaroute
mapstopswhenthematchclauseofastatementismet,eachrouteshouldbe
assignedasinglecombinationofcommunitiesonly.Therefore,youmusttake
greatcaretoassignatagandacommunitycombinationtoeachcombinationof
servicesthatareprovided.
WhenthePEroutersredistributestaticroutesintoBGP,
theseroutesmustpassthroughtheroutemap.BGP
assignsthecorrectcommunitydependingonthetag
valuesthataregivenontheconfigurationlineforeachof
thestaticroutes.
Finally,configurestaticroutes.Beforeyouconfigureastaticrouteforaspecific
customer,youmustidentifythecombinationoftheservicesthatareprovidedto
thiscustomer.Thenyoumustlookupthecorrespondingtagvalue.Afteryou
haveconfiguredtheroute,youmustassignthetag.
Withthisroutingpolicy,everystaticroutetoacustomernetworkisassignedatag
andtheredistributedBGProuteisassignedacorrespondingcommunity.TheBGP
communitiesthatareattachedtotheroutessignaltootherroutersintheISP
networkwhichparticularservicecombinationyoushoulduse.
StaticRoutePropagationExample
Ascenariowithvariedservicelevelsisshown.Staticroutepropagationisconfigured
inaBGPenvironment.
Sample service offering:
Addressing:
PA address blocks are not propagated to upstream ISPs.
PI address blocks are propagated to upstream ISP.
Quality of service:
Normal customers.
Gold customers.
Define static route tags.
Advertise
CustomerRoute
QoSType Route
Tag
Community
Values
No Normal 1000 no-export300:31000
Yes Normal 1001 300:31000
No Gold 2000 no-export300:32000
Yes Gold 2001 300:32000
Inthisscenario,theserviceproviderofferstwodifferentservicelevelstoits
customers:NormalandGold.CustomersarealsoassignedIPaddressblocks.
DesigningStaticRoutePropagationinaService
ProviderNetwork

SomecustomershavePAaddresses,whichtheISPdoesnotannounceasexplicit
routes.ThelargeroutesummaryblockthattheISPannouncescoversthese
customers.OthercustomersusePIaddressesthatmustbeexplicitlyannouncedto
theInternetbytheserviceprovider.
TherearetwodifferentQoSservices,NormalandGold,andtherearebothPAand
PIaddresses.Sothetotalnumberofcombinationstocoverthenetworkpolicyis
four:
NormalQoSroutesthattheISPassignsandshouldnotbeexplicitlyannounced.
NormalQoSroutesthatarePIroutesandshouldbeexplicitlyannounced.
GoldQoSroutesthattheISPassignsandshouldnotbeexplicitlyannounced.
GoldQoSroutesthatarePIroutesandshouldbeexplicitlyannounced.
Eachofthesefourcombinationsreceivesitsowntagvalueanditsowncommunity
combination.
NetworkoperatorsconfigurearoutemapinthePE1routerthathasthestaticroutes
tothecustomernetwork.Redistributionoftheconfiguredcustomerstaticroutesinto
BGPisalsoperformedatthePE1router.
Aroutemapcanmatchanindividualrouteinasingleroute-mapstatementonly.A
singletagvalue,representingeachcombinationofservicesmustbeassignedtothe
staticroutesbytherouter.Whenarouteismatched,theinterpretationoftheroute
mapforthatindividualroutestops.Theroutemaphasonestatementforeach
combination,andeachstatementmatchesatagvalueandassignsthe
correspondingcommunitycombinationforthattag.
TheroutemapisappliedduringtheredistributionofcustomerstaticroutesintoBGP
atthePErouter.Becausetheroutemaphasno"permitany"statementattheend,
thestaticroutesthatarenotassignedanyofthetagsbeingusedarenot
redistributed.Theroutemapfilterstheseroutesout,forcingthenetworkoperatorsto
makeatagassignmenttoallcustomerroutes.Furthermore,theroutemapfiltering
canhelptheadministratorcatchconfigurationentryerrors,thusgivingallcustomers
theservicecombinationthattheyareentitledto.

ThefigureshowshowthePE1routerusestheroutemapnamed"IntoBGP"when
redistributingstaticroutesintoBGP.Becausetheroutemapassignscommunity
valuesthatotherrouterswithintheISPnetworkwilluse,networkoperatorsmust
configureallIBGPneighborswiththesend-communityqualifier.
Whenconnectingcustomers,thenetworkoperatorsidentifywhichservice
combinationtouseforthisparticularcustomer.Thethreeservicesthatare
associatedwiththisparticularcustomerareasfollows:
ApplynormalQoS.
UseaPAnetworknumber.
Donotenabletheprovidertoexplicitlyannouncecustomerroutes.
Astaticroutetothecustomerisconfiguredandassignedtheappropriatetagvalue
of1000,whichrepresentsthespecifiedservicesthatareassignedtothecustomer.
Theshowiproutecommanddisplaysinformationfromtheroutingtableabout
subnet209.165.201.0/24.Therouteislearnedbystaticconfigurationandis
redistributedviaBGP.Therouterhasassignedatagvalueof1000tothecustomer
routebyusingastaticallyassignedtag.Theroutemustpassthroughtheroutemap
intoBGPbeforebeinginsertedintotheBGPtable.
TheshowipbgpcommanddisplaysinformationfromtheBGPtableaboutsubnet
209.165.201.0/24.TherouteislocalwithinthisASandthisroutersourcedit.The
BGPcommunities300:31000andno-exporthavebeenassignedbytherouterto
theredistributedcustomerroute.Theywereassignedbyusingtheprovider-defined
routemapbeforeinsertingthecustomerrouteintotheBGPtable.

Imagineacasewherethecustomernetworkhastwoconnectionstoasingleservice
provider,usingtworoutersoneachside.Oneconnectionbetweenthecustomer
networkandtheISPistheprimaryconnection,andtheotherconnectionisusedfor
backuppurposesonly.Iflink-levelprocedurescandetectlinkfailuresandafailurein
theremoterouter,thenstaticroutingcanbeusedbetweenthecustomerand
providernetworks.
Default routes on the CE router and redistribution into customer IGP:
Floating static routes are configured on the backup router.
Static route on the PE router and redistribution into service provider BGP:
Floating static routes are configured on the backup router.
Separately tag primary and backup static routes and match them for
redistribution.
Asinthepreviousexample,wherenobackuplinkisavailable,theCE1routerhasa
staticdefaultroutetowardtheISP.ThePE1routerhasstaticroutestowardthe
customer.ThecustomerrouterredistributesthestaticdefaultrouteintoitsIGP.The
ISProuterredistributesthestaticroutesintoBGP.
Iftheprimarylinkgoesdown,thelink-levelproceduressettheinterfacetothedown
state.Thiscausesthestaticroutespointingoutthroughtheinterfacetobeinvalid
andremovingtheroutesfromtheroutingtable.Whentheinterfacechangesbackto
theupstate,thestaticroutewillreappearintheroutingtable.
Theappearanceoftherouteintheroutingtableconditionstheredistributionof
routesintoanyroutingprotocol.Thus,iftheinterfacegoesdown,therouterremoves
thestaticroutefromitsroutingtable,andtherouteiswithdrawnfromtherouting
protocol.Whenthestaticroutereappears,theredistributionprocessinsertsitinto
theroutingprotocolagain.
TheCE2routeralsousesadefaultstaticroutetowardtheISPviathebackuplink.
TheCE2routerisalsoredistributingthedefaultrouteintotheIGP.However,the
staticroutethatisusedisafloatingstaticroute,whichisassignedahighAD—
higherthantheadministrativedistanceofthecustomerIGP.Aslongastheprimary
linkworks,theIGPprovidestheCE2routerwiththeprimarydefaultroute.Because
ofthehigherAD,thebackupstaticdefaultrouteisnotinstalledintotheCE2routing
table.Becausethestaticrouteisnotintheroutingtable,itisnotredistributed.Ifthe
primarylinkfails,theIGPnolongerfeedstheCE2routerwithadefaultroute.The
backupstaticdefaultrouteistheonlyremainingdefaultroute.Therefore,therouter
willinstallthefloatingdefaultrouteintoitsroutingtableandthenredistributeitinto
theIGP.
ThePE2routercanalsousefloatingstaticroutes,whichareredistributedintothe
ISPBGPprocess.
BGPBackupwithStaticRoutes

Inthefigure,thecustomernetworkandtheISPnetworkareconnectedusingleased
lines.Both,CE1andCE2,haveastaticdefaultroutetowardtheserialinterface
leadingtotheISP.Bothroutersalsodoredistributionofthedefaultrouteintothe
OSPFprotocol,whichisbeingusedasanIGPwithinthecustomernetwork.
However,thestaticdefaultrouteintheCE2routerisconfiguredwithanADvalueset
to250.ThisADvalueishigherthantheADvaluesofanyroutingprotocol.This
configurationmeansthataslongastheCE2receivesthedefaultroutebyOSPF,the
staticdefaultrouteisnotused.
Whentheprimarylinkgoesdown,thestaticdefaultrouteintheprimaryrouterisnot
valid.TheOSPFprotocolstopsannouncingthedefaultroute,becausethedefault-
informationoriginatecommandmakesOSPFcontingentontheavailabilityofthat
staticdefaultrouteintheroutingtablebeforeannouncement.
TheCE2nowinstallsitsstaticdefaultrouteintheroutingtable.Theconditionsfor
announcingthedefaultroutebyOSPFaremetandtherestofthecustomerrouters
seetheCE2asthegatewayoflastresort.
WhenfloatingstaticroutesareconfiguredonthePErouters,theyarealso
redistributedintoBGP.Thisconfigurationmakesthingsalittlebitmorecomplicated.
Thenetworkoperatorconfiguresafloatingstaticroutetothecustomersubnet
209.165.201.0/24.InthePE2router,thefloatingstaticrouteisassignedthesame
tagvalueasthetagvaluebeingusedinthePE1router.Theroutemap"IntoBGP"is
thesameasinthePE1routerandprovidestheroutestothecustomernetworkwith
thesamecommunities.ThesecommunitiesarebasedonthesameQoSleveland
theindicationwhethertoexplicitlyannouncerouteprefixtotherestoftheInternet.
Thefloatingstaticroutehastheadministrativedistancesetto250.Thisvalueis

higherthananyroutingprotocol.WhenthePE2routernolongerreceivesany
routingprotocolinformationaboutthecustomernetworks,therouterwill
automaticallyinstallthefloatingstaticrouteandthenredistributeitintoBGP.
BasedonBGProuteselectionrules,theredistributedfloatingstaticroutewillalways
remainthepreferredpathifanextraBGPconfigurationisnotperformedonthePE
router.Thispreferencemeansthatregardlessofwhethertheprimarylinkcomes
back,thePE2selectsthelocallysourcedrouteasthebestroute.Therefore,thePE2
continuestoannounceapathtowardthecustomernetwork.Thebackuplinkdoes
notgobacktotheIdlestate.
PE2# show ip bgp 209.165.201.0
BGP routing table entry for 209.165.201.0/24, version 7
Paths: (2 available, best #1, table default, not advertised to EBGP peer)
Advertised to non peer-group peers:
10.3.0.5
Local
0.0.0.0 from 0.0.0.0 (10.0.3.6)
Origin incomplete, metric 0, localpref 100, weight 32768, valid, sou
rced, best
Community: 300:31000 no-export
Local
10.0.3.2 (metric 128) from 10.0.3.5 (1.0.0.2)
Origin incomplete, metric 0, localpref 100, valid, internal
Orginator: 1.0.0.2, Cluster list: 10.0.3.5
Community: 300:31000 no-export
The BGP table on the service provider backup router contains the floating static
route.
Inthisexample,theshowipbgpcommandisusedinthePE2routeroftheprovider
todisplaytheinformationaboutthecustomernetwork209.165.201.0/24.The
primarylinkhascomeback,sothePE2nowseestwoalternateroutes.Thefirst
routeistheroutethattherouteritselfhasredistributedintoBGPusingthefloating
staticroute.ThisrouteislocallysourcedbythisASandhasbeenassignedaweight
valueof32768.ThesecondroutePE2receivedbyIBGPfromthePE1router.This
ASalsosourcesthisroute,butnoweightvalueisassigned.
TheBGProuteselectionalgorithmselectstheroutewithweightvalue32768asthe
best.Asaresult,theroutethatwasreceivedfromthePE1routerisnotacandidate
tobeinstalledintheroutingtable.Itnevercompeteswiththefloatingstaticroute.
Thefloatingstaticroutestaysintheroutingtable,andredistributionoftheroute
continuesuntilthebackuplinkgoesdownandtheroutebecomesinvalid.

Unfortunately,floatingstaticroutesdonotworkcorrectlywithBGP.Aftertheyare
inserted,thefloatingstaticrouteisneverremovedfromtheroutingtableevenifthe
primarylinkcomesback.
Limitations and corrections:
Floating static routes do not work correctly with BGP.
Weight has to be lowered to default value for other BGP routes to be
considered.
BGP local preference has to be changed for floating static routes that are
redistributed into BGP, to make sure that other routes take precedence.
Administrative distance cannot be matched with a route map; extra tags need to
be defined for static routes.
WheneveryouusefloatingstaticroutesincombinationwithredistributionintoBGP,
youwillneedtotakeextraconfigurationsteps.YouhavetoensurethattheBGP
routeselectionalgorithmselectstheprimaryrouteasthebestBGProutewhenit
reappears:
WhenarouterredistributesafloatingstaticrouteintoBGP,theweightvaluethat
isassignedtothefloatingstaticroutemustbereduced(forexamplesetto0).
Otherwise,thefloatingstaticroutewillalwaysbeselectedasthebestBGProute
afterthefirstfailureoftheprimarylinkoccurs.
Theroutermustalsoassignlocalpreferencevaluestothefloatingstaticroute,
sothatthefloatingstaticroutehasalowerlocalpreferencethantheprimary
route(forexample50).Thisassignmentensuresthattheprimaryrouteis
selectedasthebestBGProuteonotherrouterswithinProvidernetwork.
ThesetworequirementsmustbespecifiedonthePErouterintheroutemap
"IntoBGP"thatisusedfortheredistribution.Theroutemapmustselectthefloating
staticroutesandsetweightandlocalpreference.However,aroutemapcannotdo
matchingbasedontheADvaluethathasbeenassignedtoastaticroute.Some
othermeansarerequiredfortheroutemaptodistinguishbetweennormalstatic
routeswithnormalweightandlocalpreferenceandthefloatingstaticoneswith
modifiedvalues.
Thesolutionistocreateextratagvaluesforthissetofstaticroutes.Thetagvalue
mustnotonlyreflecttheQoSlevelandwhethertoannouncetheroute.Thetag
valuemustalsoindicateifitisaprimaryrouteorabackuproute.
Advertise
Customer
Route
Backup QoSType Tag Community
Values
LocalPreference
Normal 1000 no-export
300:31000
100
Yes Normal 1010 no-export
300:31000
50
Yes Normal 1001 300:31000 100
Yes Yes Normal 1011 300:31000 50
Gold 2000 no-export
300:32000
100
Yes Gold 2010 no-export
300:32000
50
Yes Gold 2001 300:32000 100
Yes Yes Gold 2011 300:32000 50
Eighttagvalueshavecurrentlybeenidentified.Eachtagvalueindicatesaspecific
combinationofexplicitroutepropagation(backuporprimary)andQoSlevel.
WhennetworkoperatorsconfigurestaticroutesinthePErouter,theymustconsider
whichofthecombinationsthattheyshouldusefortheroute.Theroutemapthat
theyusewhenredistributingthestaticroutesintoBGPmustbeconfiguredto
recognizealleightcombinations.Itmustsettheappropriateweightandcommunity
andlocalpreferencevaluestothesecombinations.
FloatingStaticRouteswithBGP

Theconfigurationoutputinthefiguredisplaysthefirsthalfofthe"IntoBGP"route
map.Theoutputshowshowmatchclausesidentifyfouroftheeightdifferenttags.
Foreachofthetagvalues,theroutemapsetsthecommunity,thelocalpreference,
and,insomecases,theweight.
ThedisplayedhalfoftheroutemapdealsonlywiththefourtagsthatindicateQoS
Normal.SoallstatementsintheconfigurationdisplayhavesettheBGPcommunity
attributeto300:31000.
Thesecondpartoftheroutemapthatisshowndealswiththefourtagsthatindicate
QoSGold,whichareconfiguredtosettheBGPcommunityattributeto300:32000.
Tagvaluesof1000,1010,2000,and2010indicatethattherouteshouldnotbe
explicitlypropagated.Theroutesthataprovidershouldnotexplicitlyadvertisetothe
restoftheInternetareassignedtheno-exportcommunitybytheroutemap.
Tagvalues1010,1011,2010,and2011allindicatethattherouteisabackuproute.
Thosetagshavetheirweightvaluesetto0andtheirlocalpreferencevaluesetto
50.Thesesettingsensurethatonthereturnofafailedprimaryroute,thePErouter
willselecttheprimaryrouteasitsbestpathandremovethebackupfloatingstatic
routefromitsroutetable.

Acustomerthathastwoconnectionstoaserviceprovidercanalsodecideto
balancetrafficoverbothlinks.Ifbothlinksareactive,trafficshouldbebalanced
acrossbothlinks.Ifthereislinkfailure,onelinkshouldcareforalltraffic.
OutgoingTrafficLoadBalancing
Outgoing traffic load balancing:
On each CE router, the default route is redistributed into IGP.
Each CE router uses the closest CE router as the exit point.
Balanced load sharing is achieved if the CE routers are collocated.
Loadsharingofoutgoingcustomertrafficisaccomplishedbyconfiguringastandard
defaultstaticrouteinbothCErouters.Eachstaticrouteisvalidaslongastheserial
linkfromtheCEroutertoPErouterisup.Whenbothstaticroutesarevalid,bothCE
routersannouncethedefaultrouteintothecustomernetwork.
Theremainingroutersinthecustomernetworkseetwocandidategatewaysoflast
resort.Theseremainingrouterschoosetheclosestone,withrespecttotheIGP
metric.Thepartofthenetworkthatisclosertotheuppermostexitpointusesthat
exitpointforalloutgoingtraffic.Theotherpartofthenetworkusestheother(lower)
exitpoint.
Ifbothexitpointsarecollocated,theyareequallydistantfromeachoftheother
routersinthecustomernetwork.Eachrouterwithinthecustomernetworktherefore
usesloadsharingoftrafficsentoutofbothexitpoints.
ReturnTrafficLoadBalancing
Load sharing of return traffic is impossible to achieve with multiple edge routers.
All provider routers select the same BGP route to the destination.
All return traffic arrives at the same PE router.
Theserviceproviderroutersknowabouttworoutestothecustomernetwork.Those
routesarelearnedthroughBGP.BGPwasdesignedtoselectonlyoneroute,which
isthebestroutefromacollectionofroutestodestination,allowingnoloadsharing.
ThePEroutersthatreceivethesameBGProutefromtwoCErouterswillalways
selectthecloserCErouter.IfallotherBGPattributesareequal,theIBGProutewith
theclosernexthopisselected.ThepartoftheISPnetworkthatisclosertothe
uppermostconnectionusesthatconnection.TheotherpartoftheISPnetworkuses
theother(lower)connection.
Ifbothconnectionpointsarecollocated,allPEroutersselectthesameIBGProute
basedonrouter-ID(becausetheIGPmetricsarealwaysequal).Soallthereturn
trafficissentoverasinglelinktowardthecustomernetwork,resultinginnoload
sharing.
LoadSharingwithStaticRoutes

SinceCiscoIOSSoftwareRelease12.2,theIBGP
multipathload-sharingfeatureenablestheBGP-speaking
routertoselectmultipleIBGPpathsasthebestpathstoa
destination.Thebestpathsormultipathsaretheninstalled
intheIProutingtableoftherouter.
You can optimize return traffic load sharing:
Each PE router advertises only part of the customer address space into the
provider backbone.
Every PE router also advertises the whole customer address space for backup
purposes.
Load sharing is not optimal—every link will carry return traffic for part of the
customer address space.
Toobtainbettercontrolofthereturntrafficload,thecustomeraddressspacemust
beadvertisedtothePEroutersusingmultiple,moreexplicitroutes.Theupperedge
routercouldadvertisehalftheaddressspace,andtheloweredgeroutercould
advertisetheotherhalf.Forbackupreasons,theyalsoshouldbothadvertisethe
entireaddressspaceasalargerroutesummary.
Aslongasbothpathsareavailable,thetrafficfromtheISPtothecustomerusesthe
mostexplicitroute.Inthiscase,twoexplicitroutesareusedtosendthetraffic
representingonehalfoftheaddressspaceoveronelinkandtrafficrepresentingthe
otherhalfoftheaddressspaceovertheotherlink.
Loadsharinginthiswaydoesnotresultinanequalloadonthelinksbutrathera
statisticallybaseddistributionofthetrafficloadoverthelinks.
LoadSharingwithStaticRoutesExample
Youcanachieveloadbalancingoftheincomingtrafficbyadvertisingdifferentparts
ofthecustomernetworkbydifferentPErouters.TheupperPEroutercouldadvertise
one-halfoftheaddressspace,andthelowerPEroutercouldadvertisetheother
half.Forbackupreasons,thePEroutersalsoshouldadvertisetheentireaddress
spaceasalargerroutesummary.
Intheexample,thecustomeraddressspace209.165.201.0/24ispartitionedintotwo
smallerblocks:209.165.201.0/25and209.165.201.128/25.
ThePE1routeradvertisestherouteto209.165.201.0/25,andthePE2router
advertisestherouteto209.165.201.128/25.BothPEroutersalsoadvertisethe
entireaddressspace209.165.201.0/24.
Aslongasbothpathsareavailable,thetrafficfromserviceprovidertothecustomer
usesthemostexplicitroute.Twoexplicitroutesareusedtosendtraffic.Trafficto
destinationsinthe209.165.201.0/25rangeissenttotheupperconnectionspoint.
Traffictodestinationinthe209.165.201.128/25rangeisdirectedtothelower
connectionpoint.

Loadsharinginthiswaydoesnotresultinanequalload
onthelinksbutratherastatisticallybaseddistributionof
thetrafficloadoverthelinks.

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
Static routing can be used for:
Customers with single connection to service provider.
Customers with multiple connections to service provider—primary and
backup path, or load balancing.
In static routing, the customer network must announce a default route.
Customer routes should be carried in BGP, not core IGP; and routes to subnets
of the provider address block should not be propagated to other ASs.
When you are using static routes in a backup scenario, floating static routes are
used on the backup routers.
Depending on the origin of the customer address space, the provider may elect
not to advertise the customer space, choosing to advertise a larger aggregate
route instead.
Summary

Overview
Whenmultipleconnectionstothesameserviceprovideraretheonlymeansthata
customerhasofconnectingtotheInternet,itisimportantthattheconnectionsare
correctlyconfigured.Theymustensureproperinteractionbetweenthecustomer
andtheserviceprovidernetwork.Itisalsoimportanttounderstandhowtoconfigure
routingprotocolssothatcustomerbackuporload-balancingrequirementsaremet.
Inthislesson,youwilllearnabouttheuseofmultipleconnectionsbetweena
customerandasingleISPforbackupandload-sharingpurposes.
Uponcompletingthislesson,youwillbeableto:
ConfigureBGPonacustomernetworktoestablishroutingbetweena
multihomedcustomerandasingleserviceprovider
Configureconditionaladvertisingofacustomeraddressspacewhenyouare
usingBGPtoestablishroutingbetweenamultihomedcustomerandasingle
serviceprovider
ConfigureBGPonaserviceprovidernetworktoestablishroutingbetweena
multihomedcustomerandasingleserviceprovider
DisablethepropagationofprivateASnumberstoEBGPpeersinaservice
providernetworkwhereamultihomedcustomerisadvertisingprivatenumbers
intheASpath
DescribetheBGPSupportforDual-ASConfigurationforNetworkASMigrations
feature
Configureatypicalbackupsetupbetweenamultihomedcustomerandasingle
serviceproviderinaBGPenvironment
Describehowyoucanimplementloadsharingbetweenamultihomedcustomer
andasingleserviceproviderinaBGPenvironment
IdentifytheCiscoIOScommandthatisrequiredtoconfigureloadsharing
betweenamultihomedcustomerandasingleserviceproviderusingBGP
multipath
Configureloadsharingbetweenamultihomedcustomerandasingleservice
providerusingEBGPmultihop
ConnectingaCustomertoaSingleService
Provider

Intheexample,thecustomernetworkisconnectedtoaserviceprovidernetworkby
usingmultiplepermanentlinks.BGPisusedtoexchangeroutinginformation
betweenthecustomerandtheprovider.
BGP is run between the customer and the service provider.
The customer advertises allocated address space into BGP. The customer can
use a private AS number.
The service provider advertises only the default route to the customer. CE
routers advertise the default route to the customer network by using IGP.
The service provider has to deploy inbound BGP filters.
SelectingBGPastheroutingprotocolbetweenthecustomerandtheprovider
networkensuresthatalinkfailureorthefailureofaremoterouterisdetected.Inthis
scenario,thecustomerdoesnotrequiretheuseofapublicASnumberorfull
Internetrouting.Instead,aprivateASnumberisassignedtothecustomernetwork,
andtheISPsendsadefaultroutetothecustomerthroughBGP.
Thereisasignificantdifferenceinthiscase,ascomparedtoanetworkscenario
wherestaticroutesandredistributionareused.RouterswithintheprivateASofthe
customernowadvertisethecustomerroutesviaBGP.Thus,thecustomeris
responsibleforannouncingitsownaddressspace.TheISPreceivesroutesfromthe
customerandconditionallypropagatesthem(similartostaticrouting).Ifthe
customerusesPAaddressspaceandtheISPcansummarizetheaddressspace,it
willnotpropagatetheexplicitroutesfromthecustomertotheInternet.Theprivate
ASnumberintheASpathattributemustberemovedbeforetheISPcanpropagate
anyofthecustomerroutes.
ThecustomerisnowcreatingBGProutesthattheISPreceives.Soanyerrorthat
thecustomermakescaninfluenceroutingoperationwithintheprovidernetworkand
ifpropagated,withintheInternetasawhole.Announcingaroutetoanetworkto
whichthecustomerhasnotbeenassignedmaycauseroutingproblems.Thereis
alwaysariskthatsuchroutingproblemscanoccurinaserviceprovidernetwork.
However,theriskismuchgreaterwhenthecustomer,whosenetworkadministrators
usuallyhavelessexperiencewithBGP,enterstheconfiguration.
Toreducetheriskoferroneousrouteadvertising,theISPshouldalwaysfilterany
BGPinformationthatcomesfromthecustomernetwork.TheISPshouldreject
routestonetworksthatarenotexpectedtobeinthecustomerAS.Routesthat
containanASpathwithunexpectedASnumbersshouldalsoberejected.
BGPConfigurationonMultihomedCustomerRoutersExample
Inthefigure,thecustomerhasbeenassignedtheprivateASnumber65001.
CE1(config)# ip route 209.165.201.0 255.255.255.0 null 0
CE1(config)# router bgp 65001
CE1(config-router)# neighbor 209.165.201.2 remote-as 65001
CE1(config-router)# neighbor 172.16.33.33 remote-as 300
CE1(config-router)# network 209.165.201.0 mask 255.255.255.0
CE1(config-router)# exit
CE1(config)# router ospf 1
BGPConfigurationonCustomerRouters

CE1(config-router)# default-information originate
The customer address space is advertised on every CE router.
CE routers run IBGP between themselves and advertise the default route to the
rest of the customer network.
BothCEroutersareconfiguredtorunBGPandshouldadvertiseallofthecustomer
networkswiththenetworkcommand.Ifonlyonerouteradvertisesthenetwork,a
singlepointoffailurehasbeenintroduced.Thetwocustomeredgeroutersmustalso
runIBGPbetweenthemtomakecommondecisionsregardingBGProuting
information.
EachCErouterhasanEBGPsessionwiththePErouterontheothersideofthe
link.OverthatEBGPsession,theISPannouncesonlyadefaultroutetothe
customerAS.WhenEBGPreceivesthedefaultroute,itinstallsitintheroutingtable
andredistributesitintotheIGP,inthiscaseOSPF,ofthecustomer.

Thecustomershouldannounceaddressesaslargeaspossible(thelargerthe
addressspacethatcanbeaggregated,thebetter).TheBGPadvertisementis
configuredontheCEroutersusingthenetworkcommand.Theappearanceofa
correspondingnetworkorsubnetintheroutingtableoftheedgerouterconditions
therouteadvertisement.Becausethereisachancethatthecustomersubnettedthe
addressspaceintosmallersubnets,thecompletecustomeraddressspacewillnot
bepresentedintheCEroutingtable.Thesolutionistomanuallyentertherouteinto
theroutingtablebyconfiguringastaticroutetonull0.However,thestaticrouteis
alwayspresentintheroutingtable.AndtheBGPadvertisementisalwaysperformed
fromtheCErouter,eveniftheCEroutercannotaccesstherestofthecustomer
network.
The CE router should announce the customer address space into BGP.
The CE router should advertise the customer space only if the customer network
is reachable from the CE router (conditional advertising).
The CE router should stop advertising the customer address space if the CE
router loses connectivity with the customer core.
The reachability of the customer core network is tested using a static route. The
static route should point to the core network next hop that is learned via IGP, not
to null 0.
IftheCErouterlosesconnectivitytotherestofthecustomernetworkbutisstill
connectedtotheISPnetwork,theBGPadvertisementmustcease.Inthiscase,
BGPadvertisementcanbestoppedifBGPadvertisementsareboundtothe
reachabilitystatusofaspecificsubnetinthecoreofthecustomernetwork,
accordingtothecustomerIGP.
Theproblemwithusingastaticroutetonull0isthatitconditionsthenetwork
statementintheBGPconfigurationsothatBGPalwaysadvertisestheroute.Ifthe
CErouterlosesconnectivitywiththerestofthecustomernetwork,therouter
continuestoadvertisetheentirecustomeraddressspace.TheISPnetworkreceives
avalidroutefromtheCErouter.Trafficissenttothisrouter,butbecausetherouter
haslostconnectivitywiththerestofthenetwork,thetrafficisdropped.Orthetraffic
isroutedtothenull0interfaceusingthestaticroute.
Thesolutionistocreateastaticrouteforthecustomer-assignedaddresses,which
pointstoanexthopthatwaslearnedthroughanIGP.Thestaticroutewillbeinthe
routingtableonlyifthenexthopisreachable.Thestaticroutewouldbevalidandthe
routewouldbeadvertisedthroughBGP.IftheCErouterlosesconnectivityfromthe
restofthecustomernetwork,thenexthopbecomesunavailableandthestaticroute
isnotvalidanymore.Becausethecustomerrouteisnotpresentintheroutingtable
anymore,BGPwillceasetoadvertisethecustomerroutetotheISP.Thecustomer
networkwillthenbeaccessibleoverthebackupconnection,ifavailable.
ConditionalBGPAdvertisinginMultihomedCustomer
NetworksExample
Inthisexample,thecustomernetworkalsousestheaddressspace13.5.0.0/16.
ConditionalBGPAdvertisinginCustomerNetworks

CE2(config)# ip route 13.5.0.0 255.255.0.0 13.5.1.1
CE2(config)# router bgp 65001
CE2(config-router)# neighbor 209.165.201.1 remote-as 65001
CE2(config-router)# neighbor 172.16.33.33 remote-as 300
CE2(config-router)# network 13.5.0.0 mask 255.255.0.0
CE2(config-router)# exit
CE2(config)# router ospf 1
CE2(config-router)# default-information originate
Theaddressspaceisfurthersubnettedatthecustomersite.Oneofthesubnets
(subnet13.5.1.0/24)isidentifiedasbeingthecentralpartofthecustomercore
network.
TheCEroutersparticipateintheIGProutingofthecustomer.Thisparticipation
meansthattheseroutershaveinformationaboutwhichsubnetswithintheaddress
space13.5.0.0/16arecurrentlyreachable.Ifthesesubnetsareavailable,thereisan
explicitroutetoeachofthem.Ifanyofthesubnetsgodown,orifthepathtoward
themgoesdown,theroutetothatsubnetisremovedfromtheroutingtable.
TheBGPadvertisementineachoftheCEroutersisconfiguredtoadvertisethefull
addressspacethatthecustomeruses.WhentheCEroutersadvertisethisroute,the
ISPnetwork,andtherestoftheInternet,seecustomer'scompleteaddressspaceas
onesingleroute,13.5.0.0/16.
Theappearanceofthestaticroute,IProute13.5.0.0255.255.0.013.5.1.1conditions
theadvertisementofthecustomeraddressspacebyBGP.Ifthestaticrouteisvalid,
thentheBGProute13.5.0.0/16isadvertised.Thestaticrouteisarecursiveroute—
theroutertakesanotherlookintheroutingtablefortheaddress13.5.1.1before
determiningwhattodowiththestaticroute.Theideaisthat13.5.1.1isreachablevia
theIGP.TheIGPannouncesthesubnet13.5.1.0/24.Ifthissubnetisreachableby
theedgerouter,thenthestaticrouteto13.5.0.0/16isvalid.Ifthereisnorouteto
13.5.1.1,thenthestaticrouteisinvalid.
Thecondition,whetherornottoadvertisetheentire
customeraddressspace13.5.0.0/16,iscontrolledbythe
IGPreachabilityofasinglesubnet,13.5.1.0/24.
TheIGPconfigurationalsoincludesoriginationofthedefaultroutebybothCE
routers.

IntheISPnetwork,thetwoPEroutersmusthaveBGPsessionsconfiguredwiththe
customer.ThereisnopointinfeedingthefullInternetroutingtabletothecustomer.
Thetablecontainsthesamesetofroutesforbothlinksandthecustomeralways
usestheISPforalltraffictowardtheInternet.Injectionofadefaultrouteinthe
customernetworkwouldaccomplishthesametask.
The service provider must:
(Conditionally) Advertise a default route to the customer through BGP.
Filter incoming BGP updates with a prefix list to verify that the customer
announces only the assigned address space
Filter incoming BGP updates with an AS path filter list to verify that the customer
uses only its own AS number
Optionally, the no-export community should be set on customer routes.
Thecustomerisresponsibleforitsownadvertisements.Becausecustomersare
muchlesslikelytobeexperiencedinBGPconfigurationthantheISP,theyaremore
likelytomakeerrors.Therefore,theISPmustprotectitselfandtherestofthe
Internetfromthoseerrors.
Theserviceprovidershoulduseafilterthatallowsonlycustomer-assignedroutes
anddeniesanyotherroute.Thisfilterensuresthatprivateaddressspaceorany
otherillegalnetworksthatthecustomererroneouslyannounces,neverreachtheISP
BGPtable.FilteringbasedontheASpathalsoprovidessomeprotectionfrom
customerconfigurationerrors.OnlyroutesthatoriginatedwithinthecustomerAS
shouldbeallowed.Afilterlistperformsthischeck.
IfthecustomeraddressspaceisPAaddressspaceanditrepresentsonlyasmall
partofalargerblockthattheISPannounces,theexplicitBGProutesthatare
receivedfromthecustomerdonotneedtobeadvertisedtotherestoftheInternet.
TheISPcanannouncethelargeblock,attractinganytraffictowardanysubnetwithin
theblock.AfterthetrafficenterstheISPnetwork,themoreexplicitroutestothe
customernetworkareavailableandused.Inthiscase,thePEroutercantagthe
BGProutesthatarereceivedfromthecustomerwiththeno-exportwell-known
community.ThiscommunitypreventstheISPfromsendingtheroutestoanyother
AS.
router(config-router)# neighbor ip-address default-originate
By default, the default route (0.0.0.0/0) is not advertised in outgoing BGP
updates.
The neighbor default-originate command advertises the default route to a
BGP neighbor even if the default route is not present in the BGP table.
ThedefaultrouteisnotsentthroughtheoutboundBGP
filters(prefixlist,filterlist,orroutemap).
Thedefaultroute,0.0.0.0/0,isnotadvertisedinoutgoingBGPupdatesunlessitis
explicitlyconfigured.Theneighbordefault-originaterouterconfigurationcommand
isusedtoinitiatetheadvertisementofthedefaultroutetoaneighbor.
BGPdoesnocheckingbeforethedefaultrouteisadvertised.Thedefaultroutedoes
notneedtobepresentintheBGPtablebeforeitisadvertisedusingthiscommand.
Thedefaultrouteisalsosentwithoutbeingfilteredbyanyoutgoingprefixlists,filter-
lists,orroutemaps.
BGPConfigurationonServiceProviderRoutersExample
BGPConfigurationonServiceProviderRouters

ThisexampleshowstheconfigurationofthePErouter.
PE1(config)# router bgp 300
PE1(config-router)# neighbor 172.16.33.3 remote-as 65001
PE1(config-router)# neighbor 172.16.33.3 default-originate
PE1(config-router)# neighbor 172.16.33.3 prefix-list DefaultOnly out
PE1(config-router)# neighbor 172.16.33.3 prefix-list Customer1 in
PE1(config-router)# neighbor 172.16.33.3 filer-list 15 in
PE1(config-router)# neighbor 172.16.33.3 route-map AllCustomerIn in
PE1(config-router)# exit
PE1(config)# ip as-path access-list 15 permit ^65001(_65001)*$
PE1(config)# ip prefix-list DefaultOnly permit 0.0.0.0/0
PE1(config)# ip prefix-list Customer1 permit 209.165.201.0/24 le 32
PE1(config)# ip prefix-list Provider permit 209.165.0.0/16 le 32
PE1(config)# route-map AllCustomersIn permit 10
PE1(config-route-map)# match ip prefix-list Provider
PE1(config-route-map)# set community no-export additive
PE1(config-route-map)# exit
PE1(config)# route-map AllCustomersIn permit 1000
ThecustomerisassignedtheprivateASnumber65001.TheBGPsessionis
openedwiththecustomerIPaddress,172.16.33.3.
TheISPsendsthedefaultrouteonlytothecustomer.Thisrouteisconfiguredusing
firstthedefault-originatecommandandthentheprefixlistDefaultOnly.
ReceivedroutesfromthecustomermustfirstpasstheprefixlistCustomer1.Thereis
onededicatedprefixlistforeachindividualcustomer;theprefixlistpermitsonlythe
routesthatthecustomerisallowedtoannounce.Iftheprefixlistallowstheroutes,
theroutesmustalsopassthefilterlistnamed"15."Inthiscase,thefilterallowsthe
privateASofthecustomerinanynumberofrepetitions,aslongasitistheonlyAS
numberinthepath.ThisfilterlistallowsASpathprependingconfigurationsonthe
customerside.Ifbothprefixlistsandthefilterlistallowthereceivedroute,thenthe
routemapAllCustomersInisapplied.
Theroutemapisageneralroutemapthatisusedforallcustomers.Itchecksevery
routethatisreceived,viatheprefixlistProvider.Iftherouteiswithinthebigblockof
PAaddressspacethattheISPannouncestotherestoftheInternet,thecustomer
routeismarkedwiththeno-exportcommunity.Thismarkmeansthattherouteis
usedwithintheISPASonlyandisnotsenttotherestoftheInternet.
Routesthatarereceivedfromthecustomer,andareallowedbytheprefixlistand
filterlist,butdonotfallwithinthePAaddressspace,areallowedbytheroutemap
andarenotchangedinanyway.TheISPpropagatestheseroutestotherestofthe
Internet.

RoutesthattheISPreceivesfromthecustomerarepropagatedtotherestofthe
InternetonlyiftheyarepartofthePIaddressspace.
A customer can use a private AS.
Private AS numbers should not be advertised into the Internet.
Private AS numbers must be removed from the AS path before the customer
BGP routes are advertised to other service providers.
A private AS number can be removed from the tail of the AS path using the
remove-private-as keyword.
WhentheISPreceivesBGProutesfromthecustomer,theASpathattributeofthe
receivedroutescontainsonlytheASnumberofthecustomer.Ifthecustomeruses
ASpathprepending,theremaybeseveralrepetitionsofthecustomerASnumberin
theASpath.IftheserviceproviderpropagatesthecustomerroutestotheInternet,
theASnumberofthecustomerwillbepresentintheASpathunlessitisexplicitly
removed.
IfthecustomerhasbeenassignedaprivateASnumber,
thisASnumbermustneverbeadvertisedbyanyrouterto
therestoftheInternet.Theserviceproviderhastomake
surethattheprivateASnumberisremovedfromtheBGP
routeandthattheserviceproviderASnumberispresent
inthetailoftheASpath.
RemovalofaprivateASnumberfromtheASpathisaccomplishedbyusingthe
remove-private-ascommandontheISPEBGPsessionswiththerestofthe
Internet.Inthefigure,removaloftheprivateASnumberoccursontheEBGP
sessionbetweenAS300andtheInternet.
router(config-router)# neighbor ip-address remove-private-as
The command modifies AS path processing on outgoing updates that are sent to
the specified neighbor.
Private AS numbers are removed from the tail of the AS path before the update
is sent.
Private AS numbers followed by a public AS number are not removed.
The AS number of the sender is prepended to the AS path after this operation.
ToremoveprivateASnumbersfromtheASpathinoutboundroutingupdates,use
theneighborremove-private-asrouterconfigurationcommand.Todisablethis
function,usethenoformofthiscommand.
neighbor {ip-address| peer-group-name} remove-private-as
SyntaxDescription
Parameter Description
ip-address IPaddressoftheBGP-speakingneighbor
peer-group-name NameofaBGPpeergroup
Usethiscommandontheserviceprovideregressrouters.Beforetheservice
provideradvertisesanyofthecustomerroutesoftheISPtotherestoftheInternet,
theprivateASnumbersmustberemoved.ThecommandremovesthoseAS
numbersiftheyareatthetailendoftheASpath.
RemovingaPrivateASNumbers

PrivateASnumbersfollowedbypublicASnumbersare
notremovedbecausethecommand'svisibilityisonlyon
thelast(tailend)ASnumber.
TheASnumberoftheISPisautomaticallyprependedtotheASpathattributeafter
theremove-private-asoperationhascompleted.ThissituationmeansthattheAS
numberoftheISPhasnotalreadybeenprependedtotheASpathattributewhen
thetailoftheASpathischeckedforprivateASnumbers.
RemovingaPrivateASNumbersExample
Inthisexample,theserviceproviderAS(300)receivesroutesfromthecustomer.
PE3(config)# router bgp 300
PE3(config-router)# neighbor 10.2.3.3 remote-as 200
PE3(config-router)# neighbor 10.2.3.3 remove-private-as
TheISPassignstheprivateASnumber65001tothecustomer;therefore,theroutes
thattheproviderreceiveshaveanASpathcontainingonlyAS65001.This
informationshouldbekeptandusedwithintheISPnetworkandshouldneverbe
propagatedtotherestoftheInternet(AS200inthisexample).
ThePE3routerinAS300hasbeenconfiguredtoremoveprivateASnumberson
EBGProutestowardAS200.IfprivateASnumbersappearinthetailendoftheAS
path(beforeAS300isadded),theyareremoved.
ThisconfigurationmustbeappliedtoallegressroutersinAS300thatserveEBGP
neighborsleadingtootherISPs.NoprivateASnumbermaybepresentinanAS
pathofaroutethatispropagatedtoanetworkusingapublicASnumber.

ASmigrationcanbenecessarywhenatelecommunicationsproviderorISP
purchasesanothernetwork.Itisdesirablefortheprovidertobeabletointegratethe
secondASwithoutdisruptingexistingcustomerpeeringarrangements.However,the
amountofconfigurationthatisrequiredinthecustomernetworkscanmakethis
migrationacumbersometaskthatisdifficulttocompletewithoutdisruptingservice.
Allows you to merge a secondary AS under the primary AS without disrupting
customer peering sessions.
Allows a router to appear to external peers as a member of secondary AS
during the AS migration.
Allows a network operator to merge the ASs and then later migrate customers to
new configurations during normal service windows without disrupting existing
peering arrangements
If misconfigured, increases the possibility of creating routing loops
TheBGPSupportforDualASConfigurationforNetworkASMigrationsfeature
allowsyoutomergeasecondaryASunderaprimaryASwithoutdisrupting
customerpeeringsessions.Theconfigurationofthisfeatureistransparentto
customernetworks.Thisfeatureallowsaroutertoappeartoexternalpeersasa
memberofsecondaryASduringtheASmigration.Italsoallowsthenetwork
operatortomergetheASandthenlatermigratecustomerstonewconfigurations
duringnormalservicewindowswithoutdisruptingexistingpeeringarrangements.
Theneighborlocal-ascommandisusedtocustomizetheASpathattributeby
addingandremovingASnumbersforroutesthatarereceivedfromEBGP
neighbors.Usethiscommandinaddress-familyorrouterconfigurationmode.To
disableASpathattributecustomization,usethenoformofthiscommand.
neighbor ip-address local-as [as-number[no-prepend [replace-as [dual-
as]]]]
SyntaxDescription
Parameter Description
ip-address SpecifiestheIPaddressoftheEBGPneighbor.
as-number SpecifiesanASnumbertoprependtotheASpathattribute.
TherangeofvaluesforthisargumentisanyvalidASnumberfrom1to
65535.
no-prepend (Optional)DoesnotprependthelocalASnumbertoanyroutes
receivedfromtheEBGPneighbor.
replace-as (Optional)PrependsonlythelocalASnumbertotheASpathattribute.
TheASnumberfromthelocalBGProutingprocessisnotprepended.
dual-as (Optional)ConfigurestheEBGPneighbortoestablishapeering
sessionusingtherealASnumberfromthelocalBGProutingprocess.
OrbyusingtheASnumberthatisconfiguredwiththeip-address
argument(local-as)
ASpathcustomizationincreasesthepossibilitythat
routingloopscanbecreatedifitismisconfigured.The
largerthenumberofcustomerpeerings,thegreaterthe
risk.Youcanminimizethispossibilitybyapplyingpolicies
ontheingressinterfacestoblocktheASnumberthatisin
transitionorroutesthathavenolocal-asconfiguration.
BGPprependstheASnumberfromeachBGPnetwork
thataroutetraversestomaintainnetworkreachability
informationandtopreventroutingloops.Thisfeature
shouldbeconfiguredonlyfortheASmigrationandshould
bedeconfiguredafterthetransitionhasbeencompleted.
Thisprocedureshouldbeattemptedonlybyan
experiencednetworkoperator,becauseroutingloopscan
becreatedwithimproperconfiguration.
BGPSupportforDualASConfigurationforNetworkAS
Migrations

Dual-ASConfigurationExample
ThefollowingexamplesshowhowDualASConfigurationforNetworkASMigrations
featureisusedtomergetwoautonomoussystemswithoutinterruptingpeering
arrangementswiththecustomernetwork.
If a service provider migrates to a new AS number, customers have to change
the BGP configuration.
A merged service provider can present itself to the customer using the old AS
number, so the customer is not required to change the BGP configuration.
Theneighborlocal-ascommandisconfiguredtoallowPE1tomaintainpeering
sessionsthroughAS100andAS200.CE1isacustomerrouterthatrunsaBGP
routingprocessinAS1andisconfiguredtopeerwithAS200.
PE1(config)# router bgp 100
PE1(config-router)# no synchronization
PE1(config-router)# neighbor 172.16.33.3 remote-as 1
PE1(config-router)# neighbor 172.16.33.3 local-as 200 no-prepend replace-
as dual-as
PE1(config)# router bgp 200
PE1(config-router)# neigbor 172.16.33.3 remote-as 1
CE1(config)# router bgp 1
CE1(config-router)# neighbor 172.16.33.34 remote-as 200
Afterthetransitioniscomplete,theconfigurationonCE1canbeupdatedtopeer
withAS100duringanormalmaintenancewindoworduringotherscheduled
downtime.
CE1(config-router)# neighbor 172.16.33.34 remote-as 100
Dual-ASConfederationConfigurationExample
ThefollowingexamplecanbeusedinplaceofthePE1configurationintheprevious
example.Theonlydifferencebetweentheseconfigurationsisthatinthisexample
PE1isconfiguredtobepartofaconfederation.
PE1(config)# router bgp 65100
PE1(config-router)# no synchronization
PE1(config-router)# bgp confederation identifier 100
PE1(config-router)# neighbor 172.16.33.3 remote-as 1
PE1(config-router)# neighbor 172.16.33.3 local-as 200 no-prepend replace-
as dual-as
Replace-ASConfigurationExample
ThefollowingexamplestripsprivateAS65100fromoutboundroutingupdatesfor
the172.16.33.3neighborandreplacesitwithpublicAS1.
PE1(config)# router bgp 65100
PE1(config-router)# neighbor 172.16.33.3 local-as 1 no-prepend replace-as

WhenacustomerusesBGPonmultiplelinksbetweenitsnetworkandtheISP
network,thecustomerissolelyresponsibleforcontrollinghowitusesthelinks.The
customercanchoosetouseitslinksinaprimaryorbackupscenarioorinaload-
sharingscenario.
The CE routers control the route selection entirely.
Outgoing traffic:
Local preference is used to select primary or backup link.
Incoming traffic:
MED is used to advertise the primary or backup link to the ISP. This is no
reliable, because the ISP can change the local preference.
No service provider configuration is required.
Ifonelinkisprimary,thentheothershouldbeusedforbackuponly.Thecustomer
canusethelocalpreferenceconfigurationtodirectalloutgoingtrafficoverthe
primarylink.
IncomingtraffictothecustomeriscontrolledbyusingeitherASpathprependingor
theMED.BecausethecustomerhasmultipleconnectionstothesameAS,theMED
istheidealattributetouse.WhenthecustomerannouncesitsroutestotheISP,a
worse(orhigh)MEDvalueonthebackuplinkisset.Alsoagood(orlow)valueon
theprimarylinkisset.
ThereceivingEBGPpeerchecksMEDandASpathlengthonlyiftheweightand
localpreferenceattributeshavenotbeenconfigured.Inthiscase,theISPshouldnot
useanyoftheseconfigurationoptions.TheISPshouldrelysolelyontheattributes
thatithasreceivedfromthecustomer.However,iftheISPsets,forexample,the
localpreferenceforcustomerroutes,theISPwillcontrolthepathselectionfortraffic
tothecustomer.Thispathselectioniswhyyoucannotrelyonthefactthatyour
trafficdistributionscenariowillworkasintended.
Primary/BackupLinkSelectionExample
ThecustomerisconnectedtotheISPovertwopermanentconnections.The
customerusestheupperconnectionastheprimaryconnectionandthelower
connectionasthebackup.
TheBGPconfigurationontheISPsideistransparent.Thistransparencymeansthat
noparticularpreferenceisconfiguredtousetheupperorlowerconnection.TheISP
reliesontheattributevaluesthatarereceivedfromthecustomer.
TheCE1routerisconfiguredtosetlocalpreferencetothevalue100onallEBGP
routesthatarereceived.TheCE2routersetsthelocalpreferenceattributetoa
valueof50.Thisconfigurationmeansthattheoutgoingtraffictowardanydestination
thattheISPannouncesisprimarilysentovertheupperlink.Itmakestheprimary
routerthepreferredone.
IncomingtraffictothecustomerisdirectedtotheprimarylinkbyusingtheMED.On
theCE1router,allroutesthataresenttotheISPhavetheirMEDattributesettothe
value100bytheroutemapnamed"LowMEDout."OntheCE2router,allroutesthat
BackupSolutionswithBGP
aresenttotheISPhavetheirMEDattributesettothevalue200bytheroutemap
named"HiMEDout."BecausetheISPreceivestherouteswithallotherattributesset
tothesamevalues,theMEDvaluesdirecttrafficforthecustomertotheprimarylink.
Thismakestheprimaryrouterthepreferredonefromtheserviceproviderpointof
view.

Loadsharingofoutgoingtrafficfromthecustomernetworkisidenticaltothestatic
routingscenario.ThecustomerIGPisconfiguredtosendinformationabouta
gatewayoflastresort.Thereisnodifferencewhethertheedgeroutergetsitsdefault
bystaticroutingorbyincomingEBGPupdates.
You can implement load sharing of return traffic in a number of ways:
Outgoing traffic:
Load sharing is identical to the static routing scenario. The IGP determines
it.
Incoming traffic:
Announce portions of the customer address space to each upstream router.
Configure BGP multipath support in the service provider network.
Use EBGP multihop in environments where parallel links run between a pair
of routers.
LoadsharingofthereturntrafficcomingbacktothecustomernetworkfromtheISP
canbeimplementedinanumberofways:
Thecustomercandivideitsaddressspaceintoseveralannouncements.TheCE
routercansendeachannouncementoveroneofitsEBGPsessionswiththe
ISP.Forbackuppurposes,thecustomershouldadvertisetheentireaddress
spaceoverallofitsEBGPsessions.TheISPnowusesthemostexplicitroute
rule.Aslongasbothlinksareup,trafficwithdestinationswithinonepartofthe
customeraddressspaceisroutedoveroneofthelinks.Traffictotheotherpart
isroutedovertheotherlink.
Ifthecustomerannouncesequivalentroutesoverbothlinks,theISProutersuse
theclosestconnectionregardingtheIGPoftheISP.IfanISProuterhasan
equivalentdistancetobothconnectionpoints,theuseofthemaximum-paths
(orBGPmultipath)optioncausesloadsharing.
IfthemultiplelinksbetweenthecustomerandtheISPnetworkterminateinone
singlerouteronthecustomersideandonesinglerouterontheISPside,thetwo
routersmustestablishtheirEBGPsessionfromloopbackinterfacetoloopback
interface.Staticordynamicroutingisrequiredforoneroutertogetinformation
onhowtoreachtheloopbackinterfaceoftheotherrouter.Theuseoftheebgp-
multihopoptionisalsorequiredbecausetheaddressoftheneighborisnot
directlyconnected.
LoadSharing

Bydefault,BGProuteselectionrulesselectone,andonlyone,routeasthebest.If
therearetwoidenticalroutes,thetiebreakeriseitherthemoststablerouteorthe
router-IDofthepeerrouterthatisadvertisingtheroute.However,whenthe
maximum-pathsrouterconfigurationcommandisused,theBGProuteselection
processwillselectmorethanonerouteasbestiftheyareidentical.Theroutesare
allinstalledintheroutingtable,andloadsharingtakesplace.
BGP Multipath:
By default, BGP selects a single path as the best path and installs it in the IP
routing table.
If configured, a BGP router can select up to six identical BGP routes as the best
routes.
router(config-router)# maximum-paths number
With maximum-paths configured, a BGP router can select several identical
EBGP routes as the best routes and install them in the IP routing table for load-
sharing purposes.
AroutercanuseeitheronlyIBGProutesoronlyEBGProutesforloadbalancingbut
notbothatthesametimebecausethiscouldleadtoroutingloops.BGPmultipath
canbeenabledseparatelyforIBGPandEBGProutes.Aroutercaninstalluptosix
BGProutesintheIProutingtable.Theactualtypeofloadsharing(per-sessionor
per-packet)thatoccursbetweentheroutesdependsontheswitchingmodethatis
used.
TocontrolthemaximumnumberofparallelroutesthatanIProutingprotocolcan
support,usethemaximum-pathscommandinaddressfamilyorrouter
configurationmode.Torestorethedefaultvalue,usethenoformofthiscommand.
maximum-paths number
SyntaxDescription
Parameter Description
number MaximumnumberofparallelroutesthatanIProutingprotocolinstalls
inaroutingtable,intherangeof1to6.
LoadsharingbetweenalternativeBGProutesisachieved
onlyiftheEBGProutesareidenticalaccordingtoallBGP
routeselectionrulesandmaximum-pathsisconfigured
withavaluelargerthan1.
LoadSharingwithBGPMultipath

Whentwoadjacentroutershavemultiplelinksbetweenthem,youcanconfigurethe
EBGPsessionfromloopbackinterfacetoloopbackinterface.Inthiscase,youmust
usetheebgp-multihopoptiontomaketheBGPsessiongointotheactivestate.
Theremustbestaticordynamicroutinginusetoprovidebothrouterswith
informationonhowtoreachtheloopbackinterfacesofeachother.Otherwise,their
EBGPsessiondoesnotcompleteestablishment.
EBGP Multihop:
Used when parallel links between routers exist. Loopback interfaces have to be
used for BGP peering.
Because of recursive lookup, load sharing toward a BGP destination always
occurs if there are several equal-cost paths to the BGP next hop.
By default, EBGP neighbors must be directly connected.
The ebgp-multihop [TTL] command declares an EBGP neighbor to be distant
(several hops away).
Routingtotheloopbackinterfaceoftheneighboringrouterisrequiredtoestablish
theEBGPsession.Itisalsousedintherecursivelookupwhentherouterinstallsthe
routesinitsroutingtable.Thetworoutestotheloopbackinterfaceofthe
neighboringroutershouldbeequivalentforloadsharingtooccur.
Afterconfiguration,onesingleEBGPsessionisestablishedbetweenthetworouters.
Thissessionisusedtoexchangetheroutinginformation.ThereisonlyoneBGP
routetoeachdestination,andithasanexthopthatreferstotheloopbackinterface
oftheotherrouter.
TheloadbalancingisautomaticasaresultoftherecursiveroutelookupofBGP
nexthops.TheIProutingtablewillcontainasingleroutingentrytoreachthe
customerprefixbuttheCiscoExpressForwarding(CEF)table(whichcontainsthe
resultsoftherecursivelookup)willhavetwoequal-costpathstoreachthecustomer
prefix.
Bydefault,EBGPneighborsmustbedirectlyconnected.Arouterverifiesthatan
EBGPneighborisreachableasdirectlyconnectedoveroneoftherouterinterfaces
beforethesessiongoesintotheactivestate.ForanEBGPsession,IPpacketsthat
carrytheTCPsegmentswithBGPinformationarealsosentusingaTTLvaluesetto
thevalue1.Thisvaluemeansthattheycannotberouted.
Theebgp-multihopneighborconfigurationcommandchangesthisbehavior.
Althoughtheneighborisseveralhopsaway,thesessiongoesintotheActivestate,
andpacketsstarttobeexchanged.TheTTLvalueoftheIPpacketsissettoavalue
largerthan1.Ifnovalueisspecifiedonthecommandline,255isused.
Usetheebgp-multihopcommandwhenyouareestablishingEBGPsessions
betweenloopbackinterfacesforload-sharingpurposes.Youmusttakegreatcare
whenusingebgp-multihop.Properpacketforwardingreliesonalltheintermediate
routersalongthepathtotheEBGPpeertomakethecorrectforwardingdecision.If
theintermediateroutershaveacorrectpathtotheEBGPpeerbutawrongpathto
thefinaldestination,thepacketmaygetintoaroutingloop.
LoadSharingwithEBGPMultihopExample
Inthefigure,thecustomernetworkandtheISPnetworkareconnectedviasingle
routeroneachside.Twoparallellinksareused.
LoadSharingwithEBGPMultihop

Inthiscase,onlyoneEBGPsessionisconfiguredbetweenthecustomerand
providerrouters.Thesessionshouldbeestablishedfromtheloopbackinterfaceon
oneroutertotheloopbackinterfaceontheother.
Eachofthetwoedgeroutershastwostatichostroutesthatpointtotheloopback
interfaceontheotherrouter.TheEBGPsessionisestablishedfromloopbackto
loopbackusingebgp-multihop.
ThecustomerreceivesanEBGProutefromtheISPwiththenexthopsetto
10.0.3.1.TheCErouterperformsarecursivelookupandfindsthatitcanreach
10.0.3.1via172.16.33.33andvia172.16.34.34.Thesetworoutesareequivalent.
Therefore,theroutetothefinaldestinationisinstalledintheroutingtableofthe
customerrouterusingbothpaths.
Dependingontheswitchingmodeinuse,loadsharingisdoneperpacket,per
destination,orpersourceanddestinationpair.
Inthisexample,link-levelproceduresensurethatifoneofthelinksgoesdown,the
correspondingstaticlinkgoesdown.AllBGProutesintheroutingtablethatrelyon
thestaticroutetothelinkthatwentdownareinvalidated.However,theBGProutes
intheroutingtablethatrelyontheremaininglinkarestillvalidandused.

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
When a customer has multiple connections to a single ISP and the link-level
procedures cannot detect a link failure, a routing protocol is required. For
security reasons, this routing protocol must be BGP.
Customer does not necessarily use a public AS number, it can also use private
AS numbers that range from 64512 to 65535. BGP must remove private AS
numbers.
The ISP should advertise a default route to the customer through BGP. The
provider should also use incoming filters to ensure that the customer advertises
only the correct address space and AS number.
The BGP Support for Dual AS Configuration for Network AS Migrations feature
allows you to merge a secondary AS under a primary AS without disrupting
customer peering sessions.
By announcing portions of its address space, a customer can use maximum
paths and EBGP multihop to provide load sharing over multiple links.
Summary

Overview
Whenacustomerrequiresthemaximumredundancyinitsnetworkdesign,itshould
implementamultihomedstrategythatusesmultipleserviceproviders.This
configurationrequiresspecificconsiderationstobeimplementedproperly.
AddressingandASnumberselectionareimportantconsiderationsthataffectthe
networkimplementation.Itisalsoimportanttounderstandhowtoconfigurerouting
protocolssothatcustomerbackuporload-sharingrequirementsaremet.
Inthislesson,youwilldiscussmultipleconnectionsbetweenacustomerand
multipleserviceprovidersforbackupandload-sharingpurposes.IncludingtheBGP
characteristicsthatareusedtoconfiguresuchconnectivity.Youwillalsodiscuss
addressselection,privateASnumbertranslation,andconfigurationofthenetworkto
supporteitherbackuplinksorloadsharing.
Uponcompletingthislesson,youwillbeableto:
DescribeBGPconfigurationcharacteristicsthatareusedtoestablishrouting
betweenamultihomedcustomerandmultipleserviceproviders
Describeaddressingstrategiesthatareavailabletoamultihomedcustomerthat
isconnectedtomultipleserviceproviders
DescribeASnumberingstrategiesthatareavailabletoamultihomedcustomer
thatisconnectedtomultipleserviceproviders
DescribetheoperationofASnumbertranslation
Describehowyoucanimplementatypicalbackupsetupbetweenamultihomed
customerandmultipleserviceprovidersinaBGPenvironment
DescribetheuseofBGPattributestoinfluenceinboundlinkselectionin
customernetworksthataremultihomedtomultipleserviceproviders
Describehowyoucanimplementloadsharingbetweenamultihomedcustomer
andmultipleserviceprovidersinaBGPenvironment
ConnectingaMultihomedCustomerto
MultipleServiceProviders

Thehighestlevelofredundancytonetworkfailuresisachievedinnetworkdesigns
thatconnectthecustomernetworktotwodifferentserviceprovidernetworks.
CustomersusethisoptionwhentherequirementforresilientInternetconnectivityis
veryhigh.Thisrequirementalsoinvolvesduplicationofequipmenttomakethe
customernetworkfullyredundant.
BGP is run between the customer and the service provider.
The customer advertises the allocated address space into BGP. It is
recommended to use a public AS number.
The service provider has to deploy inbound BGP filters.
The service provider advertises the following to the customer:
Default route, default route + local networks, or full Internet routing table
BecausethecustomerhastousePIaddressspace,itistheresponsibilityofthe
customertoadvertisethecustomeraddressspace.Theonlyroutingoptionthatcan
beusedinthisscenarioisBGPbecauseserviceprovidersrunonlyBGPwith
customers.Itisnotenoughtodetectlinkfailuresorafailureintheremoterouterby
link-levelprocedures.Failuresthatoccurbeyondthedirectlyconnectedroutermust
alsobedetected,andtheonlymeansofdetectingthesefailuresisbyusingarouting
protocol.TheonlyroutingprotocolthatissuitedfortheInternetenvironmentisBGP.
Correctlyconfigured,BGPtakescareofreroutinginthefollowingsituations:
LinkfailurebetweenthecustomernetworkandthenetworkofoneoftheInternet
serviceproviders.
Edgerouterfailureoneitherthecustomerortheserviceproviderside.
LinkfailureorrouterfailurewithinthecustomernetworkthatcausestheCE
routertoloseconnectivitywiththecustomernetworkcore.Thissituation
requirescorrectconfigurationofrouteadvertisementasdescribedinanearlier
lesson.
LinkfailureorrouterfailurewithintheISPnetworkthatcausesthePErouterto
loseconnectivitywiththerestoftheInternet
MultihomedcustomershavemultiplepermanentlinkstodifferentISPs.Thelinks
shouldterminateindifferentedgeroutersinthecustomernetwork.Otherwise,oneof
themajoradvantages,resiliencetorouterfailure,islost.
MultihomedcustomersshoulduseBGPwithbothISPs.Thecustomershould
advertiseitsaddressspacetobothproviders.Therouteadvertisementshouldbe
configuredinbothCErouters.Theadvertisementshouldbeconditionedattheedge
routersbytheappropriateroutepoliciesleadingtowardthecoreofthecustomer
network.Thissetupisanalogoustotheoneconfiguredwhenyouareconnectinga
multihomedcustomernetworktoasingleserviceprovider.
Thecustomershouldtakecarenottomoveanyroutinginformationbetweenthetwo
ISPs.Itmustuseoutgoingfilterstopreventanyroutethatisreceivedfromoneofthe
ISPsfrombeingpropagatedtotheother.Otherwise,thecustomernetworkappears
asatransitnetworkbetweenthetwoISPs.
BothISPsmustapplyfiltersontheincomingBGPinformationfromthecustomer.
ThesefilterswillprotectthemselvesandtherestoftheInternetfromerrorsinthe
BGPconfigurationofthecustomer.Eachoftheserviceprovidersmustacceptroutes
fromthecustomerthatindicatenetworkswithinthecustomeraddressspaceonly.
ASpathfilterlistsshouldbeimplementedonthePErouterstoallowincomingroutes
onlyiftheyhavethecorrectASpathattributevalue.IftheincomingfiltersontheISP
edgerouteracceptcustomerroutes,thentheserviceprovidershouldpropagate
thoseroutestotherestoftheInternet.
BothISPsmustprovidethecustomerwithatleastsomeBGProutes.Dependingon
thecustomerrequirements,thevolumeofBGProutestheISPprovidescanvary.It
BGPConfigurationforMultihomedCustomers

canbethedefaultrouteonly,thedefaultroutewithlocalroutesaswell,orthefull
Internetroutingtable.
Beforeconfiguringthemultihomednetwork,youneedtoconsiderthefollowing
questions:
Shouldanyofthelinksbeusedasprimaryandtheothersasbackup?
Shouldbothlinkssharetheload?
Whataddressspaceisthecustomerusing?IsthecustomeraddressspacePA
orPI?
WhatASnumberisthecustomerusing?(Isthecustomerusingapublicora
privateASnumber?)

Ifthecustomerhasitsownaddressspace,itshouldannounceittobothservice
providers.Bothprovidersareresponsibleforpropagatingthecustomerroutestothe
restoftheInternetwithoutdoinganysummarization.
Provider-independent address space:
If the customer owns the address space, there should be no limitations
regarding announcing it to both service providers.
Provider-assigned address space:
If the customer uses ISP-assigned small address blocks, then there is no
purpose in using BGP to provide redundant connectivity. NAT is easier to
implement and solves the problem of the reverse path.
However,ifthecustomerusesasmallblockofaddressesthatoneoftheISPs
assigned,analternativedesignthatdoesnotinvolveBGPexist.Thecustomercan
usetwodifferentPAaddressspacesanddoNAT.WithNAT,theroutertranslates
trafficgoingoutoveroneofitsconnectionstooneofthePAaddresses.Ifthetraffic
goesouttheotherway,theaddressesaretranslatedtoanaddressfromtheaddress
spaceoftheotherprovider.
MultihomedCustomerAddressSpaceSelection

TheuseofBGPrequiresanASnumber.Thepreferredoptionistousearegistered,
publicASnumber.However,registeredASnumbersareassignedonlytothosewho
reallyneedthembecausepublicASnumbersareascarceresource.Acustomer
withBGPsessionstomultipleISPsmustusearegistered,publicASnumber.A
customerthatisconnectedtoonlyoneISPdoesnotrequireapublicASnumber.In
thatcase,aprivateASnumberintherangefrom64512to65535issufficient.
Registered, public AS number (recommended):
Preferred option, but difficult to get.
Does not require ISPs to assign a private AS number.
Consistent routing information in the Internet.
Private AS number (discouraged):
Easier to get (even easier with AS translation).
One private AS number: The customer has to be able to use the same
private AS number with multiple providers.
Multiple private AS numbers: Each service provider assigns a private AS
number to the customer and the customer then uses one of them internally;
the others have to be translated.
Causes inconsistent routing information.
WheneverthecustomerisassignedapublicASnumber,therearenoconflictsinthe
BGPsetupbecausethenumberisguaranteedtobeuniquewithintheInternet.Both,
thecustomerandtheserviceprovidermakerouteannouncementswithout
tamperingwiththeASpath.Asaresult,theserviceproviderpropagatesaconsistent
ASpathinformationtotherestoftheInternet.
IncaseswherethecustomerdoesnothaveapublicASnumber,itmustusea
privateASnumber.BecauseprivateASnumbersarenotpropagatedtotheInternet,
severalnetworkadministratorscanmakethisassignmentindependentlyofeach
other.Inthiscase,ASnumbersarereused,whichconservesASnumberspace.A
serviceprovidernormallyassignsprivateASnumberstoitscustomers.This
arrangementensuresthatuniqueprivateASnumbersareusedamongthe
customersofasingleISP.
WhenacustomerisgoingtobemultihomedandtheprivateASnumberthathas
alreadybeenassignedbyoneoftheISPscomesinconflictwithanASnumberthat
hasbeenassignedbytheotherISP,thecustomerneedstoconsiderrenumbering
thecustomerAS.Ifthetwoserviceproviderscanreachacommonagreementon
whichprivateASnumberthemultihomedcustomershoulduse,renumberingisa
solution.Ifnocommonagreementcanbemadeorifrenumbering,forsomereason,
isnotanoption,AStranslationmustbeconfiguredonthecustomernetwork.
NoroutershouldeverpropagateprivateASnumberstotherestoftheInternet.An
ISPcankeeptrackoftheprivateASnumbersthatithasassignedtoitscustomers
andavoidreuseorconflictswithinthatscope.However,assoonasthescopeis
widenedtoincludeotherISPs,conflictswillhappen.EachISP,therefore,removes
privateASnumbersfromtheASpathbeforesendingroutesoutsideitsownAS.
WhentherouteswiththeprivateASnumbersremovedarepropagatedtotherestof
theInternet,theASpathlooksasthoughtherouteswereoriginatedwithinthepublic
ASoftheISP.AllinformationabouttheprivateASlyingbehindthepublicASislost.
Inthecaseofamultihomedcustomer,thecustomerroutesarefirstpropagatedinto
eachoftheautonomoussystemsofitsISPs.Inthenextstep,theprivateASnumber
isremovedfromtheroutes,astheroutesarepropagatedtotherestoftheInternet.
NowthecustomerroutesappeartobeoriginatingintheASsofbothISPs.Toan
outsideobserver,thereisnowanASpathinconsistencybecauseitlooksasthough
thesameroutebelongstodifferentASs.
MultihomedCustomerASNumberSelection

Thefigureshowsacasewhereacustomerismultihomedbutforcedtousetwo
privateASnumbers(forexample,becauseofthescarcityofpublicASnumbers).
On one EBGP adjacency, the real AS number is used.
On the other EBGP adjacency, the AS number is translated to the one assigned
by the second ISP.
Inthefigure,ServiceProvider1hasassignedtheprivateASnumber65053tothe
customer.Serviceprovider2didnotagreetousethisprivateASnumberwhen
connectingtothecustomer.Instead,serviceprovider2hasassignedtheprivateAS
number65286.
ThecustomernowhastwodifferentprivateASnumbers:65053and65286.The
customerdecidestouse65053internally.AllrouterBGPconfigurationlineshave
65053astheASnumber.ThecustomerusesASnumber65286onlywhen
establishingtheEBGPsessiontoAS200.
Intheexample,ServiceProvider1(AS100)hasanEBGPsessiontothecustomer
wheretheASnumber65053isusedatthecustomerend.Serviceprovider2(AS
200)hasanEBGPsessiontothecustomerwheretheASnumber65286isusedat
thecustomerend.TranslationbetweenthesetwoprivateASnumberstakesplacein
theCErouteraspartoftheEBGPsessiontoAS200.
router(config-router)# neighbor ip-address local-as private-as [no-
prepend [replace-as]]
Optionally, the service providers can assign two different private AS numbers to
the customer.
Internally, the customer can use an ISP-assigned AS number or even any other
private AS number.
Externally, the customer appears as one private AS to ISP 1 and as a different
private AS to ISP 2.
Note: When you are using this option, the AS path of the customer network
contains two AS numbers. The ISP has to adapt the incoming AS path filters.
Theneighborip-addresslocal-asprivate-asrouterconfigurationcommandisused
toindicatetheASnumberthatthelocalrouterusesasitslocalASnumberinthe
BGPOpenmessage.TheremoterouterisassumedtohaveanEBGPsessiontothe
indicatedlocalAS.
Internally,thecustomernetworkusesanotherprivateASnumber.Whenroutesare
senttotheneighbor,theinternalASnumberisautomaticallyprependedintheAS
pathfirst,andthenthespecifiedlocalASnumberisprependedaswell.Asa
consequence,theISPreceivestherouteswithanASpathwithbothASnumbersin
it.TheISPhastoadaptitsincomingfilter-listsasaresultofthissituation.
Whenakeywordno-prependisused,routerdoesnotprependthelocal
autonomoussystemnumbertoanyroutesreceivedfromtheEBGPneighbor.
Whenakeywordreplace-asisused,routerreplacestherealautonomoussystem
numberwiththelocalautonomoussystemnumberintheeBGPupdates.The
autonomoussystemnumberfromthelocalBGProutingprocessisnotprepended.
Someserviceprovidersmightbeunwillingtochangetheir
ASpathinputfilters,leavingthecustomernootheroption
thantouseapublicASnumberortoconnecttoasingle
ISPwithaprivateASnumber.
ASNumberTranslation


WhenusingBGPonmultiplelinksbetweenacustomerandseveralserviceprovider
networks,thecustomerissolelyresponsibleforcontrollingtheuseofthelinks
betweenthemforoutgoingtraffic.Thecustomerchooseswhethertousetheselinks
inaprimaryandbackup,oraload-sharingconfiguration.
Intheprimaryandbackupscenario,onlythedefaultrouteisrequiredfromeach
serviceprovider.Thecustomerimplementsroutingpolicies.
Outgoing link selection:
You can use the same solution as with multihomed customers connected to
one service provider.
A higher local preference for the default route comes from the primary
service provider.
Incoming link selection:
You cannot use the MED because it can be sent only to the neighboring AS
and no farther.
You must use other means such as BGP communities or AS path
prepending to achieve incoming link selection.
Only the default route is required from both service providers.
Ifonelinkisprimaryandtheotherisbackup,thecustomercanusethelocal
preferenceattributeintheconfigurationtodirectalloutgoingtrafficovertheprimary
link.Thecustomerselectsaprimaryserviceproviderforoutgoingtrafficbysettinga
higherlocalpreferenceforroutesthatarereceivedfromthepreferredISP.This
configurationisnodifferentthantheconfigurationthatisusedforcustomerswith
multipleconnectionsrunningBGPtoasingleserviceprovider.
Controllingtheloaddistributionofincomingtrafficovermultiplelinksismoredifficult
inthemultihomedscenariowhenlinkstomultipleserviceprovidersareused.You
cannotusetheMEDwhenthecustomerconnectstomultipleprovidersbecausethe
updatesaresenttotwodifferentASs.RecallthattheMEDisusedonlywhenyou
compareroutesthatarereceivedfromasingledirectlyconnectedASovertwo
parallellinks.
Therefore,routeselectiondecisionswillmostlikelyusetheASpathattributeand
prefertheroutewiththeshortestASpathlength.ThecustomercanconfigureAS
pathprependingofroutesthataresenttothebackupserviceprovidertolengthen
theASpath.ThereturningtrafficoriginatingfromtheInternetwillthereforechoosea
shorterpaththroughtheprimaryserviceprovider.
PrimaryandBackupLinkSelection

Toremoveincomingtrafficfromthebackuplink,thecustomermustinfluenceroute
selectioninthebackupAS.ThebackupISPmustbeforcedtoprefertheprimary
pathtoreachthecustomernetwork,althoughthischoicemeansselectingaroute
withalongerASpath.
BGP communities:
Customer sets the appropriate BGP community attribute on updates that are
sent to the backup ISP.
Requires the ISP to translate the BGP community attribute to a local preference
attribute that is lower than the default value of 100.
May not work in all situations.
AS path prepending:
Multiple copies of customer AS number prepended to the AS path to lengthen
the AS path sent over the backup link.
Customer not dependent on the provider configuration.
Always works.
Onewaytoinfluencerouteselectionistouselocalpreferenceinthenetworkofthe
backupISP.Usinglocalpreferencecreatesanadministrativescalabilityissueifeach
customerrequiresitsuse,becausetheISPmustmaintaintheconfiguration.
OnescalablewayofsettinglocalpreferenceinanISPnetworkistouse
communities.Thecustomersetsawell-knowncommunityvalueontheroutesthat
aresenttothebackupISP.TheISPrecognizesthecommunityandsetsthelocal
preferencefortheseroutes.ThissolutionisavailableonlyiftheISPhas
implementedandannouncedtheuseofcommunities.Ifcommunitiesandalocal
preferencesettingareused,routeselectionoccursonlyiftherearealternative
routestocompare.
AnotherwayofinfluencingrouteselectioninthebackupISPistodoASpath
prependingbeforesendingtheadvertisementtothebackupISP.Whenthecustomer
sendsroutesoverthebackuplink,multiplecopiesofitsownASnumberare
prependedtotheASpathofeachroute.ThebackupISPreceivestheroutesand
makesnormalroute-selectiondecisions.Nospecialweightorlocalpreference
settingsareused;theBGProuteselectionisbasedexclusivelyontheASpath
length.Nospecialconfigurationisrequiredintheserviceprovidernetwork.
BGPIncomingLinkSelectionUsingBGPCommunities
Intheexamplehere,thebackupserviceprovider2(AS200)hasdefinedthe
meaningofcommunity200:50.WhenAS200receivesrouteswiththiscommunity,
thelocalpreferenceissetto50.
ThecustomerAS1isadvertisingtherouteovertheprimarylinkwithoutany
communities.ItisreceivedbyAS100andpropagatedtoAS200.WhenAS200
receivestherouteviaAS100,thereisnocommunityset.AS200thereforeassigns
thedefaultlocalpreferencevalueof100.
Thecustomerisalsoadvertisingtherouteoverthebackuplink.However,inthis
case,theroutehasthecommunity200:50set.WhenAS200receivesthisroute,it
recognizesthecommunity,andthelocalpreferencevalueissetto50.
RouteselectionisnowperformedinAS200.Theroutethathasbeenreceivedvia
AS100ispreferredbasedonthelocalpreferencevalues.
BGPIncomingLinkSelection

Evenwhentheuseofcommunitiesiscorrectlyconfigured,thedesiredload
distributionmaynotalwaysbeachieved.Asthisexampleshows,AS200doesnot
alwaysreceivetheprimaryroute,althoughnothingiswronginthenetwork.
ThecustomerAS1sendsrouteswithcommunity200:50overthebackuplinktoAS
200.AS200receivestheroutesandsetsthelocalpreferenceto50.IfAS200over
sometimeselectsthedirectlyconnectedpathtoAS1asthebest,itpropagatesthe
routetoAS300.AstherouteispropagatedovertheEBGPsessionbetweenAS200
andAS300,thelocalpreferencevaluethatisusedwithinAS200islost.
AS300doesnothaveanyuseforthecommunity200:50becausethiscommunityis
definedandimplementedonlywithinAS200.Potentially,thecommunityvaluecan
alsobestrippedoffduringBGProutepropagation.
CustomerAS1alsosendstheroutesovertheprimarylinktoAS100.Theroutes
arepropagatedtoAS300,whichnowseestwoalternativeroutestothedestination
networkswithinAS1.TherouterinAS300doesnotuseweightnorlocalpreference
ascriteriaforreachingAS1.BothalternativeshaveequalASpathlengths.
TherouteselectiondecisionthatwillbemadeinAS300ishardtopredict,butthe
outcomedefinitelyinfluencestherouteselectiondecisionthatwasmadeinAS200.
IfAS300preferstheroutetothecustomernetworkviaAS200foranyreason,then
thesecond-bestalternativeviaAS100andtheprimarylinkisneverpropagatedto
AS200.
Inthiscase,AS200neverseestheprimarypathandhastosticktothebackuplink
andannouncetheroutetoAS300.Thenetworkhasreachedasteadystatewhen
thetrafficusesthebackuplinkalthoughtheprimarylinkisavailable.
BGPIncomingLinkSelectionUsingASPathPrepending
Inthisexample,thecustomerAS1isperformingASpathprependingonthebackup
link.ThreecopiesofthecustomerASnumber(1)areprependedtotheASpath.As
theroutegoesoutovertheEBGPsession,BGPprependsthelocalASnumberto
theASpathattribute.AS200receivesroutesfromAS1overthebackuplinkwithan

ASpathlengthoffour.ThisistheoriginalAS1plusthreeprependedcopiesthatthe
CErouterappliedtotheASpathattribute.
ThecustomeradvertisesnetworkswithoutASpathprependingovertheprimarylink.
AS100receivesrouteswithanASpathlengthofoneandpropagatestheseroutes
toAS300,whichthenreceivesthemwithanASpathlengthoftwo.
If,forashorttime,AS300receivedthecustomerroutesviaAS200,theASpath
lengthofthoserouteswouldhavebeenfive.Inthatcase,AS300selectstheroute
fromAS100asthebestandpropagatesittoAS200.
AS200nowseesbothalternatives.Thecustomerroutesthathavebeenreceived
directlyfromthecustomerhaveanASpathlengthoffour.Theroutesthathavebeen
receivedviaAS300haveanASpathlengthofthree.Becausenoweightorlocal
preferenceisconfiguredinthisexample,AS200selectstherouteviaAS300asthe
best.
Thedesiredresult,tohavealltrafficenterthecustomernetworkviatheprimarylink,
isnowachieved.
IfthebackupISPisimplementingincomingASpathfilters
forthiscustomerwiththelengthoftheASpathequalto
one,theISPhastochangetheconfigurationoftheAS
pathfilterforthecustomer.TheISPcaneithercreatea
newfilter,allowingmultiplecopiesofthecustomerAS
numberonlyforthiscustomer,oruseregularexpression
variablestocreateacommonfilterforallcustomersthat
belongtoonepeergroup.

LoadsharingoverlinkstotwodifferentISPscanbecomparedtodoingloadsharing
overtwoparallellinkstoasingleISP.Theonlydifferenceisthatthereisonlyone
optionthatisavailabletocontrolincomingtraffic.Controllingloaddistributionofthe
outgoingtrafficisconfiguredinthesamewayaswhenamultihomedcustomer
connectstoasingleserviceprovider.
Load sharing for outgoing traffic:
You can use the same solution as with multihomed customers that are
connected to one service provider.
A higher local preference for half of the routes comes from one service
provider. A higher local preference for the other half of the routes comes
from the other service provider.
Load sharing for incoming traffic:
The only load-sharing option that you can use in this setup is to separate the
address space into two or more smaller address blocks.
Some traffic analysis is needed to fine-tune the address space separation
according to link bandwidths.
You should use AS path prepending to ensure symmetric routing as well as
backup for noncontiguous address blocks.
The customer divides the address space into two announcements.
Thecustomercancontroltheloaddistributionofincomingtrafficbasedonthetraffic
destination.Thecustomerdividesitsaddressspaceintoseveralannouncements.
OneannouncementissenttooneoftheISPs.Anotherannouncementissenttothe
otherISP.Forbackuppurposes,thecustomerannouncestheentireaddressspace
tobothISPs.TheISPsnowusethemost-explicitrouterule.Aslongasbothlinks
areup,trafficwithdestinationswithinonepartofthecustomeraddressspaceis
routedoveroneofthelinks.Traffictotheotherpartisroutedovertheotherlink.
Itisverydifficulttopredictthevolumeoftrafficthatwillbedirectedtoeachpartof
thecustomeraddressspace.Youshouldmonitortheresultsofchangingroute
updatesbywatchingtheloadonthelinksbeforeandafterimplementingthechange.
Iftheloaddistributionisnotsatisfactory,youcanfurthermodifythedivisionofthe
addressspace.Youmustthenchecktheloadonthelinksagainandfurtherfine-tune
theconfiguration.
Acustomermaydecidetouseboththedivisionofaddressspaceintoseveral
advertisementsandASpathprependingtogether.Somepartofthecustomer
addressspacemaybeadvertisedbythecustomernetworkwithalongerASpath
overoneofthelinkstofine-tunetheload.Also,theremaybecaseswherethereare
noncontiguoussubnetsthatcannotbedividedbecausetheprefixeswouldbetoo
long.Thesesubnetsareevenlydistributedbetweenthelinksinaprimary/backup
configuration.
LoadSharingwithMultipleProviders

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
A customer that is multihomed to multiple BGP service providers must advertise
its address space to both ISPs, but has to make sure that it does not become a
transit network.
Customers who are connected to multiple ISPs must use an AS number that all
ISPs agree to.
You can use AS number translation to prepend a different AS number to the
AS path, which allows the customer to use a single private AS number in the
network.
Primary and backup connectivity:
Outgoing route selection is achieved by using local preference.
Incoming route selection is achieved by using either BGP communities or
AS path prepending.
The key for load-sharing is to divide the customer address space.
Summary

Overview
Thistopicsummarizesthekeypointsthatwerediscussedinthismodule.
Customer requirements influence the planning of connectivity between a
customer and an ISP, including:
Physical connection type (the redundancy provided)
IP addressing
AS numbering
Static or dynamic routing can be used between a customer and a service
provider.
Static routing: Customers with a single or multiple connections to the
service provider (link detection and device failure can be detected)
Dynamic routing (BGP): Multihomed customers.
When using dual links and BGP, BGP attribute manipulation is required to
achieve the required traffic distribution pattern:
Primary and backup link
Load sharing
ModuleSummary

Foradditionalinformation,refertotheseresources:
CiscoSystems,Inc.SampleConfigurationforBGPwithTwoDifferentServiceProviders
(Multihoming).
http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a008009456d.shtml
CiscoSystems,Inc.RemovingPrivateAutonomousSystemNumbersinBGP.
http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13756-32.html
CiscoSystems,Inc.HowBGPRoutersUsetheMulti-ExitDiscriminatorforBestPathSelection.
http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13759-37.html
CiscoSystems,Inc.ConfiguringtheBGPLocal-ASFeature.
http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13761-39.html
CiscoSystems,Inc.LoadSharingwithBGPinSingleandMultihomedEnvironments:Sample
Configurations.
http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a00800945bf.shtml
References
Usethequestionsheretoreviewwhatyoulearnedinthismodule.Thecorrect
answersandsolutionsarefoundintheModuleSelf-CheckAnswerKey.
ModuleSelf-Check

1. Ifacustomerrequiresextrabandwidthandredundancy,which
approachispreferred?(Source:"UnderstandingCustomer-to-
ProviderConnectivityRequirements")
AsinglepermanentconnectiontooneISP.
PermanentconnectionstomorethanoneISP.
Dial-upconnectionstomorethanoneISP.
MultiplepermanentconnectionstooneISP.

1. Whichtworoutingoptionscouldbeusedwhenconnectinga
customertoaserviceprovider?(Choosetwo.)(Source:
"UnderstandingCustomer-to-ProviderConnectivityRequirements")
staticrouting
OSPF
IS-IS
BGP

1. Acustomerwouldliketoconnecttoaserviceprovider.Whichtwo
requirementsshouldbeconsideredbeforedecidingonatypeof
connectivity?(Choosetwo.)(Source:"UnderstandingCustomer-to-
ProviderConnectivityRequirements")
applicationavailability
redundancy
costownership
flexibility

1. Whichtypeofredundancydomultiplepermanentconnectionsthat
provideload-sharingconfigurationdisplay?(Source:"Understanding
Customer-to-ProviderConnectivityRequirements")
link
equipment
serviceprovider
routingprotocol

1. Inacustomer-to-providerroutingscheme,whichmethodofrouting
ispreferredbecauseofitslowercomplexity?(Source:
"UnderstandingCustomer-to-ProviderConnectivityRequirements")
policy-basedrouting
dynamicrouting
contentrouting
staticrouting

1. Whyisitthatwithmultiplepermanentconnectionstomorethanone
ISP,theuseofdynamicroutingwithBGPisrequired?(Source:
"UnderstandingCustomer-to-ProviderConnectivityRequirements")
Whenoneoftheconnectionsislost,thelinkleveldetectsthislossand
placestheinterfaceinadownstate.
MonitoringofthelinkstatuscannotdetectaprobleminsideoneoftheISP
networks.
StaticroutesdetectproblemsinsideoneoftheISPnetworks.
Itisnotrequired,andstaticroutingmaybeused.

1. Whatcanbedonewhenacustomerisassignedonlyaverysmall
subnetofpublicaddresses?(Source:"UnderstandingCustomer-to-
ProviderConnectivityRequirements")
Purchasemoreaddressesasrequired.
UseNAT.
Addaserviceprovider.
Addlinkstothesameserviceprovider.

1. Whataretwodifferentaddressingschemesthatcustomersuseto
connecttoaserviceprovider?(Choosetwo.)(Source:
"UnderstandingCustomer-to-ProviderConnectivityRequirements")
provider-independent
customer-independent
provider-assigned
customer-assigned

1. Whichtwoofthefollowingcriteriaarerequiredforacustomertobe
multihomedtomultipleISPs?(Choosetwo.)(Source:
"UnderstandingCustomer-to-ProviderConnectivityRequirements")
ThecustomermusthaveapublicASnumber.
ThecustomermusthaveaprivateASnumber.
ThecustomermustrunBGPwithbothofitsISPs.
ThecustomermustrunBGPwithoneISPandmayusestaticroutingwith
theother.

1. Floatingstaticroutesdonotdemandanyadditionalconfigurationto
workwithBGP.Trueorfalse?(Source:"ImplementingCustomer
ConnectivityUsingStaticRouting")
True
False

1. Whenstaticroutingisimplementedbetweenthecustomernetwork
andtheISPnetwork,thecustomermustannounceadefaultroute.
Trueorfalse?(Source:"ImplementingCustomerConnectivityUsing
StaticRouting")
True
False

1. Whataretworequirementsforbeingabletousestaticroutingas
partofinstallingredundantconnectionsbetweenthecustomer
networkandasingleserviceprovidernetwork?(Choosetwo.)
(Source:"ImplementingCustomerConnectivityUsingStatic
Routing")
Theroutermustbeabletodetectalinkfailure.
ThedefaultroutemustbeannouncedusingthecustomerIGP.
Ifonelinkgoesdown,theinterfacemustremaininanupstate.
ThecustomerIGPmustcontinuetoadvertisethestaticdefaultroute.

1. Acustomerroutethatshouldnotbeannouncedtotherestofthe
Internetismarkedusingwhat?(Source:"ImplementingCustomer
ConnectivityUsingStaticRouting")
aroutetag
theexportcommunity
theno-exportcommunity
thepublicaddressfilter

1. Whenyouaredesigningastaticroutepropagationinaservice
providernetwork,whichthreestepsmustyoutake?(Choosethree.)
(Source:"ImplementingCustomerConnectivityUsingStatic
Routing")
Assignatagtoeachcombinationofservices.
Configureacommunitythatmatchesdefinedtags.
RedistributestaticroutesintoBGPthrougharoutemap.
Identifyallpossiblecombinationsofservicesthatareofferedtoa
customer.

1. Whatdoesaroutemapassignthatwillbeusedbyotherrouters
withinanetwork?(Source:"ImplementingCustomerConnectivity
UsingStaticRouting")
atag
communityvalues
publicaddressing
QoS

1. Whichthreekeypiecesofinformationcanyouderivefromthe
followingroutercommandoutput?(Choosethree.)(Source:
"ImplementingCustomerConnectivityUsingStaticRouting")CE2#
showipbgp209.165.201.0
BGProutingtableentryfor209.165.201.0/24,version7
Paths:(2available,best#1,notadvertisedtoEBGPpeer)
Advertisedtononpeer-grouppeers:
10.3.0.5
Local
0.0.0.0from0.0.0.0(10.3.0.6)
Originincomplete,metric0,localpref100,weight32768,valid,
sourced,best
Community:1:31000no-export
Local
10.3.0.2(metric128)from10.3.0.5(1.0.0.2)
Originincomplete,metric0,localpref100,valid,internal
Originator:1.0.0.2,Clusterlist:10.3.0.5
Community:1:31000no-export
Theprimarylinkhascomebackup,sothebackuprouternowseestwo
alternateroutes.
Theprimarylinkhasnotcomebackup,butthebackuprouterstillsees
twoalternateroutes.
ThefirstrouteistheroutethattherouteritselfhasredistributedintoBGP
usingthefloatingstaticroute.ThisrouteislocallysourcedbytheASand
hasbeenassignedaweightvalueof32768.
ThesecondrouteistheonethathasbeenreceivedbyIBGPfromthe
primaryedgerouter.TheASalsosourcesthisroute,butnoweightvalue
isassigned.

1. Whichtwothingscanyoudotoovercometheproblemsthatoccur
whenafloatingstaticrouteisredistributedintoBGP?(Choosetwo.)
(Source:"ImplementingCustomerConnectivityUsingStatic
Routing")
Youmustraisetheweightvalue.
Youmustlowertheweightvalue.
YoumustsettheADatahighervaluethanallotherroutes.
Youmustassignlocalpreferencevalues,givingthefloatingstaticroutea
lowerlocalpreferencevaluethantheprimaryroute.

1. Whatarethethreecharacteristicsofusingstaticroutesduringload
sharingofoutgoingtraffic?(Choosethree.)(Source:"Implementing
CustomerConnectivityUsingStaticRouting")
Outgoingtrafficloadsharingiseasytoachieve.
Eachcustomerrouterusestheclosestcustomeredgerouterastheexit
point.
Balancedloadsharingisachievedifthecustomeredgeroutersare
collocated.
Localpreferencevaluesmustbeassigned,givingthefloatingstaticroutea
lowerlocalpreferencevaluethantheprimaryroute.

1. Whatarethethreeresponsibilitiesofthecustomerwhenthe
customerhasmultipleconnectionstoasingleserviceprovider?
(Choosethree.)(Source:"ConnectingaCustomertoaSingle
ServiceProvider")
CustomeredgeroutersmustrunIBGPbetweenthem.
Thecustomermustadvertiseadefaultroute.
Thecustomermustconditionallyadvertiseitsassignedaddressspaceinto
BGP.
ThecustomeredgeroutersmustrunEBGPwiththeprovider.

1. Giventhefollowingroutercommandoutput,whichmethodhasbeen
usedtoinfluencereturntrafficinaprimary/backuplink
implementationforthecustomerwithmultipleconnectionstoa
serviceprovider?(Source:"ConnectingaCustomertoaSingle
ServiceProvider")ISP#showipbgp
BGPtableversionis5,localrouterIDis10.0.33.34
Statuscodes:ssuppressed,ddamped,hhistory,*valid,>best,i-
internal
Origincodes:i-IGP,e-EGP,?-incomplete
NetworkNextHopMetricLocPrfWeightPath
*10.10.20.0/24192.168.63.310000100100i
*>192.168.64.420000400100i
*>30.30.30.0/24192.168.63.300100I
*>40.40.40.0/24192.168.64.400400I
MED
localpreference
weight
ASpathprepending

1. Whatarethreeresponsibilitiesoftheproviderrouterwhen
supportingacustomerwithmultipleconnections?(Choosethree.)
(Source:"ConnectingaCustomertoaSingleServiceProvider")
TheprovidermustadvertiseadefaultroutetothecustomerthroughBGP.
Theprovidermustfiltercustomerroutestoverifythatproperaddressingis
used.
TheprovidermustremovetheprivateASnumber,ifitisinusebythe
customer.
TheprovidermustconfigurenewASpathfilterstoallowASpath
prepending;otherwise,aprimary/backuplinkcannotbeestablished.

1. WhatwilloccurifprivateASnumbersareadvertisedtotheInternet?
(Source:"ConnectingaCustomertoaSingleServiceProvider")
TheInternetwillnotbeabletoroutepackets.
InternetrouterscoulddroproutesbasedonBGPloop-prevention
mechanisms.
Customerloadbalancingwillnotfunction.
Customerconfigurationsfortheprimary/backuplinkusingASpath
prependingwillnotfunction.

1. WhichtwoBGPconfigurationsarerequiredtoproperlyimplementa
backupsolutionforacustomerthatisconnectedtoasingleprovider
viamultipleconnections?(Choosetwo.)(Source:"Connectinga
CustomertoaSingleServiceProvider")
Thecustomershouldsetlocalpreferencetoinfluenceoutgoingroute
selection.
Thecustomershouldsettheweightattributetoinfluenceoutgoingpath
selection.
ThecustomershouldsettheMEDoneachroutetoinfluencereturnpath
selection.
ThecustomershouldconfigureASpathprependingtoensureproper
outgoingpathselection.

1. Acustomerrouterhasbeenconfiguredwithmaximumpathssettoa
valueof4.Giventhefollowingroutercommandoutput,overhow
manylinkswilltherouterneedtoperformloadbalancing?(Source:
"ConnectingaCustomertoaSingleServiceProvider")CE1#show
ipbgp
BGPtableversionis5,localrouterIDis10.0.33.34
Statuscodes:ssuppressed,ddamped,hhistory,*valid,>best,i-
internal
Origincodes:i-IGP,e-EGP,?-incomplete
NetworkNextHopMetricLocPrfWeightPath
*10.10.20.0/24192.168.63.30300100100i
*>192.168.64.40400100i
*192.168.65.50500100i
*>30.30.30.0/24192.168.63.300300i
*>40.40.40.0/24192.168.64.400400i
Therouterwilluseonlythepathmarkedas"best"byBGP.
Therouterwillperformloadbalancingovertwopathstoreachnetwork
10.10.20.0/24.
Therouterwillperformloadbalancingoverthreepathstoreachnetwork
10.10.20.0/24.
Thereisnotenoughinformationtodeterminethecorrectanswer.

1. Whichthreemethodscanyouusetoprovideloadsharingover
networklinksbetweenacustomerandasingleprovider?(Choose
three.)(Source:"ConnectingaCustomertoaSingleService
Provider")
Advertisingofsplitaddressingspacetotheprovider.
Configuringebgp-multihopbetweenthecustomerandtheprovider.
UsingtheBGPmaximum-pathscommandtoperformloadbalancingover
parallellinks.
Configuringmultiplestaticroutesthatpointtotheprovider.

1. WhyisitnotrequiredtoconfiguremaximumpathsundertheBGP
routingprocesswhenloadbalancingisbeingperformedbecause
theebgp-multihopcommandhasbeenconfigured?(Source:
"ConnectingaCustomertoaSingleServiceProvider")
Bydefault,BGPwillperformloadbalancingoveruptofourpaths,
configurableuptosix.
ThestaticrouteorIGPprocessisresponsibleforloadbalancinginthis
configuration.
ConfiguringmultihopenablesmaximumpathsequaltotheTTLsettingof
theneighborebgp-multihopcommand.
Configuringebgp-multipathisarequiredcomponentofebgp-multihop
loadbalancing.

1. Whichtwoofthefollowingcharacteristicsaccuratelydescribethe
BGPSupportforDualASConfigurationforNetworkASMigrations
feature?(Choosetwo.)(Source:"ConnectingaCustomertoaSingle
ServiceProvider")
AllowsyoutomergeasecondaryASunderaprimaryASwithout
disruptingcustomerpeeringsessions.
Allowsaroutertoappear,toexternalpeers,asamemberofprimaryAS
duringtheASmigration.
Allowsaroutertoappear,toexternalpeers,asamemberofsecondary
ASduringtheASmigration.
Eliminatesthepossibilitythatroutingloopscanbecreated.

1. AmultihomedcustomerisusingASnumber65550internally.The
customerisconnectedtotwodifferentproviders.ISP1(inAS200)
hasassignedthecustomeranASnumberofAS65101.ISP2(inAS
300)hasassignedthecustomeranASnumberofAS65201.Given
thatthecustomerwilluseASnumbertranslationforitsinternalAS,
whatistheASpathattribute(attachedtoroutesthatoriginatedinthe
customernetwork)thatwillbedisplayedonarouterinthenetwork
ofISP2?(Source:"ConnectingaMultihomedCustomertoMultiple
ServiceProviders")
65550i
65201i
6520165550i
30065201i

1. Whichthreemethodscanyouusetoprovideloadsharingover
networklinksbetweenamultihomedcustomerandmultiple
providers?(Choosethree.)(Source:"ConnectingaMultihomed
CustomertoMultipleServiceProviders")
Advertisingofsplitaddressingspacetotheprovider.
Configuringofmultiplestaticroutesthatpointtotheprovider.
UsingtheBGPmaximum-pathscommandtoperformloadsharingover
parallellinks.
ASpathprependingtofine-tunetheload-sharingconfiguration.

1. WhatarethreeBGPconfigurationcharacteristicsofamultihomed
customerthatisconnectedtomultipleproviders?(Choosethree.)
(Source:"ConnectingaMultihomedCustomertoMultipleService
Providers")
Thecustomerannouncesassignedaddressingtoitsprovidersthrough
BGP.
ThecustomerannouncesadefaultroutetoitsnetworkthroughBGP.
Theproviderannouncesadefaultroute,localroutes,orfullInternet
routingtothecustomerviaBGP.
Thecustomerconfiguresoutboundfilterstopreventitsnetworkfrom
becomingatransitarea.

1. AmultihomedcustomerisusingASnumber1024andisconnected
totwodifferentproviders(ISP1:AS200andISP2:AS300).The
customerhasconfiguredtheMEDtoensureaproperreturnpathso
thatISP1istheprimaryproviderandISP2isthebackupprovider.
Unfortunately,returntrafficcontinuestousethebackuplink.Whatis
apossiblecauseofthisproblem?(Source:"Connectinga
MultihomedCustomertoMultipleServiceProviders")
ThebackupproviderisignoringtheMEDattributeonreceivedroutes.
TheMEDattributecannotbesenttothebackupproviderbecauseitis
localtoAS1024only.
ThecustomerhasnotsettheproperBGPcommunitiestoallowthe
primaryandbackupproviderstocorrectlysettheMEDattribute.
TheMEDcannotbeusedinthisscenario,becauseitwillnotbeadvertised
toprovidersupstreamofISP2.

1. Whatarethreeimportantconsiderationsforcustomersthatwishto
connecttomultipleproviders?(Choosethree.)(Source:"Connecting
aMultihomedCustomertoMultipleServiceProviders")
ThecustomerhastoconsiderwhethertousePAorPIaddressspace.
ThecustomerhastodecidewhethertousestaticroutesorBGPto
connecttoupstreamproviders.
ThecustomerhastodecidewhethertouseapublicASnumberora
privateASnumberscheme.
Thecustomerhastodecidewhethertoperformloadsharingorusea
primary/backupimplementationoverredundantlinks.

1. WhichASnumberselectionisthebestpossiblechoicefora
customerthatismultihomedtomultipleproviders?(Source:
"ConnectingaMultihomedCustomertoMultipleServiceProviders")
AsinglepublicASnumber.
AsingleprivateASnumber.
TwoprivateASnumbersthatareusedinconjunctionwithASnumber
translation.
MultipleprivateASnumbers,oneusedinternallybythecustomerandthe
othersusedinconjunctionwithASnumbertranslationforeachprovider.

1. Giventhefollowingroutercommandoutput,whichtwomethods
havebeenconfiguredtoinfluencereturntrafficinaprimary/backup
linkforthismultihomedcustomer?(Choosetwo.)(Source:
"ConnectingaMultihomedCustomertoMultipleService
Providers")ISP#showipbgp
BGPtableversionis5,localrouterIDis10.0.33.34
Statuscodes:ssuppressed,ddamped,hhistory,*valid,>best,i-
internal
Origincodes:i-IGP,e-EGP,?-incomplete
NetworkNextHopMetricLocPrfWeightPath
*10.10.20.0/24192.168.63.320000100100100i
*>192.168.64.40300100i
*>30.30.30.0/24192.168.63.300300100i
*>40.40.40.0/24192.168.64.400100i
MED
localpreference
splitaddressadvertisement
ASpathprepending

1. Youareacustomerconnectedtotwoserviceproviderswithonelink
toeachprovider.Youwouldliketoachieveprimaryandbackup
trafficdistribution.WhichtwoBGPattributesdoyouhaveto
manipulate?(Choosetwo.)(Source:"ConnectingaMultihomed
CustomertoMultipleServiceProviders")
localpreferenceforincomingtraffic
localpreferenceforoutgoingtraffic
ASpathforincomingtraffic
MEDforincomingtraffic

1. AmultihomedcustomercangetonlyoneprivateASnumber,
regardlessthenumberofserviceproviders.Trueorfalse?(Source:
"ConnectingaMultihomedCustomertoMultipleServiceProviders")
True
False

1. Ifacustomerrequiresextrabandwidthandredundancy,which
approachispreferred?(Source:"UnderstandingCustomer-to-
ProviderConnectivityRequirements")
AsinglepermanentconnectiontooneISP.
PermanentconnectionstomorethanoneISP.
Dial-upconnectionstomorethanoneISP.
MultiplepermanentconnectionstooneISP.
AnswerKey

1. Whichtworoutingoptionscouldbeusedwhenconnectinga
customertoaserviceprovider?(Choosetwo.)(Source:
"UnderstandingCustomer-to-ProviderConnectivityRequirements")
staticrouting
OSPF
IS-IS
BGP

1. Acustomerwouldliketoconnecttoaserviceprovider.Whichtwo
requirementsshouldbeconsideredbeforedecidingonatypeof
connectivity?(Choosetwo.)(Source:"UnderstandingCustomer-to-
ProviderConnectivityRequirements")
applicationavailability
redundancy
costownership
flexibility

1. Whichtypeofredundancydomultiplepermanentconnectionsthat
provideload-sharingconfigurationdisplay?(Source:"Understanding
Customer-to-ProviderConnectivityRequirements")
link
equipment
serviceprovider
routingprotocol

1. Inacustomer-to-providerroutingscheme,whichmethodofrouting
ispreferredbecauseofitslowercomplexity?(Source:
"UnderstandingCustomer-to-ProviderConnectivityRequirements")
policy-basedrouting
dynamicrouting
contentrouting
staticrouting

1. Whyisitthatwithmultiplepermanentconnectionstomorethanone
ISP,theuseofdynamicroutingwithBGPisrequired?(Source:
"UnderstandingCustomer-to-ProviderConnectivityRequirements")
Whenoneoftheconnectionsislost,thelinkleveldetectsthislossand
placestheinterfaceinadownstate.
MonitoringofthelinkstatuscannotdetectaprobleminsideoneoftheISP
networks.
StaticroutesdetectproblemsinsideoneoftheISPnetworks.
Itisnotrequired,andstaticroutingmaybeused.

1. Whatcanbedonewhenacustomerisassignedonlyaverysmall
subnetofpublicaddresses?(Source:"UnderstandingCustomer-to-
ProviderConnectivityRequirements")
Purchasemoreaddressesasrequired.
UseNAT.
Addaserviceprovider.
Addlinkstothesameserviceprovider.

1. Whataretwodifferentaddressingschemesthatcustomersuseto
connecttoaserviceprovider?(Choosetwo.)(Source:
"UnderstandingCustomer-to-ProviderConnectivityRequirements")
provider-independent
customer-independent
provider-assigned
customer-assigned

1. Whichtwoofthefollowingcriteriaarerequiredforacustomertobe
multihomedtomultipleISPs?(Choosetwo.)(Source:
"UnderstandingCustomer-to-ProviderConnectivityRequirements")
ThecustomermusthaveapublicASnumber.
ThecustomermusthaveaprivateASnumber.
ThecustomermustrunBGPwithbothofitsISPs.
ThecustomermustrunBGPwithoneISPandmayusestaticroutingwith
theother.

1. Floatingstaticroutesdonotdemandanyadditionalconfigurationto
workwithBGP.Trueorfalse?(Source:"ImplementingCustomer
ConnectivityUsingStaticRouting")
True
False

1. Whenstaticroutingisimplementedbetweenthecustomernetwork
andtheISPnetwork,thecustomermustannounceadefaultroute.
Trueorfalse?(Source:"ImplementingCustomerConnectivityUsing
StaticRouting")
True
False

1. Whataretworequirementsforbeingabletousestaticroutingas
partofinstallingredundantconnectionsbetweenthecustomer
networkandasingleserviceprovidernetwork?(Choosetwo.)
(Source:"ImplementingCustomerConnectivityUsingStatic
Routing")
Theroutermustbeabletodetectalinkfailure.
ThedefaultroutemustbeannouncedusingthecustomerIGP.
Ifonelinkgoesdown,theinterfacemustremaininanupstate.
ThecustomerIGPmustcontinuetoadvertisethestaticdefaultroute.

1. Acustomerroutethatshouldnotbeannouncedtotherestofthe
Internetismarkedusingwhat?(Source:"ImplementingCustomer
ConnectivityUsingStaticRouting")
aroutetag
theexportcommunity
theno-exportcommunity
thepublicaddressfilter

1. Whenyouaredesigningastaticroutepropagationinaservice
providernetwork,whichthreestepsmustyoutake?(Choosethree.)
(Source:"ImplementingCustomerConnectivityUsingStatic
Routing")
Assignatagtoeachcombinationofservices.
Configureacommunitythatmatchesdefinedtags.
RedistributestaticroutesintoBGPthrougharoutemap.
Identifyallpossiblecombinationsofservicesthatareofferedtoa
customer.

1. Whatdoesaroutemapassignthatwillbeusedbyotherrouters
withinanetwork?(Source:"ImplementingCustomerConnectivity
UsingStaticRouting")
atag
communityvalues
publicaddressing
QoS

1. Whichthreekeypiecesofinformationcanyouderivefromthe
followingroutercommandoutput?(Choosethree.)(Source:
"ImplementingCustomerConnectivityUsingStaticRouting")CE2#
showipbgp209.165.201.0
BGProutingtableentryfor209.165.201.0/24,version7
Paths:(2available,best#1,notadvertisedtoEBGPpeer)
Advertisedtononpeer-grouppeers:
10.3.0.5
Local
0.0.0.0from0.0.0.0(10.3.0.6)
Originincomplete,metric0,localpref100,weight32768,valid,
sourced,best
Community:1:31000no-export
Local
10.3.0.2(metric128)from10.3.0.5(1.0.0.2)
Originincomplete,metric0,localpref100,valid,internal
Originator:1.0.0.2,Clusterlist:10.3.0.5
Community:1:31000no-export
Theprimarylinkhascomebackup,sothebackuprouternowseestwo
alternateroutes.
Theprimarylinkhasnotcomebackup,butthebackuprouterstillsees
twoalternateroutes.
ThefirstrouteistheroutethattherouteritselfhasredistributedintoBGP
usingthefloatingstaticroute.ThisrouteislocallysourcedbytheASand
hasbeenassignedaweightvalueof32768.
ThesecondrouteistheonethathasbeenreceivedbyIBGPfromthe
primaryedgerouter.TheASalsosourcesthisroute,butnoweightvalue
isassigned.

1. Whichtwothingscanyoudotoovercometheproblemsthatoccur
whenafloatingstaticrouteisredistributedintoBGP?(Choosetwo.)
(Source:"ImplementingCustomerConnectivityUsingStatic
Routing")
Youmustraisetheweightvalue.
Youmustlowertheweightvalue.
YoumustsettheADatahighervaluethanallotherroutes.
Youmustassignlocalpreferencevalues,givingthefloatingstaticroutea
lowerlocalpreferencevaluethantheprimaryroute.

1. Whatarethethreecharacteristicsofusingstaticroutesduringload
sharingofoutgoingtraffic?(Choosethree.)(Source:"Implementing
CustomerConnectivityUsingStaticRouting")
Outgoingtrafficloadsharingiseasytoachieve.
Eachcustomerrouterusestheclosestcustomeredgerouterastheexit
point.
Balancedloadsharingisachievedifthecustomeredgeroutersare
collocated.
Localpreferencevaluesmustbeassigned,givingthefloatingstaticroutea
lowerlocalpreferencevaluethantheprimaryroute.

1. Whatarethethreeresponsibilitiesofthecustomerwhenthe
customerhasmultipleconnectionstoasingleserviceprovider?
(Choosethree.)(Source:"ConnectingaCustomertoaSingle
ServiceProvider")
CustomeredgeroutersmustrunIBGPbetweenthem.
Thecustomermustadvertiseadefaultroute.
Thecustomermustconditionallyadvertiseitsassignedaddressspaceinto
BGP.
ThecustomeredgeroutersmustrunEBGPwiththeprovider.

1. Giventhefollowingroutercommandoutput,whichmethodhasbeen
usedtoinfluencereturntrafficinaprimary/backuplink
implementationforthecustomerwithmultipleconnectionstoa
serviceprovider?(Source:"ConnectingaCustomertoaSingle
ServiceProvider")ISP#showipbgp
BGPtableversionis5,localrouterIDis10.0.33.34
Statuscodes:ssuppressed,ddamped,hhistory,*valid,>best,i-
internal
Origincodes:i-IGP,e-EGP,?-incomplete
NetworkNextHopMetricLocPrfWeightPath
*10.10.20.0/24192.168.63.310000100100i
*>192.168.64.420000400100i
*>30.30.30.0/24192.168.63.300100I
*>40.40.40.0/24192.168.64.400400I
MED
localpreference
weight
ASpathprepending

1. Whatarethreeresponsibilitiesoftheproviderrouterwhen
supportingacustomerwithmultipleconnections?(Choosethree.)
(Source:"ConnectingaCustomertoaSingleServiceProvider")
TheprovidermustadvertiseadefaultroutetothecustomerthroughBGP.
Theprovidermustfiltercustomerroutestoverifythatproperaddressingis
used.
TheprovidermustremovetheprivateASnumber,ifitisinusebythe
customer.
TheprovidermustconfigurenewASpathfilterstoallowASpath
prepending;otherwise,aprimary/backuplinkcannotbeestablished.

1. WhatwilloccurifprivateASnumbersareadvertisedtotheInternet?
(Source:"ConnectingaCustomertoaSingleServiceProvider")
TheInternetwillnotbeabletoroutepackets.
InternetrouterscoulddroproutesbasedonBGPloop-prevention
mechanisms.
Customerloadbalancingwillnotfunction.
Customerconfigurationsfortheprimary/backuplinkusingASpath
prependingwillnotfunction.

1. WhichtwoBGPconfigurationsarerequiredtoproperlyimplementa
backupsolutionforacustomerthatisconnectedtoasingleprovider
viamultipleconnections?(Choosetwo.)(Source:"Connectinga
CustomertoaSingleServiceProvider")
Thecustomershouldsetlocalpreferencetoinfluenceoutgoingroute
selection.
Thecustomershouldsettheweightattributetoinfluenceoutgoingpath
selection.
ThecustomershouldsettheMEDoneachroutetoinfluencereturnpath
selection.
ThecustomershouldconfigureASpathprependingtoensureproper
outgoingpathselection.

1. Acustomerrouterhasbeenconfiguredwithmaximumpathssettoa
valueof4.Giventhefollowingroutercommandoutput,overhow
manylinkswilltherouterneedtoperformloadbalancing?(Source:
"ConnectingaCustomertoaSingleServiceProvider")CE1#show
ipbgp
BGPtableversionis5,localrouterIDis10.0.33.34
Statuscodes:ssuppressed,ddamped,hhistory,*valid,>best,i-
internal
Origincodes:i-IGP,e-EGP,?-incomplete
NetworkNextHopMetricLocPrfWeightPath
*10.10.20.0/24192.168.63.30300100100i
*>192.168.64.40400100i
*192.168.65.50500100i
*>30.30.30.0/24192.168.63.300300i
*>40.40.40.0/24192.168.64.400400i
Therouterwilluseonlythepathmarkedas"best"byBGP.
Therouterwillperformloadbalancingovertwopathstoreachnetwork
10.10.20.0/24.
Therouterwillperformloadbalancingoverthreepathstoreachnetwork
10.10.20.0/24.
Thereisnotenoughinformationtodeterminethecorrectanswer.

1. Whichthreemethodscanyouusetoprovideloadsharingover
networklinksbetweenacustomerandasingleprovider?(Choose
three.)(Source:"ConnectingaCustomertoaSingleService
Provider")
Advertisingofsplitaddressingspacetotheprovider.
Configuringebgp-multihopbetweenthecustomerandtheprovider.
UsingtheBGPmaximum-pathscommandtoperformloadbalancingover
parallellinks.
Configuringmultiplestaticroutesthatpointtotheprovider.

1. WhyisitnotrequiredtoconfiguremaximumpathsundertheBGP
routingprocesswhenloadbalancingisbeingperformedbecause
theebgp-multihopcommandhasbeenconfigured?(Source:
"ConnectingaCustomertoaSingleServiceProvider")
Bydefault,BGPwillperformloadbalancingoveruptofourpaths,
configurableuptosix.
ThestaticrouteorIGPprocessisresponsibleforloadbalancinginthis
configuration.
ConfiguringmultihopenablesmaximumpathsequaltotheTTLsettingof
theneighborebgp-multihopcommand.
Configuringebgp-multipathisarequiredcomponentofebgp-multihop
loadbalancing.

1. Whichtwoofthefollowingcharacteristicsaccuratelydescribethe
BGPSupportforDualASConfigurationforNetworkASMigrations
feature?(Choosetwo.)(Source:"ConnectingaCustomertoaSingle
ServiceProvider")
AllowsyoutomergeasecondaryASunderaprimaryASwithout
disruptingcustomerpeeringsessions.
Allowsaroutertoappear,toexternalpeers,asamemberofprimaryAS
duringtheASmigration.
Allowsaroutertoappear,toexternalpeers,asamemberofsecondary
ASduringtheASmigration.
Eliminatesthepossibilitythatroutingloopscanbecreated.

1. AmultihomedcustomerisusingASnumber65550internally.The
customerisconnectedtotwodifferentproviders.ISP1(inAS200)
hasassignedthecustomeranASnumberofAS65101.ISP2(inAS
300)hasassignedthecustomeranASnumberofAS65201.Given
thatthecustomerwilluseASnumbertranslationforitsinternalAS,
whatistheASpathattribute(attachedtoroutesthatoriginatedinthe
customernetwork)thatwillbedisplayedonarouterinthenetwork
ofISP2?(Source:"ConnectingaMultihomedCustomertoMultiple
ServiceProviders")
65550i
65201i
6520165550i
30065201i

1. Whichthreemethodscanyouusetoprovideloadsharingover
networklinksbetweenamultihomedcustomerandmultiple
providers?(Choosethree.)(Source:"ConnectingaMultihomed
CustomertoMultipleServiceProviders")
Advertisingofsplitaddressingspacetotheprovider.
Configuringofmultiplestaticroutesthatpointtotheprovider.
UsingtheBGPmaximum-pathscommandtoperformloadsharingover
parallellinks.
ASpathprependingtofine-tunetheload-sharingconfiguration.

1. WhatarethreeBGPconfigurationcharacteristicsofamultihomed
customerthatisconnectedtomultipleproviders?(Choosethree.)
(Source:"ConnectingaMultihomedCustomertoMultipleService
Providers")
Thecustomerannouncesassignedaddressingtoitsprovidersthrough
BGP.
ThecustomerannouncesadefaultroutetoitsnetworkthroughBGP.
Theproviderannouncesadefaultroute,localroutes,orfullInternet
routingtothecustomerviaBGP.
Thecustomerconfiguresoutboundfilterstopreventitsnetworkfrom
becomingatransitarea.

1. AmultihomedcustomerisusingASnumber1024andisconnected
totwodifferentproviders(ISP1:AS200andISP2:AS300).The
customerhasconfiguredtheMEDtoensureaproperreturnpathso
thatISP1istheprimaryproviderandISP2isthebackupprovider.
Unfortunately,returntrafficcontinuestousethebackuplink.Whatis
apossiblecauseofthisproblem?(Source:"Connectinga
MultihomedCustomertoMultipleServiceProviders")
ThebackupproviderisignoringtheMEDattributeonreceivedroutes.
TheMEDattributecannotbesenttothebackupproviderbecauseitis
localtoAS1024only.
ThecustomerhasnotsettheproperBGPcommunitiestoallowthe
primaryandbackupproviderstocorrectlysettheMEDattribute.
TheMEDcannotbeusedinthisscenario,becauseitwillnotbeadvertised
toprovidersupstreamofISP2.

1. Whatarethreeimportantconsiderationsforcustomersthatwishto
connecttomultipleproviders?(Choosethree.)(Source:"Connecting
aMultihomedCustomertoMultipleServiceProviders")
ThecustomerhastoconsiderwhethertousePAorPIaddressspace.
ThecustomerhastodecidewhethertousestaticroutesorBGPto
connecttoupstreamproviders.
ThecustomerhastodecidewhethertouseapublicASnumberora
privateASnumberscheme.
Thecustomerhastodecidewhethertoperformloadsharingorusea
primary/backupimplementationoverredundantlinks.

1. WhichASnumberselectionisthebestpossiblechoicefora
customerthatismultihomedtomultipleproviders?(Source:
"ConnectingaMultihomedCustomertoMultipleServiceProviders")
AsinglepublicASnumber.
AsingleprivateASnumber.
TwoprivateASnumbersthatareusedinconjunctionwithASnumber
translation.
MultipleprivateASnumbers,oneusedinternallybythecustomerandthe
othersusedinconjunctionwithASnumbertranslationforeachprovider.

1. Giventhefollowingroutercommandoutput,whichtwomethods
havebeenconfiguredtoinfluencereturntrafficinaprimary/backup
linkforthismultihomedcustomer?(Choosetwo.)(Source:
"ConnectingaMultihomedCustomertoMultipleService
Providers")ISP#showipbgp
BGPtableversionis5,localrouterIDis10.0.33.34
Statuscodes:ssuppressed,ddamped,hhistory,*valid,>best,i-
internal
Origincodes:i-IGP,e-EGP,?-incomplete
NetworkNextHopMetricLocPrfWeightPath
*10.10.20.0/24192.168.63.320000100100100i
*>192.168.64.40300100i
*>30.30.30.0/24192.168.63.300300100i
*>40.40.40.0/24192.168.64.400100i
MED
localpreference
splitaddressadvertisement
ASpathprepending

1. Youareacustomerconnectedtotwoserviceproviderswithonelink
toeachprovider.Youwouldliketoachieveprimaryandbackup
trafficdistribution.WhichtwoBGPattributesdoyouhaveto
manipulate?(Choosetwo.)(Source:"ConnectingaMultihomed
CustomertoMultipleServiceProviders")
localpreferenceforincomingtraffic
localpreferenceforoutgoingtraffic
ASpathforincomingtraffic
MEDforincomingtraffic

1. AmultihomedcustomercangetonlyoneprivateASnumber,
regardlessthenumberofserviceproviders.Trueorfalse?(Source:
"ConnectingaMultihomedCustomertoMultipleServiceProviders")
True
False

Introduction
InstandardBGPimplementations,allBGProuterswithinanASmustbefully
meshedsothatallexternalroutinginformationcanbedistributedamongtheother
routersthatresidewithintheAS.Therefore,withinanAS,allroutersmustestablish
TCPsessionswithallotherBGProuters.AstheASgrows,scalabilitychallenges
arisebecauseofanever-increasingnumberofTCPsessionsanddemandsfor
routerCPUandmemoryresources.
Thismodulediscussesnetworkscalabilityconcernsthatarecommontolarge,
complexserviceprovidernetworks.ThemodulealsodiscussesBGProutereflectors
asscalabilitymechanismthatallowsyoutosteerawayfromBGPfull-mesh
requirementsandimprovenetworkscalabilitybyreducingthenumberofTCP
sessionsthatarerequiredwithinanAS.AlsodiscussedinthismodulearetheCisco
IOScommandsthatareneededtoconfigureandmonitorBGProutereflectors.
Uponcompletingthismodule,youwillbeableto:
Describecommonroutingscalabilityissuesinserviceprovidernetworks
DescribethefunctionofroutereflectorsinaBGPenvironment
ConfigureproperoperationofroutereflectorstomodifyIBGPsplit-horizonrules
inanexistingIBGPnetwork
ScalingServiceProviderNetworks

Overview
ProperlyscalingIPaddressing,IGPs,andBGPisacommonareaofconcerntoall
serviceprovidersandcanbethedifferencebetweenasuccessfulandaproblematic
BGPimplementation.Serviceprovidernetworksarecomplexandmustmeetthe
administrativepolicyandroutingdemandsoftheinternalnetwork,different
customers,andotherproviders.Properscalingiscrucialtothesuccessofthe
network.InteractionsbetweenIGPsandtheBGP,specificallywhenyousupport
internalrouting,customerconnectivity,andtransittraffic(andtheadministrative
policiesthatmatch),canbequitecomplex.Furthermore,thelargenumberof
prefixesthatarerequiredtosupportfullInternetroutingrequiresadministratorsto
fullycharacterizeIGPandBGPinteractionsforinternalnetworksandcustomers
alike.
Thislessondiscussesnetworkscalabilityconcernscommontolarge,complex
serviceprovidernetworks.IncludedinthislessonisadescriptionofatypicalISP
networkanddiscussionofthepropagationofinternalandcustomerrouting
information.AlsoscalingconsiderationsforIGPsandBGP,andscalingofIP
addressinginserviceprovidernetworksaredescribed.
Uponcompletingthislesson,youwillbeableto:
Describethebasicstructureofserviceprovidernetworks
Describethepropagationofinternalandcustomerroutesinserviceprovider
networks
DescribeproperscalingofIGPsandBGPinserviceprovidernetworks
DescribescalingissuesthatarerelevanttoIPaddressinginISPnetworks
ScalingIGPandBGPinServiceProvider
Networks

ThecommonserviceprovidernetworkrunsEBGPorstaticroutingwithcustomers.
EBGPisalwaysusedastheroutingprotocolbetweendifferentserviceproviders.
Runs BGP or static routing with customer.
Exchanges routes with other service providers via BGP.
Runs IBGP between its own BGP speakers.
Runs one instance of IGP (OSPF or IS-IS).
IGP used for internal routes only.
IBGPisrequiredintheprovidernetworkbecauseallEBGP-speakingroutersinan
ASmustexchangeexternalroutesviaIBGP.Also,non-EBGPspeakersarerequired
totakepartintheIBGPexchangeiftheyareinatransitpathandforwardpackets
basedondestinationIPaddresses.
TheserviceprovidernetworkalsorunsanIGP.TheprotocolsofchoiceareOSPF
andIS-IS.TheIGPisusedfortwopurposes:
ProvidesIPconnectivitybetweenallIBGPspeakerssothatTCPsessionsfor
IBGPcanbeestablishedbetweenBGP-speakingrouters
ProvidesoptimalroutingtotheBGPnext-hopaddress
AsingleIGPshouldbeusedwithintheentireAS.Thissetupfacilitateseffective
packetforwardingfromtheingressroutertoegressrouters.TheIGPisconfiguredto
carryinternalroutesonly,includinginternallinksandloopbackaddressesofthe
routers.Forperformanceandscalabilityreasons,nocustomerroutesorexternal
routesshouldbeinjectedintotheIGP.
Thetypicalserviceprovidernetworkconsistsofanetworkcorethatconnectsvarious
edgedevices.Someoftheedgedevicesconnectcustomers;othersconnecttoother
serviceproviders.
TheedgedevicesthatconnecttootherserviceprovidersuseEBGPtoexchange
routinginformation.Theedgedevicesthatconnectcustomersuseeitherstatic
routingorEBGP.
UnlessMPLSisconfiguredontheserviceproviderbackbone,routersinatransit
patharealsorequiredtohavefullroutinginformation.Therefore,theserouterstake
partintheIBGProutingexchange.
AnIGPisalsorequiredwithintheserviceprovidernetwork.TheIGPisusedtocarry
internalroutes,includingtheloopbackinterfaceaddressesofIBGP-speaking
routers.TheIGPprovidesreachabilityinformationtoestablishIBGPsessionsandto
performtherecursiveroutinglookupfortheBGPnexthop.
CommonServiceProviderNetwork

PE routers use EBGP or static routing with CE routers.
PE and P routers use full-mesh IBGP routing.
The provider core IGP is a single instance of IS-IS or OSPF and is used only
within the service provider core network.
Optimal routing between PEs is desired.
CEroutersconnectviaIPtoPErouters.Inmanycases,thePEroutersusestatic
routingtocustomernetworks.ThePEroutersadvertisestaticroutestotherestof
theserviceprovidernetworkandtootherautonomoussystemsusingBGP.PEand
Proutersusefull-meshIBGProutingtoexchangeBGProutinginformation.
ServiceprovidersuseBGProutingwiththecustomerwhenredundancyrequiresthe
useofaroutingprotocol.
TheserviceproviderbackbonetypicallyusesasingleinstanceofeitherIS-ISor
OSPFasitsIGP.TheIGPisusedwithintheproviderbackboneonly.Theprovider
backboneexchangesnoIGProutinginformationwithcustomerroutersorwith
routersinotherautonomoussystems.

ItisimportanttoavoidsendinganyunnecessaryroutinginformationintheIGP.The
IGPperformsbestifitcarriesasfewroutesaspossible.Optimally,theIGPshould
containonlyinformationaboutBGPnexthopsandroutesthatareinternaltothe
serviceprovidernetwork,enablingtheestablishmentofIBGPsessions.
BGP route propagation
BGP carries customer routes.
BGP carries other provider routes.
IGP route propagation
IGP is responsible only for the resolution of BGP next hop and internal
routes
Do not redistribute BGP into IGP.
IGP performance and convergence time suffer if many are carried.
No IGP is capable of carrying full Internet routes.
A full Internet routing table has exceeded 600,000 routes.
AllotherroutinginformationshouldbecarriedinBGP,whichisdesignedtoscalefor
largevolumesofroutinginformation.Customerroutesandtheroutesfromother
serviceprovidersshouldbecarriedinBGP.Theseroutesshouldnotbepropagated
fromBGPintotheproviderIGP.
IGPperformanceandconvergencetimesufferiftheIGPcarriesalargernumberof
routes.Thedesigngoalshouldbetominimizethevolumeofroutinginformationthat
theIGPcarries.Naturally,thenumberofrouteflapsisalsoreducedasthenumber
ofroutesisreduced.
BGPscalestoamuchlargervolumeofroutinginformationbecauseoftheinherent
qualitiesofthedesignofBGP.Potentially,theBGProutersoftheserviceprovider
canreceivethefullInternetroutingtable,whichhasexceeded600,000routes.You
shouldthereforeneverredistributetheroutinginformationthattheBGPreceivedinto
theIGP,becausenoIGPiscapableofcarryingseveraltensofthousandsofroutes.
RoutingInformationExchangewithOtherServiceProviders
BGP is used to exchange routing information with upstream service providers:
Service provider sends summary of service provider-owned address space to
upstream service provider.
Service provider sends prefixes owned by customers using independent
address space.
Upstream service provider sends full Internet routing table to the service
provider.
Thefigureshowshowroutesareexchangedbetweenserviceproviders.
ProvideredgeroutersuseBGPtoexchangeroutinginformationwithotherservice
providernetworksforredundancyandscalabilityreasons.
RoutinginformationfromcustomersisreceivedatPEroutersusingEBGPandthen
propagatedusingIBGPtotherestoftheserviceP-network.AtanotherPErouter,
theroutinginformationisfurtherpropagatedtoadifferentserviceproviderusing
EBGPwithotherautonomoussystems.Theserviceprovidersendsasummaryof
serviceprovider-ownedspacetoupstreamserviceproviders,alongwithprefixes
ownedbythecustomerusingprovider-independentaddressspace.Theupstream
serviceprovidersendsthefullInternetroutingtabletotheserviceprovider,which
allowstheserviceprovidertoimplementaprimary/backupscenariooraload-
balancingscenariowhenpeeringwithmultipleupstreamserviceproviders.
RoutePropagationinServiceProviderNetworks

RoutingInformationExchangewithCustomers
BGP with customer:
Customer advertises its address space.
Service provider advertises default route, service provider-owned routes and
default route, or full Internet routing table.
Static routing with customer:
Customer uses default route.
Service provider uses static route on the PE router for customer address
space. Static route is redistributed into BGP on the PE router.
Thefigureshowshowcustomersexchangerouteswiththeserviceprovider.Inthis
case,thecustomeradvertisesitsaddressspacetotheserviceprovider.Theservice
provideradvertisestothecustomereitherthedefaultroute,serviceprovider-owned
routesandthedefaultroute,orthefullInternetroutingtable,basedonthecustomer
requirements.
Whenthecustomerdoesnotrequireredundancy,staticroutingisused.Inthiscase,
thecustomerconfiguresastaticdefaultroutethatpointstothePErouterofthe
serviceprovider.Theserviceproviderconfiguresastaticrouteforthecustomer
networkthatpointstotheCErouter.ThePErouterredistributesstaticroutesinto
BGP.TheserviceP-networkthenusesBGPtopropagatetheinformationtotherest
oftheserviceP-networkusingIBGP.Theserviceprovideralsoadvertisescustomer
routinginformationtootherautonomoussystemsusingBGP.
Next-HopResolution
The core IGP of the service provider should carry information only about
backbone links and loopback addresses.
next-hop-self feature on the PE routers removes the need to include access
links in IGP, and thus prevents route flapping if access link flaps.
ThefigureshowswhyIGPisneededintheserviceprovidercorenetwork.TheIGP
usedintheserviceprovidercoreshouldcarryinformationonlyaboutbackbonelinks
andloopbackaddresses.TheserviceprovidershoulduseBGPtocarryallother
information.
UsetheBGPnext-hop-selfcommandwhenBGProutingisexchangedwiththe
customerorotherserviceproviders.Usingthenext-hop-selfcommandresultsin
theBGPnexthopbeingsettotheloopbackaddressoftheserviceprovideredge
routerandnottotheaccesslinkaddressofthecustomer.TheIGPcanthenbe
relievedoftheburdenofcarryinginformationabouttheaccesslink.Thebenefitof
notcarryingcustomerlinkinformationisthataflappingaccesslinkwillnotdisturb
theserviceproviderIGP.
AsshownintheroutingtableonthePE2router,thenexthopforthecustomer
networkpointstotheaddressofthePE1route.ThisisusuallytheIPaddressofthe
loopbackinterface.BecausethePE1andPE2routersarenotdirectlyconnected,an
IGProutingprotocolisneededthatcarriesinformationaboutcorelinksand
loopbacksacrosstheserviceprovidernetwork.

BGPandIGPhavedifferentresponsibilitiesinserviceprovidernetworks.
IGP responsibilities:
Carrying route to BGP next hop.
Providing optimal path to next hop.
Converging to alternate path so that BGP peering is maintained.
BGP responsibilities:
Generating BGP update.
Scaling BGP policies.
Scaling IBGP mesh.
Reducing impact of flapping routes.
TheIGPisresponsibleforthefollowing:
CarryingroutestotheBGPnexthopstofacilitaterecursiverouting.
Providinganoptimalpathtothenexthop,therebyoptimizingpacketflowtoward
allBGPdestinations.
Convergingtoanalternatepathinthecaseoflostlinksorroutersinaredundant
network(whichshouldbequicksothatBGPsessionsarenotlost).
TheBGPisresponsibleforthefollowing:
GeneratingBGPupdatesaboutreachableandunreachablenetworks.
ImplementingandscalingtheBGProutingpolicy,whichcanbequite
cumbersomeinlargeserviceprovidernetworkswithmanyEBGP-speaking
routers.
ImplementingandscalingIBGPsessionsbetweenallBGP-speakingroutersin
theAS.
Reducingtheimpactofindividualflappingroutesthroughroutesummarization.
ScalingIGP
InscalinganIGP,itisimportanttolimitthenumberofroutesthattheIGPcarries.
Optimally,theIGPcarriesonlyloopbackinterfacesandinternallinks.
Loopbacks and internal links carried only.
Good addressing structure within the POP required.
Loopback addresses taken out of a different address space and not
summarized.
Summarization of internal link addresses on POP level.
Optimal routes to loopbacks needed only (with proper summarization).
ThenumberofroutesthattheIGPcarriedcanbeevenfurtherreducedwithroute
summarization.However,caremustbetakenbecauseloopbackaddressesshould
neverbesummarized.Routesummarizationalwaysintroducestheriskof
suboptimalroutingandshouldbecarefullyplanned,becauseitisimportantthat
recursiveroutinglookupalwaysusesoptimalroutingtothenexthop.Also,inan
MPLSenvironment,anLSPmustbeunbrokenbetweenedgerouters,and
summarizingloopbackinterfaceswillbreaktheLSP.
InternallinkscanalwaysbesummarizedbecausetheyarenotusedasBGPnext-
hopaddresses.Tofacilitateproperroutesummarization,internallinksandloopback
interfacesonaroutershouldbeassignedaddressesfromtwodifferentaddress
spaces.Also,theinternallinksofaroutershouldbeassignedaddressesdepending
uponwhichPOPtheroutersbelongto.
Ifimplementedcorrectly,allinternalrouterlinksinonePOPcanbesummarizedat
thePOPlevelandinjectedintothecoreasasingleroute.But,allrouterloopback
addresseswithinthePOParestillpropagatedintothecoreasindividualhostroutes,
givingoptimalroutingtoallloopbackinterfaces.
ScalingBGP
ScalingBGPincludesscalingbothIBGPandEBGPaswellasscalingBGPupdates
androutingtablesize.
BGP policy scaling:
ScalingServiceProviderRoutingProtocols

The AS routing policy should be unitary and easy to maintain.
This goal is achieved by reusing the same configuration in all EBGP-
speaking routers.
IBGP mesh scaling:
Avoid unnecessary duplicate updates over a physical link.
Full-mesh IBGP is not needed since there are other technologies and
features available
Updates and table size scaling:
Route summarization is the key to scalability.
ThetaskofscalingBGPactuallyinvolvesthreedifferentandindependentscaling
tasks:
BGPpolicyscaling:TheASroutingpolicyshouldbeunitaryandeasyto
maintain.DifferentedgeroutersofthesameASshouldnotusedifferentpolicies
andtherebyadvertisedifferentroutestoneighboringautonomoussystems.
Regardlessofwhichrouteriscurrentlyactive,thesameroutingpolicyshouldbe
inplace.Administratively,replicationofthesameroutingpoliciesrequiresthe
sameconfigurationlinesinseveraledgerouters.
IBGPmeshscaling:AllBGP-speakingroutersmustbeupdatedwithconsistent
IBGPinformation.InthetraditionalBGPapproach,ensuringconsistentrouting
informationwasachievedbyestablishingafullmeshofIBGPsessionsbetween
allrouterswithintheAS.AnIBGPfullmeshiscertainlynotscalable,andseveral
toolsarenowavailabletoachievethesameresultswithoutthefullmesh.
Updatesandtablesizescaling:Thenumberofroutesintheroutingtableand
thenumberofupdatesthataresentandreceivedrepresentthethirdscaling
task.Routesummarizationisthekeytothisscalability.

InternalIPaddressingintheserviceprovidercorenetworkcanbesimplifiedto
reducetheuseofpublicaddressesandtosimplifyconfiguration.
This list shows how to scale addressing in Service Provider Core Network:
Private or public IP addresses can be used.
Private addresses on core links and loopbacks display private IP addresses in a
traceroute when run from customers.
MPLS with TTL propagation disabled solves the traceroute issue.
Private addresses on loopbacks and core links call for careful external routing to
prevent advertisement of private addresses to customers or upstream service
providers.
Otherwise, use public addresses in service provider core networks.
ForIPv4,publicorprivateIPaddressescanbeusedoncorelinks.However,using
privateaddresseshassomedrawbacks.Privateaddressesontheproviderinternal
linkswillcausetroubleforthetracerouteapplication.Whenthetraceroute
commandisexecutedfromthecustomer,thecustomerwillseeprivateIPaddresses
inthetracerouteprintout.UsingMPLSwithoutTTLpropagationintheservice
P-networkcaneasilyovercomethetracerouteproblemwithprivateaddresses.If
thesefunctionsareused,theprovidernetworkwillappearasasinglehoptothe
tracerouteapplication.Theintermediaterouterswillbeinvisibleandthuscanuse
privateaddresses.
Usingprivateaddressesontheserviceproviderrouterloopbackinterfacesis
possible.However,youmusttakecarenottoadvertiseanyprivateaddressestoany
otherAS.
Aruleofsafetyistopreventtheannouncementofanyprivateaddressesbyusing
prefixliststhatareappliedonoutgoingupdatestoexternalneighbors.Thesame
prefixlistmechanismcanalsobeusedontheprovideredgerouters.Itcanbeused
topreventacceptingprivateaddressesfromanyotherASiftheotherAS,by
mistake,announcesprivateaddresses.
ScalingServiceProviderAddressing

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
Service providers most commonly use integrated IS-IS and OSPF as interior
gateway protocols and BGP as the exterior gateway protocol.
BGP is used to carry customer routes while IGPs are used to carry service
provider internal prefix reachability information.
BGP allows ISP clients to acquire information about all or some networks
reachable through the ISP.
ISP can use static routing or BGP to direct traffic going to the customers to the
correct links.
Next-hop-self can be used to avoid redistributing transit segments into IGP on
iBGP neighbors.
When BGP networks grow, various actions must be taken to make them
scalable, for iBGP scalability use route reflectors.
When IP networks grow, several aspects of addressing need to be considered to
reduce sizes of routing tables and to avoid consuming too many addresses.
Summary

Overview
LargeBGPnetworkscannotproperlyscalewithoutrelyingonperformance-
enhancingtoolssuchasroutereflectorsandconfederations.Routereflectorsenable
BGProutinginformationtobedistributedinafashionthatdoesnotrequirea
physicalfullymeshednetwork.Networkoverheadisreducedbydecreasingthe
numberofTCPconnectionsthatarerequiredtodistributeroutinginformationandby
lesseningrouterCPUandmemoryrequirements.
ThislessonintroducesBGProutereflectorsbyexplainingwhytheyimproveBGP
scalability.Modifiedsplit-horizonrules,appliedwhenyouareusingroutereflectors,
arealsodiscussed.Thelessonalsodescribesthevariousredundancymechanisms
thatareusedwithroutereflectors,includingroutereflectorclusters.Thelesson
introducesnetworkdesignrulesthatyoushouldfollowwhenimplementinganetwork
withBGProutereflectors.Italsoliststhepotentialissuesthatcanariseifthe
networkdesignrulesarenotadheredto.Thelessonconcludesbydescribingthe
conceptofhierarchicalroutereflectors.
Uponcompletingthislesson,youwillbeableto:
ExplaintheneedforBGProutereflectorsinBGPtransitbackbones
ExplainhowroutereflectorsmodifytraditionalIBGPsplit-horizonrules
Explainthebenefitsofdeployingredundantroutereflectors
Explainhowroutereflectorclusterspreventloopsinthedeploymentofroute
reflectorsinredundantconfigurations
Describeadditionalroutereflectormechanismsthathavebeendesignedto
preventroutingloops
ListthenetworkdesignrulesforimplementingBGProutereflectors
Listthepotentialissuesthatcanariseifyoudonotfollowtheroutereflector
networkdesignrules
Explainthefunctionofhierarchicalroutereflectors
IntroducingandDesigningRouteReflectors

ClassicIBGPsplit-horizonrulesspecifythatupdatesthatarereceivedonanEBGP
sessionshouldbeforwardedonallIBGPandEBGPsessions.However,updates
thatarereceivedonanIBGPsessionshouldbeforwardedonlytoallEBGP
sessions.ThisrulerequiresaBGPboundaryroutertobeabletosendrouting
updatestoallotherBGP-speakingroutersinitsownASdirectlythroughaseparate
IBGPsessiontoeachofthem.
IBGP requires a full mesh between all BGP-speaking routers.
Large number of TCP sessions.
Unnecessary duplicate routing traffic.
Solutions:
Route reflectors modify IBGP split-horizon rules.
BGP confederations modify IBGP AS-path processing.
TheprimaryreasonfortheIBGPsplit-horizonruleistoavoidroutinginformation
loopswithintheAS.IftheinformationthatisreceivedthroughanIBGPsessionis
forwardedonotherIBGPsessions,theinformationmightcomebacktothe
originator.Thisinformationisthenforwardedagaininanever-endingloop.The
originatorwouldnotdetecttheloopbecausenoBGPattributesarechangedon
IBGPsessions.
ThegeneraldesignruleinclassicIBGPistohaveafullmeshofIBGPsessions.But
afullmeshofIBGPsessionsbetweennnumberofrouterswouldrequire(n*(n-1))
/2IBGPsessions.Forexample,arouterwithanASthatcontains10routerswould
require(10*(10-1))/2=45IBGPsessions.Imaginethenumberofsessions(and
theassociatedrouterconfiguration)thatwouldberequiredforasingleAScontaining
500routers.
EveryIBGPsessionusesasingleTCPsessiontoanotherIBGPpeer.Anupdate
thatmustbesenttoallIBGPpeersmustbesentoneachoftheindividualTCP
sessions.Ifarouterisattachedtotherestofthenetworkoverjustasinglelink,this
singlelinkhastocarryallTCP/IPpacketsforallIBGPsessions.Thisrequirement
resultsinmultiplicationoftheupdateoverthesinglelink.
RoutereflectorsareBGPscalabilitymechanismsthatenableroutinginformationto
beredistributedtoallrouterswithinanASwhileeliminatingtheneedforafully
meshedtopologywithintheAS.ThisfeaturereducesthenumberofTCPsessions
thatmustbemaintained,loweringnetworkoverheadandCPUandmemoryresource
requirements.
Twodifferentsolutionsareavailabletoachievegreaterscalabilitywhenyouare
facedwiththefull-meshrulesofIBGPautonomoussystems:
RoutereflectorsmodifytheclassicIBGPsplit-horizonruleandallowaparticular
routertoforwardincomingIBGPupdatestoanoutgoingIBGPsessionunder
certainconditions.Thisrouterbecomesaconcentrationrouter,oraroute
reflector.
BGPconfederations(notcoveredinthiscourse)introducetheconceptofa
numberofsmallerautonomoussystemswithintheoriginalAS.Thesmall
autonomoussystemsexchangeBGPupdatesbetweenthemusingintra-
confederationEBGPsessions.
IBGPScalabilityIssuesinaTransitAS

InclassicIBGP,theBGPboundaryrouterneedstoforwardtheroutethatisreceived
fromanEBGPpeertoeveryotherrouterwithinitsownAS.ItusesadedicatedIBGP
sessionforeachrouter.Also,theBGPboundaryrouterforwardsroutesthatarouter
sourcesinthesameway.Toalloweveryroutertoupdateeveryotherrouter,afull
meshofIBGPsessionsisrequired.
Classic IBGP: IBGP routes are not propagated to other IBGP peers.
Full mesh of IBGP peers is therefore required.
ThefigureshowshowtherouterreceivesroutingupdateonEBGPsessionand
forwardsthisupdatetoallIBGPneighbors.WhenIBGPneighborsreceivethis
updateonIBGPsessions,theseupdatesarenotforwardedtoanyotherIBGP
sessionsbydefault.
Route reflector can propagate IBGP routes to other IBGP peers.
Full mesh of IBGP peers is no longer required.
TheIBGProutereflectordesignrelaxestheneedforafullmesh.Therouterthatis
configuredasaroutereflector,undercertainconditions,willrelayupdatesthatare
receivedthroughanIBGPsessiontoanotherIBGPsession.Thiscapabilityrequires
modificationsoftheclassicIBGPsplit-horizonrules.
Theroutereflectorconceptintroducesprocessingoverheadontheconcentration
routerand,ifitisconfiguredincorrectly,cancauseroutingloopsandinstability.
RouteReflectorSplit-HorizonRules

Whenyouimplementaroute-reflector-basedIBGPnetwork,theBGProutersare
dividedintoroutereflectors(whichimplementmodifiedsplit-horizonrules)and
clients(whicharebehavingliketraditionalIBGProuters).
Routereflectorclientsareexcludedfromthefullmesh.Theycanhaveanynumber
ofEBGPsessionsbutmayhaveonlyoneIBGPsession,thesessionwiththeirroute
reflector.ClientsconformtotheclassicIBGPsplit-horizonrulesandforwarda
receivedroutefromEBGPontheirIBGPneighborsessions.Buttheroutereflector
conformstotheroutereflectorsplit-horizonrulesandrecognizesthatithasanIBGP
sessiontoaclient.WhentheIBGPupdateisreceivedfromtheclient,theroute
reflectorforwardstheupdatetootherIBGPneighbors,thereforealleviatingtheIBGP
full-meshrequirementforitsclients.
Similarly,whentheroutereflectorreceivesanIBGPupdatefromaneighborthatis
notitsclient,itforwardstheupdatetoallofitsclients.
ForwardingofanIBGPupdateinaroutereflectordoesnotchangethenext-hop
attributeoranyothercommonBGPattribute.Thisfeaturemeansthattheclientwill
usetheoptimumroutewiththerecursiverouting,regardlessofthewaythatithas
receivedtheBGProute.
Anotherexampleofroutepropagationinaroutereflector-enablednetwork:
NonclientsconformtotheclassicIBGPsplit-horizonrulesandforwarda
receivedroutefromEBGPontheirIBGPneighborsessions.
Theupperroutereflectorthatreceivesaroutefromanonclientsendstheroute
toEBGPpeersandclientsonly.ItisthereasonwhytheIBGPupdateisnotsent
tothebottomroutereflectoraswell.
TheclientreceivestheIBGPupdateandsendsittotheEBGPpeers.
ThetablepresentsdetailedIBGPsplit-horizonrulesasmodifiedbytheintroduction
ofBGProutereflectors.Forpurposesofdefinition,a"routereflector"isaBGP
speakerthatcanadvertiseIBGPlearnedrouterstoanotherIBGPpeerand,hence,

canreflectroutes.IBGPpeersoftheroutereflectorfallundertwocategories:
"clients"and"nonclients."Theroutereflectoranditsclientsforma"cluster."AllIBGP
peersoftheroutereflectorthatarenotpartoftheclusterarenonclients.A"classic"
IBGProuterisarouterthatdoesnotsupportroutereflectorfunctionality.
TypeofRouter IncomingUpdateFrom IsForwardedTo
Classic EBGPpeer Allpeers(IBGPandEBGP)
IBGPpeer EBGPpeers
Routereflector EBGPpeer Allpeers(IBGPandEBGP)
NonclientIBGPpeer EBGPpeersandclients
ClientIBGPpeer Allpeersbutthesender
Client EBGPpeer Allpeers(IBGPandEBGP)
IBGPpeer EBGPpeers

ClientsmayhaveanynumberofEBGPpeersbutmayhaveIBGPsessionsonlywith
theirroutereflectororreflectors.Ifthereflectorfails,itsclientcannolongersend
BGPupdatesto,orreceivethemfrom,therestoftheAS.Theroutereflectoris,
therefore,asinglepointoffailure.
Clients that have an IBGP session with only one route reflector will not be able
to send any BGP updates if the route reflector fails.
Clients should establish an IBGP session with at least two route reflectors using
different physical connections.
Toavoidintroducingasinglepointoffailureintothenetwork,theroutereflector
functionalitymustbeasredundantasthephysicalnetwork.Ifaclientwillstillbe
physicallyattachedtothenetworkafteritsroutereflectorhasfailed,theclientshould
havearedundantroutereflector.Thus,inallhighlyavailablenetworks,route
reflectorsmustberedundant.
Redundant reflectors solve the high-availability requirement.
The concept of clusters is introduced to prevent IBGP routing loops between
route reflectors.
AclientmayhaveIBGPsessionstomorethanoneroutereflectortoavoidasingle
pointoffailure.Eachclientwillreceivethesameroutefrombothofitsreflectors.
BothroutereflectorswillreceivethesameIBGPupdatefromtheirclient,andthey
willbothreflecttheupdatetotherestoftheclients.Additionally,bothroutereflectors
willgetupdatedfromthefullmeshandreflectthoseupdatestotheirclients.Asa
result,eachclientwillgettwocopiesofallroutes.Undercertaincircumstances
(particularlywhenyouuseweightsonIBGPsessionstoinfluenceBGProute
selection),improperroutereflectioncanresultinanIBGProutingloop.Andthis
routingloopisimpossibletodetect.ExtraBGPattributesarethusnecessaryto
preventtheseroutingloops.
RedundantRouteReflectors

Arouterthatisactingasaroutereflectorclientdoesnotrequireanyspecific
configuration.ItsimplyhasfewerIBGPsessionsthanitwouldhaveifitwerepartof
thefullmesh.Butimproperlyconfiguringtheclienttoalsobeareflectorcouldeasily
causealoop.AnIBGProutecominginfromoneoftherealreflectorstotheclient
couldbeforwardedbytheclient,erroneouslyactingasreflector,totheother
reflector.
A group of redundant route reflectors and their clients form a cluster.
Each cluster must have a unique cluster ID.
Each time a route is reflected, the cluster ID is added to the cluster-list BGP
attribute.
The route that already contains the local cluster ID in the cluster list is not
reflected.
RoutereflectorclusterspreventIBGProutingloopsinredundantroutereflector
designs.
Theroleofthenetworkdesigneristoproperlyidentifywhichroutereflectorsand
theirclientswillformacluster.Thedesignerassignstotheclusteracluster-ID
numberthatisuniquewithintheAS.
Thecluster-IDnumbermustbeconfiguredintheroute
reflectors.Theclientsshouldnotbeconfiguredwiththis
information.
Aroutereflectorroutercanreflectroutesonlywithinasinglecluster.Aroutereflector
can,however,participateinanotherclusterbutonlyasaclient.Aclientcanfunction
asaclientonlytoaroutereflectorbelongingtothesamecluster.
Whenarouteisreflected,thereflectorcreatesthecluster-listattributeandattaches
ittotherouteifitdoesnotexist.Itthensetsitscluster-IDnumberinthecluster-listor
addsitscluster-IDnumbertoanalreadyexistingcluster-listattribute.Iftheroute,for
anyreason,iseverreflectedbacktothesamereflector,itwillrecognizeitscluster-
IDnumberinthecluster-listandnotforwarditagain.Thefirstroutereflectorthat
reflectstheroutealsosetsaBGPattribute,called"originator-ID,"andaddsittothe
BGProuter-IDofitsclient.
Thecluster-listandoriginator-IDattributesare
nontransitiveoptionalBGPattributes,allowingroutersthat
donotsupportroutereflectorfunctionalitytocoexistwith
routereflectorsandtheirclientsinthesameAS.
Basedoncluster-listandoriginator-IDattributes,routerscanimplementtwoloop-
preventionmechanisms:
AnyrouterthatreceivesanIBGPupdatewiththeoriginator-IDattributesettoits
ownBGProuter-IDwillignorethatupdate.
AnyroutereflectorthatreceivesanIBGPupdatewithitscluster-IDalreadyin
thecluster-listwillignorethatupdate.
Intheexample,theclientintheclusterforwardsthereceivedEBGPupdatetoboth
reflectors.TheroutereflectorsforwardtheupdateintotheIBGPfullmesh.This
behaviormeansthattheysendtheupdatetoeachotheraswell.Butwhenaroute
reflectorreceivesaBGPupdatefromanotherroutereflector,itrecognizestheir
commonclusterIDnumberinthecluster-listattribute.Therefore,thenewlyreceived
routeupdateisignored.
RouteReflectorClusters

Whenarouteisreflected,theroutereflectorsetstheoriginator-IDBGPattribute
(nontransitiveoptionalBGPattribute)totherouter-IDofthepeerfromwhichit
receivedtheroute.Anyrouterthatreceivesaroutewithitsownrouter-IDinthe
originator-IDattributesilentlyignoresthatroute.
Every time a route is reflected, the router-ID of the originating IBGP router is
stored in the originator-ID BGP attribute.
A router receiving an IBGP route with originator-ID set to its own router-ID
ignores that route.
The BGP path selection procedure is modified to take into account cluster-list
and originator-ID.
BGPpathselectionruleshavebeenmodifiedtoselectthebestrouteinscenarios
wherearoutermightreceivereflectedandnonreflectedroutesorseveralreflected
routes:
ThetraditionalBGPpathselectionparameterssuchasweight,localpreference,
origin,andMEDarecomparedfirst.
Iftheseparametersareequal,theroutesthatarereceivedfromEBGP
neighborsarepreferredoverroutesthatarereceivedfromIBGPneighbors.
WhenarouterreceivestwoIBGProutes,thenonreflectedroutes(routeswithno
originator-IDattribute)arepreferredoverreflectedroutes.
Thereflectedrouteswithshortercluster-listsarepreferredoverrouteswith
longercluster-lists.
Iftheadditionalroute-reflector-orientedselectioncriteriadonotyieldadecision,
therestofthetraditionalBGPpathselectionrulesarefollowed.
AdditionalRouteReflectorLoop-PreventionMechanisms

Thephysicaltopologyofthenetworkcouldserveasaguidetoroutereflector
design.
Route reflector rules:
Route reflector rules divide a transit AS into smaller areas (called clusters).
Each cluster contains route reflectors and route reflector clients.
Routers that do not support route reflector functionality act as a one-router
cluster or as a route reflector client.
ImplementingroutereflectorswithinthetransitASwillcreatesmallerareas(or
groups)ofrouters.Thesesmallergroupingsofroutersarecalledclusters.Acluster
consistsofroutereflectorrouters,eitherredundantornonredundant,andtheclient
routersthatareconnectedtothem.
IndesigningtheimplementationofroutereflectorswithinatransitAS,identifya
groupofperipheralroutersthatarephysicallyconnectedtothesamebackbone
routerorrouters.Considertheperipheralroutersasclientsandthebackbone
routersasroutereflectors.Then,considerthisgroupofrouterstoformacluster.
IBGP session rules:
All clients in a cluster must establish IBGP sessions with and only with all route
reflectors in the cluster.
An IBGP full mesh between all route reflectors within the AS is required.
Routers that are not route reflectors can participate in the IBGP full mesh or be
route reflector clients.
TheprincipalgoalfordesigningnetworkswithBGProutereflectorsistoreducethe
sizeofthefullmeshofIBGPsessionsbyexcludingsomeroutersfromthemesh.
Theroutersthatareexcludedfromthefullmesh,theclients,havetosendtheirIBGP
informationto,andreceiveitfrom,atleastonerouterthatbelongstothefullmesh,
theroutereflector.Thus,thefullmeshisstillthere,butitissmaller,andallroute
reflectorshavetobepartofit.
AllclientsinaclustershouldhaveIBGPsessionswithalltheirroutereflectorsand
theirroutereflectorsonly.Ifaclientdoesnothavesessionswithallthereflectorsin
thecluster,theredundancyisviolated.IfaclienthasIBGPsessionstoroutersother
thantheroutereflectors,unnecessaryroutingtrafficisgenerated.
Bothclientsandotherrouters,thatarenotroutereflectors,obeytheclassicIBGP
split-horizonrules.Thus,non-route-reflectorroutersareeitherclientstoareflectoror
areparticipatingdirectlyinthefullmesh.
Intheexample,therearetwoclustersandonestandaloneBGProuters.Inthearea
thatislabeled“redundantcluster,”thethreeclientroutersandthetworoutereflector
routersmakeupthecluster.EachofthethreeclientroutershasanIBGPsession
withthetworoutereflectorsandonlywiththosetworoutereflectors.
Inthenonredundantarea,theclientrouterhasasinglephysicalconnectiontoa
routereflectorrouter.Thesetworoutersformanonredundantcluster.Therouterthat
isdesignatedastheroutereflectorintheclusterisalreadyasinglepointoffailurein
thisphysicaldesign.Afailureofthisrouterwillpreventtheclientsintheclusterfrom
reachingtherestofthenetwork.Therefore,thereisnonewsinglepointoffailure
thatisintroducedwhentherouterisconfiguredastheonlyroutereflectorinthis
cluster.TheclienthasasingleIBGPsessiontotheroutereflector.
Thestandalonerouterthatisshownisnotconfiguredasaroutereflector,norisita
NetworkDesignwithRouteReflectors
clienttoanyotherroutereflector.Thisotherrouterservesasanexampleofwherea
non-route-reflectorrouterparticipatesinthefullmesh.Thisrouterhasafullmeshof
IBGPsessionswithallroutereflectors,eachreflectorrepresentingitscluster.

Potential problems that can occur when you deviate form the route reflector network
design rules:
Issue: Result:
Clientsdonothavesessionswithallreflectorsina
cluster.
ClientswillnotreceiveallIBGProutes.
Clientshavesessionswithreflectorsinseveral
clusters.
Clientswillreceiveduplicatecopiesofthesame
route.
ClientshaveIBGPsessionswithotherclients. Clientswillreceiveduplicatecopiesofthesame
route.
TwonontransitiveoptionalBGPattributes,originator-IDandcluster-list,areboth
usedtopreventfatalloopsofinformation.Theuseofthesetwoattributesmakesa
networkfairlyinsensitivetopoorconfiguration.However,foroptimalperformance,
youmusthaveanoptimalconfiguration.Herearesomeoftheproblemsthatcould
occurifyoudeviatefromroutereflectornetworkdesignrules:
IfroutereflectorsarenotconnectedwithIBGPsessionsinafullmesh,some
clusterswillnothavealltheroutes.
IfaclienthasIBGPsessionswithsomeroutereflectorsinacluster,butnotwith
allofthem,theclientmightmisssomeBGProutes.
IfaclienthasIBGPsessionstoroutereflectorsthatbelongtodifferentclusters,
theclientwillforwardtheBGPupdatefromtheclientintothefullmeshwith
differentcluster-IDsinthecluster-listattribute.WhentheBGPupdateentersthe
mesh,itwillreachtheotherroutereflector,whichwill,unnecessarily,acceptthe
routeasvalidandforwarditintoitscluster.Thissituation,inturn,causes
unnecessaryduplicationofupdatestotheclients.
IfaclienthasIBGPsessionstootherclientsinthesamecluster,thoseclients
willreceiveunnecessaryduplicationsofupdates.
PotentialNetworkIssues

Networkdesignerscanbuildroutereflectorclustersinhierarchies.Withhierarchies,
arouterservingasaroutereflectorinoneclustercanactasaclientinanother
cluster.
Problem:
In very large networks, a single layer of route reflectors might not be enough.
Solution:
A hierarchy of route reflectors can be established.
A route reflector can be a client of another route reflector.
The hierarchy can be as deep as needed.
Clientsarenotconfiguredtoberoutereflectorclients;theysimplyhavefewerIBGP
sessions.However,anetworkdesignermustconfigurearoutereflector.In
configuringanIBGPsessiononaroutereflector,thedesignermustconfigurethe
sessiontoreachaclient,sotheroutereflectorIBGPsplit-horizonrulestostart
working.AllotherIBGPsessionsthatareconfiguredontheroutereflectorareapart
ofthefullmesh.Also,thedesignermustconfigurethecluster-IDontheroute
reflector.
ArouterthatisconfiguredtobearoutereflectorwillstillhaveordinaryIBGP
sessionsthatarepartofthefullmesh.Ifthesesessionsarereducedinnumberand
onlyafewremain,andtheremainingonesreachasecondlevelofroutereflectors,a
hierarchyofroutereflectorsiscreated.
Whenadesignerbuildsafirstlevelofclusters,theremainingfullmeshissmaller
thanwhenallroutersbelongedtoit.Butifitislargeenough,thedesignercanbuild
anextralevelofroutereflectors.
Thefigureshowsanexampleofhierarchicalroutereflectors.
Thefirstlevelofhierarchyreducedtheoriginalfullmeshof12routers(allroutersin
theserviceprovidernetwork)toafullmeshofsevenrouters(thelowerthreeroute
reflectorsandtheuppertworoutereflectorsandtwoclients).Thesecondlevelof
routereflectorclusterswasbuiltbycreatingcluster27.Thissecondstepfurther
reducedthefullmeshofsevenrouterstoafullmeshconsistingofonlytworouters
(upperroutereflectors).Onlythetworoutereflectorsincluster27shouldbe
connectedinafullmesh.
WhenaclientinthelowestlevelreceivesanEBGPupdate,itwillforwardtheupdate
onallconfiguredIBGPsessionstoaroutereflector.Theroutereflectorrecognizes
BGPupdatesthatarereceivedfromconfiguredclientsandwillforwardthese
updatestoallotherclientsthatusenormalIBGPsessions.Theupdate,sentona
normalIBGPsession,willbeasecond-levelclientupdatetothesecond-levelroute
reflector.Thesecond-levelroutereflectorwillrecognizethattheupdatewas
receivedfromaclient,andwillforwardittoallotherclientsandintothefullmesh.
HierarchicalRouteReflectors

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
BGP route reflectors were introduced to free the network designers from IBGP
full-mesh requirements that prevent large networks from scaling.
BGP route reflectors modify IBGP split-horizon rules. All routes that are received
from a route reflector client are sent to all other IBGP neighbors. All routes that
are received from a nonclient IBGP neighbor are sent to all route reflector
clients.
A route reflector is a single point of failure, and therefore redundancy should be
implemented in a network containing route reflectors.
Route reflector clusters were introduced in the BGP route reflector architecture
to support redundancy, preventing IBGP routing loops in redundant route
reflector designs.
The originator-ID and cluster-list BGP attributes were introduced to prevent
routing loops in route reflector environments.
All route reflectors in a cluster should have IBGP sessions to all clients in the
cluster. The route reflectors also participate in the IBGP full mesh, and they
should have no other IBGP sessions.
When the route reflector clients do not have IBGP sessions with all route
reflectors in the cluster, they might not receive all IBGP routes.
Route reflector clusters can be built in hierarchies. A router that is a route
reflector in one cluster can act as client in another cluster.
Summary

Overview
LargeBGPnetworkscannotproperlyscalewithoutrelyingonperformance-
enhancingtoolssuchasroutereflectors.RoutereflectorsenableBGProuting
informationtobedistributedinafashionthatdoesnotrequireaphysicalfull-mesh
network.Implementingsuchanetworkrequiresknowledgeofthestepstoproperly
migrateandconfigureroutereflectorsandthecommandsthatareusedtoverifythe
operationofaconfigurednetwork.
Thislessonintroducesthestepsthatarerequiredtosuccessfullymigrateanexisting
AStoBGProutereflectors.ItalsoliststheCiscoIOScommandsthatarerequiredto
configureandmonitorroutereflectors.
Uponcompletingthislesson,youwillbeableto:
ListthestepstomigrateanexistingIBGPbackbonetoabackbonewithroute
reflectors
IdentifytheconfigurationchangesandrelatedCiscoIOScommandsthatare
requiredtoconfigureroutereflectorsonaBGPbackbone
IdentifytheCiscoIOScommandsthatarerequiredtomonitoraBGPbackbone
thatcontainsroutereflectors
ConfiguringandMonitoringRoute
Reflectors

1.
2.
ThephysicaltopologyoftheASservesasaguidetodesigningclusters.Youshould
introducenoadditionalsinglepointsoffailurewhenyouaredeployingroute
reflectors.Ifthephysicaltopologyisredundant,agoodpracticeistohaveredundant
routereflectors.Ifthephysicaltopologyisnotredundant,introducinga
nonredundantclusterdoesnotaddasinglepointoffailurebecausethenetworkwas
alreadynonredundant.
Divide the AS into areas (clusters).
Assign a cluster-ID to each area.
On route reflector clients, retain only IBGP sessions with route reflectors in their
cluster.
On route reflectors, retain only IBGP sessions with other route reflectors and
clients in their cluster.
Configure cluster-ID on every route reflector.
Configure clients on every route reflector.
Thefollowingplanningandpreparationstepsarerequiredbeforeyoumigratefroma
fullmeshofIBGPsessionstoaroutereflectordesign:
Identifyagroupofperipheralroutersthatarephysicallyconnectedtothesame
setofbackbonerouters.Considertheperipheralroutersasclientsandthe
backboneroutersasroutereflectors.Lettheroutersformacluster.Makesure
thatnorouterbelongstotwodifferentclusters,becausethissetupwould
representanillegalconfiguration.
Createanumberingplanthatindicateshownumbersareassignedtothe
clustersinthenetwork.Theplanmustmakesuretouniquelyidentifyeachofthe
clusterswithintheAS.ClustersarenotseenfromoutsidetheAS,sotheplan
doesnotneedtobecoordinatedwithanyotherAS.Toeasetroubleshooting,it
isrecommendedthatnumberslowerthan256areused,becausecluster-IDsare
displayedinIPaddressformat.
Thedefaultvalueofacluster-IDistheBGProuter-IDof
theroutereflector.Ifyoudecidetoimplement
nonredundantclusters,youdonothavetoplanthe
cluster-IDnumbers,becausetheBGProuter-IDsshould
beunique.
RouteReflectorBackboneMigration

Configuration changes that are required to configure BGP route reflectors:
Configure cluster-ID on route reflectors.
Configure BGP neighbors as route reflector clients on the route reflectors.
No configuration is needed on the route reflector clients.
Make sure that IBGP neighbor is removed on both ends of the IBGP session.
Aspartoftheplanningandpreparationthatisnecessarytomigratefromafullmesh
ofIBGPsessionstoaroutereflectordesign,youneedtomakethefollowing
configurationchanges:
Configurethepropercluster-IDvalueontheroutereflectors.
ConfiguretheroutereflectorwithinformationaboutwhichIBGPneighbor
sessionsarereachingtheirclients.
Intheclients,removeallIBGPsessionstoneighborsthatarenotroutereflectors
intheclientcluster.
MakesurethattheIBGPneighborisremovedonbothendsoftheIBGP
session.
Cisco IOS commands that are required to configure BGP route reflectors:
router(config-router)# bgp cluster-id cluster-id
Optionally assigns a cluster-ID to the route reflector (default value is router-ID)
Required only for clusters with redundant reflectors
router(config-router)# neighbor ip-address route-reflector-client
On route reflector configures an IBGP neighbor to be a client of this reflector.
Usethebgpcluster-idcommandtoconfigurethecluster-IDiftheBGPclusterhas
redundantroutereflectors.
bgp cluster-id cluster-id
Toremovethecluster-ID,usethenoformofthiscommand.
no bgp cluster-id cluster-id
SyntaxDescription
Parameter Description
cluster-id Cluster-IDoftherouteractingasaroutereflector.
Thecluster-IDisamaximumof4bytes.
ThiscommandisusedtoconfiguretherouterasaBGProutereflectorandconfigure
thespecifiedneighborasitsclient.Whenalltheclientsaredisabled,thelocalrouter
isnolongeraroutereflector.
neighbor ip-address route-reflector-client
Toindicatethattheneighborisnotaclient,usethenoformofthiscommand.
no neighbor ip-address route-reflector-client
SyntaxDescription
Parameter Description
ip-address NeighborIPaddress
Bydefault,thereisnoroutereflectorintheAS.
ConfiguringRouteReflectorsExample
Inthisexample,therouter1.0.0.1hasbeenconfiguredasaroutereflector.
ConfiguringRouteReflectors

Therouterswithrouter-ID1.0.0.1and1.0.0.2areroutereflectorsinaclusterthat
hasbeenassignedcluster-ID175.Therouterswithrouter-ID1.0.0.3and1.0.0.4are
clientstothesetworoutereflectors.
Thefigureshowsaportionoftheconfigurationinrouter1.0.0.1.Thecluster-IDis
assignedtotherouterundertherouterbgpprocessdefinitionoftherouter
configuration.Aftertherouterhasbeenassigned,theroutereflectorclient
configurationisaddedundertherouterbgpprocessforthetwoneighborsthat
identifythetwosessionsreachingclients.
BothclientsneedtohaveestablishedIBGPsessiontobothroutereflectors.IBGP
sessionbetweenroutereflectorsisalsoneeded.Routereflector1.0.0.1alsohas
establishedIBGPsessiontononclientrouter1.0.0.6andEBGPsessiontorouter
2.7.1.1onautonomoussystem222.

Overview
Throughthisdiscovery,youwilllearnhowtoeliminatetheneedforfullmeshIBGP
sessionsbyintroducingtheroutereflectorfeatureintotheautonomoussystem.
Discovery17:ConfigureRouteReflector

Topology

Ifyoushutdownaninterfaceonarealrouterorswitch,the
connecteddevicewillseeitas"down/down."Dueto
virtualizationspecifics,IOLbehaviorisslightlydifferent.If
youshutdownaninterfaceonarouterorswitch,the
connecteddevicewillseeitas"up/up."InIOL,thestatus
ofaninterfacecanonlybe"up/up"or"administratively
down/down."
DeviceInformation
Device Interface IPaddress Description
ISP1 Ethernet0/0 172.16.11.11/24 ConnectiontoR1
ISP1 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
10.0.1.1/28
10.0.1.17/28
10.0.1.33/28
10.0.1.49/28
10.0.1.65/28
10.0.1.81/28
Loopbackssimulate
LANnetworks
R1 Ethernet0/0 172.16.11.1/24 ConnectiontoISP1
R1 Ethernet0/3 192.168.13.1/24 ConnectiontoR3
R1 Loopback1 10.0.0.1/28 Loopbacksimulates
LANnetwork
R3 Ethernet0/2 192.168.34.3/24 ConnectiontoR4
R3 Ethernet0/3 192.168.13.3/24 ConnectiontoR1
R3 Loopback1 10.0.0.17/28 Loopbacksimulates
LANnetwork
R4 Ethernet0/0 172.16.34.4/24 ConnectiontoISP3B
R4 Ethernet0/3 192.168.24.4/24 ConnectiontoR2
R4 Loopback1 10.0.0.49/28 Loopbacksimulates
LANnetwork
ISP3B Ethernet0/0 172.16.34.34/24 ConnectiontoR4
ISP3B Loopback1
Loopback2
Loopback3
Loopback4
10.0.3.1/28
10.0.3.17/28
10.0.3.33/28
10.0.3.49/28
Loopbackssimulate
LANnetworks
IPaddressesandIGParepreconfiguredasshowninthetopologybelow:
TheseBGPsessionshavebeenpreconfigured:
EBGPsessionbetweenISP1andR1routers
EBGPsessionbetweenISP3BandR4routers
IBGPsessionbetweenR1andR3routers
IBGPsessionbetweenR3andR4routers
NotethatthereisnoIBGPsessionbetweenR1andR4routers.OSPFprotocolhas
alsobeenpreconfiguredasIGProutingprotocol,makingsurethatallinternallinks,
JobAids
loopbacks,andnexthopsareaccessibleinautonomoussystemAS1.

Step1
OntheR1router,verifywhichBGPsessionsareestablished.
R1# show bgp summary
BGP router identifier 10.0.0.1, local AS number 1
BGP table version is 101, main routing table version 101
8 network entries using 1184 bytes of memory
8 path entries using 512 bytes of memory
4/3 BGP path/bestpath attribute entries using 544 bytes of memory
1 BGP rrinfo entries using 24 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 2312 total bytes of memory
BGP activity 55/42 prefixes, 86/78 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.0.0.17 4 1 8 6 101 0 0 00:00:22 1
172.16.11.11 4 100 109 118 101 0 0 01:33:46 6
YoushouldonlyseetheBGPsessionsestablished:
EBGPsessiontotheISP1router(neighbor172.16.11.11)
IBGPsessiontotheR3router(neighbor10.0.0.17)
Step2
OntheR3router,verifywhichBGPsessionsareestablished.
R3# show bgp summary
BGP router identifier 10.0.0.17, local AS number 1
BGP table version is 198, main routing table version 198
13 network entries using 1924 bytes of memory
13 path entries using 832 bytes of memory
4/4 BGP path/bestpath attribute entries using 544 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 3348 total bytes of memory
BGP activity 37/24 prefixes, 109/96 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.0.0.1 4 1 7 8 198 0 0 00:00:51 7
10.0.0.49 4 1 6 7 198 0 0 00:00:38 5
YoushouldonlyseetheBGPsessionsestablished:
IBGPsessiontotheR1router(neighbor10.0.0.1)
IBGPsessiontotheR4router(neighbor10.0.0.49)
Step3
OntheR4router,verifywhichBGPsessionsareestablished.
R4# show bgp summary
BGP router identifier 10.0.0.49, local AS number 1
BGP table version is 145, main routing table version 145
6 network entries using 888 bytes of memory
6 path entries using 384 bytes of memory
3/3 BGP path/bestpath attribute entries using 408 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1704 total bytes of memory
BGP activity 61/55 prefixes, 109/103 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.0.0.17 4 1 8 7 145 0 0 00:01:03 1
172.16.34.34 4 300 109 122 145 0 0 01:34:45 4
YoushouldonlyseetheBGPsessionsestablished:
ConfiguringRouteReflector
DiscoverySteps

EBGPsessiontotheISP3Brouter(neighbor172.16.34.34)
IBGPsessiontotheR3router(neighbor10.0.0.17)
NotethatthereisnoIBGPsessionbetweenroutersR1andR4.
Step4
OntheR1router,verifywhichroutesareadvertisedtotherouterR3.
R1# show ip bgp neighbors 10.0.0.17 advertised-routes
BGP table version is 53, local router ID is 10.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 0.0.0.0 0 32768 i
*> 10.0.1.0/28 172.16.11.11 0 0 100 i
*> 10.0.1.16/28 172.16.11.11 0 0 100 i
*> 10.0.1.32/28 172.16.11.11 0 0 100 i
*> 10.0.1.48/28 172.16.11.11 0 0 100 i
*> 10.0.1.64/28 172.16.11.11 0 0 100 i
*> 10.0.1.80/28 172.16.11.11 0 0 100 i
YoushouldseethatR1routeradvertisestheseprefixes:
Locallyoriginatedprefix10.0.0.0/28
AllprefixesoriginatingontheISP1router(10.0.1.0/24subnets)inAS100.
Step5
OntheR3router,verifythecontentoftheBGPtable.
R3# show ip bgp
BGP table version is 102, local router ID is 10.0.0.17
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*>i 10.0.0.0/28 10.0.0.1 0 100 0 i
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*>i 10.0.0.48/28 10.0.0.49 0 100 0 i
*>i 10.0.1.0/28 10.0.0.1 0 100 0 100 i
*>i 10.0.1.16/28 10.0.0.1 0 100 0 100 i
*>i 10.0.1.32/28 10.0.0.1 0 100 0 100 i
*>i 10.0.1.48/28 10.0.0.1 0 100 0 100 i
*>i 10.0.1.64/28 10.0.0.1 0 100 0 100 i
*>i 10.0.1.80/28 10.0.0.1 0 100 0 100 i
*>i 10.0.3.0/28 10.0.0.49 0 100 0 300 i
*>i 10.0.3.16/28 10.0.0.49 0 100 0 300 i
*>i 10.0.3.32/28 10.0.0.49 0 100 0 300 i
*>i 10.0.3.48/28 10.0.0.49 0 100 0 300 i
YoushouldseethatprefixesoriginatingontheISP1router(10.0.1.0/24prefixes)were
receivedontheR3router.
Step6
OntheR3router,verifywhichroutesareadvertisedtotherouterR4.
R3# show ip bgp neighbors 10.0.0.49 advertised-routes
BGP table version is 102, local router ID is 10.0.0.17
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.16/28 0.0.0.0 0 32768 i

Total number of prefixes 1
Youshouldseethatonlylocallyoriginatedprefix(10.0.0.16/28)isadvertisedtotheR4
router.SplithorizonrulepreventsrouterR3topassreceivedupdatesfromrouterR1to
besenttotheR4router.
Step7
OntheR4router,verifythecontentoftheBGPtable.
R4# show ip bgp
BGP table version is 81, local router ID is 10.0.0.49
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*>i 10.0.0.16/28 10.0.0.17 0 100 0 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*> 10.0.3.0/28 172.16.34.34 0 0 300 i
*> 10.0.3.16/28 172.16.34.34 0 0 300 i
*> 10.0.3.32/28 172.16.34.34 0 0 300 i
*> 10.0.3.48/28 172.16.34.34 0 0 300 i
YoushouldseethatprefixesoriginatingontheISP1router(10.0.1.0/24prefixes)werenot
receivedontheR4router.
NOTE:FortheprefixesoriginatingontheISP1routertobereceivedontheR4router,
eitherIBGPsessionbetweenR1andR4needstobeconfiguredortherouterR3should
beconfiguredastheroutereflectortobreakthesplithorizonruleforIBGPsessions.
Step8
OntheISP3Brouter,verifythecontentoftheBGPtable.
ISP3B# show ip bgp
BGP table version is 75, local router ID is 10.0.3.49
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.16/28 172.16.34.4 0 1 i
*> 10.0.0.48/28 172.16.34.4 0 0 1 i
*> 10.0.3.0/28 0.0.0.0 0 32768 i
*> 10.0.3.16/28 0.0.0.0 0 32768 i
*> 10.0.3.32/28 0.0.0.0 0 32768 i
*> 10.0.3.48/28 0.0.0.0 0 32768 i
YoushouldseeasaconsequenceoftheIBGPsplithorizonrulethatprefixesoriginating
ontheISP1router(10.0.1.0/24prefixes)werenotreceivedontheISP3Brouter.
Step9
ConfiguretheBGPclusterIDof1ontheR3router.ConfiguretheR3routertobe
routereflectorforclientrouterR1andR4.
R3(config)# router bgp 1
R3(config-router)# bgp cluster-id 1
R3(config-router)# neighbor 10.0.0.1 route-reflector-client
R3(config-router)# neighbor 10.0.0.49 route-reflector-client
NOTE:IBGPsessionisrestoredautomaticallyafterroutereflectorclientis
configuredontheroutereflectorrouter.
MonitoringRouteReflectors

MonitoringRouteReflectors
Commands that are used to monitor route reflector operation:
router# show ip bgp neighbors
Displays whether a neighbor is a route reflector client.
router# show ip bgp network/lenght
Displays the routes that are received from the client as seen on the reflector.
Displays reflected routes as seen on the client (with originator ID and cluster ID
information)
TodisplayinformationabouttheTCPandBGPconnectionstoneighbors,usethe
showipbgpneighborsEXECcommand.
show ip bgp neighbors [address]
Inthiscase,theshowipbgpneighborscommandisusedontherouternottosee
routesorpathsthathavebeenreceivedbuttoseethestatusoftheneighbor
session,sonootherqualifiersthantheoptionalIPaddressaregiven.Thecommand
thatisissuedontheroutereflectorrouter,indicatesthattheneighborisaroute
reflectorclient.
TodisplayentriesintheBGProutingtable,usetheshowipbgpEXECcommand.
show ip bgp[network/lenght [longer-prefixes]
WhendetailsaredisplayedforaspecificrouteentryintheBGPtable,theclusterlist
andoriginatorIDattributesarealsoshown.Ifyouissuethiscommandontheroute
reflector,youcouldseethataparticularentrywasreceivedfromaroutereflector
client.Ifyouissuethiscommandontheroutereflectorclient,youcouldseeentries
intheBGPtable,thatwerereflectedbytheroutereflector.
Step10
OntheR3router(whichactsasaroutereflector),verifythattheR1routerisconfiguredasroutereflector
client.
R3# show ip bgp neighbors 10.0.0.1
BGP neighbor is 10.0.0.1, remote AS 1, internal link
BGP version 4, remote router ID 10.0.0.1
BGP state = Established, up for 00:07:39
Last read 00:00:41, last write 00:00:22, hold time is 180, keepalive interval is 60 seconds
Neighbor sessions:
1 active, is not multisession capable (disabled)
Neighbor capabilities:
Route refresh: advertised and received(new)
Four-octets ASN Capability: advertised and received
Address family IPv4 Unicast: advertised and received
Enhanced Refresh Capability: advertised and received
Multisession Capability:
Stateful switchover support enabled: NO for session 1
Message statistics:
InQ depth is 0
OutQ depth is 0
Sent Rcvd
Opens: 1 1
Notifications: 0 0
Updates: 7 3
Keepalives: 10 10
Route Refresh: 0 0
Total: 18 14
Default minimum time between advertisement runs is 0 seconds
For address family: IPv4 Unicast
Session: 10.0.0.1
BGP table version 150, neighbor version 150/0
Output queue size : 0
Index 5, Advertise bit 1
Route-Reflector Client
5 update-group member

Slow-peer detection is disabled
Slow-peer split-update-group dynamic is disabled
Step11
OntheR3router(whichactsasaroutereflector),verifyadditionalinformationin
theBGPtableforprefix10.0.1.0/28,whichisoriginatedontheISP1router.Make
surethattheroutewasreceivedfromtheroutereflectorclient.
R3# show ip bgp 10.0.1.0/28
BGP routing table entry for 10.0.1.0/28, version 134
Paths: (1 available, best #1, table default)
Advertised to update-groups:
5
Refresh Epoch 1
100, (Received from a RR-client)
10.0.0.1 (metric 11) from 10.0.0.1 (10.0.0.1)
Origin IGP, metric 0, localpref 100, valid, internal, best
Step12
OntheR4router(whichactsasaroutereflectorclient),verifyadditional
informationintheBGPtableforprefix10.0.1.0/28,whichisoriginatedonthe
ISP1router.Makesurethattheroutewasreflectedfromtheroutereflector
routerR3.
R4# show ip bgp 10.0.1.0/28
BGP routing table entry for 10.0.1.0/28, version 99
Paths: (1 available, best #1, table default)
Advertised to update-groups:
6
Refresh Epoch 2
100
10.0.0.1 (metric 21) from 10.0.0.17 (10.0.0.17)
Origin IGP, metric 0, localpref 100, valid, internal, best
Originator: 10.0.0.1, Cluster list: 0.0.0.1
YoushouldseethatoriginatorofthisreflectedroutewasroutereflectorclientR1
(10.0.0.1)andtheBGPclusterIDis1.
Step13
OntheR3router,verifywhichroutesareadvertisedtotheR4router.
R3# show ip bgp neighbors 10.0.0.49 advertised-routes
BGP table version is 150, local router ID is 10.0.0.17
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*>i 10.0.0.0/28 10.0.0.1 0 100 0 i
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*>i 10.0.0.48/28 10.0.0.49 0 100 0 i
*>i 10.0.1.0/28 10.0.0.1 0 100 0 100 i
*>i 10.0.1.16/28 10.0.0.1 0 100 0 100 i
*>i 10.0.1.32/28 10.0.0.1 0 100 0 100 i
*>i 10.0.1.48/28 10.0.0.1 0 100 0 100 i
*>i 10.0.1.64/28 10.0.0.1 0 100 0 100 i
*>i 10.0.1.80/28 10.0.0.1 0 100 0 100 i
*>i 10.0.3.0/28 10.0.0.49 0 100 0 300 i
*>i 10.0.3.16/28 10.0.0.49 0 100 0 300 i
*>i 10.0.3.32/28 10.0.0.49 0 100 0 300 i
*>i 10.0.3.48/28 10.0.0.49 0 100 0 300 i
Network Next Hop Metric LocPrf Weight Path
Total number of prefixes 13
YoushouldseethatprefixesoriginatedontheISP1(10.0.1.0/24subnets)routerare
beingadvertisedfromtheR3routertotheIBGPneighborR4becauseoftherouterR3
actingasaroutereflector.

Step14
OntheR4router,verifythecontentoftheBGPtable.
R4# show ip bgp
BGP table version is 106, local router ID is 10.0.0.49
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*>i 10.0.0.0/28 10.0.0.1 0 100 0 i
*>i 10.0.0.16/28 10.0.0.17 0 100 0 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*>i 10.0.1.0/28 10.0.0.1 0 100 0 100 i
*>i 10.0.1.16/28 10.0.0.1 0 100 0 100 i
*>i 10.0.1.32/28 10.0.0.1 0 100 0 100 i
*>i 10.0.1.48/28 10.0.0.1 0 100 0 100 i
*>i 10.0.1.64/28 10.0.0.1 0 100 0 100 i
*>i 10.0.1.80/28 10.0.0.1 0 100 0 100 i
*> 10.0.3.0/28 172.16.34.34 0 0 300 i
*> 10.0.3.16/28 172.16.34.34 0 0 300 i
*> 10.0.3.32/28 172.16.34.34 0 0 300 i
*> 10.0.3.48/28 172.16.34.34 0 0 300 i
YoushouldseethatprefixesoriginatingontheISP1router(10.0.1.0/24prefixes)
werereceivedontheR4router,becausetherouterR3isconfiguredasaroutereflector.
Step15
OntheISP3Brouter,verifythecontentoftheBGPtable.
ISP3B# show ip bgp
BGP table version is 84, local router ID is 10.0.3.49
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 172.16.34.4 0 1 i
*> 10.0.0.16/28 172.16.34.4 0 1 i
*> 10.0.0.48/28 172.16.34.4 0 0 1 i
*> 10.0.1.0/28 172.16.34.4 0 1 100 i
*> 10.0.1.16/28 172.16.34.4 0 1 100 i
*> 10.0.1.32/28 172.16.34.4 0 1 100 i
*> 10.0.1.48/28 172.16.34.4 0 1 100 i
*> 10.0.1.64/28 172.16.34.4 0 1 100 i
*> 10.0.1.80/28 172.16.34.4 0 1 100 i
*> 10.0.3.0/28 0.0.0.0 0 32768 i
*> 10.0.3.16/28 0.0.0.0 0 32768 i
*> 10.0.3.32/28 0.0.0.0 0 32768 i
*> 10.0.3.48/28 0.0.0.0 0 32768 i
YoushouldseethatprefixesoriginatingontheISP1router(10.0.1.0/24prefixes)were
receivedontheISP3Brouter.

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
A proper migration plan is important because the change to BGP confederation
involves a major reconfiguration of BGP routing.
The neighbor ip-address route-reflector-client command specifies an IBGP
neighbor to be a client of this reflector
The show ip bgp neighbors command has been modified to display whether a
BGP neighbor is part of a BGP confederation.
Summary

Overview
Thistopicsummarizesthekeypointsthatwerediscussedinthismodule.
Service providers use an IGP to carry internal routes and to provide optimal
routing between POPs, the information that is needed for IBGP sessions to be
established, and the addresses that are required for BGP next-hop resolution.
Route reflectors enable BGP routing information to be distributed in a fashion
that does not require a physical fully meshed network.
Route reflector clusters can be built in hierarchies. A router that is a route
reflector in one cluster can act as a client in another cluster.
There are only two Cisco IOS commands that are used to configure route
reflectors: bgp cluster-id and neighbor ip-address route-reflector-client.
ModuleSummary
Usethequestionsheretoreviewwhatyoulearnedinthismodule.Thecorrect
answersandsolutionsarefoundintheModuleSelf-CheckAnswerKey.
ModuleSelf-Check

1. Whichthreecharacteristicsarecommontotypicalserviceprovider
networks?(Choosethree.)(Source:"ScalingIGPandBGPin
ServiceProviderNetworks")
TheprovidernetworkusestwoIGPs,oneforcustomerroutesandonefor
internalproviderroutes.
ServiceprovidersexchangerouteswithotherprovidersusingBGP.
ServiceprovidersrunIBGPwithintheirnetworkinadditiontotheirIGP
requirements.
ServiceproviderstypicallyuseeitherstaticroutesorEBGPwiththeir
customers.

1. WhatisthetypicalroleofanIGPwithinaserviceprovidernetwork?
(Source:"ScalingIGPandBGPinServiceProviderNetworks")
TheIGPcarriescustomerroutesforredistributionintoBGPattheprovider
edge.
TheIGPadvertisesadefaultroutetocustomersoftheserviceprovider.
TheIGPresolvesnext-hopIPaddresses.
TheIGPcarriesBGProutesacrosstheprovidernetwork.

1. TheIGPprotocolisnotneededintheserviceprovidernetwork,as
informationaboutnexthopattributegetsadvertisedviaBGP
updates.Trueorfalse?(Source:"ScalingIGPandBGPinService
ProviderNetworks")
true
false

1. WhyshouldyouavoidtheuseofprivateIPaddressinginservice
providernetworks?(Source:"ScalingIGPandBGPinService
ProviderNetworks")
Privateaddressingcanpreventcustomernetworktroubleshootingutilities
suchastraceroutefromfunctioningcorrectly.
PrivateIPaddressingisnotallowedontheInternetandwillnotfunctionin
aserviceprovidernetwork.
PrivateIPaddressingpreventstheserviceproviderfromproperly
summarizingcustomerroutesifitisalsousingprivateaddressspace.
PrivateIPaddressingpreventsserviceproviderapplicationssuchas
MPLSfromoperatingproperlyinanInternet-supportingenvironment.

1. InserviceprovidernetworkItisrecommendedtotoredistributeBGP
routesintoIGPprotocol.Trueorfalse?(Source:"ScalingIGPand
BGPinServiceProviderNetworks")
true
false

1. WhenusingnexthopselffeatureonthePErouterintheservice
providernetwork,IGPcanberelievedoftheburdenofcarrying
informationabouttheaccesslink.Trueorfalse?(Source:"Scaling
IGPandBGPinServiceProviderNetworks")
true
false

1. WhichthreerequirementsarekeytoproperlyscalingBGPina
serviceproviderenvironment?(Choosethree.)(Source:"Scaling
IGPandBGPinServiceProviderNetworks")
IBGPfull-meshscalingtoolstoreduceduplicatetrafficwithintheAS
summarizationofcustomerroutestoreducethenumberofprefixesthat
arecarried
improvementinBGPconvergencetimebyusingtheIGPforroute
propagationwithintheproviderAS
properscalingoftheAS-wideroutingpolicytoeaseadministrationand
maintenancerequirements

1. WhichthreerequirementsarekeytoproperlyscalingBGPina
serviceproviderenvironment?(Choosethree.)(Source:"Scaling
IGPandBGPinServiceProviderNetworks")
IBGPfull-meshscalingtoolstoreduceduplicatetrafficwithintheAS
summarizationofcustomerroutestoreducethenumberofprefixesthat
arecarried
improvementinBGPconvergencetimebyusingtheIGPforroute
propagationwithintheproviderAS
properscalingoftheAS-wideroutingpolicytoeaseadministrationand
maintenancerequirements

1. InthetraditionalBGPapproach,ensuringconsistentrouting
informationwasachievedbyestablishingafullmeshofIBGP
sessionsbetweenallrouterswithintheAS.Trueorfalse?(Source:
"ScalingIGPandBGPinServiceProviderNetworks")
true
false

1. WhatisthemainproblemthatissolvedbyimplementingBGProute
reflectors?(Source:"IntroducingandDesigningRouteReflectors")
thelargenumberofroutesthatarecarriedintheIGPwhenBGPis
deployed
theabilityofBGPtoscaleasingleASinalargenetwork
theneedforahomogeneousmethodofapplyingpoliciestoroutesthatare
carriedthroughanAS
theabilitytosupportservice-levelparameterswithgreaterease

1. HowdoesaroutereflectormodifytheIBGPsplit-horizonrule?
(Source:"IntroducingandDesigningRouteReflectors")
forwardsEBGPupdatestoallpeers(IBGPandEBGP)
treatsallneighborsasEBGPpeers,whicheliminatestheIBGPmesh
requirements
forwardsIBGPupdatesfromclientstootherIBGPneighbors
appendsthecluster-IDtotheASpath,whichallowspeerstobetreatedas
EBGPneighbors

1. WhenincomingBGPupdateisreceivedfromEBGPpeeronroute
reflector,theupdateisforwardedtobothIBGPandEBGPpeers.
Trueorfalse?(Source:"IntroducingandDesigningRoute
Reflectors")
true
false

1. Whyareredundantroutereflectorsmandatoryinanyhigh-
availabilitynetworkdesign?(Source:"IntroducingandDesigning
RouteReflectors")
Allneighborspeerwiththeroutereflector,andalargenumberof
neighborscanmaketheroutereflectorrouterunstable.
EBGPpeerscaninjectBGPupdatesintotheASonlythroughtheroute
reflector.
Routereflectorsmaintainmoreroutinginformation,whichmakesthem
morepronetocongestionandfailure.
ClientscanformIBGPrelationshipsonlywiththeroutereflector.

1. Whatisthemainreasonforimplementingredundantroutereflectors
withclusters?(Source:"IntroducingandDesigningRoute
Reflectors")
toeliminateroutingloopsinredundantconfigurations
tolimitthenumberofneighborsessionswitheachroutereflector
toprovideanotherscalabilitymechanismtargetedatremovingtheIBGP
full-meshrequirement
toenhancesecuritywithintheAS

1. Howdoestheoriginator-IDattributeassistintheeliminationof
routingloopsthatarecausedbyredundantroutereflectordesigns?
(Source:"IntroducingandDesigningRouteReflectors")
Iftheoriginator-IDmatchestherouter-IDofthereflector,localpreference
issetontheroutetomakeitabackup.
Theoriginator-IDattributeissettothecluster-IDtoensurethataroute
traversestheASonlyonetime.
Arouterthatreceivesarouteinwhichtheoriginator-IDmatchesitsrouter-
IDwillignorethatroute.
Theoriginator-IDallowstheroutertoknowiftherouteoriginatedlocallyor
fromanexternalsourcesothatadministrativedistancerulesfortheroute
canbeverified.

1. WhatcanoccurifaclienthasIBGPneighborrelationshipswithother
routersthatarenotconfiguredasroutereflectors?(Source:
"IntroducingandDesigningRouteReflectors")
Thisisaninvalidconfiguration.
Theclientwillnotifytheroutereflectorandbepromotedtoaroutereflector
aswell.
RoutingblackholescanoccurandcauselosttrafficinsidetheAS.
Unnecessaryroutingtrafficwillbegenerated.

1. WhichpotentialproblemcanoccurifaclientdoesnothaveanIBGP
sessionwithallroutereflectorsinacluster?(Source:"Introducing
andDesigningRouteReflectors")
Thisisaninvalidconfiguration.
TheclientmightnotreceiveallBGProutes.
EBGProutesthatarereceivedbytheclientwillnotbedistributedproperly
throughouttheAS.
Duplicateroutingtrafficwillbesenttotheclient.

1. Whichproblemarehierarchicalroutereflectorsdesignedtosolve?
(Source:"IntroducingandDesigningRouteReflectors")
lackofaconsistentapplicationofsecurityandroutingpoliciesthroughout
theAS
scalabilityofautonomoussystemsinverylargeroutingdomains
routingloopscausedbyredundantclusterconfigurations
administrativeoverheadwhenyouareimplementingrouterreflector
networkdesigns

1. WhichtwoBGPparametersdoyouhavetoconfigureonaroute
reflector?(Choosetwo.)(Source:"ConfiguringandMonitoringRoute
Reflectors")
cluster-ID
originator-ID
cluster-list
routereflectorclients

1. Whatarethreemigrationstepsthatarerequiredtoconvertfroma
fullymeshedIBGPAStoanASthatisbasedonroutereflectors?
(Choosethree.)(Source:"ConfiguringandMonitoringRoute
Reflectors")
removeunnecessaryIBGPsessions
configuretheclientsontheroutereflectors
configureIBGPsessionsbetweenroutereflectorclients
configurethecluster-IDontheroutereflectors

1. Whichcommandshouldyouusetoidentifyroutereflectorclients
withoutinspectingtherouterconfiguration?(Source:"Configuring
andMonitoringRouteReflectors")
showipbgpprefix
showipbgpneighbors
showipbgpclients
showipbgpsummary

1. Thecommandneighborip-addressroute-reflector-
clientcommandshouldbeusedonclient.Trueorfalse?(Source:
"ConfiguringandMonitoringRouteReflectors")
true
false

1. Whichthreecharacteristicsarecommontotypicalserviceprovider
networks?(Choosethree.)(Source:"ScalingIGPandBGPin
ServiceProviderNetworks")
TheprovidernetworkusestwoIGPs,oneforcustomerroutesandonefor
internalproviderroutes.
ServiceprovidersexchangerouteswithotherprovidersusingBGP.
ServiceprovidersrunIBGPwithintheirnetworkinadditiontotheirIGP
requirements.
ServiceproviderstypicallyuseeitherstaticroutesorEBGPwiththeir
customers.
AnswerKey

1. WhatisthetypicalroleofanIGPwithinaserviceprovidernetwork?
(Source:"ScalingIGPandBGPinServiceProviderNetworks")
TheIGPcarriescustomerroutesforredistributionintoBGPattheprovider
edge.
TheIGPadvertisesadefaultroutetocustomersoftheserviceprovider.
TheIGPresolvesnext-hopIPaddresses.
TheIGPcarriesBGProutesacrosstheprovidernetwork.

1. TheIGPprotocolisnotneededintheserviceprovidernetwork,as
informationaboutnexthopattributegetsadvertisedviaBGP
updates.Trueorfalse?(Source:"ScalingIGPandBGPinService
ProviderNetworks")
true
false

1. WhyshouldyouavoidtheuseofprivateIPaddressinginservice
providernetworks?(Source:"ScalingIGPandBGPinService
ProviderNetworks")
Privateaddressingcanpreventcustomernetworktroubleshootingutilities
suchastraceroutefromfunctioningcorrectly.
PrivateIPaddressingisnotallowedontheInternetandwillnotfunctionin
aserviceprovidernetwork.
PrivateIPaddressingpreventstheserviceproviderfromproperly
summarizingcustomerroutesifitisalsousingprivateaddressspace.
PrivateIPaddressingpreventsserviceproviderapplicationssuchas
MPLSfromoperatingproperlyinanInternet-supportingenvironment.

1. InserviceprovidernetworkItisrecommendedtotoredistributeBGP
routesintoIGPprotocol.Trueorfalse?(Source:"ScalingIGPand
BGPinServiceProviderNetworks")
true
false

1. WhenusingnexthopselffeatureonthePErouterintheservice
providernetwork,IGPcanberelievedoftheburdenofcarrying
informationabouttheaccesslink.Trueorfalse?(Source:"Scaling
IGPandBGPinServiceProviderNetworks")
true
false

1. WhichthreerequirementsarekeytoproperlyscalingBGPina
serviceproviderenvironment?(Choosethree.)(Source:"Scaling
IGPandBGPinServiceProviderNetworks")
IBGPfull-meshscalingtoolstoreduceduplicatetrafficwithintheAS
summarizationofcustomerroutestoreducethenumberofprefixesthat
arecarried
improvementinBGPconvergencetimebyusingtheIGPforroute
propagationwithintheproviderAS
properscalingoftheAS-wideroutingpolicytoeaseadministrationand
maintenancerequirements

1. WhichthreerequirementsarekeytoproperlyscalingBGPina
serviceproviderenvironment?(Choosethree.)(Source:"Scaling
IGPandBGPinServiceProviderNetworks")
IBGPfull-meshscalingtoolstoreduceduplicatetrafficwithintheAS
summarizationofcustomerroutestoreducethenumberofprefixesthat
arecarried
improvementinBGPconvergencetimebyusingtheIGPforroute
propagationwithintheproviderAS
properscalingoftheAS-wideroutingpolicytoeaseadministrationand
maintenancerequirements

1. InthetraditionalBGPapproach,ensuringconsistentrouting
informationwasachievedbyestablishingafullmeshofIBGP
sessionsbetweenallrouterswithintheAS.Trueorfalse?(Source:
"ScalingIGPandBGPinServiceProviderNetworks")
true
false

1. WhatisthemainproblemthatissolvedbyimplementingBGProute
reflectors?(Source:"IntroducingandDesigningRouteReflectors")
thelargenumberofroutesthatarecarriedintheIGPwhenBGPis
deployed
theabilityofBGPtoscaleasingleASinalargenetwork
theneedforahomogeneousmethodofapplyingpoliciestoroutesthatare
carriedthroughanAS
theabilitytosupportservice-levelparameterswithgreaterease

1. HowdoesaroutereflectormodifytheIBGPsplit-horizonrule?
(Source:"IntroducingandDesigningRouteReflectors")
forwardsEBGPupdatestoallpeers(IBGPandEBGP)
treatsallneighborsasEBGPpeers,whicheliminatestheIBGPmesh
requirements
forwardsIBGPupdatesfromclientstootherIBGPneighbors
appendsthecluster-IDtotheASpath,whichallowspeerstobetreatedas
EBGPneighbors

1. WhenincomingBGPupdateisreceivedfromEBGPpeeronroute
reflector,theupdateisforwardedtobothIBGPandEBGPpeers.
Trueorfalse?(Source:"IntroducingandDesigningRoute
Reflectors")
true
false

1. Whyareredundantroutereflectorsmandatoryinanyhigh-
availabilitynetworkdesign?(Source:"IntroducingandDesigning
RouteReflectors")
Allneighborspeerwiththeroutereflector,andalargenumberof
neighborscanmaketheroutereflectorrouterunstable.
EBGPpeerscaninjectBGPupdatesintotheASonlythroughtheroute
reflector.
Routereflectorsmaintainmoreroutinginformation,whichmakesthem
morepronetocongestionandfailure.
ClientscanformIBGPrelationshipsonlywiththeroutereflector.

1. Whatisthemainreasonforimplementingredundantroutereflectors
withclusters?(Source:"IntroducingandDesigningRoute
Reflectors")
toeliminateroutingloopsinredundantconfigurations
tolimitthenumberofneighborsessionswitheachroutereflector
toprovideanotherscalabilitymechanismtargetedatremovingtheIBGP
full-meshrequirement
toenhancesecuritywithintheAS

1. Howdoestheoriginator-IDattributeassistintheeliminationof
routingloopsthatarecausedbyredundantroutereflectordesigns?
(Source:"IntroducingandDesigningRouteReflectors")
Iftheoriginator-IDmatchestherouter-IDofthereflector,localpreference
issetontheroutetomakeitabackup.
Theoriginator-IDattributeissettothecluster-IDtoensurethataroute
traversestheASonlyonetime.
Arouterthatreceivesarouteinwhichtheoriginator-IDmatchesitsrouter-
IDwillignorethatroute.
Theoriginator-IDallowstheroutertoknowiftherouteoriginatedlocallyor
fromanexternalsourcesothatadministrativedistancerulesfortheroute
canbeverified.

1. WhatcanoccurifaclienthasIBGPneighborrelationshipswithother
routersthatarenotconfiguredasroutereflectors?(Source:
"IntroducingandDesigningRouteReflectors")
Thisisaninvalidconfiguration.
Theclientwillnotifytheroutereflectorandbepromotedtoaroutereflector
aswell.
RoutingblackholescanoccurandcauselosttrafficinsidetheAS.
Unnecessaryroutingtrafficwillbegenerated.

1. WhichpotentialproblemcanoccurifaclientdoesnothaveanIBGP
sessionwithallroutereflectorsinacluster?(Source:"Introducing
andDesigningRouteReflectors")
Thisisaninvalidconfiguration.
TheclientmightnotreceiveallBGProutes.
EBGProutesthatarereceivedbytheclientwillnotbedistributedproperly
throughouttheAS.
Duplicateroutingtrafficwillbesenttotheclient.

1. Whichproblemarehierarchicalroutereflectorsdesignedtosolve?
(Source:"IntroducingandDesigningRouteReflectors")
lackofaconsistentapplicationofsecurityandroutingpoliciesthroughout
theAS
scalabilityofautonomoussystemsinverylargeroutingdomains
routingloopscausedbyredundantclusterconfigurations
administrativeoverheadwhenyouareimplementingrouterreflector
networkdesigns

1. WhichtwoBGPparametersdoyouhavetoconfigureonaroute
reflector?(Choosetwo.)(Source:"ConfiguringandMonitoringRoute
Reflectors")
cluster-ID
originator-ID
cluster-list
routereflectorclients

1. Whatarethreemigrationstepsthatarerequiredtoconvertfroma
fullymeshedIBGPAStoanASthatisbasedonroutereflectors?
(Choosethree.)(Source:"ConfiguringandMonitoringRoute
Reflectors")
removeunnecessaryIBGPsessions
configuretheclientsontheroutereflectors
configureIBGPsessionsbetweenroutereflectorclients
configurethecluster-IDontheroutereflectors

1. Whichcommandshouldyouusetoidentifyroutereflectorclients
withoutinspectingtherouterconfiguration?(Source:"Configuring
andMonitoringRouteReflectors")
showipbgpprefix
showipbgpneighbors
showipbgpclients
showipbgpsummary

1. Thecommandneighborip-addressroute-reflector-
clientcommandshouldbeusedonclient.Trueorfalse?(Source:
"ConfiguringandMonitoringRouteReflectors")
true
false

Introduction
BGPisdesignedforreliabilityandscalability.Assuch,ithasbecomethestandard
protocolthatisusedtocarrythemorethan600,000prefixesintheInternettoday.
BGPalsohasatremendousamountofflexibilitywithregardtoadministrativepolicy
controls,routeselection,performancetuning,andscalabilityfeatures.
YouwilllearnaboutadvancedBGPconfigurationtoolsthataredesignedtoimprove
BGPscalabilityandperformance.Toolsthatarediscussedinthismoduleinclude
convergencetimereductionfeatures,limitingthenumberofprefixes,peergroups,
androutedampening.
Uponcompletingthismodule,youwillbeableto:
ConfigureCiscoIOSperformanceimprovementstoreduceBGPconvergence
time
ConfigureBGPtolimitthenumberofprefixesthatarereceivedfromaneighbor
UseBGPpeergroupstosharecommonconfigurationparametersbetween
multipleBGPpeers
Useroutedampeningtominimizetheimpactofunstableroutes
OptimizingBGPScalability

Overview
AsthenumberofroutesintheInternetincreases,demandsonrouterCPUand
memoryresourcesontherouterinaserviceproviderwillincrease.BGPprocessing
affectsbothrouterresourcesandnetworkconvergencetime.Itisimportantthatthe
networkconvergenceisasfastaspossibletoensureaccurateroutinginformation
betweendomains.Itisalsoimportantthatrouterresourcesareoptimizedwhenever
possible.CiscoIOSperformanceimprovementsforBGParedesignedtoaid
networkadministratorsinachievingthesegoals.
Inthislesson,youwilllearnaboutvariousCiscoIOSperformanceimprovements
thathavebeendesignedtoreduceBGPconvergencetime.Includedinthislesson
arediscussionsofconvergence,BGProutingprocesses,andtheeffectsofBGP
routingprocessesonrouterCPUresources.Thelessonalsodiscussesthe
commandsthatarerequiredtoconfigureandmonitorBGPforvariousCiscoIOS
performanceimprovements.ImprovementsthatarementionedarePMTUdiscovery,
inputholdqueue,BGPPIC,BFD,BGPNSFawareness,BGPscantime,
advertisementinterval,keepalive,andhold-downtimers.
Uponcompletingthislesson,youwillbeableto:
DescribeconvergenceinBGPnetworks
DescribetheBGProuterprocessesandtheirfunctions
DescribetheeffectsofBGPprocessesonrouterCPUresources
DescribethefeaturesthatcanbeusedtoimproveBGPconvergence
DescribeusingPMTUdiscovery
Describeincreasingtheinputqueuedepth
DescribetheBGPprefixindependentconvergencefeatureandconfiguration
DescribetheBGPBFDfeatureandconfiguration
DescribethefunctionoftheBGPNonstopForwardingAwarenessfeature
ExplainBGPscantimerconfiguration
ExplainBGPadvertisementintervalconfiguration
ExplainBGPkeepaliveandhold-downtimerconfiguration
ImprovingBGPConvergence

AsthenumberofroutesintheInternetroutingtablegrows,serviceprovidersand
largeenterprisecustomersareexperiencingadramaticincreaseinthetimethat
BGPtakestoconverge.Networksthatonceconvergedin10or15minutesmaynow
takeuptoanhourinsomecases,andevenlongerinextremesituations.Ingeneral,
convergenceisdefinedastheprocessofbringingallroutingtablestoastateof
consistency.
As the number of routes in the Internet routing table grows, the time it takes for
BGP to converge increases.
The Internet currently contains more than 300,000 prefixes.
Network convergence times can range from 10 minutes to more than 1 hour.
BGP is considered converged when:
All routes have been accepted.
All routes have been installed in the routing table.
The input queue and output queue for all peers is 0.
The table version for all peers equals the table version of the BGP table.
TheBGProutingprotocolisconsideredconvergedwhenthefollowingconditionsare
true:
Allrouteshavebeenaccepted.
Allrouteshavebeeninstalledintheroutingtable.
Theinputqueueandoutputqueueforallpeersis0.
ThetableversionforallpeersequalsthetableversionoftheBGPtable.
Convergencetimeisanimportantconsiderationinanetwork,because
nonconvergednetworkscancauseroutingloops,packetdelays,andevenpacket
lossasaresultofblackholes.
BGPConvergence

Ingeneral,aCiscoIOSprocessconsistsoftheindividualthreadsandassociated
datathatperformroutertasks,suchassystemmaintenance,packetswitching,and
implementingroutingprotocols.
BGPconsistsofseveralprocesses,eachofthemrunningatdifferenttimes,
dependingonthetaskthatishandles.
Process Description Interval
BGPopen PerformsBGPpeerestablishment. Atinitialization,whenestablishinga
TCPconnectionwithaBGPpeer.
BGPI/O HandlesqueuingandprocessingofBGP
packets(updatesandkeepalives).
AsBGPcontrolpacketsare
received.
BGPscanner WalkstheBGPtableandconfirms
reachabilityofthenexthops.BGP
scanneralsochecksconditional
advertisementtodeterminewhether
BGPshouldadvertiseconditionprefixes.
Performsroutedampening.
Every60seconds.
BGProuter CalculatesthebestBGPpathand
processesanyroutechanges.Italso
sendsandreceivesroutes,establishes
peers,andinteractswiththerouting
informationbase.
Oncepersecondandwhenadding,
removing,orsoft-reconfiguringa
BGPpeer.
BGP scanner and BGP router are responsible for many calculations and can
lead to high CPU utilization.
SeveralprocessesthatareexecutedontherouterenableBGPtorun.Youcanuse
theshowprocesscpu|includeBGPcommandtoseethevolumeofCPU
resourcesthatareconsumed(utilization)becauseofrunningBGPprocesses.
Athreadisaninformationplaceholderthatallowsasingle
processtobehalted(interrupted)ontheroutersothatthe
CPUcanserviceanotherprocess.Theinformationthatis
containedwithinthethreadallowstheinterruptedprocess
torestartexactlywhereitleftoffwhentheCPUisreadyto
continuetoservicethatprocessthread.
ThefigureliststhefunctionofeachoftheBGProuterprocessesandhowofteneach
processisexecutedontherouter.Itshowsthateachprocessrunsatdifferenttimes,
dependingonthetasksthatthisspecificprocesshandles.BecauseBGPscanner
andBGProuterareresponsibleformanycalculations,youmaynoticehighCPU
utilizationduringtherunningofeitheroneoftheseprocesses.
BGPProcesses

RunningBGProuterprocessesaffectsrouterCPUresources.
BGP scanner process:
High CPU utilization stemming from the BGP scanner process can be expected
for short durations on a router carrying a large Internet routing table.
While the BGP scanner runs, low-priority processes need to wait a longer time
to access the CPU.
BGP router process:
The BGP router process runs about once per second to check for work.
The BGP router consumes all free CPU cycles.
OnroutersthatcarryalargeInternetroutingtable,youcanexpecthighCPU
utilizationstemmingfromtheBGPscannerprocessforshortperiodsoftime.Once
perminute,theBGPscanner"walks"(scans)theBGProutingtableandperforms
importantmaintenancetasks.Thesetasksincludecheckingthenexthopthatis
referencedintheBGPtableoftherouterandverifyingthatthenext-hopdevicescan
bereached.Thus,alargeBGPtabletakesanequallylargeamountoftimetobe
walkedandvalidated.
TheBGPscannerwalkstheBGProutingtabletoupdateanydatastructuresand
walksthetableforrouteredistributionpurposes.Inthiscontext,theroutingtableis
alsoknownastheRIB,whichtherouteroutputswhentheshowiproutecommand
isexecuted.Bothtablesarestoredseparatelyintheroutermemoryandcanbevery
large,thusconsumingCPUandmemoryresources.
TheBGPscannerrunsthroughtheentireBGPtable.Sothedurationofthehigh
CPUutilizationconditionthattheBGPscannerprocesscausesvarieswiththe
numberofneighborsandthenumberofroutesthatarelearnedperneighbor.
WhiletheBGPscannerruns,low-priorityprocessesneedtowaitalongertimeto
accesstheCPU.Onelow-priorityprocesscontrolsICMPpacketssuchaspings.
Packetsthataredestinedtoorhaveoriginatedfromtheroutermayexperience
higherthanexpectedlatencybecausetheICMPprocessmustwaitbehindtheBGP
scanner.TheBGPscannerprocessrunsforsometime,andissuspended,then
ICMPrunsandissuspended,thentheBGPscannerruns,andsoon.Incontrast,
pingssentthrougharoutershouldbeswitchedviaCiscoExpressForwarding(CEF)
andshouldnotexperienceanyadditionallatency.Whenyouaretroubleshooting
periodicspikesinlatency,compareforwardingtimesforpacketsthatareforwarded
througharouterversuspacketsthatareprocesseddirectlybytheCPUonthe
router.
TheBGProuterprocessrunsaboutoncepersecondtocheckforwork.BGP
convergencedefinesthedurationbetweenthetimewhenthefirstBGPpeeris
establishedandthepointatwhichBGPisconverged.Toensuretheshortest
possibleconvergencetimes,theBGProuterconsumesallfreeCPUcycles.
However,afteritstarts,itrelinquishes(orsuspends)theCPUintermittently.
CPUEffectsofBGPProcessesExample
ConvergencetimeisadirectmeasurementofhowlongtheBGProuterprocessruns
ontheCPU,notthetotaltimethattheprocessisactuallyrunning.Thisexample
investigatesthehighCPUutilizationconditiononarouterduringBGPconvergence
asBGPexchangesprefixeswithtwoEBGPpeers.
CaptureabaselinefornormalCPUutilizationbeforestartingthetest.
R1# show process cpu
CPU utilization for five seconds: 0%/0%; one minute: 4%; five minutes: 5%
Aftertheteststarts,theCPUreaches100percentutilization.Theshow
processcpucommandshowsthattheBGProutercauseshighCPUcondition,
denotedby139(theCiscoIOSprocessIDfortheBGProuter)inthefollowing
output:
R1# show process cpu
CPU utilization for five seconds: 100%/0%; one minute: 99%; five minutes:
81%
[output omitted] 139 6795740 1020252 6660 88.34% 91.63% 74.01% 0
BGP Router
CPUEffectsofBGPProcesses

Monitortherouterbycapturingmultipleoutputsoftheshowipbgpsummary
andshowprocesscpucommandsduringtheevent.Theshowipbgp
summarycommandcapturesthestateoftheBGPneighbors.
R1# show ip bgp summary
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxR
cd
192.168.12.2 4 64512 309453 157389 19981 0 253 22:06:44 11163
3
172.16.11.11 4 65101 188934 1047 40081 41 0 00:07:51 58
430
WhentheroutercompletesprefixexchangewithitsBGPpeers,theCPU
utilizationratesshouldreturntonormallevels.Thecomputed1-minuteand5-
minuteaverageswillsettlebackdownaswellbutmayshowhigherthannormal
levelsforalongerperiodthanthe5-secondrate.
R1# show process cpu
CPU utilization for five seconds: 3%/0%; one minute: 82%; five minutes: 91
%
UsingtheoutputfromtheshowcommandswillallowyoutocomputetheBGP
convergencetime.Inparticular,theUp/Downcolumnoftheshowipbgp
summarycommandiscomparedtothestartandstoptimesofthehighCPU
utilizationcondition.Typically,BGPconvergencecantakeseveralminuteswhen
routersexchangealargeInternetroutingtable.

BGPconvergencecanoftenbeanissueinnetworksrequiringquickpropagationof
routinginformation.
Queuing to TCP peer connections
BGP automatically queues data aggressively from the BGP output queue
Deploy BGP peer groups
Simplifies BGP configuration and enhances BGP scalability.
Enable the path MTU feature
Improves efficiency by dynamically determining the largest MTU that you
can use without creating packets that need to be fragmented.
Implement BFD:
Reduces BGP convergence by fast detection of neighbor failure.
Implement BGP PIC:
Reduces convergence by storing BGP backup/alternate path in RIB and FIB.
Increase interface input queues
Improves convergence by reducing dropped TCP ACKs.
Enable BGP NSF Awareness feature
Forwards packets even during failure and thus, saves resources.
ToreduceBGPconvergencetimeandthehighCPUutilizationthatarunningBGP
processcauses,thefollowingperformanceimprovementfeaturesareavailable:
QueuingtoTCPpeerconnections:Insteadofqueuingdataoncepersecond,
BGPnowqueuesdataaggressivelyfromtheBGPoutputqueuetotheTCP
socketforeachpeeruntiltheoutputqueueshavedrainedcompletely.Because
BGPnowsendsatafasterrate,itconvergesmorequickly.
BGPpeergroups:ThemajorbenefitofspecifyingaBGPpeergroupisthatit
reducesthevolumeofsystemresources(CPUandmemory)thatareusedin
BGPupdategeneration.PeergroupsalsosimplifyBGPconfiguration.Many
repetitiveconfigurationelements(suchasfilters)areappliedbytherouteronly
once(tothepeergroup)insteadofapplyingthemtoeachneighbor.Peergroups
allowtheroutingtabletobecheckedonlyonceandallowupdatestobe
replicatedtoallotherin-syncpeergroupmembers.Itdependsonthenumberof
peergroupmembers,thenumberofprefixesinthetable,andthenumberof
prefixesthatareadvertised.Consequentlytheycansignificantlyreducerouter
resourcerequirements.
BidirectionalForwardingDetection:BFDisadetectionprotocoldesignedto
providefastforwardingpathfailuredetectiontimesforallmediatypes,
encapsulations,topologies,androutingprotocols.
BGPPrefixIndependentConvergence:TheBGPPICfeatureimprovesBGP
convergenceafteranetworkfailure.Thisconvergenceisapplicabletobothcore
andedgefailuresandcanbeusedinbothIPandMPLSnetworks.TheBGPPIC
featurecreatesandstoresabackup/alternatepathintheRIB,FIB,andCisco
ExpressForwarding(CEF).Whenafailureisdetected,thebackup/alternate
pathcanimmediatelytakeover,thusenablingfastfailover.
PathMTUfeature:AllTCPsessionsareboundedbyalimitonthenumberof
bytesthatasinglepacketcantransport.Thislimit,whichisknownastheMSS,
is536bytesbydefault.Inotherwords,TCPbreaksuppacketsinatransmit
queueinto536-bytechunksbeforepassingpacketsdowntotheIPlayer.The
advantageofa536-byteMSSisthatpacketsarenotlikelytobefragmentedat
anIPdevicealongthepathtothedestination,becausemostlinksuseanMTU
ofatleast1500bytes.Thedisadvantageisthatsmallerpacketsincreasethe
amountofbandwidththatisusedfortransportoverhead.
BecauseBGPbuildsaTCPconnectiontoallpeers,a536-byteMSSaffects
BGPconvergencetimes.ThesolutionistoenablethePMTUfeature.Youcan
usethisfeaturetodynamicallydeterminehowlargetheMSSvaluecanbe
withoutcreatingpacketsthatneedtobefragmented.PMTUallowsTCPto
determinethesmallestMTUsizeamongalllinksinaTCPsession.TCPthen
usesthisMTUvalue,minusroomfortheIPandTCPheaders,astheMSSfor
thesession.
Increaseinterfaceinputqueues:IfBGPisadvertisingthousandsofroutesto
manyneighbors,TCPmusttransmitthousandsofpackets.BGPpeersreceive
thesepacketsandsendTCPACKstotheadvertisingBGPspeaker,causingthe
BGPspeakertoreceiveafloodofTCPACKsinashorttime.IftheACKsarrive
ImprovingBGPConvergence

ataratethatistoohighfortherouterCPU,packetsbackupininboundinterface
queues.Bydefault,routerinterfacesuseaninputqueuesizeof75packets.In
addition,specialcontrolpacketssuchasBGPupdatesuseaspecialqueuewith
SPD.Thisspecialqueueholds100packets.DuringBGPconvergence,TCP
ACKscanquicklyfillthe175spotsofinputbuffering,causingnewlyarriving
packetstobedropped.Onrouterswith15ormoreBGPpeersthatalso
exchangethefullInternetroutingtable,morethan10,000dropsperinterface
perminutemaybeseen.Increasingtheinterfaceinputqueuedepthhelps
reducethenumberofdroppedTCPACKs,reducingtheamountofworkthat
BGPmustdotoconverge.
BGPNonstopForwardingAwarenessfeature:NSFawarenessallowsaNSF-
awareroutertoassistNSF-capableandNSF-awareneighborstocontinue
forwardingpacketsduringaswitchoveroperationorduringawell-knownfailure
condition.Therouter-holdtimersetsthemaximumtimethattheNSF-aware
routerwillholdknownroutesforanNSF-capableneighbor.Thedeploymentof
BGPNSFawarenesscanimprovetheoverallnetworkstabilitybyreducingthe
amountofresourcesthatarenormallyrequiredforreestablishingpeeringwitha
failedrouter.
BGP convergence can also be improved to some extent by:
Lowering scan time interval for the BGP scanner process.
Lowering advertisement interval between BGP neighbors.
Lowering keepalive and hold-down timers.
Limitation:
Not recommended in routers dealing with large BGP tables.
Could lead to CPU or memory exhaustion.
Lower hold-down timers could lead to undesired session terminations.
YoualsoneedtoimproveBGPconvergenceincertainscenarios;forexample,in
networksusingtheconditionaladvertisementfeature.TherearefourextraBGP
parametersthatyoucanusetoinfluenceBGPconvergencespeed:
Scantime:ControllingtheBGPscannerprocess,responsibleforverifying
informationintheBGPtable
Advertisementinterval:Controllingtherateatwhichsuccessive
advertisementsaresenttoaBGPneighbor
Keepalivetimers:ControllingtheBGPsessionbysendingkeepalivemessages
atspecifictimeinterval.
Hold-downtimers:ControllingtheBGPsessionbywaitingforsuccessive
keepalivemessagefromaBGPneighbor.
Networkadministratorsmusttakecarewhenconfiguringtheseparameters.Setting
thevaluestoolowforaspecificnetworkenvironmentcouldleadtoasignificant
consumptionofrouterresources.ThelargertheBGPtablesandthemoreunstable
theBGPnetwork,thegreaterthedangerofexhaustingtheresourcesofarouter.
Loweringthekeepaliveandhold-downtimerscouldleadtoundesiredsession
terminationswhenkeepalivesarenotreceivedduetonetworkcongestion.

PMTUdiscoveryfeaturecanbeusedtoreduceBGPconvergence.PMTUdiscovery
isamethodformaximizingtheuseofavailablebandwidthinthenetworkbetween
theendpointsofaTCPconnection.
PMTU discovery is used to automatically determine TCP MSS used for TCP
connections from a router.
Prior to Cisco IOS Release 15.0, the default TCP MSS value for BGP was 536
bytes.
From Cisco IOS Release 15.0, PMTU is enabled by default.
Small TCP MSS affects BGP convergence:
Higher TCP MSS can improve BGP convergence.
router(config)# ip tcp path-mtu-discovery [age-timer {minutes | infinite}]
The command enables the PMTU discovery feature for all new TCP connections
from the router.
The age timer is a time interval for how often TCP re-estimates the path
MTU with a larger MSS (default is 10 minutes).
PMTUdiscoveryworksbysettingtheDFoptionbitintheIPheadersofoutgoing
packets.Then,anydevicealongthepathwhoseMTUissmallerthanthepacketwill
dropit.ThenitwillsendbackanICMPFragmentationNeeded(Type3,Code4)
messagecontainingitsMTU,allowingthesourcehosttoreduceitsPMTU
appropriately.TheprocessrepeatsuntiltheMTUissmallenoughtotraversethe
entirepathwithoutfragmentation.
ThedefaultTCPMSSforBGPtrafficis536bytes.EnablingPMTUdiscovery,and
thususingahigherMSSforBGPtraffic,cansignificantlyimproveBGP
convergence,sinceittakesfewerpacketstosendBGPupdates.
ToenablethePMTUdiscoveryfeatureforallnewTCPconnectionsfromtherouter,
usetheiptcppath-mtu-discoveryglobalconfigurationcommand.Todisablethe
function,usethenoformofthiscommand:
ip tcp path-mtu discovery [age-timer {minutes | infinite}]
SyntaxDescription
Parameter Description
agetimerminutes (Optional)Timeinterval(inminutes)afterwhichTCPre-estimates
thePMTUwithalargerMSS.Themaximumintervalis30
minutes;thedefaultis10minutes.
age-timerinfinite (Optional)Turnsofftheagetimer.
TheagetimerisatimeintervalforhowoftenTCPre-estimatesthePMTUwitha
largerMSS.Thedefaultvalueoftheagetimeris10minutes,butitcanbemanually
configuredupto30minutesordisabled(settoinfinite).IftheMSSthatisusedfor
theconnectionissmallerthanthepeerconnectioncanhandle,therouterwill
attempttousealargerMSSeachtimethattheagetimerexpires.Thediscovery
processisstoppedwheneitherthesentMSSisaslargeasthepeernegotiatedor
theuserhasdisabledthetimerontherouter.Youcanturnofftheagetimerby
settingitto"infinite."
MonitoringPMTUDiscovery
ToverifytheTCPMSSthatisusedbetweenBGPneighbors,usetheshowipbgp
neighbors.Youcanuseincludemaxdatafiltertodisplayrelevantoutputonly,as
shownintheexample.
router# show ip bgp neighbor | include max data
Datagrams (max data segment is 536 bytes):
Datagrams (max data segment is 536 bytes):
Datagrams (max data segment is 536 bytes):
Datagrams (max data segment is 536 bytes):
The default MSS is 536 bytes (before Cisco IOS Release 15.0).
PMTUDiscovery

router# show ip bgp neighbor | include max data
Datagrams (max data segment is 1460 bytes):
Datagrams (max data segment is 1460 bytes):
Datagrams (max data segment is 1460 bytes):
Datagrams (max data segment is 1460 bytes):
After enabling of the PMTU discovery feature, the MSS has been increased.
ThefirstexampleshowsthedefaultsizeoftheMSS,536bytes,beforethePMTU
discoveryfeatureisenabledontherouter.Afterusingtheiptcppath-mtu-
discoverycommandtoenablePMTUdiscovery,therouterdynamicallydetermines
howlargetheMSScanbewithoutcreatingIPpacketsthatrequirefragmentation.In
theexampleatthebottom,theoutputshowsthatthePMTUfeaturehasbeen
enabled.Theshowipbgpneighbors|includemaxdatacommandhasbeenused
todeterminethatthePMTUdiscoveryfeaturehassettheMSSto1460bytes.

AnotherfeaturecanbeusedtoimproveBGPconvergenceistoincreaseinput
queuedepth.BGProutersmightexperiencepacketdropsonaninterfacedueto
largenumberofTCPACKsegments,whichareusedtoacknowledgereceiptof
BGPupdates.
Input queue on an interface specifies how many packets can be queued before
dropping the packets.
BGP routers with several peers might experience packet drops on an interface
due to many TCP ACK segments.
router(config-if)# hold-queue length in
This command limits the size of the IP queue on an interface.
The default input hold-queue limit is 75 packets, configurable from 0 to
65,535 packets.
A length of 1000 will normally resolve problems that are caused by input
queue drops of TCP ACKs.
Eachinterfaceownsaninputqueueintowhichincomingpacketsareplacedtoawait
processingbytherouter.Frequently,therateatwhichincomingpacketsareplaced
intheinputqueueexceedstherateatwhichtheroutercanprocessthepackets.
Eachinputqueuehasasizethatindicatesthemaximumnumberofpacketsthatcan
beplacedinthequeue.Aftertheinputqueuebecomesfull,theinterfacedropsany
newincomingpackets.
TospecifythesizeoftheIPinputoroutputqueueonaninterface,usethehold-
queuecommandininterfaceconfigurationmode.Torestorethedefaultvaluesfor
aninterface,usethenoformofthiscommandwiththeappropriatekeyword.
hold-queue length {in | out}
SyntaxDescription
Parameter Description
length Integerthatspecifiesthemaximumnumberofpacketsinthe
queue.Therangeofallowedvaluesis0to65535.
in Specifiestheinputqueue.Thedefaultis75packets.For
asynchronousinterfaces,thedefaultis10packets.Theselimits
preventamalfunctioninginterfacefromconsuminganexcessive
amountofmemory.
out Specifiestheoutputqueue.Thedefaultis40packets.For
asynchronousinterfaces,thedefaultis10packets.Theselimits
preventamalfunctioninginterfacefromconsuminganexcessive
amountofmemory.
Severalconsiderationsshouldbetakenintoaccountwhen
increasinginterfaceinputqueues.Increasingtheinterface
inputqueueswillincreasememoryutilization.
Increasingtheholdqueuecanhavedetrimentaleffectson
networkroutingandresponsetimes.Forprotocolsthat
useSEQorACKpacketstodetermineround-triptimes,do
notincreasetheoutputqueue.Droppingpacketsinstead
informshoststoslowdowntransmissionstomatch
availablebandwidth.Thisapproachisgenerallybetter
thanhavingduplicatecopiesofthesamepacketwithinthe
network(whichcanhappenwithlargeholdqueues).
TheCisco12000SeriesnowusesadefaultSPD
headroomvalueof1000.Itretainsthedefaultinputqueue
sizeof75.Usetheshowspdcommandtoviewthese
specialinputqueues.
MonitoringPMTUInputQueueDepth
Usetheshowinterface{interface-identifier}commandtodisplaysthecurrentinput
IncreasingInputQueueDepth

queuelevelsandthenumberofincomingpacketsdropped.
router# show interface GigabitEthernet0/0
GigabitEthernet0/0 is up, line protocol is up
Hardware is AmdP2, address is aabb.cc00.4900 (bia aabb.cc00.4900)
MTU 1500 bytes, BW 10000 Kbit/sec, DLY 1000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Displays interface information, including input queue depth.
Theinputqueuew/x/y/zcounterdisplaysthecurrentinputqueue.wisthecurrent
numberofpacketsintheinputqueueandxisthequeuedepth.Thedropscounter,
y,indicatesthenumberofincomingpacketsthathavebeendropped.Inthe
example,thereisnopacketintheinputqueue,thedepthofqueueisleftondefault,
75,andnopacketweredropped.
Ifthecurrentnumberofpacketsintheinputqueueisconsistentlyat,orgreaterthan,
80percentofthecurrentsizeoftheinputqueue,thesizeoftheinputqueuemay
requiretuningtoaccommodatetherateofincomingpackets.Evenifthecurrent
numberofpacketsintheinputqueueneverseemstoapproachthesizeoftheinput
queue,burstsofpacketsmaystillbeoverflowingthequeue.Ifthedropscounteris
increasingatahighrate,thesizeoftheinputqueuemayrequiretuningto
accommodatethebursts.

1.
2.
3.
4.
5.
BGPPrefixIndependentConvergencefeatureimprovesBGPconvergenceaftera
networkfailure.Itcalculatesasecondbetspath,alongwiththeprimarybestpath
andstoresbothpathsintheCiscoExpressForwarding(CEF).
BGP prefix independent convergence characteristics:
PIC enhances BGP convergence, regardless of the number of BGP prefixes.
PIC stores the BGP backup/alternate path for each prefix in BGP, RIB, and FIB
tables.
When the primary goes down, Cisco Express Forwarding quickly selects a
different egress port for the affected destination.
Undernormalcircumstances,BGPcantakeseveralsecondstoafewminutesto
convergeafteranetworkchange.Atahighlevel,BGPgoesthroughthefollowing
process:
BGPlearnsoffailuresthrougheitherIGPorBFDeventsorinterfaceevents.
BGPwithdrawstheroutesfromtheRIB,andtheRIBwithdrawstheroutesfrom
theFIBanddistributedFIB.Thisprocessclearsthedatapathfortheaffected
prefixes.
BGPsendswithdrawmessagestoitsneighbors.
BGPcalculatesthenextbestpathtotheaffectedprefixes.
BGPinsertsthenextbestpathforaffectedprefixesintotheRIB,andtheRIB
installsthemintheFIBanddistributedFIB.
Thisprocesstakesafewsecondsorafewminutestocomplete.Thetimedepends
onthelatencyofthenetwork,theconvergencetimeacrossthenetwork,andthe
localloadonthedevices.Thedataplaneconvergesonlyafterthecontrolplane
converges.
TheBGPPICfunctionalityisachievedbyadditionalfunctionalityintheBGP,RIB,
andCEF.
BGPPICaffectsprefixesunderIPv4andVPNv4addressfamilies.Forthose
prefixes,BGPcalculatesasecondbestpath,alongwiththeprimarybestpath.(The
secondbestpathiscalledthebackup/alternatepath.)BGPinstallsthebestpathand
thebackup/alternatepathsfortheaffectedprefixesintotheBGPRIB.The
backup/alternatepathprovidesafastreroutemechanismtocounterasinglenetwork
failure.
ForBGPPIC,RIBinstallsanalternatepathperrouteifoneisavailable.Withthe
BGPPICfunctionality,aRIBthatselectsaBGProutecontainingabackup/alternate
pathinstallsthebackup/alternatepathwiththebestpath.
WithBGPPIC,CEFstoresanalternatepathperprefix.Whentheprimarypathgoes
down,CEFsearchesforthebackup/alternatepathinaprefix-independentmanner.
CEFalsolistenstoBFDeventstorapidlydetectlocalfailures.Upondetectionofa
failure,CEFdetectsthealternatenexthopforallprefixesthatareaffectedbythe
failure.
BGPPICConfiguration
ToenableBGPPIConCiscoIOSSoftwarerouters,firstenterBGPconfiguration
modeusingtherouterbgpcommand.Then,entertheappropriateaddressfamily
configurationmodeandusethebgpadditional-pathsinstallcommandtoenable
BGPPIC.
BGPPrefixIndependentConvergence

Intheexample,CE1andCE2areconfiguredwiththeBGPPICfeature.BGP
computesPE1asthebestpathandPE2asthebackup/alternatepath,andinstalls
boththeroutesintotheRIBandCEFplane.
NopoliciesshouldbesetonCE1andCE2fortheEBGPpeersPE1andPE2.Both
CEroutersmustpointtotheEBGProuteasthenexthop.OnCE1,thenexthopto
reachtheInternetisthroughPE1.OnCE2,thebestpathtoreachtheInternetis
PE2.CE2advertisesitselfasthenexthoptoCE1,andCE1doesthesametoCE2.
Asaresult,CE1hastwopathsforthespecificprefix.Itusuallyselectsthedirectly
connectedEBGPpathovertheIBGPpath,accordingtothebestpathselection
rules.Similarly,CE2hastwopaths,anEBGPpaththroughPE2andanIBGPpath
throughCE1-PE1.
IftheCE1-PE1linkorPE1goesdown,BGPrecomputesthebestpath,removingthe
nexthopPE1fromRIBandreinstallingCE2asthenexthopintotheRIBandCEF.
CE1automaticallygetsabackup/alternaterepairpathintoCEF,andthetrafficloss
duringforwardingisnowinsubseconds,achievingfastconvergence.
PE1# show ip bgp
BGP table version is 65, local router ID is 10.0.3.81
Status codes: s suppressed, d damped, h history, * valid, > best, i - inte
rnal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-
Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 209.165.201.0/24 1.0.0.101 0 1 i
*bi 10.0.100.2 0 100 0 1 i
Youcanverifythebackuproutebyissuingshowipbgpcommand.Intheexample,
youcanseethatPE1routerhastwopathstoreachthe209.165.201.0/24networkat
thecustomerside.Theinternalroute,viaPE2router,ismarkedasthebackuproute.
Additionally,youcanverifythatthebackuppathisreallystoredintheCEF,by
issuingshowipcefprefixdetailcommand.Thebackuprouteislabeledas"repair."
WithoutBGPPICfeatureenabled,onlyonepathisstoredintheCEF.
PE1# show ip cef 209.165.201.0/24 detail
209.165.201.0/24, epoch 0, flags rib only nolabel, rib defined all labels
recursive via 1.0.0.101
attached to Serial0
recursive via 10.0.100.2, repair
attached to Ethernet0/0

BFDprovidesalow-overhead,short-durationmethodofdetectingfailuresinthe
forwardingpathbetweentwoadjacentrouters,includingtheinterfaces,datalinks,
andforwardingplanes.BFDisadetectionprotocolthatyouenableattheinterface
androutingprotocollevels.CiscosupportstheBFDasynchronousmode,which
dependsonthesendingofBFDcontrolpacketsbetweentwosystemstoactivate
andmaintainBFDneighborsessionsbetweenrouters.Therefore,inorderforaBFD
sessiontobecreated,youmustconfigureBFDonbothBFDpeers.OnceBFDhas
beenenabledontheinterfacesandattherouterlevelfortheappropriaterouting
protocols,aBFDsessioniscreated,BFDtimersarenegotiated,andtheBFDpeers
willbegintosendBFDcontrolpacketstoeachotheratthenegotiatedinterval.
Extremely lightweight hello protocol that uses UDP to test bidirectional
communication.
Used to detect failures in the forwarding path between two adjacent routers.
Millisecond resolution of forwarding plane failure.
Relies on routing protocols to detect neighbors.
BFDprovidesfastBFDpeerfailuredetectiontimesindependentlyofallmediatypes,
encapsulations,topologies,androutingprotocolsBGP,EIGRP,IS-IS,andOSPF.By
sendingrapidfailuredetectionnoticestotheroutingprotocolsinthelocalrouterto
initiatetheroutingtablerecalculationprocess,BFDcontributestogreatlyreduced
overallnetworkconvergencetime.
TheBFDprotocolhasnodiscoverymechanismstodetectneighbors;itisdesigned
solelyasanagentforotherapplicationsrequiringfastfailuredetection.Whenevera
routingprotocolthatisconfiguredtouseBFDdetectsanewneighbor,itrequests
availabilitytrackingfromBFD.
BFDcanrelyoncontrolpacketsoronechopackets.EchopacketsareIPpackets
addressedtotherouteritselfbutsenttotheLayer2addressofthenext-hopnode.
Theechopacketsthoroughlytestthecompletebidirectionalforwardingpath
betweenadjacentroutersbecausetheyhavetobetransmittedbytheoriginating
router,propagatedtotheadjacentrouter,receivedbyitsinterfacelogic,switchedby
itsforwardingengine,andsentbacktotheoriginator(becausetheIPpacketis
addressedtotherouteritself).
Forexample,whenR1sendsaBFDechopacket,itsetsthedestinationIPaddress
inthepackettoitsowninterfaceIPaddressandtheMACaddressintheLayer2
frameheadertotheMACaddressoftheneighbor(R2).WhenR2receivesthe
packet,itperformsaLayer3lookupandsendsthepackettowarditsfinaldestination
(backtoR1).
BFD operation:
Routing protocol (BFD client) bootstraps BFD to create a BFD session to a
neighbor:
BFD client receives link status change notification.
Receive and transmit intervals are negotiated and configurable.
The two systems agree on a method to detect failure.
In case of failure, BFD notifies the BFD client:
BidirectionalForwardingDetectionforBGP

The BFD client independently decides on the action.
Whenaroutingprotocol(BGP,forexample)discoversaneighbor,itsendsarequest
tothelocalBFDprocesstoinitiateaBFDneighborsessionwiththeBGPneighbor
router.ThentheBFDneighborsessionwiththeBGPneighborrouterisestablished.
Ifthereisafailureonthelinkbetweenneighbors,theBFDneighborsessionwiththe
BGPneighborrouteristorndown.BFDnotifiesthelocalBGPprocessthattheBFD
neighborisnolongerreachable.ThelocalBGPprocesstearsdowntheBGP
neighborrelationship.Ifanalternativepathisavailable,therouterswillimmediately
startconvergingonit.
IfmultipleroutingprotocolswanttoestablishBFD
sessionswiththesameremotesystemforthesame
routedprotocol(IPv4orIPv6),allmustshareasingleBFD
session.
BFDConfiguration
ToconfigureBFD,youfirsthavetoenabletheBFD,usingthebfdinterval
commandintheinterfaceconfigurationmode.
bfd interval send-timer min_rx receive-timer multiplier multiplier
SyntaxDescription
Parameter Description
intervalsend-timer Therate,inmilliseconds,atwhichBFDcontrolpacketswillbe
senttoBFDpeers.Thevalidrangeforthesend-timerisfrom50
to999.
min_rxreceiver-timer Therate,inmilliseconds,atwhichBFDcontrolpacketswillbe
expectedtobereceivedfromBFDpeers.Thevalidrangeforthe
receive-timerisfrom50to999.
multiplermultipler ThenumberofBFDpacketsthatcanbelostbeforetheBFDpeer
isdeclared"down."
ThenyouhavetoenableBFDsupportforBGP,usingtheneighborfall-overbfd
command.
neighbor ip-address fall-over bfd
SyntaxDescription
Parameter Description
fall-overbfd EnablesBFDforindividualneighbor.

Usually,whenanetworkingdevicerestarts,allroutingpeersofthatdevicedetect
thatthedevicewentdownandthencamebackup.Thistransitionresultsinwhatis
calledaroutingflap,whichcouldspreadacrossmultipleroutingdomains.Routing
flapsthatarecausedbyroutingrestartscreateroutinginstabilities,whichare
detrimentaltotheoverallnetworkperformance.CiscoNonstopForwarding(NSF),
alsoknownasgracefulrestart,workswiththeSSOtominimizetheamountoftimea
networkisunavailabletoitsusersfollowingaswitchover.Themainobjectiveof
CiscoNSFistocontinueforwardingIPpacketsfollowingarouteprocessor
switchoverinplatformswithdualRPs,thusreducingnetworkinstability.
CiscoNonstopForwarding
Cisco NSF is applicable in platforms with dual RPs and works together with
SSO.
Cisco NSF allows:
Routing neighbor relationships remain established during SSO.
Routes on neighboring routers remain valid.
Forwarding of data packets continues while the routing process on the new
RP converges.
Cisco NSF is supported by:
Routing protocols (OSPF, IS-IS, EIGRP, BGP)
Forwarding operation (Cisco Express Forwarding)
The device must be Cisco NSF-capable.
The neighboring device must be Cisco NSF-aware.
CiscoNSFallowsfortheforwardingofdatapacketstocontinuealongknownroutes
whiletheroutingprotocolinformationisbeingrestoredfollowingaswitchover.With
NSF,peernetworkingdevicesdonotexperienceroutingflaps.Datatrafficis
forwardedthroughintelligentlinecardsordualforwardingprocessors,whilethe
standbyRPassumescontrolfromthefailedactiveRPduringaswitchover.
CiscoNSFissupportedbyfourprotocolsforrouting(BGP,EIGRP,OSPF,andIS-IS
),andbyCiscoExpressForwarding(CEF)forforwarding.Theroutingprotocols
havebeenenhancedwithCiscoNSFcapabilityandawareness,meaningthat
routersrunningtheseprotocolscandetectaswitchoverandtakethenecessary
actionstocontinueforwardingnetworktrafficandtorecoverrouteinformationfrom
thepeerdevices.
AnetworkingdeviceissaidtobeCiscoNSF-awareifitisrunningNSF-compatible
software.AdeviceissaidtobeCiscoNSF-capableifithasbeenconfiguredto
supportNSFandcanrebuildroutinginformationfromNSF-awareorNSF-capable
neighbors.
CiscoNSFdependsonCEFtocontinueforwardingpacketsduringswitchoverwhile
theroutingprotocolsrebuildtheRIBtables.Oncetheroutingprotocolshave
converged,CEFupdatestheFIBtableandremovesoldrouteentries.CEF,inturn,
updatesthelinecardswiththenewFIBinformation.
Cisco NSF overview:
One RP is active, one is standby.
Cisco Express Forwarding on the active RP synchronizes the FIB and adjacency
table to the standby RP.
Upon switchover, the new active RP uses the old FIB and adjacency table to
forward packets while the routing protocol reconverges.
Routing protocol must:
Establish neighbor relationship without causing a reset of neighbor
relationship
Learn routing information
As the routing protocol starts to repopulate the RIB, it updates Cisco Express
Forwarding.
CiscoNSFalwaysoperatestogetherwithSSO.InspecificCisconetworkingdevices
thatsupportdualRPs,SSOestablishesoneoftheRPsastheactiveprocessor
whiletheotherRPisdesignatedasthestandbyprocessor,andthensynchronizes
theFIBandadjacencytablebetweenthem.Aswitchoverfromtheactivetothe
BGPNonstopForwardingAwareness

standbyprocessoroccurswhentheactiveRPfails,isremovedfromthenetworking
device,orismanuallytakendownformaintenance.Duringtheswitchover,thenew
activeRPusestheoldFIBandadjacencytabletoforwardpacketswhiletherouting
protocolreconverges.OncetheroutingprotocolshaveupdatedtheRIB,CEF
updatestheFIBtableandremovesoldrouteentries.CEF,inturn,updatestheline
cardswiththenewFIBinformation.
Theroutingprotocols(forexample,BGP)runonlyontheactiveRP,andthey
receiveroutingupdatesfromtheirneighborrouters.Routingprotocolsdonotrunon
thestandbyRP.IfCiscoNSFisnotconfigured,aneighboringdevicewillteardown
theadjacencyduringaswitchover.Theresultwouldbearoutingflapthatwould
spreadacrossthenetwork.
UsingCiscoNSF,theroutingprotocolsonanNSF-capabledevicerequeststhatthe
NSF-awareneighbordevicessendroutinginformationtohelprebuildtherouting
tables.TheCiscoNSF-awareneighborwillnotteardowntheneighborrelationship.
Itwillre-establishtheneighborrelationshipwiththeCiscoNSF-capabledevice,and
willsendroutinginformationtosynchronizetheroutingtableonanNSF-capable
device.
ACiscoNSF-awareroutercanpeerwithCiscoNSF-capableroutersandfacilitate
theresynchronizationofroutinginformationwithsuchrouters.
BGPNonstopForwardingAwareness
TheBGPNSFAwarenessfeatureallowstheBGPpeersofthefailingroutertoretain
theroutinginformationthatisadvertisedbythefailingrouter.Italsocontinuetouse
thisinformationuntilthefailedrouterhasreturnedtonormaloperatingbehaviorand
isabletoexchangeroutinginformation.Thepeeringsessionismaintained
throughouttheentireNSFoperation.
Minimizes the effects of the following:
Well-known failure conditions (for example, a stuck-in-active event)
Unexpected events (for example, an RP switchover operation)
Scheduled events (for example, a hitless software upgrade)
router(config-router)# bgp graceful-restart
Globally enables BGP NSF awareness.
TheBGPNSFfeatureprovidesanNSF-awarerouterwiththecapabilitytodetecta
neighborthatisundergoinganSSOoperation,maintainthepeeringsessionwiththis
neighbor,retainknownroutes,andcontinuetoforwardpacketsfortheseroutes.
BGPsupportforCiscoNSFrequiresthatneighborroutersareNSF-awareorNSF-
capable.ThegracefulrestartmechanismalsoenablesCiscoNSFawarenessin
BGP.ArouterthatisNSF-awarefunctionslikearouterthatisNSF-capable,with
oneexception:AnNSF-awareroutercannotperformanSSOoperation.However,a
routerthatisNSF-awarecanmaintainapeeringrelationshipwithaNSF-capable
neighborduringanNSFSSOoperation.Itcanholdroutesforthisneighborduring
theSSOoperation.
AnNSF-awareroutermustbeupandcompletely
convergedwiththenetworkbeforeitcanassistanNSF-
capablerouterinanNSFrestartoperation.
ThedeploymentofBGPNSFawarenesscanminimizetheeffectsofthefollowing:

Well-knownfailureconditions(forexample,astuck-in-activeevent)
Unexpectedevents(forexample,anRPswitchoveroperation)
Scheduledevents(forexample,ahitlesssoftwareupgrade)
BGPNSFimprovestheoverallnetworkstabilitybyreducingtheamountof
resourcesthatarenormallyrequiredforreestablishingpeeringwithafailedrouter.
WhenaCiscoNSF-capablerouterbeginsaBGPsessionwithaBGPpeer,itsends
anOPENmessagetothepeer.Includedinthemessageisadeclarationthatthe
CiscoNSF-capableorNSF-awarerouterhas"gracefulrestartcapability."IftheBGP
peerhasreceivedthiscapability,itisawarethatthedevicesendingthemessageis
CiscoNSF-capable.BoththeCiscoNSF-capablerouteranditsBGPpeers(NSF-
awarepeers)needtoexchangethegracefulrestartcapabilityintheirOPEN
messagesatthetimeofsessionestablishment.Ifbothpeersdonotexchangethe
gracefulrestartcapability,thesessionwillnotbecapableofgracefulrestart.
IftheBGPsessionislostduringtheRPswitchover,theCiscoNSF-awareBGPpeer
marksalltheroutesthatareassociatedwiththeNSF-capablerouterasstale.
However,itcontinuestousetheseroutestomakeforwardingdecisionsforatime.
ThisfunctionalitymeansthatnopacketsarelostwhilethenewlyactiveRPiswaiting
forconvergenceoftheroutinginformationwiththeBGPpeers.
AfteranRPswitchoveroccurs,theCiscoNSF-capablerouterre-establishesthe
sessionwiththeBGPpeer.Inestablishingthenewsession,itsendsanewgraceful
restartmessagethatidentifiestheCiscoNSF-capablerouterashavingrestarted.
Atthispoint,theroutinginformationisexchangedbetweenthetwoBGPpeers.
Oncethisexchangeiscomplete,theCiscoNSF-capabledeviceusestherouting
informationtoupdatetheRIBandtheFIBwiththenewforwardinginformation.The
CiscoNSF-awaredeviceusesthenetworkinformationtoremovestaleroutesfrom
itsBGPtable.Oncethestaleroutesareremoved,theBGPprotocolisfully
converged.
IfaBGPpeerdoesnotsupportthegracefulrestartcapability,itwillignorethe
gracefulrestartcapabilityinanOPENmessagebutwillestablishaBGPsessionwith
theCiscoNSF-capabledevice.Thisfunctionalitywillallowinteroperabilitywithnon-
NSF-awareBGPpeers(andwithoutNSFfunctionality),buttheBGPsessionwith
non-NSF-awareBGPpeerswillnotbecapableofgracefulrestart.
BGPNSFawarenessisnotenabledbydefault.Togloballyenableit,usebgp
graceful-restartrouterconfigurationcommand.TodisabletheBGPgracefulrestart
capabilitygloballyforallBGPneighbors,usethenoformofthiscommand.
bgp grafecul-restart [restart-time seconds] [stalepath-time seconds]
SyntaxDescription
Parameter Description
restart-timeseconds (Optional)Themaximumtimeperiodthatthelocalrouterwillwait
foragraceful-restart-capableneighbortoreturntonormal
operationafterarestarteventoccurs.Thedefaultvalueforthis
argumentis120seconds.Thevalidrangeofvaluesisfrom1to
3600seconds.
stalepath-timeseconds (Optional)Themaximumtimeperiodthatthelocalrouterwillhold
stalepathsforarestartingpeer.Allstalepathsaredeletedafter
thistimerexpires.Thedefaultvalueforthisargumentis360
seconds.Thevalidrangeofvaluesisfrom1to3600seconds
NSFawarenessisenabledautomaticallyinsupported
softwareimagesforInteriorGatewayProtocols,suchas
EIGRP,IS-IS,andOSPF.

BGPconvergencecanalsobereducedbyusingcertainBGPtimers.BGPscantime
isoneofthetimersthatcanbeusedtoinfluenceBGPconvergencespeed.
Defines how often BGP scanner process scans the BGP table.
If lowered, can improve convergence
Needed to confirm that next hops are still available.
The BGP scanner process is also responsible for advanced features such as
conditional advertisement check and performing route dampening.
Set to 60 seconds by default.
router(config-router)# bgp scan-time scanner-interval
Changes the default value of BGP scanner process runs.
TheBGPscannerprocesswalks(scans)theBGPtableandconfirmsthe
reachabilityofnexthops.AchangeofthisstatustriggersanewBGProuteselection
forthenetwork.TherouterthenpropagatethechangestoestablishedBGP
neighbors.IncreasingtheBGPscannerprocessfrequencywillmaketherouterfind
achangedstatusmorequickly,butitwillalsoconsumemoreCPUresources.
TheBGPscannerprocessisalsoresponsibleforsomeadvancedBGPfeatures.It
checkstheconditionaladvertisementtodeterminewhetherBGPshouldadvertise
conditionalprefixesorperformroutedampening.
ToconfigurenondefaulttimeintervalforrepetitionsoftheBGPscannerprocess,use
bgpscan-timecommand.
bgp scan-time [import] scanner-interval
SyntaxDescription
Parameter Description
import (Optional)ConfiguresimportprocessingofVPNv4unicastrouting
informationfromBGProutersintoroutingtables.
scanner-interval SpecifiesthescanningintervalofBGProutinginformation.Valid
valuesthatareusedforselectingthedesiredscanninginterval
arefrom5to60seconds.Bydefault,thescanningintervalis60
seconds.
MonitoringBGPScanTime
YoucanchecktheconfiguredBGPscanintervalusingtheshowipbgpsummary
command.
R1# show ip bgp summary
BGP router identifier 192.168.12.1, local AS number 1
BGP table version is 87, main routing table version 87
11 network entries using 1628 bytes of memory
16 path entries using 1024 bytes of memory
3/2 BGP path/bestpath attribute entries using 408 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 3084 total bytes of memory
BGP activity 44/33 prefixes, 84/68 paths, scan interval 60 secs
<... output omitted ...>
Scan interval is defined per BGP router process and address family.
TheconfiguredBGPscanintervalwillapplytotheentireBGProutingprotocol
process.
BGPNext-HopTracking
BGPmonitorsthenexthopofinstalledroutestoverifynext-hopreachabilityandto
select,install,andvalidatetheBGPbestpath.Bydefault,theBGPscannerisused
topolltheRIBforthisinformationevery60seconds.Duringthe60secondtime
periodbetweenscancycles,IGPinstabilityorothernetworkfailurescancauseblack
holesandroutingloopstotemporarilyform.
BGPScanTime

TheBGPnext-hoptrackingfeaturepreventsblackholeroutingduringthe60second
periodofscan-timer.Scan-timerisalreadymostlyreplacedinbasicfunctionsbythe
BGPNHT.
The replacement for scan-timer.
Prevents black-hole routing during the scan-timer period.
It is event driven.
Automatically tracks BGP prefixes, and rapidly report next-hop changes to the
BGP routing process.
Enabled by default.
router(config-router)# bgp nexthop trigger [delay seconds | enable]
Controls the BGP NGT feature:
Enables it, if it was previously disabled.
Changes the interval between checks.
BGPnext-hoptrackingisanevent-drivensystemthatprovidesfasterconvergencein
on-demandfashionratherthanperiodicbasedonscan-timer.ItmonitorsRIBfor
next-hoprelatedchangesforbothEBGPandIBGPprefixes.Itreportschangesto
theBGProutingprocess.
ThisoptimizationimprovesoverallBGPconvergencebyreducingtheresponsetime
tonext-hopchangesforroutesinstalledintheRIB.Whenabestpathcalculationis
runinbetweenBGPscannercycles,onlynext-hopchangesaretrackedand
processed.
BGPNHTfeatureisenabledbydefault.Disablingnexthopaddresstrackingmaybe
usefulifyournetworkhasunstableIGPpeersandroutedampeningisnotresolving
thestabilityissues.Tocontrolthisfeature,usethebgpnexthoptriggercommand
intheaddressfamilyconfigurationmodeoftheroutingprocess.
bgp nexthop trigger { delay seconds | enable}
SyntaxDescription
Parameter Description
delayseconds Changesthedelayintervalbetweenchecksonupdatednext-hop
routesthatareinstalledintheroutingtable.Validvaluesforthe
delayarefrom0to100seconds.Thedefaultis5seconds.
enable EnablesBGPnext-hoptracking.
Thebgpscan-timecommandisignoredifyourrouterhas
BGPnext-hoptrackingenabledfortheaddress-family.

BGPadvertisementintervalisanotheroptiontoinfluenceBGPconvergencespeed.
Defines a time which has to elapse between two successive updates about the
same destination that are sent to a neighbor.
If lowered, can improve convergence
Default values are different for IBGP and EBGP neighbors:
30 seconds for EBGP neighbors
0 seconds for IBGP neighbors
router(config-router)# neighbor [ip-address | peer-group-
name] advertisement-interval seconds
Changes the default time interval in the sending of BGP routing updates for a
specific neighbor:
Advertisementintervaltimercontrolstherateatwhichsuccessiveadvertisements
aresenttoaBGPneighbor.WhenaBGP-speakingroutersendsarouteupdatetoa
neighborforaspecificdestination,itisnotallowedtosendanotherupdatetothe
neighboraboutthesamedestinationuntilatimeequaltotheadvertisementinterval
haselapsed.So,theadvertisementintervaltimeractsasaformofratelimitingona
per-destinationbasis,eventhoughthevalueoftheadvertisementintervalis
configuredforeachneighbor.
ThedefaultvaluesaredifferentforIBGPandEBGPpeers.ForIBGPpeers,the
intervalissetto0seconds.ForEBGPpeers,theintervalissetto30seconds.For
EBGPpeersthatareconfiguredinaVRFinstance,theintervalisalsosetto0
seconds.
Itisimportanttonotethatwhiletherouteriswaitingfortheadvertisementinterval
timertoexpire,theroutercanstillreceiveandprocessrouteupdatesfromBGP
neighbors.Changingtheadvertisementintervaldoesnotrate-limitBGProute
selection(inboundupdatesandsubsequentprocessing)butonlytherateofoutgoing
routeadvertisements.
WhenfasterpropagationofsuccessiveBGPupdates(whicharebatchedandrate-
limited)isrequired,thenetworkadministratorcanlowerthedefaultvalueofthe
advertisementinterval,thusimprovingconvergence.
YoucanmodifythedefaultadvertisementintervalforaspecificBGPpeerusingthe
neighboradvertisement-intervalrouterconfigurationcommand.
neighbor [ip-address | peer-group-name] advertisement-interval seconds
SyntaxDescription
Parameter Description
ip-address NeighborIPaddress.
peer-group-name NameofaBGPpeergroup.IfaBGPpeergroupisspecifiedby
usingthepeer-group-nameargument,allmembersofthepeer
groupwillinheritthecharacteristicthatisconfiguredwiththis
command.
seconds Timeinseconds.Thevalidvalueisfrom0to600seconds.The
defaultis30secondsforexternalpeersand5secondsforinternal
peers.
InroutersthathandlelargeBGPtablesandlessstable
networks,loweringtheadvertisementintervalcould
potentiallyleadtoconsuminglargeportionsofrouter
resources.
MonitoringtheBGPAdvertisementInterval
BGPAdvertisementInterval

R1# show ip bgp neighbors 192.168.12.2
BGP neighbor is 192.168.12.2, remote AS 1, internal link
<... output omitted ...>
Default minimum time between advertisement runs is 0 seconds
<... output omitted ...>
R1# show ip bgp neighbors 172.16.11.11
BGP neighbor is 172.16.11.11, remote AS 100, external link
<... output omitted ...>
Default minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
Session: 172.16.11.11
BGP table version 102, neighbor version 102/0
<... output omitted ...>
Minimum time between advertisement runs is 15 seconds
<... output omitted ...>
YoucanexaminethecurrentlyconfiguredBGPadvertisementintervalwiththeshow
ipbgpneighborscommand.Theadvertisementintervalisdefinedforaspecific
neighborinaspecificBGPaddressfamily.Actualvaluesoftheadvertisement
intervalarethereforestatedunderthespecificaddress-familyportionoftheneighbor
output.
Theexampleshowstheoutputforinternalneighbor,wherethedefaulttimeris0
seconds.ThesecondexampleshowsthechangeddefaulttimerforEBGP,30
seconds.Aftertheparameterwaschanged,thetimerswitchedto15seconds.

BGPkeepaliveandhold-downtimersaretwoBGPtimersthatinfluenceBGP
convergenceaswell.
BGP keepalive timer:
Defines a time between successive keepalive messages.
Set to 60 seconds by default.
BGP hold-down timer:
Defines how long a router will wait from the last received keepalive or update
message before declaring the session dead.
Set to 3x keepalive = 180 seconds by default.
router(config-router)# neighbor [ip-address | peer-group-
name] timers keepalive holdtime [min-holdtime]
ThekeepalivetimerdefineshowoftenaBGProuterwillprobeaBGPneighborby
sendingkeepalivemessages.Theholddowntimerdefineshowlongarouterwill
waitfromthelastreceivedkeepaliveorupdatemessagebeforedeclaringthe
sessiondead.
Loweringthekeepaliveandhold-downtimerswillimproveBGPconvergence.
Bydefault,thekeepalivetimerissetto60seconds,andthehold-downtimerissetto
180seconds.EveniftheIProutingtableindicatesthattheneighborisnolonger
reachable,BGPwillnottriggertheconvergenceprocessuntiltheBGPsessionhold-
downtimerexpires.
Toconfigureanondefaultvalueofthekeepaliveand/orhold-downtimers,usethe
neighbortimersrouterconfigurationcommand.
neighbor [ip-address | peer-group-name] timers keepalive holdtime [min-
holdtime]
SyntaxDescription
Parameter Description
ip-address NeighborIPaddress.
peer-group-name NameofaBGPpeergroup.IfaBGPpeergroupisspecifiedby
usingthepeer-group-nameargument,allmembersofthepeer
groupwillinheritthecharacteristicthatisconfiguredwiththis
command.
keepalive Timeinsecondswithwhichthekeepalivemessagesaresentto
thepeer.Thevalidvalueisfrom0to65535seconds.Thedefault
is60seconds.
holdtime Timeinsecondsafternotreceivingakeepalivemessageand
declaringapeerdead.Thevalidvalueisfrom0to65535
seconds.Thedefaultis180seconds.
min-holdtime (Optional)Interval(inseconds)specifyingtheminimum
acceptablehold-timefromaBGPneighbor.Theminimum
acceptablehold-timemustbelessthan,orequalto,theinterval
thatisspecifiedintheholdtimeargument.Thevalidvalueisfrom
0to65535.
NewkeepaliveswilltakeeffectonlyafternewBGP
sessionestablishmentastheyaretransferredand
negotiatedtothelowervaluesfromthetwopeersinthe
OPENmessages.ThereforeyouneedtoresettheBGP
session.
MonitoringBGPKeepaliveandHold-DownTimers
R1# show ip bgp neighbors
BGP neighbor is 172.16.11.11, remote AS 100, external link
BGP version 4, remote router ID 10.0.1.81
BGP state = Established, up for 06:54:31
Last read 00:00:02, last write 00:00:22, hold time is 180, keepalive int
BGPKeepaliveandHold-DownTimers

erval is 60 seconds
<... output omitted ...>
Verifies keepalive and hold-down timers.
YoucanexaminethecurrentlyconfiguredBGPkeepaliveandhold-downtimersfor
eachneighborwiththeshowipbgpneighborscommand.
Intheexample,bothtimersareleftondefault:keepalivetimeris60secondsand
hold-downtimeris180seconds.

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
BGP is considered converged when there are no outstanding updates to be sent
to neighbors.
Several features are provided in BGP to improve convergence time:
PMTU discovery benefits BGP as it benefits any transmission over IP.
Input queue depth can be increased to improve performance.
PIC enhances BGP convergence regardless of number of BGP prefixes.
BFD reduces conversion time by providing rapid detection of failed peers.
NSF awareness reduces the amount of resources by continue forwarding
packets during a failure condition.
You can also lower the BGP timers to influence BGP convergence:
Scan timer
Advertisement interval
Keepalive and hold-down timers
Summary

Overview
Therearecurrentlymorethan600,000prefixesontheInternet.Therearemany
circumstancesinwhichnetworkadministratorsdonotneedordesiretheirroutersto
carryfullInternetrouting.Furthermore,thereisaneedtoprovideprotectivecontrols
oncustomer-facingrouterstoensurethataconfigurationerrordoesnotcausethe
accidentaladvertisementofprefixesfromASsthatdidnotoriginatethem.
BGPisdesignedforreliabilityandscalability.Assuch,ithasatremendousamount
offlexibilityregardingadministrativepolicycontrols,routeselection,and
performancetuningandscalabilityfeatures.AnadvancedBGPconfigurationtool
hasbeendesignedtoimproveBGPscalabilityandperformancebyreducingthe
numberofprefixesthatarouterreceivesfromaBGPneighbor.
Uponcompletingthislesson,youwillbeableto:
Describetheneedforlimitingthenumberofroutesthatarereceivedfroma
BGPneighbor
IdentifytheCiscoIOScommandthatisrequiredtoconfiguretheBGProute
limiting
DescribehowtoconfigureandmonitorBGPmaximum-prefixfunction
LimitingtheNumberofPrefixesReceived
fromaBGPNeighbor

Incomingroutepolicies,whichareappliedonBGProuters,indicatetheBGP
attributevaluesthatarouteshouldhaveinordertobeaccepted.Routepoliciescan
beappliedthatmatchroutesbasedonthenetworknumberortheBGPattributes
thatareattachedtoaroute.Themostcommonlyappliedfilteringusedinroute
policiesistheonethatmatchesthecontentsoftheASpathattribute.
All filtering mechanisms specify only what you are willing to accept but not how
much.
A misconfigured BGP neighbor can send a huge number of prefixes that can
exhaust the memory of a router or overload the CPU (several Internet-wide
incidents have already occurred).
BGP maximum prefixes limiting is used to establish a hard limit on the number
of prefixes that are received from a neighbor.
AnISPwithamultihomedcustomermayuseroutepoliciestoensurethattheroutes
thatarereceivedfromthecustomeroriginatewithintheASofthecustomer.Using
anASpathaccesslistisonemethodofachievingthisgoal.
Ifyouconfigureroutepoliciesinacustomerrouterimproperly,itmayaccidentally
causethecustomertoreceivemanyInternetroutes.Evenworse,afaulty
configurationmaycausecustomertoadvertiseprefixesasthoughtheroutes
originatedinsidethecustomerAS.ThissituationwouldresultinaBGPtableinthe
ISProuterthatlistsmanyofthepossibledestinationnetworksontheInternetas
reachableinthecustomerAS.TheASwouldcontainonlyasingleentry,the
customerAS.TheBGProuteselectionintheISPnetworkwouldselectthoseroutes
asthebest,basedontheASpathlength.Asaresult,itwoulddirectmuchofthe
providertrafficthatisintendedfortheInternettothecustomernetwork.
AroutepolicythatisbasedonanASpathfilterintheISProuterwillnotpreventthis
accident.TheroutesthatthecustomersendshavetheanticipatedASpathvalue.A
routepolicythatisbasedoncustomerprefixesandthatdistinctlyidentifiesand
permitseachofthenetworknumbersthatthecustomermayadvertisewillprevent
theaccident.However,sucharoutingpolicyisdifficulttomaintain.
BGP router terminates peering when a number of maximum prefixes exceeded.
You can configure a router to:
Generate a logging message when a specified percentage of the maximum
prefixes is reached.
Reestablish BGP peering after a specified time (from 1 to 65535 minutes).
Generate a logging message when the maximum prefix limit is exceeded,
instead of terminating BGP peering.
Ascalablesolutiontotheneedforlimitingthenumberofroutes(prefixes)thatare
receivedfromaBGPneighboristouseBGPmaximumprefixeslimiting.Thisfeature
enablesyoutospecifyhowmanyroutesaroutercanreceivefromaneighbor.
Whenthenumberofprefixesthatisreceivedfromthepeerforagivenaddress
familyexceedsthemaximumlimit,aceasenotificationmessageissenttothe
neighbor.Alsothepeeringwiththeneighboristerminated
Youcanalsoconfiguretheroutertogeneratealoggingmessagewhenaconfigured
percentageofthemaximumprefixesisreached.Youcanalsoconfiguretherouterto
automaticallyreestablishapeeringsessionthathasbeendisabledbecausethe
maximumprefixlimithasbeenexceeded.Insteadofceasingthepeeringwitha
neighbor,youcanconfiguretheroutertogenerateanddisplayawarningwhena
configuredpercentageofthemaximumprefixeshasbeenreached.
BGPRouteLimiting

TheBGProutelimitingcanbeconfiguredwiththeuseofmaximum-prefixfunction.
router(config-router)# neighbor ip-address maximum-
prefix maximum [threshold] [warning-only] [restart restart-interval]
This command controls how many prefixes can be received from a neighbor.
The optional threshold parameter specifies the percentage where a warning
message is logged (default is 75%).
The optional warning-only keyword specifies the action on exceeding the
maximum number (default is to drop the neighbor relationship).
The optional restart keyword instructs the router to try to re-establish the
session after the specified interval in minutes.
TocontrolhowmanyprefixesaBGProutercanreceivefromaneighbor,usethe
neighbormaximum-prefixrouterconfigurationcommand.
neighbor {ip-address| peer-group-name} maximum-
prefix maximum [threshold] [warning-only] [restart restart-interval]
SyntaxDescription
Parameter Description
ip-address IPaddressoftheneighbor.
peer-group-name NameofaBGPpeergroup.
maximum Maximumnumberofprefixesthatareallowedfromthisneighbor.
threshold (Optional)Integerspecifyingatwhatpercentageofmaximumthe
routerstartstogenerateawarningmessage.Therangeis1to
100percent.Thedefaultis75percent.
warning-only (Optional)Allowstheroutertogeneratealogmessagewhenthe
maximumisexceeded,insteadofterminatingthepeering.
restart (Optional)Configurestheroutertoautomaticallyre-establisha
peeringsessionthathasbeendisabledbecausethemaximum-
prefixlimithasbeenexceeded.Theconfigurablerangeofthe
restartintervalisfrom1to65535minutes.
ThiscommandallowsyoutoconfigureamaximumnumberofprefixesthataBGP
routerisallowedtoreceivefromapeer.Itaddsanothermechanism(inadditionto
distributelists,filterlists,androutemaps)tocontrolprefixesthatarereceivedfroma
peer.
Whenthenumberofreceivedprefixesexceedsthemaximumnumberthatis
configured,therouterterminatesthepeering(bydefault).However,ifthewarning-
onlykeywordisconfigured,theroutersendsalogmessagebutcontinuespeering
withthesender.Ifthepeeristerminated,thepeersessionremainsdownuntilthe
clearipbgpcommandisissuedontherouter,unlessyouhaveincludedtherestart
keywordintheconfiguration.
TheBGPRestartSessionAfterMax-PrefixLimitfeatureenhancesthecapabilitiesof
theneighbormaximum-prefixcommandwiththeintroductionoftherestart
keyword.Thisenhancementallowsyoutoconfigurethetimeintervalafterwhicha
routerre-establishesapeeringsessionwhenthenumberofprefixesthathavebeen
receivedfromapeerhasexceededthemaximumprefixlimit.Therestartkeyword
hasaconfigurabletimerargumentthatisspecifiedinminutes.Thetimerangeofthe
timerargumentisfrom1to65535.
Thisfeatureattemptstore-establishadisabledpeeringsessionatthetimeinterval
thatyouconfigure.However,theconfigurationoftherestarttimeralonecannot
changeorcorrectapeerthatissendinganexcessivenumberofprefixes.Youwill
needtoreconfigurethemaximum-prefixlimitorreducethenumberofprefixesthat
aresentfromthepeer.Apeerthatisconfiguredtosendtoomanyprefixescan
causeinstabilityinthenetwork,whereanexcessivenumberofprefixesarerapidly
advertisedandwithdrawn.Inthiscase,thewarning-onlykeywordcanbe
configuredtodisabletherestartcapabilitywhileyoucorrecttheunderlyingproblem.
Youcanusethebgpdampeningcommandtoconfigure
ConfiguringtheBGPRouteLimiting

thedampeningofaflappingrouteorinterfacewhenapeer
issendingtoomanyprefixesandcausingnetwork
instability.Youshouldneedtherestartcommandonly
whenyouaretroubleshootingortuningarouterthatis
sendinganexcessivenumberofprefixes.

Overview
Throughthisdiscovery,youwilllearnhowtoconfigureBGProutelimitingusingthe
maximum-prefixfunction.Youwillconfigureaserviceprovider'srouter,ISP1,tolimit
themaximumnumberofprefixesthatarereceivedfromamultihomedcustomer's
router,R2.
Discovery18:ConfigureBGPRouteLimiting

Topology

Ifyoushutdownaninterfaceonarealrouterorswitch,the
connecteddevicewillseeitas"down/down."Dueto
virtualizationspecifics,IOLbehaviorisslightlydifferent.If
youshutdownaninterfaceonarouterorswitch,the
connecteddevicewillseeitas"up/up."InIOL,thestatus
ofaninterfacecanonlybe"up/up"or"administratively
down/down."
DeviceInformation
Device Interface IPaddress Description
R2 Ethernet0/0 172.16.22.2/24 ConnectiontoISP2
R2 Ethernet0/1 172.16.12.2/24 ConnectiontoISP1
R2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
Loopback7
Loopback8
Loopback9
10.0.0.1/28
10.0.0.17/28
10.0.0.33/28
10.0.0.49/28
10.0.0.65/28
10.0.0.81/28
10.0.0.97/28
10.0.0.113/28
10.0.0.129/28
Loopbackssimulate
LANnetworks
ISP1 Ethernet0/1 172.16.12.11/24 ConnectiontoR2
ISP1 Ethernet0/2 172.16.100.11/24 ConnectiontoISP2
ISP2 Ethernet0/0 172.16.22.22/24 ConnectiontoR2
ISP2 Ethernet0/2 172.16.100.22/24 ConnectiontoISP1
IPaddressesandadvertisednetworksinBGParepreconfiguredasshownbelow:
BGPisalsopreconfiguredasEBGP:
R2toISP1
R2toISP2
JobAids

Step1
OntheISP1andISP2routers,verifyinitialstateofBGPtable.Verifythatyoureceived
routestofourdestinationnetworksfromR2.
Usetheshowipbgpcommand.
ISP1# show ip bgp
BGP table version is 5, local router ID is 172.16.12.11
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 172.16.12.2 0 0 1 i
*> 10.0.0.16/28 172.16.12.2 0 0 1 i
*> 10.0.0.32/28 172.16.12.2 0 0 1 i
*> 10.0.0.48/28 172.16.12.2 0 0 1 i
*> 10.0.0.64/28 172.16.12.2 0 0 1 i
ISP2# show ip bgp
BGP table version is 5, local router ID is 172.16.22.22
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 172.16.22.2 0 0 1 i
*> 10.0.0.16/28 172.16.22.2 0 0 1 i
*> 10.0.0.32/28 172.16.22.2 0 0 1 i
*> 10.0.0.48/28 172.16.22.2 0 0 1 i
*> 10.0.0.64/28 172.16.22.2 0 0 1 i
Both,ISP1andISP2,havereceivedroutestofivedifferentnetworks—10.0.0.0/28,
10.0.0.16/28,10.0.0.32/28,10.0.0.48/28,and10.0.0.64/24.
Step2
OntheISP1router,limitthenumberofreceivedprefixesfromR2.
ISP1shouldreceivenomorethan8prefixesfromR2,andshouldstart
generatingwarningmessageswhenthenumberofreceivedprefixesexceeds
75%ofthemaximumspecified.
ISP1(config)# router bgp 100
ISP1(config-router)# neighbor 172.16.12.2 maximum-prefix 8 75
Step3
OntheR2router,advertisethe10.0.0.80/28and10.0.0.96/28networksinBGP.
Toadvertisenetworks,configurethefollowingcommandsonR2.
NOTE:BeforeconfiguringR2,makesurethatyoualsohaveaconsolewindow
openforISP1router.Soyouwillbeabletoseethegeneratedwarning
messages.
R2(config)# router bgp 1
R2(config-router)# network 10.0.0.80 mask 255.255.255.240
R2(config-router)# network 10.0.0.96 mask 255.255.255.240
Step4
OntheISP1router,observethewarningmessagegenerated.
ISP1#
*Apr 2 12:07:55.964: %BGP-4-
MAXPFX: Number of prefixes received from 172.16.12.2 (afi 0) reaches 7, max 8
Thewarningmessagewasgenerated,becauseISP1received7prefixesfromR2.The
ConfigureBGPRouteLimiting
DiscoverySteps

Thewarningmessagewasgenerated,becauseISP1received7prefixesfromR2.The
maximumissetto8,sothethresholdof75%wasexceeded.
Step5
OntheISP1router,verifythatyoustillhavealldestination,thatR2advertises,intheBGP
table.
ISP1# show ip bgp
BGP table version is 8, local router ID is 172.16.12.11
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 172.16.12.2 0 0 1 i
*> 10.0.0.16/28 172.16.12.2 0 0 1 i
*> 10.0.0.32/28 172.16.12.2 0 0 1 i
*> 10.0.0.48/28 172.16.12.2 0 0 1 i
*> 10.0.0.64/28 172.16.12.2 0 0 1 i
*> 10.0.0.80/28 172.16.12.2 0 0 1 i
*> 10.0.0.96/28 172.16.12.2 0 0 1 i
Althoughthewarningwasgenerated,ISP1stillhasall7networksthatarereceivedfrom
R2initsBGPtable.
Step6
OntheR2router,alsoadvertisethe10.0.0.112/28and10.0.0.128/28networks
inBGP.
Toadvertisenetworks,configurethefollowingcommandsonR2.
NOTE:BeforeconfiguringR2,makesurethatyoualsohaveaconsolewindow
openforISP1router.Soyouwillbeabletoseethegeneratedmessages.
R2(config)# router bgp 1
R2(config-router)# network 10.0.0.112 mask 255.255.255.240
R2(config-router)# network 10.0.0.128 mask 255.255.255.240
Step7
OntheISP1router,observethegeneratedmessages.
ISP1#
*Apr 2 12:22:01.859: %BGP-4-MAXPFX: Number of prefixes received from 172.16.12.2 (afi 0) reaches 8, max 8
ISP1#
*Apr 2 12:22:32.575: %BGP-3-
MAXPFXEXCEED: Number of prefixes received from 172.16.12.2 (afi 0): 9 exceeds limit 8
*Apr 2 12:22:32.575: %BGP-5-ADJCHANGE: neighbor 172.16.12.2 Down BGP Notification sent
*Apr 2 12:22:32.575: %BGP-3-NOTIFICATION: sent to neighbor 172.16.12.2 3/1 (update malformed) 0 bytes
*Apr 2 12:22:32.575: %BGP-4-MSGDUMP: unsupported or mal-formatted message received from 172.16.12.2:
FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF 0037 0200 0000 1B40 0101 0040 0206 0201
0000 0001 4003 04AC 100C 0280 0404 0000 0000 1C0A 0000 80
ISP1#
*Apr 2 12:22:32.575: %BGP_SESSION-5-
ADJCHANGE: neighbor 172.16.12.2 IPv4 Unicast topology base removed from session BGP Notification sent
ISP1#
*Apr 2 12:23:41.141: %BGP-3-
NOTIFICATION: sent to neighbor 172.16.12.2 passive 2/8 (no supported AFI/SAFI) 3 bytes 000101 (timer expired)
Thebeginningoftheoutputfirstshowsthatthetotalnumberofreceivedprefixeshasreached8,whichisoverthe
thresholdtogenerateawarningmessage.WhenyoustartedtoadvertisethesecondnetworkinBGP,thesecondmessage
wasgenerated.Thetotalnumberofreceivedprefixesisnow9,whichisabovetheconfiguredlimit(8).Asaresult,the
sessionwiththeneighbor,R2,wasterminated.
Step8
OntheISP1andISP2routers,verifythestateofBGPtable.
ISP1# show ip bgp
ISP1#
ISP2# show ip bgp
BGP table version is 10, local router ID is 172.16.22.22

BGP table version is 10, local router ID is 172.16.22.22
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/28 172.16.22.2 0 0 1 i
*> 10.0.0.16/28 172.16.22.2 0 0 1 i
*> 10.0.0.32/28 172.16.22.2 0 0 1 i
*> 10.0.0.48/28 172.16.22.2 0 0 1 i
*> 10.0.0.64/28 172.16.22.2 0 0 1 i
*> 10.0.0.80/28 172.16.22.2 0 0 1 i
*> 10.0.0.96/28 172.16.22.2 0 0 1 i
*> 10.0.0.112/28 172.16.22.2 0 0 1 i
*> 10.0.0.128/28 172.16.22.2 0 0 1 i
ISP1hasnoroutesintheBGPtable,sinceR2wastheonlyneighborandthesession
wasterminatedduetoexceededmaximumnumberofreceivedprefixes.Youdidnot
configureroutelimitingonISP2,soyoucanseeroutesforallninedestinationsinitsBGP
table.
MonitoringtheBGPRouteLimiting
router# show ip bgp neighbors [address]
For neighbors with the maximum-prefix function configured, displays the
maximum number of prefixes and the warning threshold.
For neighbors exceeding the maximum number of prefixes, displays the reason
that the BGP session is idle.
YoucanusetheshowipbgpneighborscommandtomonitorthestatusofBGP
neighbors.Amongotherthings,thecommanddisplaysinformationabouthowmany
prefixesaBGProuterhasreceivedfromaneighborandifanylimitshavebeen
configured.
Ifthepeerexceededtheconfiguredmaximumnumberofprefixes,theoutputofthe
showipbgpneighborscommandshowsthereasonforresettingthesession.Asa
resultofthesessionbeingreset,theBGPsessionwillremainintheIdlestate.
ToforcetheneighborfromtheIdlestateintotheActivestateandtore-establishthe
BGPsession,youmustissuetheclearipbgpip-addresscommandforthe
neighbor.Except,ifyouhavespecifiedtherestartkeywordintheconfiguration.In
thiscase,theroutertriestore-establishtheBGPsessionautomaticallyafterthe
expirationoftheconfiguredrestarttimeoutinterval.
Step9
OntheISP1router,verifyinformationabouttheR2neighbor.
Toverifyinformationabouttheneighbor,usetheshowipbgpneighbors
commandwithaneighborIPaddressasanargument.
ISP1# show ip bgp neighbor 172.16.12.2
BGP neighbor is 172.16.12.2, remote AS 1, external link
BGP version 4, remote router ID 10.0.0.129
BGP state = Idle
Neighbor sessions:
0 active, is not multisession capable (disabled)
Stateful switchover support enabled: NO
Default minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
BGP table version 17, neighbor version 1/17
Output queue size : 0
Index 0, Advertise bit 0
Address family not supported notification sent
Slow-peer detection is disabled
Slow-peer split-update-group dynamic is disabled
Peer had exceeded the max. no. of prefixes configured.
Maximum prefixes allowed 8
Threshold for warning message 75%
Reduce the no. of prefix and clear ip bgp 172.16.12.2 to restore peering
<... output omitted ...>
ThestateofBGPsessionwithR2routerisIdle.Thereasonisthatthepeerhad
exceededthemaximumnumberofprefixesconfigured.Youcansethatthe
maximumallowedprefixesforthisneighborare8andthethresholdforwarning
maximumallowedprefixesforthisneighborare8andthethresholdforwarning
messagesissetto75%.Thesearethevaluesthatyouconfiguredearlier.
ToforcetheneighborfromtheIdlestateintotheActivestateandtore-establishthe
BGPsession,youhavetoreducethenumberofprefixesandcleartheBGPsession
withtheneighbor.

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
An improperly configured filter in a customer router may accidentally cause the
customer router to receive many Internet routes.
Maximum prefix limitation will shut down peering session if too many prefixes
are received.
Use neighbor maximum-prefix command to configure route limiting—a
maximum number of prefixes that a BGP router is allowed to receive from a
peer.
Summary

Overview
ScalingrouterstomeetthedemandsoffullInternetroutingandassociated
administrativepoliciesrequiresprotocolslikeBGPwithembeddedscalability
mechanisms.Inenvironmentswherenetworkadministratorsmustconfiguremany
BGPpeers,peergroupsareascalabilitytoolthatreducesbothadministrative
overheadandrouterresourcerequirements.
TypicalserviceprovidernetworksusuallycontainBGP-speakingroutersthatconsist
ofmanyneighborsthatareconfiguredwiththesameadministrativepolicies.These
policiescanbeoutboundroutemaps,distributelists,filterlists,updatesource,and
soon.Youcangroupneighborswiththesameupdatepoliciesintopeergroupsto
simplifyconfigurationand,moreimportantly,tomakeBGPupdatesmoreefficient.In
thislesson,youwilllearnaboutpeergroupsasaBGPscalabilitymechanism.
Uponcompletingthislesson,youwillbeableto:
DescribetheneedforBGPpeergroups
DescribetheperformancebenefitsofusingBGPpeergroups
DescribethelimitationsofBGPpeergroups
IdentifytheCiscoIOScommandsthatarerequiredtoconfigureBGPpeer
groups
DescribetheconfigurationofBGPpeergroups
ExplaintheBGPpeergroupconfigurationexamples
DescribeBGPdynamicupdategroups
DescribeBGPpeertemplates
DescribetheBGPpeertemplateinheritance
IdentifytheCiscoIOScommandsthatarerequiredtoconfigureBGPpeer
templates
ImplementingBGPPeerGroups

Inmanycases,youasanetworkadministratormustconfigureasinglerouterwith
manyneighbors,eachneighborhavingparameterssimilartotheothers.This
situationmaycausetime-consumingconfigurationwork,becausethenyouhaveto
configurealmostthesameparametersforalloftheneighbors.Imagineyouhavea
serviceprovidernetworkthathasanedgerouterwithmanycustomersattachedtoit,
whereeachcustomerrequiresitsownBGPsession.Youmayfindthatallofthe
BGPsessionstoitscustomerroutershavealmostidenticalconfigurations.
BGP routers could have many neighbors with similar requirements:
Provider edge router with many customer connections.
BGP route reflector with many IBGP peers.
Provider edge router at an exchange point.
Most of the parameters that are specified for the BGP neighbors are identical,
with a few exceptions.
Solution is to group common parameters in a BGP peer group.
Likewise,IBGPsessionsarealmostalwaysidenticallyconfigured.Ifafullmeshis
deployedwithinanAS,manypeerconfigurationsmightexist.RecallthatanAS
containingonly15routerswillrequire([15*14]/2)=105neighborsessionstomeet
thefull-meshrequirementofBGP.Configuring105neighborswithduplicate
parametersleadtoatremendousamountofredundantconfiguration.
Toeasetheburdenofconfiguringmanyneighborswithidenticalorsimilar
parameters(forexample,routemaps,filterlists,orprefixlists),theconceptofpeer
groupswasintroduced.Youasanetworkadministratorcanconfigureatemplate,or
peergroupwithalltheBGPparametersthataretobeappliedtomanyBGPpeers.
ActualBGPneighborsareboundtothepeergroup,andyouapplythepeergroup
configurationoneachoftheBGPsessions.BGPneighborsofasingleroutercanbe
dividedintoseveralgroups,eachgrouphavingitsownBGPparameters.Actual
neighborsarethenboundtotheappropriategroup,resultinginanoptimumBGP
configuration.
BGP peer group creates a neighbor parameter template.
Configurable parameters include the following:
Community propagation
Update-source and next-hop-self
EBGP multihop
Authentication password
Neighbor weight
Prefix lists, filer lists, and route maps
Individual parameters that are specified in a peer group can be overridden on a
neighbor-by-neighbor basis.
Onarouter,thepeergroupiscreatedasatemplate.Thetemplatecanbe,among
others,configuredtodothefollowing:
Propagate,ornotpropagate,thecommunityattribute.
UsetheIPaddressofaspecificinterfaceasthesourceaddresswhenopening
theTCPsessionorusethenext-hop-selffeature.
Use,ornotuse,theEBGPmultihopfunction.
Use,ornotuse,MD5authenticationontheBGPsessions.
Filteroutanyincomingoroutgoingroutesusingaprefixlist,afilterlist,anda
routemap.
Assignaparticularweightvaluetotheroutesthatarereceived.
Whenactualneighboringroutersareassignedtothepeergrouponarouter,allof
theattributesthatareconfiguredforthepeergroupareappliedtoallpeergroup
members.CiscoIOSsoftwareoptimizestheoutgoingroutesbyrunningthroughthe
outgoingfiltersandroutingpoliciesonlyonceandthenreplicatingtheresultstoeach
ofthepeergroupmembers.Inreality,CiscoIOSsoftwareassignsapeergroup
leader,forwhichthesoftwaregeneratesanupdate,andthisupdateisreplicatedby
theleadertoallothermembersofthepeergroup.
Someparametersthatareconfiguredonthepeergroupcanbeoverriddenby
neighborconfigurations.Butonlyiftheindividualconfigurationsapplyonincoming
updates.Outgoingupdatesarealwayspreparedforthepeergroupleaderandthen
BGPPeerGroupsOverview

replicatedtotheothermembersofthepeergroup.
PeerGroupsExample—CustomerConnections
Thisexampleillustratesaserviceprovidernetworkwithagroupofcustomer
autonomoussystemsthatcanbetreatedinthesame(oraverysimilar)way.
Thefigureshowsanexamplewherepeergroupsareuseful.Thecustomer
autonomoussystemsareallassumedtoannouncelocalnetworksonly.Allcustomer
ASsshouldreceiveBGPupdateswiththesamesetofInternetroutes,andthe
customerASsareallassumedtogenerateonlyafewprefixes.
Thissituationmakestheneighborconfigurationalmostidenticalforeachofthe
customers,withonlyafewchangesthatarespecifictoeachneighbor.
Inthisscenario,theuseofthepeergroupfunctionishighlydesirable.Youasa
networkadministratorcanconfigureBGPneighborsinthecustomerASsusinga
singlepeergroup.Youconfigurethepeergrouptemplatewithreferencestoroute
policies,authenticationsettings,andthemaximumnumberofreceivedprefixes.
ThentheIPaddressesofthecustomerroutersareboundtothepeergroup,andthe
peergroupconfigurationisappliedtoallneighbors.
PeerGroupExample—BGPRouteReflector
ThisexampleillustratestheBGProutereflector.
AnotherexampleofusingpeergroupsiswithintheentirelocalAS,ontheroute
reflectors,whereeveryIBGPsessionisconfiguredidentically.IfarouterintheASis
suppliedwithsomeinformation,thenalltheroutersshouldbesuppliedwiththe
sameinformation.Otherwise,aninconsistentroutingpolicywithintheASmight
causeinconsistentroutingorapplicationofBGPpolicies.

ThepeergroupfunctionisagoodtooltomakesurethatallIBGPpeersreceivethe
sameconfigurationinformation.Youcanconfigureapeergrouptemplatewiththe
requiredparameters.YoucanconfiguretheneighborASnumber,enableofthe
send-communityoption,setoftheupdatesourcetoaloopbackinterface,and
routerauthenticationmechanisms.Then,alltheinternalneighborIPaddressesare
boundtothepeergroup,andthepeergroupconfigurationisappliedtoallofthem.
ThisapproachensuresaconsistentroutingpolicywithintheAS.
Inaserviceprovidernetwork,theroutersthatareassignedasroutereflectorsare
therouterswiththelargestnumberofIBGPsessions.Thesearetherouterswhere
thepeergroupfunctionismostuseful.
PeerGroupExample—EdgeRouterataPeeringPoint
Thisexampleillustratesanedgerouteratapeeringpoint.
Anotherexampleofusingpeergroupsisontheedgerouterthatislocatedinthe
networkwheretheserviceproviderexchangesrouteswithotherserviceproviders.
Fromtheedgerouter,theserviceproviderAScanpeerwithmanyotherservice
providers.
AllpeeringASsshouldreceivethesamesetofroutes,namelytherouteslocaltothe
serviceproviderASandtheroutesthatarereceivedfromcustomerASs.Also,all
routesthatarereceivedbytheserviceproviderpeeringrouterfromallpeeringASs
areprocessedalmostidentically.Thecharacteristicoftheexchangenetworkisthe
sameregardlessofwhichneighbortheroutesarereceivedfrom.Ifthepeeringpoint
isanFDDI,ATM,GigabitEthernet,orDPTnetwork,thepreferenceofusingthe
networkforpacketexchangemaybedifferent.However,foreachsinglepeering
point,allneighborsarereachableoverthesamenetwork,andthepreferenceis
quitelikelytobethesame.
Additionally,anumberofotherparameterscouldbethesame,suchasremoving
privateASnumbersandlimitingthenumberofroutesreceived.Inthesecases,you
canapplytheseparametersonthepeergrouptemplatebeforetheactualIP
addressesoftheneighborsareboundtothepeergroup.

Asdescribedhere,peergroupscanbeusedtocombinecommonBGPconfiguration
intoapeergroup.Neighborsarethenconfiguredbyassigningthemtothepeer
group.Bydefault,routerbuildsBGPupdatesforeachneighborindividually.Building
BGPupdatesinvolvesanumberofrouter-CPU-consumingtasks,includingscanning
theBGPtableandapplyingvariousoutgoingfilteringmechanisms(filterlists,route
maps,andprefixlists).Thesetasksmeanthatwhenarouterisconfiguredwitha
largenumberofneighbors,theCPUloadgrowsproportionally.
By default, router builds individual BGP updates for each BGP neighbor.
Common configuration can be combined into a peer group.
Neighbors are configured by assigning them to the peer group.
A single BGP update is then built for all members of a BGP peer group.
The CPU load does not increase linearly with the increased number of
neighbors.
Use peer groups wherever possible to reduce the CPU load of the BGP
process.
However,withtheuseofpeergroups,someoftherouterCPUutilizationthatis
imposedbyBGPupdategenerationissignificantlyreduced.Theuseofpeergroups
allowstheroutertoruntheBGPupdate(includingalloutgoingfilterprocessing)only
oncefortheentirepeergroup.Therouter,afterithasfinishedbuildingtheBGP
update,sendsittoeachmemberofthepeergroup.TheactualTCPtransmission
stillhastobedoneonaper-neighborbasisbecauseoftheconnection-oriented
characteristicsofBGPsessions.
RouterCPUloaddoesincreasewhentherearemoreneighborsofarouter,dueof
increasedTCPworkload,buttheuseofpeergroupscansignificantlyreducethe
increase.Therefore,youshouldusepeergroupswheneverpossibletoreducethe
CPUload.
BGPpeergroupsarethefundamentalBGPscalabilitytool
andshouldbeusedinallenvironmentswherearouterhas
alargenumberofBGPneighbors.
RoutersbuiltBGPupdatesforeachneighborindividually
beforetheintroductionofdynamicupdategroups,which
wereintroducedinCiscoIOSRelease12.0(24)S.
Dynamicupdategroups,whichareenabledbydefault,
allowrouterstodynamicallycalculateandoptimize
updatesthataresenttoneighborthatsharethesame
outboundpolicies.Althoughthisnewfeatureeffectively
mademanuallydefinedpeergroupsobsolete,many
administratorsstillusepeergroupsastheyoffer
convenienceduringconfiguration.
BGPPeerGroupsasaPerformanceTool

BGPpeergroupswereintroducedprimarilyforCPUusageoptimization.Because
therouterbuildsonlyoneupdateforallmembersofthesamepeergroup,some
restrictionsapplytomembersofthepeergroup.
Peer groups have a number of limitations because of the way that they are used to
build BGP updates.
Peer groups were intended to be used only for CPU optimization.
Awkward with similar but not identical configuration policies.
IBGP and EBGP neighbors cannot be mixed in a peer group.
Per-neighbor BGP parameters that affect outbound updates cannot be changed
for peer group members.
BGPparametersandoutboundroutingpoliciescannotdifferbetweengroup
membersbecausedoingsocouldcausedifferentupdatestobesenttotwo
membersofthesamepeergroup.Routercreatesonlyoneupdate,whichisthen
replicatedtoallmembers.Therefore,peergroupsareawkwardwhenusedona
routerwithseveralneighborsthathavesimilarbutnotcompletelyidenticalpolicies.
AlsoEBGPandIBGPupdatesareverydifferent.Thesamepeergroupcannotbe
usedforEBGPandIBGPneighbors,eventhoughapartoftheconfigurationisthe
sameforbothtypesofneighbors.Anexamplewouldbeifyouwantedtochangethe
BGPkeepaliveandhold-downtimersforbothIBGPandEBGPsessions.Usingpeer
groups,youmustspecifythetimersinbothpeergroups(IBGPandEBGP),because
theyusedifferentconfigurationsduetothedifferentnatureofIBGPandEBGP
sessions.AlsoEBGPupdateshavetheASpathattributechanged.IBGPsessions
passonlythelocalpreferenceattribute.TheMEDattributethatisreceivedfroma
remoteASispassedontoIBGPsessionsbutisremovedbeforeitissentonan
EBGPsession.ThereforecommonBGPparametersmustbereplicatedacrossall
peergroups,andthereisnowaytouseonlyonepeergroupforcommon
configuration.
BGPPeerGroupLimitations

1.
2.
3.
4.
TofinishBGPpeergroupconfiguration,youfirsthavetocreateapeergroup,
specifyparameterforthepeergroup,andthenassignneighborsintothepeergroup.
router(config-router)# neighbor group-name peer-group
Creates a BGP peer group (peer groups names are case-sensitive) .
router(config-router)# neighbor group-name any-BGP-parameter
Specifies any BGP parameter for the peer group.
router(config-router)# neighbor ip-address peer-group peer-group-name
Assigns a BGP neighbor to a peer group. The neighbor inherits all the BGP
parameters that are specified for the peer group.
router(config-router)# neighbor ip-address any-BGP-parameter
Overrides a BGP parameter that is specified for the peer group with a neighbor-
specific parameter.
ToconfigureBGPpeergroupsonCiscoIOSrouters,performthefollowingsteps:
CreateaBGPpeergroup.
TocreateaBGPpeergroup,usetheneighborpeer-grouprouterconfiguration
command.
neighbor peer-group-name peer-group
SpecifyparametersfortheBGPpeergroup.
Afteryouhavecreatedapeergroup,youcanconfigureitwiththeneighbor
commands.Bydefault,membersofthepeergroupinheritalltheconfiguration
optionsofthepeergroup.Youcanalsoconfigurememberstooverridetheoptions
thatdonotaffectoutboundupdates.Peergroupmemberswillalwaysinheritthe
followingconfigurationoptions:remote-as(ifconfigured),version,update-source,
out-route-map,out-filter-list,out-dist-list,minimum-advertisement-interval,and
next-hop-self.Allpeergroupmemberswillinheritchangesthataremadetothe
peergroup.
CreateaBGPneighbor.
Assignthisneighborintothepeergroup.
ToconfigureaBGPneighbortobeamemberofapeergroup,usetheneighbor
peer-grouprouterconfigurationcommand.
neighbor ip-address peer-group peer-group-name
SyntaxDescription
Parameter Description
ip-address IPaddressoftheBGPneighborthatbelongstothepeergroup
thatisspecifiedbythetag.
peer-group-name NameoftheBGPpeergrouptowhichthisneighborbelongs.
Afteryouhaveassignedanactualneighbortobeamemberofthepeergroup,all
configurationsthataremadetothepeergrouptemplatearethenappliedtoallthe
neighborsthatareassignedtothatpeergroup.Throughconfiguration,peergroup
configurationsmaybeoverriddenforanindividualneighbor,aslongasthechanges
applyonlytoincomingupdates.Rememberthatoutgoingupdatesarepreparedonly
onceandthenreplicated.
Thepeergroupisaverypowerfultoolwhennetwork
administratorsaredealingwithalargenumberof
neighborswithalmostidenticalconfigurations.However,if
anyofthecustomersrequireroutinginformationthat
ConfiguringBGPPeerGroups

differsfromthatofothermembersofthepeergroup,then
thatneighbormustberemovedfromthepeergroupand
configuredasanindividualneighbor.

Overview
Throughthisdiscovery,youwilllearnhowtoconfigureBGPpeergroup.Apeer
groupwillbeusedforallcustomeroftheserviceproviderbecausetheyshare
identicalroutingpolicy.Youwillputallneighborconfigurationinthepeergroup
configurationandthepeerswilltheninheritthepeergroupconfiguration.
Discovery19:ConfigureBGPPeerGroups

Topology

Ifyoushutdownaninterfaceonarealrouterorswitch,the
connecteddevicewillseeitas"down/down."Dueto
virtualizationspecifics,IOLbehaviorisslightlydifferent.If
youshutdownaninterfaceonarouterorswitch,the
connecteddevicewillseeitas"up/up."InIOL,thestatus
ofaninterfacecanonlybe"up/up"or"administratively
down/down."
DeviceInformation
Device Interface IPaddress Description
ISP1 Ethernet0/1 172.16.11.11/24 ConnectiontoR1
ISP1 Ethernet0/2 172.16.12.11/24 ConnectiontoR2
ISP1 Ethernet0/3 172.16.13.11/24 ConnectiontoR3
R1 Ethernet0/1 172.16.11.1/24 ConnectiontoISP1
R1 Loopback1 10.1.0.1/24 Loopbacksimulates
LANnetwork
R2 Ethernet0/2 172.16.12.2/24 ConnectiontoISP1
R2 Loopback1 10.2.0.1/24 Loopbacksimulates
LANnetwork
R3 Ethernet0/3 172.16.13.3/24 ConnectiontoISP1
R3 Loopback1 10.3.0.1/24 Loopbacksimulates
LANnetwork
IPaddressesandadvertisednetworksinBGParepreconfiguredasshownbelow:
BGPisalsopreconfiguredasEBGP:
ISP1toR1
ISP1toR2
ISP1toR3
JobAids

Step1
OntheISP1router,verifythatyoureceivenetworks,thatallthreecustomersadvertise.
ISP1# show ip bgp
BGP table version is 4, local router ID is 172.16.13.11
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.1.0.0/24 172.16.11.1 0 150 0 1 i
*> 10.2.0.0/24 172.16.12.2 0 150 0 2 i
*> 10.3.0.0/24 172.16.13.3 0 150 0 3 i
YoucanseethatISP1routerinAS100receivedthreenetworks,eachfromdifferent
customer:
10.1.0.0/24networkoriginatesinthefirstcustomer'sAS1.
10.2.0.0/24networkoriginatesinthesecondcustomer'sAS2.
10.3.0.0/24networkoriginatesinthethirdcustomer'sAS3.
Notethatallthreenetworkshavelocalpreferencesetto150.Routemapisusedtoset
thelocalpreferenceforallthreeneighbors.
ISP1# show route-map
route-map Filter, permit, sequence 10
Match clauses:
Set clauses:
local-preference 150
Policy routing matches: 0 packets, 0 bytes
Step2
OntheISP1router,verifytheBGPconfiguration.
ISP1# show running-config | section bgp
router bgp 100
bgp log-neighbor-changes
neighbor 172.16.11.1 remote-as 1
neighbor 172.16.11.1 prefix-list Customer in
neighbor 172.16.11.1 route-map Filter in
neighbor 172.16.11.1 filter-list 10 in
neighbor 172.16.12.2 remote-as 2
neighbor 172.16.12.2 prefix-list Customer in
neighbor 172.16.12.2 route-map Filter in
neighbor 172.16.12.2 filter-list 10 in
neighbor 172.16.13.3 remote-as 3
neighbor 172.16.13.3 prefix-list Customer in
neighbor 172.16.13.3 route-map Filter in
neighbor 172.16.13.3 filter-list 10 in
Allthreeneighborsareconfiguredwiththesameparameters.Insteadof
configuringthesameconfigurationthreetimes,youcanputalltheconfiguration
intothepeergroupconfigurationandassignalltheneighbortothispeergroup.
Step3
OntheISP1router,createapeergroupCUSTOMERS.
ISP1(config)# router bgp 100
ISP1(config-router)# neighbor CUSTOMERS peer-group
Step4
OntheISP1router,moveallper-neighborBGPconfigurationintopeergroup
configuration.
ConfigureBGPPeerGroups
DiscoverySteps

Removethefilterlist10,prefixlistCustomer,androutemapFilterfromallthree
neighbors.ApplythisthreeroutingpoliciestotheCUSTOMERSpeergroup
ISP1(config)# router bgp 100
ISP1(config-router)# neighbor CUSTOMERS prefix-list Customer in
ISP1(config-router)# neighbor CUSTOMERS route-map Filter in
ISP1(config-router)# neighbor CUSTOMERS filter-list 10 in
ISP1(config-router)# no neighbor 172.16.11.1 prefix-list Customer in
ISP1(config-router)# no neighbor 172.16.11.1 route-map Filter in
ISP1(config-router)# no neighbor 172.16.11.1 filter-list 10 in
ISP1(config-router)# no neighbor 172.16.12.2 prefix-list Customer in
ISP1(config-router)# no neighbor 172.16.12.2 route-map Filter in
ISP1(config-router)# no neighbor 172.16.12.2 filter-list 10 in
ISP1(config-router)# no neighbor 172.16.13.3 prefix-list Customer in
ISP1(config-router)# no neighbor 172.16.13.3 route-map Filter in
ISP1(config-router)# no neighbor 172.16.13.3 filter-list 10 in
ApplyingtheroutingpoliciesonlytothepeergroupsimplifiestheBGP
configurationandimprovesBGPscalability.Insteadofconfiguringthesame
parametersforeachneighbor,younowconfigurethemonlyonceandthen
assignasmanyneighbortothepeergroupasyouwant.
Step5
OntheISP1router,assignallthreeneighborstotheCUSTOMERSpeergroup.
ISP1(config)# router bgp 100
ISP1(config-router)# neighbor 172.16.11.1 peer-group CUSTOMERS
ISP1(config-router)# neighbor 172.16.12.2 peer-group CUSTOMERS
ISP1(config-router)# neighbor 172.16.13.3 peer-group CUSTOMERS
Thisconfigurationenablestheneighborsthatareassignedtothepeergroup,to
inheritcommonconfigurationfromthepeergroup.Youdonotneedtoconfigure
eachindividualneighbor.
MonitoringPeerGroups
router# show ip bgp peer-group [peer-group-name]
Displays the definition of the specified peer group or all peer groups
router# show ip bgp peer-group [peer-group-name] summary
Displays summary status of all neighbors in the peer group
router# clear ip bgp [peer-group-name] [soft [in | out]]
Clears BGP session with all peer group members
TodisplayinformationaboutBGPpeergroups,usetheshowipbgppeer-group
command.Ifyouusesummarykeyword,onlyasummaryofthestatusofallthe
membersofapeergroupwillbeshown.
ToresettheBGPsessionswithallthemembersofapeergroup,usetheclearip
bgpcommand.
clear ip bgp {* | neighbor-address | peer-group-name} [soft [in | out]]
SyntaxDescription
Parameter Description
*ResetsallcurrentBGPsessions.
neighbor-address ResetsonlythespecifiedBGPneighbor.
peer-group-name ResetsonlythespecifiedBGPpeergroup.
soft (Optional)Initiatessoftreconfiguration.
in|out (Optional)Triggersinboundoroutboundsoftreconfiguration.If

youdonotspecifytheinoroutoption,bothinboundand
outboundsoftreconfigurationaretriggered.
Parameter Description
Step6
OntheISP1router,verifythatallprefixlist,filterlist,androutemapconfiguration
isnowappliedtothepeergroupCUSTOMER.
ISP1# show ip bgp peer-group
BGP peer-group is CUSTOMERS
BGP version 4
Neighbor sessions:
0 active, is not multisession capable (disabled)
Default minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
BGP neighbor is CUSTOMERS, peer-group external, members:
172.16.11.1 172.16.12.2 172.16.13.3
Index 0, Advertise bit 0
Incoming update prefix filter list is Customer
Incoming update AS path filter list is 10
Route map for incoming advertisements is Filter
Update messages formatted 0, replicated 0
Number of NLRIs in the update sent: max 0, min 0
Youcanseethatallparametersconfiguredforthepeergrouparelistedinthe
output:
Prefixlist"Customer"forincomingupdates.
Filterlist"10"forincomingupdates.
Routemap"Filter"forincomingupdates.
NotethatthepeergroupshouldhaveonlyIBGPmembersorEBGPmembers.
ThispeergroupcontainsEBGPpeers—172.16.11.1,172.16.12.2,and
172.16.13.3.Thesearethepeersthatinherittheconfigurationfromthepeer
group.
Anotheroptiontoverifytheconfigurationthatisappliedtothepeergroupisto
simplyviewtheBGPconfigurationontheISP1.
ISP1# show running-config | section bgp
router bgp 100
bgp log-neighbor-changes
neighbor CUSTOMERS peer-group
neighbor CUSTOMERS prefix-list Customer in
neighbor CUSTOMERS route-map Filter in
neighbor CUSTOMERS filter-list 10 in
neighbor 172.16.11.1 remote-as 1
neighbor 172.16.11.1 peer-group CUSTOMERS
neighbor 172.16.12.2 remote-as 2
neighbor 172.16.12.2 peer-group CUSTOMERS
neighbor 172.16.13.3 remote-as 3
neighbor 172.16.13.3 peer-group CUSTOMERS
Step7
OntheISP1router,verifythatR1,R2,andR3peersarepartoftheCUSTOMERSpeergroup.
ISP1# show ip bgp peer-group CUSTOMERS summary
BGP router identifier 172.16.13.11, local AS number 100
BGP table version is 10, main routing table version 10
3 network entries using 444 bytes of memory
3 path entries using 192 bytes of memory
6/3 BGP path/bestpath attribute entries using 816 bytes of memory
3 BGP AS-PATH entries using 72 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1524 total bytes of memory
BGP activity 24/21 prefixes, 27/24 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
172.16.11.1 4 1 18 23 10 0 0 00:12:10 1
172.16.12.2 4 2 18 23 10 0 0 00:11:58 1
172.16.13.3 4 3 17 21 10 0 0 00:11:46 1

TheoutputlistsyouallthemembersofCUSTOMERSpeergroup
R1(172.16.11.1)
R2(172.16.12.2)
R3(172.16.13.3)
Anotheroptiontoverifythattheneighborisamemberofthepeergroupisusingtheshowipbgp
neighborcommand.
ISP1# show ip bgp neighbor 172.16.11.1
BGP neighbor is 172.16.11.1, remote AS 1, external link
Member of peer-group CUSTOMERS for session parameters
BGP version 4, remote router ID 10.1.0.1
BGP state = Established, up for 00:12:39
Last read 00:00:44, last write 00:00:28, hold time is 180, keepalive interval is 60 seconds
<... output omitted ...>
ISP1# show ip bgp neighbor 172.16.12.2
BGP neighbor is 172.16.12.2, remote AS 2, external link
Member of peer-group CUSTOMERS for session parameters
BGP version 4, remote router ID 10.2.0.1
BGP state = Established, up for 00:13:00
Last read 00:00:13, last write 00:00:12, hold time is 180, keepalive interval is 60 seconds
<... output omitted ...>
ISP1# show ip bgp neighbor 172.16.13.3
BGP neighbor is 172.16.13.3, remote AS 3, external link
Member of peer-group CUSTOMERS for session parameters
BGP version 4, remote router ID 10.3.0.1
BGP state = Established, up for 00:13:08
Last read 00:00:12, last write 00:00:28, hold time is 180, keepalive interval is 60 seconds
<... output omitted ...>
Step8
OntheISP1router,verifythatyoustillreceivenetworks,thatallthreecustomers
advertise.Verifythatthelocalpreferenceisstillsetto150forallthenetworks.
ISP1# show ip bgp
BGP table version is 10, local router ID is 172.16.13.11
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.1.0.0/24 172.16.11.1 0 150 0 1 i
*> 10.2.0.0/24 172.16.12.2 0 150 0 2 i
*> 10.3.0.0/24 172.16.13.3 0 150 0 3 i
YoucanseethatISP1routerinAS100receivedthreenetworks,eachfromdifferent
customer:
10.1.0.0/24networkoriginatesinthefirstcustomer'sAS1.
10.2.0.0/24networkoriginatesinthesecondcustomer'sAS2.
10.3.0.0/24networkoriginatesinthethirdcustomer'sAS3.
Allthreenetworksstillhavelocalpreferencesetto150.Eventhoughtheroutemapthat
setsthelocalpreferenceisnowincludedinthepeergroupconfiguration,theneighbors
inheritedtheconfigurationfromthepeergroup.

PeerGroupConfigurationExample—BGPRouteReflector
Inthisexample,arouteractingasaBGProutereflectorhasfourIBGPneighbors.
router(config)# router bgp 100
router(config-router)# neighbor IBGP_peers peer-group
router(config-router)# neighbor IBGP_peers remote-as 100
router(config-router)# neighbor IBGP_peers update-source loopback 0
router(config-router)# neighbor IBGP_peers password c73Dx8K
router(config-router)# neighbor IBGP_peers send-community
router(config-router)# neighbor 10.0.1.3 peer-group IBGP_peers
router(config-router)# neighbor 10.0.1.4 peer-group IBGP_peers
router(config-router)# neighbor 10.0.1.6 peer-group IBGP_peers
router(config-router)# neighbor 10.0.1.8 peer-group IBGP_peers
InalargeAS,someroutersmayhavemanyIBGPsessions.Apeergroupthatis
named"IBGP_peers"iscreatedtohandlealloftheIBGPsessions.Thepeergroup
iscreatedandconfiguredwiththeremoteAS,update-source,authentication,and
community-passingparameters.Whentheactualneighborsareconfiguredas
membersofthepeergroup,alltheseconfigurationparameterswillapplytoallofthe
neighbors.
InthecaseofIBGP,theremoteAScanalsobepartofthepeergroupconfiguration
sincetheASnumberisthesameforallpeergroupmembers.
ThepeergroupisaverypowerfultoolwhenyouaredealingwithmanyIBGP
neighbors.Youcangivealloftheneighborsthesameconfigurationtoensurea
consistentAS-wideroutingpolicy.
PeerGroupConfigurationExample—EdgeRouterataPeering
Point
Inthisexample,therouterinAS100isbeingconfiguredwithapeergroupnamed
"Peering"
PE(config)# router bgp 100
PE(config-router)# neighbor Peering peer-group
PE(config-router)# neighbor Peering filter-list 10 in
PE(config-router)# neighbor Peering route-map PeerMap out
PE(config-router)# neighbor Peering maximum-prefix 50
PE(config-router)# neighbor Peering remove-private-as
PE(config-router)# neighbor 209.165.207.7 remote-as 700
PE(config-router)# neighbor 209.165.207.7 peer-group Peering
PE(config-router)# neighbor 209.165.208.8 remote-as 800
PE(config-router)# neighbor 209.165.208.8 peer-group Peering
PE(config-router)# no neighbor 209.165.208.8 maximum-prefix 50
PE(config-router)# no neighbor 209.165.208.8 filter-list 10 in
PE(config-router)# neighbor 209.165.209.9 remote-as 900
PE(config-router)# neighbor 209.165.209.9 peer-group Peering
BGPPeerGroupConfigurationExamples

Thispeergroupisusedforallpeerprovidersbecausetheyshareanalmostidentical
routingpolicy.Thepeergroupisfirstcreatedasatemplate,whichisconfiguredwith
anincomingASpathfilterlist(list10)andanoutgoingroutemapnamed"PeerMap."
Themaximumnumberofreceivedprefixesisalsosetinthepeergroupto50.The
peergrouphasalsobeenconfiguredtoremoveprivateASnumbersfromallAS
pathsbeforetheroutesaresenttothepeerAS.TheseASnumbersareintherange
64512to65535inclusive.
TheneighborsinAS700,AS800,andAS900arethenassignedtothepeergroup,
meaningthattherouterinAS100willattempttoopenBGPsessionswiththose
routers.IftheBGPsessionsaresuccessfullyestablished,filterlist10andtheroute
mapPeerMap,asconfiguredinthepeergroup,willbeappliedtoincomingand
outgoingroutesfrombothneighbors,respectively.
Asdefinedintherouterconfiguration,filterlist10filtersoutanyincomingroutesfrom
peergroupmembersunlessotherwisespecified.However,inthecaseofthe
neighborinAS800,theindividualconfigurationofnofilter-list10willoverridethe
peergroupconfiguration.Thus,thefilterlistwillnotbeusedforthisneighbor.The
limitationonthenumberofreceivedroutesfromAS800isalsoremovedfromthe
neighborinAS800.
Thepeergroupisaverypowerfultoolwhenyouare
dealingwithalargenumberofneighborswithalmost
identicalconfigurations.However,ifanyofthecustomers
thatareassignedtothepeergrouprequirerouting
informationthatisdifferentfromothermembersofthe
peergroup,thenthatneighbormustberemovedfromthe
peergroupandconfiguredindividually.

IntheCiscoIOS12.0(24)SreleaseCiscointroduceddynamicupdatepeergroups,a
featurethatenablestherouterstoautomaticallygroupBGPneighborintogroups
andgenerateupdatemessagesaccordingly.
Separates BGP update generation from neighbor configuration
Introduces a new algorithm that dynamically calculates and optimizes update
groups of neighbors that share the same outbound policies.
Requires no additional configuration.
Optimal BGP update message generation occurs automatically and
independently
InpreviousversionsofCiscoIOSsoftware,BGPupdatemessagesweregrouped
basedonpeergroupconfigurations.ThismethodofgroupingneighborsforBGP
updatemessagegenerationreducedtheamountofsystemprocessingresources
thatareneededtoprocesstheroutingtable.Thismethod,however,hadthe
followinglimitations:
Allneighborsthatsharedthesamepeergroupconfigurationalsohadtoshare
thesameoutboundroutingpolicies.
Allneighborshadtobelongtothesamepeergroupandaddressfamily.
Neighborsthatareconfiguredindifferentpeergroupscannotbelongtodifferent
addressfamilies.
Theselimitationsexistedtobalanceoptimalupdategenerationandreplication
againstpeergroupconfiguration.Theselimitationsalsocausedthenetworkoperator
toconfiguresmallerpeergroups,whichreducedtheefficiencyofupdatemessage
generation.
TheBGPdynamicupdategroupsfeaturecontainsanalgorithmthatdynamically
calculatesandoptimizesupdategroupsofneighborsthatshareoutboundpolices
andcansharetheupdatemessages.TheBGPdynamicupdategroupsfeature
separatesupdategroupreplicationfrompeergroupconfiguration,improving
convergencetimeandflexibilityofneighborconfiguration.TheBGPupdategroups
requirenoconfiguration,andarouteroptimizesBGPupdatemessagegeneration
automatically.
Whenachangetotheconfigurationoccurs,therouterautomaticallyrecalculates
updategroupmembershipsandappliesthechangesbytriggeringanoutboundsoft
resetaftera3-minutetimerexpires.Thisbehaviorisdesignedtoprovidethe
networkoperatorwithtimetochangetheconfigurationifamistakeismade.
Asoftreset,whichisperformedonaper-neighborbasis,
doesnotcleartheBGPsessionandfacilitatesthe
applicationofnewpolicies.Therearetwomethodsof
performingasoftreset.Dynamicinboundsoftresetis
usedtogenerateinboundupdatesfromaneighbor.An
outboundsoftresetisusedtosendanewsetofupdates
toaneighbor.
clear ip bgp update-group [index-group | ip-address]
Clears BGP update-group member sessions.
debug ip bgp groups [index-group | ip-address]
Displays information that is related to the processing of BGP update-groups.
show ip bgp replication [index-group | ip-address]
Displays update replication statistics for BGP update-groups.
show ip bgp update-group [index-group | ip-address] [summary]
Displays information about BGP update-groups.
Ifnoargumentisspecified,theclearipbgpupdate-groupcommandrecalculates
allupdate-groups.Specificindexnumbersforupdategroupsandinformationabout
BGPDynamicUpdatePeerGroupsFeature

update-groupmembershipisdisplayedintheoutputoftheshowipbgpupdate-
groupanddebugipbgpgroupscommands.
clearipbgpupdate-group
ToclearBGPupdate-groupmembersessions,usetheclearipbgpupdate-group
commandinprivilegedEXECmode.
clear ip bgp update-group [index-group | ip-address]
SyntaxDescription
Parameter Description
index-group (Optional)Specifiesthattheupdate-groupwithcorresponding
indexnumberwillbereset.Therangeofupdate-groupindex
numbersisfrom1to4294967295.
ip-address (Optional)SpecifiestheIPaddressofasinglepeerthatwillbe
reset.
debugipbgpgroups
Theoutputofthedebugipbgpgroupscommanddisplaysyouinformationabout
update-groupcalculationsandtheadditionandremovalofupdate-groupmembers.
Informationaboutpeergroupsandpeer-policyandpeer-sessiontemplatesisalso
displayedintheoutputofthiscommandasneighborconfigurationschange.
debug ip bgp groups [index-group | ip-address]
SyntaxDescription
Parameter Description
index-group (Optional)Specifiesthatupdate-groupdebugginginformationfor
thecorrespondingindexnumberwillbedisplayed.Therangeof
update-groupindexnumbersisfrom1to4294967295.
ip-address (Optional)Specifiesthatupdate-groupdebugginginformationfor
asinglepeerwillbedisplayed.
Thefollowingexampleoutputfromthedebugipbgpgroupscommandshowsthe
recalculationofupdate-groupsaftertheclearipbgpgroupscommandwasissued:
ISP1# debug ip bgp groups
5w4d: %BGP-5-ADJCHANGE: neighbor 172.16.11.1 Down User reset
5w4d: BGP-
DYN(0): Comparing neighbor 172.16.11.1 flags 0x0 cap 0x0 and updgrp 2 fl0
5w4d: BGP-DYN(0): Update-
group 2 flags 0x0 cap 0x0 policies same as 172.16.11.1 fl0
5w4d: %BGP-5-ADJCHANGE: neighbor 172.16.12.2 Down User reset
5w4d: BGP-
DYN(0): Comparing neighbor 172.16.12.2 flags 0x0 cap 0x0 and updgrp 2 fl0
5w4d: BGP-DYN(0): Update-
group 2 flags 0x0 cap 0x0 policies same as 172.16.12.2 fl0
5w4d: %BGP-5-ADJCHANGE: neighbor 172.16.100.22 Down User reset
5w4d: BGP-
DYN(0): Comparing neighbor 172.16.100.22 flags 0x0 cap 0x0 and updgrp 2 fl
0
5w4d: BGP-DYN(0): Update-
group 2 flags 0x0 cap 0x0 policies same as 172.16.100.22 fl0
5w4d: %BGP-5-ADJCHANGE: neighbor 172.16.11.1 Up
5w4d: %BGP-5-ADJCHANGE: neighbor 172.16.100.22 Up
5w4d: %BGP-5-ADJCHANGE: neighbor 172.16.12.2 Up
Theoutputofthiscommandcanbeveryverbose,soyou
shouldnotdeploythiscommandinaproductionnetwork
unlessyouaretroubleshootingaproblem.
showipbgpreplication
TodisplayupdatereplicationstatisticsforBGPupdate-groups,usetheshowipbgp
replicationcommand.
show ip bgp replication [index-group | ip-address]

SyntaxDescription
Parameter Description
index-group (Optional)Specifiesthatupdatereplicationstatisticsforthe
update-groupwithcorrespondingindexnumberwillbedisplayed.
Therangeofupdate-groupindexnumbersisfrom1to
4294967295.
ip-address (Optional)SpecifiestheIPaddressofasingleneighborforwhich
update-groupstatisticswillbedisplayed.
Thefollowingsampleoutputfromtheshowipbgpreplicationcommandshows
update-groupreplicationinformationforallforneighbors:
ISP1# show ip bgp replication
Curren
t Next
Index Members Leader MsgFmt MsgRepl Csize Versio
n Version
1 2 172.16.11.1 0 0 0/1000 1
/0
2 1 172.16.100.22 0 0 0/1000
1/0
showipbgpupdate-group
TodisplayinformationaboutBGPupdate-groups,usetheshowipbgpupdate-
group.
show ip bgp update-group [index-group | ip-address] [summary]
SyntaxDescription
Parameter Description
index-group (Optional)Specifiesthatupdatereplicationstatisticsforthe
update-groupwithcorrespondingindexnumberwillbedisplayed.
Therangeofupdate-groupindexnumbersisfrom1to
4294967295.
ip-address (Optional)SpecifiestheIPaddressofasingleneighborforwhich
update-groupstatisticswillbedisplayed.
summary (Optional)Displaysasummaryofupdate-groupmember
information.
Theoutputcanbefilteredtoshowinformationforasingleindex-
grouporpeerwiththeindex-grouporip-addressargument.
Thefollowingsampleoutputfromtheshowipbgpupdate-groupcommandshows
update-groupinformationforallneighbors:
ISP1# show ip bgp update-group
BGP version 4 update-group 1, external, Address Family: IPv4 Unicast
BGP Update version : 6/0, messages 0
Topology: global, highest version: 6, tail marker: 6
Format state: Current working (OK, last minimum advertisement interval)
Refresh blocked (not in list, last not in list)
Update messages formatted 1, replicated 2, current 0, refresh 0, limit 1
000
Number of NLRIs in the update sent: max 5, min 0
Minimum time between advertisement runs is 30 seconds
Has 1 member:
172.16.100.22
BGP version 4 update-group 2, external, Address Family: IPv4 Unicast
BGP Update version : 6/0, messages 0
Topology: global, highest version: 6, tail marker: 6
Format state: Current working (OK, last minimum advertisement interval)
Refresh blocked (not in list, last not in list)
Route map for outgoing advertisements is CUST1
Update messages formatted 1, replicated 2, current 0, refresh 0, limit 1
000
Number of NLRIs in the update sent: max 5, min 0
Minimum time between advertisement runs is 30 seconds
Has 2 members:
172.16.12.2 172.16.11.1

TheBGPdynamicupdategroupsfeatureseparatespeergroupconfigurationfrom
updategroupgeneration.BGPneighborconfigurationisnolongerrestrictedby
outboundroutingpolicies,andupdategroupscanbelongtodifferentaddress
families.
Peer templates contain configuration pattern that can be applied to neighbors
that share common policies.
They are reusable and support inheritance, which allows you to group and apply
distinct neighbor configurations for BGP neighbors.
You can define very complex configuration patterns through the use of
inheritance.
EventhoughBGPupdatemessagegenerationhasbeenseparatedfrompeergroup
configuration,peergroupconfigurationstillhasthefollowinglimitations:
Aneighborcanbelongonlytoonepeergroup.
Neighborsthatbelongtodifferentaddressfamiliescannotbelongtothesame
peergroup.
Differentsetsofpoliciescannotbegroupedandappliedtoaneighbor.
Toaddressthelimitationsofpeergroups,theBGPpeertemplatesfeaturewas
introducedalongwiththeBGPdynamicupdategroupsfeature.
Apeertemplateisaconfigurationpatternthatcanbeappliedtoneighborsthatshare
commonpolicies.Peertemplatesarereusableandsupportinheritance,whichallows
youtogroupandapplydistinctneighborconfigurationsforBGPneighborsthatshare
commonpolicies.Peertemplatesalsoallowyoutodefineverycomplex
configurationpatterns,sinceapeertemplatecaninheritaconfigurationfromanother
peertemplate.
Theexampleinthefigurepresentspeertemplateinheritance.Onepeertemplate,
calledBGP,isconfiguredandcontainsparametersthatarecommontoallBGP
neighbors.Intheexample,suchparametersaretheBGPkeepaliveandhold-down
timers.ThenonepeertemplateisconfiguredforIBGPandoneforEBGPneighbors.
BothtemplatesinheritsettingsfromthecommonpeertemplatethatiscalledBGP
andaddotherparametersthatarecommononlytoIBGPorEBGPsettings,
respectively.Thereforetemplatescanbecreatedmoreeffectivelywithfewer
configurationswhencomparedtoBGPpeergroups.
Two types of peer templates are available:
Peer session template: Used to group and apply the configuration of general
session commands that are common to all address-family configuration modes.
Peer policy template: Used to group and apply the configuration of commands
that are applied within specific address-family configuration modes.
Therearetwotypesofpeertemplates:
Peersessiontemplatesareusedtogroupandapplytheconfigurationofgeneral
sessioncommandsthatarecommontoalladdress-familiesconfiguration
modes.
Peerpolicytemplatesareusedtogroupandapplytheconfigurationof
commandsthatareappliedwithinspecificaddress-familiesconfigurationmodes.
Peertemplatesimprovetheflexibilityandenhancethecapabilityofneighbor
configuration.Peertemplatesalsoprovideanalternativetopeergroupconfiguration
andovercomesomelimitationsofpeergroups.BGPpeerroutersusingpeer
templatesalsobenefitfromautomaticupdategroupconfiguration.Withthe
configurationoftheBGPpeertemplatesthesupportoftheBGPdynamicupdate
BGPPeerTemplatesOverview

peergroupsfeature,younolongerneedtoconfigurepeergroupsinBGP.You
benefitfromimprovedconfigurationflexibilityandfasterconvergence.
TheconfigurationofBGPpeertemplatesdoesnotconflict
withorrestrictpeergroupconfiguration,andpeergroups
arestillsupportedinCiscoIOSReleasesthatsupport
BGPpeertemplates.However,aBGPneighborcannotbe
configuredtoworkwithbothpeergroupsandpeer
templates.ABGPneighborcanbeconfiguredtobelong
onlytoapeergrouportoinheritpoliciesfrompeer
templates.

Theinheritancecapabilityisakeycomponentofpeer-templateoperation.
Inheritanceinapeertemplateissimilartothenodeandtreestructuresthatare
commonlyfoundingeneralcomputing—forexample,fileanddirectorytrees.Apeer
templatecandirectlyorindirectlyinheritaconfigurationfromanotherpeertemplate.
Thedirectlyinheritedpeertemplaterepresentsthetreeinthestructure,andthe
indirectlyinheritedpeertemplaterepresentsanodeinthetree.Becauseeachnode
alsosupportsinheritance,branchescanbecreatedthatapplytheconfigurationsof
allindirectlyinheritedpeertemplateswithinachainthattracesbacktothedirectly
inheritedpeertemplateorthesourceofthetree.Thisstructureeliminatestheneed
torepeatconfigurationstatementsthatarecommonlyreappliedtogroupsof
neighbors.Commonconfigurationstatementscannowbeappliedonceandthen
indirectlyinheritedbypeertemplatesthatareappliedtoneighborgroupswith
commonconfigurations.
The BGP peer templates inheritance characteristics are as follows:
A session template can inherit configuration from another session template.
A policy template can inherit configuration from another policy template.
Neighbors can inherit from a session and a policy template.
Inheritanceexpandsthescalabilityandflexibilityofneighborconfiguration.Itallows
youtochaintogetherpeer-templateconfigurationstocreatesimpleconfigurations
thatinheritcommonconfigurationstatementsorcomplexconfigurationsthatapply
specificconfigurationstatementsalongwithcommoninheritedconfigurations.
Generalsessioncommandscanbeconfiguredonceinapeersessiontemplateand
thenappliedtomanyneighborsthroughthedirectapplicationofapeersession
template.Orthroughindirectinheritancefromapeersessiontemplate.The
configurationofpeersessiontemplatessimplifiestheconfigurationofgeneral
sessioncommandsthatarecommonlyappliedtoallneighborswithinanAS.
Peersessiontemplatessupportdirectandindirectinheritance.Apeercanbe
configuredwithonlyonepeersessiontemplateatatime,andthatpeersession
templatecancontainonlyoneindirectlyinheritedpeersessiontemplate.
Ifyouattempttoconfiguremorethanoneinheritstatement
withasinglepeersessiontemplate,anerrormessagewill
bedisplayed.
ThisbehaviorallowsaBGPneighbortodirectlyinheritonlyonesessiontemplate
andindirectlyinherituptosevenadditionalpeersessiontemplates.Thispractice
allowsyoutoapplyamaximumofeightpeersessionconfigurationstoaneighbor.
Theconfigurationfromthedirectlyinheritedpeersessiontemplate,andthe
configurationsfromuptosevenindirectlyinheritedpeersessiontemplates.Inherited
peersessionconfigurationsareevaluatedfirstandappliedstartingwiththelastnode
inthebranchandendingwiththedirectlyappliedpeersessiontemplate
configurationatthesourceofthetree.Thedirectlyappliedpeersessiontemplatewill
havepriorityoverinheritedpeersessiontemplateconfigurations.Anyconfiguration
statementsthatareduplicatedininheritedpeersessiontemplateswillbeoverwritten
bythedirectlyappliedpeersessiontemplate.Meaningthatifageneralsession
commandisreappliedwithadifferentvalue,thesubsequentvaluewillhavepriority
andoverwritethepreviousvaluethatwasconfiguredintheindirectlyinherited
template.
PeerpolicytemplatesareusedtoconfigureBGPpolicycommandsthatare
configuredforneighborsthatbelongtospecificaddressfamilies.Likepeersession
templates,peerpolicytemplatesareconfiguredonceandthenappliedtomany
neighborsthroughthedirectapplicationofapeerpolicytemplateorthrough
BGPPeerTemplatesInheritance
inheritancefrompeerpolicytemplates.Theconfigurationofpeerpolicytemplates
simplifiestheconfigurationofBGPpolicycommandsthatareappliedtoallneighbors
withinanAS
Likepeersessiontemplates,apeerpolicytemplatesupportsinheritance.However,
thereareminordifferences.Adirectlyappliedpeerpolicytemplatecandirectlyor
indirectlyinheritconfigurationsfromuptosevenpeerpolicytemplates.Thatis,a
totalofeightpeerpolicytemplatescanbeappliedtoaneighbororneighborgroup.
Inheritedpeerpolicytemplatesareconfiguredwithsequencenumberslikeroute
maps.Aninheritedpeerpolicytemplate,likearoutemap,isevaluatedstartingwith
theinheritstatementwiththelowestsequencenumberandendingwiththehighest
sequencenumber.However,thedifferenceisthatapeerpolicytemplatewillnot
collapselikearoutemap.Everysequenceisevaluated,andifaBGPpolicy
commandisreappliedwithadifferentvalue,anypreviousvaluefromalower
sequencenumberwillbeoverwritten.
Thedirectlyappliedpeerpolicytemplateandtheinheritstatementwiththehighest
sequencenumberwillalwayshavepriorityandbeappliedlast.Commandsthatare
reappliedinsubsequentpeertemplateswillalwaysoverwritethepreviousvalues.
Thisbehaviorisdesignedtoallowyoutoapplycommonpolicyconfigurationsto
largeneighborgroupsandspecificpolicyconfigurationsonlytocertainneighbors
andneighborgroups,withoutduplicatingindividualpolicyconfigurationcommands.
Theconfigurationofpeerpolicytemplatessimplifiesandimprovestheflexibilityof
BGPconfiguration.Aspecificpolicycanbeconfiguredonceandreferencedmany
times.Becauseapeerpolicysupportsuptoeightlevelsofinheritance,specificand
complexBGPpoliciescanalsobecreated.

Generalsessioncommandsthatarecommonforneighborsthatareconfiguredin
differentaddressfamiliescanbeconfiguredwithinthesamepeersessiontemplate.
Peersessiontemplatesarecreatedandconfiguredinpeersessionconfiguration
mode.Onlygeneralsessioncommandscanbeconfiguredinapeersession
template.BGPpolicyconfigurationcommandsthatareconfiguredonlyforspecific
addressfamiliesconfigurationmodesareconfiguredwithpeerpolicytemplates.
PeerSessionCommands
template peer-session session-template-name
Creates a peer session.
inherit peer-session session-template-name
Configures a peer session template to inherit the configuration of another peer
session template.
neighbor ip-address inherit peer-session session-template-name
Sends a peer session template to a neighbor so that the neighbor can inherit the
configuration.
Tocreateapeersessiontemplateandentersessiontemplateconfigurationmode,
usethetemplatepeer-sessioncommandinrouterconfigurationmode.
template peer-session session-template-name
SyntaxDescription
Parameter Description
session-template-name Nameortagforthepeersessiontemplate
Toconfigureapeersessiontemplatetoinherittheconfigurationofanotherpeer
sessiontemplate,usetheinheritpeer-sessioncommandinsession-template
configurationmode.
inherit peer-session session-template-name
SyntaxDescription
Parameter Description
session-template-name Nameortagforthepeersessiontemplate
Theneighborinheritpeer-sessioncommandisusedtosendlocallyconfigured
sessiontemplatestothespecifiedneighbor.Ifthesessiontemplateisconfiguredto
inheritconfigurationsfromothersessiontemplates,thespecifiedneighborwillalso
indirectlyinherittheseconfigurationsfromtheothersessiontemplates.Aneighbor
candirectlyinheritonlyonepeersessiontemplateandindirectlyinherituptoseven
peersessiontemplates.
Usetheneighborinheritpeer-sessioncommandinaddressfamilyorrouter
configurationmode.
neighbor ip-address inherit peer-session session-template-name
SyntaxDescription
Parameter Description
ip-address IPaddressoftheneighbor
session-template-name Nameortagforthepeersessiontemplate
ABGPneighborcannotbeconfiguredtoworkwithboth
peergroupsandpeertemplates.ABGPneighborcanbe
configuredtobelongonlytoapeergrouportoinherit
BGPPeerTemplatesConfiguration

policiesonlyfrompeertemplates.
PeerPolicyCommands
Peerpolicytemplatessupportonlygeneralpolicycommands.BGPpolicy
configurationcommandsthatareconfiguredonlyforspecificaddressfamilies
configurationmodesareconfiguredwithpeerpolicytemplates.
inherit peer-policy policy-template-name sequence-number
Configures a peer policy template to inherit the configuration from another peer
policy template.
neighbor ip-address inherit peer-policy policy-template-name
Sends a peer policy template to a neighbor so that the neighbor can inherit the
configuration.
Toconfigureapeerpolicytemplatetoinherittheconfigurationfromanotherpeer
policytemplate,usetheinheritpeer-policycommandinpolicy-template
configurationmode.
inherit peer-policy policy-template-name sequence-number
SyntaxDescription
Parameter Description
peer-policy-name Nameofthepeerpolicytemplatetobeinherited.
sequence-number Sequencenumberthatsetstheorderinwhichthepeerpolicy
templateisevaluated.Likearoutemapsequencenumber,the
lowestsequencenumberisevaluatedfirst.
Theneighborinheritpeer-policycommandisusedtosendlocallyconfigured
policytemplatestothespecifiedneighbor.Ifthepolicytemplateisconfiguredto
inheritconfigurationsfromotherpeerpolicytemplates,thespecifiedneighborwill
alsoindirectlyinherittheseconfigurationsfromtheotherpeerpolicytemplates.A
directlyappliedpeerpolicytemplatecandirectlyorindirectlyinheritconfigurations
fromuptosevenpeerpolicytemplates.So,atotalofeightpeerpolicytemplatescan
beappliedtoaneighbororneighborgroup.
neighbor ip-address inherit peer-policy policy-template-name
SyntaxDescription
Parameter Description
ip-address IPaddressoftheneighbor
policy-template-name Nameortagforthepeerpolicytemplate
BGPPeerTemplatesVerification
show ip bgp template peer-session [session-template-name]
Displays peer policy template configurations.
show ip bgp template peer-policy [policy-template-name]
Displays locally configured peer policy templates.
Theshowipbgptemplatepeer-sessioncommandisusedtodisplaylocally
configuredpeersessiontemplates.Theoutputcanbefilteredtodisplayasingle
peersessiontemplatewiththepeer-session-nameargument.Thiscommandalso
supportsallstandardoutputmodifiers.
show ip bgp template peer-session [session-template-name]
SyntaxDescription

Parameter Description
session-template-name (Optional)Nameofalocallyconfiguredpeersessiontemplate
Todisplaylocallyconfiguredpeerpolicytemplates,usetheshowipbgptemplate
peer-policycommandinEXECmode.
show ip bgp template peer-policy [policy-template-name]
SyntaxDescription
Parameter Description
policy-template-name (Optional)Nameofalocallyconfiguredpeerpolicytemplate

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
BGP peer groups were designed primarily for CPU optimization. They can also
be used for configuration optimization.
BGP peer groups are used on a router with several neighbors that have
similar, but not completely identical polices.
Peer groups have limitations because of the way that they are used to build
BGP updates:
Per-neighbor BGP parameters that affect outbound updates cannot be
changed for peer group members.
IBGP and EBGP neighbors cannot be mixed in a peer group.
To configure BGP peer groups, create a BGP peer group, specify parameters
for the BGP peer group, create a BGP neighbor, and then assign a neighbor to
the peer group.
BGP dynamic update groups separate BGP update generation from neighbor
configuration.
BGP peer templates are reusable configuration patterns that support
inheritance.
Peer session templates—contain configuration that is common to all
address families.
Peer policy templates—contain configuration that is applied within a specific
address family.
Summary

Overview
EvenwhenaBGPimplementationiscorrectlyconfiguredandhighlyrobust,the
performanceoftheroutingprocessonanygivenrouterislimited.Limitingthe
propagationofunstableroutes,specificallywhentheyarenotbeneficialtothe
network,becomesanimportantissuebecauseitreducestheprocessing
requirementsoftherouterthatisforcedtoprocessroutingtablestatechanges.
RoutedampeningisaBGPfeaturethathasbeendesignedtoreduceBGP
processingrequirementsbyminimizingthepropagationofunstableroutestoBGP
peers.ASborderrouters,inanyBGPimplementation,cannotrelyuponexternal
peerstosufficientlyshieldtheASfromroutingtableinstability.Routedampening
allowsrouteinstabilitytobecontainedatanASborderrouterthatbordersthe
instability.
Thislessondescribesthepurposeandoperationoftheroute-dampeningfeatureon
CiscoIOSrouters.AlsodiscussedinthislessonaretheCiscoIOScommandsthat
arerequiredtoenableroutedampening,modifydefaultdampeningparameters,and
releasearoutethathasbeensuppressedbecauseofdampening.TheCiscoIOS
commandsthatareusedtomonitorroutedampeningarealsodiscussed.
Uponcompletingthislesson,youwillbeableto:
DescribethepurposeofBGProutedampening
DescribetheoperationofBGProutedampening
IdentifytheCiscoIOScommandsthatarerequiredtoconfigureBGProute
dampening
IdentifytheCiscoIOScommandsthatarerequiredtoreleasedampenedroutes
andmonitorBGProute-dampening
UsingBGPRouteDampening

BGPistheonlyroutingprotocolthatisdesignedforlargeinternetworkswiththe
specificintentionofcarryingalargenumberofprefixes.Thereareseveral
mechanismsthatarebuiltintoBGPthatensuremaximumrouterstability.
Designed to reduce router processing load that is caused by unstable routes
Prevents sustained routing oscillations without affecting other well-behaved
routes
Defined in RFC 2439: BGP Route Flap Dampening
A tool that is designed to help minimize the number of BGP updates
Other update reduction tools:
Batching of BGP updates
Per-neighbor update timers
Forexample,aBGProuterdoesnotforwardBGProutingupdatesimmediatelyafter
receivingthem.EverytimeaBGProutersendsanupdate,itstartsa5-secondtimer
forinternalneighborsanda30-secondtimerforexternalneighbors.Nonewupdates
canbesentuntilthattimerexpires.Theresultisthatifaroutercontainsalinkthatis
flappingrepeatedly(available,thenunavailable,thenavailable,thenunavailable,
andsoon)atarateofoncepersecond,externalroutersseetheflapatamuch
slowerrate.Routersthatareexternaltothesourceoftheflaparenotforcedto
recalculatethebestpatheverysecondbut,atmost,every30seconds.
Reducingtherateatwhichneighboringroutersprocessflappingrouteshelpswith
reducingtherequirementstoprocesstheBGPupdate.However,routersthat
processroutingupdatesforunstableroutesarestillwastingresourcesin
determiningthebestroutetothedestination.Becausetheunstablerouteis
oscillatingbetweenupanddown,eachrouteupdatethatarouterreceivescausesit
toprocesstheunstableroutealloveragain.Abetterapproachistoremovethe
updateabouttherouteuntilitcanbeguaranteedthatthedestinationismorestable.
Withthisgoalinmind,anextraBGPscalabilitymechanism,routeflapdampening,
wascreatedtoreducerouteupdateprocessingrequirementsbysuppressing
unstableroutes.
Minimizes the amount of BGP update processing in the Internet by suppressing
unstable (flapping) routes
Does not suppress routes that occasionally flap
Suppresses routes that are likely to flap in the future based on the history of
their behavior
Flap = Remove route
Suppress = Do not use a route after it reappears
MostserviceprovidersholdroutinginformationfortheentireInternet.Therefore,a
flappinglinksomewhereintheInternetcancauseallroutersintheInternettokeep
processingchangesbecauseofonesinglelink.If,however,oneoftheautonomous
systemsintheInternetimplementsroutedampening,theflappingnetworkis
suppressed.Therouteisnotpropagatedfurthertootherautonomoussystemsuntil
theconfiguredrulesofroutedampeningallowit.
A"flap"referstoaroutethatisrepeatedlyavailable,thenunavailable,then
available,thenunavailable,andsoon.Ifarouteflapsonceortwice,itistypicallynot
consideredaflapfromanadministrativeperspective.Iftheflappinghappensmore
often,however,thereisprobablysomethingwrongwiththedestinationandtheroute
shouldbesuppressed.TheBGProuterstoresasuppressedrouteintheBGPtable
butdoesnotconsideritintheBGPpath-selectionprocessanddoesnottherefore
propagateittootherBGPneighborsoruseitfordataforwarding.
BGPRouteDampening

ABGProuterwithroutedampeningenabledkeepstrackofallroutes(eventhe
routesthatareunreachable)soitcanrecallthepenaltiesthatareassignedtoeach
route.
Each time an EBGP route flaps, it gets 1000 penalty points (IGBP routes are not
dampened).
The penalty that is placed on a route decays according to the exponential decay
algorithm.
When the penalty exceeds the suppress limit, the route is dampened (no longer
used or propagated to other neighbors).
A dampened route is propagated when the penalty drops below the reuse limit.
Everytimearouteflapoccurs,theflappingroutereceives1000penaltypoints.The
penaltyisgraduallydecreasedbyusingadecayingalgorithm.Ifarouteflapsseveral
times,itwillbepenalized(gainenoughpenaltypoints)andsubsequentlyreachand
exceedthesuppresslimit.
Anyroutethatreachesthesuppresslimitisnolongerforwardedtootherneighbors
untiltheassignedpenaltyisonceagainbelowthereuselimit.Anexponentialdecay
algorithmreducespenaltypointsthatareappliedtoaflappingroute.Afterthe
numberofpenaltypointsthatareassignedtoaroutefallsbelowthereuselimit,the
BGProuteronceagainadvertisestheroute.
The flap history is forgotten, when the penalty drops below half of the reuse limit.
A route is never dampened for more time than the maximum suppress limit.
An unreachable route with a flap history is put in the history state—it stays in the
BGP table but only to maintain the flap history.
A penalty is applied on the individual path in the BGP table, not on the IP prefix.
Arouterstopstrackingpenaltypointswhentheyarebelowhalfofthereuselimit.
Themaximumsuppresslimitdefinesthemaximumdurationthataroutecanbe
suppressedafterithasbeensuppressed.
Afterroutedampeningisenabled,therouterneverremovesaroutefromtheBGP
table.AroutethataBGPneighborhaswithdrawncanstillbeseenintheBGPtable
andismarkedwithan"h"(historystate).
Apenaltyisalwaysappliedtoapathandnotaprefix.Ifoneofthepathsisflapping,
itdoesnotmeanthatthedestinationisflapping.
BGPRouteDampeningOperation

ThistopicidentifiestheCiscoIOScommandsthatarerequiredtoconfigureBGP
routedampening.
router(config-router)# bgp dampening [half-life reuse suppress max-
suppress-time] [route-map map-name]
Configures BGP route dampening
BGP dampening parameters:
half-life Decay time in which the penalty is halved
suppress Value when the route starts dampening
reuse Value when the dampened route is reused
max-suppress-time Maximum time to suppress the route
route-map Name of route-map controlling dampening
Toenableroutedampening,usethebgpdampeningcommand.Optionally,youcan
changethedefaultsettingsoftheroute-dampeningparameters.
Routeflapdampeningrequiresthefollowingparameters:
half-life:Thehalf-lifeisthetimethatisneededforthepenaltytohalve(defaultis
15minutes).
suppress:Whenaroutehasmorepenaltypointsthanthesuppresslimit,the
routeissuppressed(defaultis2000).
reuse:Aftertheflappinghasstoppedandthepenaltyforaroutehasfallen
belowthereuselimit,therouteisunsuppressed(defaultis750).
max-suppress-time:Noroutecanbesuppressedlongerthanthemax-suppress-
timeminutes(defaultis1hour;maximumis255minutes).
Youcanspecifythefourrouteflap-dampeningparametersdirectlywiththebgp
dampeningcommand.Alternatively,youcancreatearoute-mapthatspecifies
differentdampeningparametersfordifferentsetsofroutes,andthenyoucanapply
theroute-mapwiththebgpdampeningroute-mapcommand.
Most Internet service providers use default values:
A flapping route is dampened after three successive flaps.
A route stays suppressed for approximately 30 minutes.
Net result: The route is lost for 30 minutes if a BGP session with a neighbor is
cleared three times in succession.
Default dampening parameter values are:
half-life 15 minutes
suppress 2000
reuse 750
max-suppress-time 60 minutes (4x half-life)
per-flap penalty 1000 (nonconfigurable)
Thissamplecalculationshowshowlongaroutethatflapsthreetimesissuppressed
withthedefaultvaluesoftheCiscoIOSroute-dampeningparameters.Eachtime
thatarouteflaps,itaccumulatesanother1000points.Afterthethirdflap,theroute
hasalmost3000points.Rememberthatthepenaltyisgraduallydecreasedbyusing
adecayingalgorithm,causingareductioninthenumberofpointsthattheroute
accumulates.Ittakes15minutesforthepenaltytodropbelow1500(providedthere
arenofurtherflaps)andanother15minutestodropbelowthereuselimitof750.
Manyserviceproviderschangethedefaultparameterstoallowamaximum
suppresstimeofseveralhours.
Usingtheclearipbgp*commandisregardedasaflapto
neighboringautonomoussystems.Usingthiscommand
severaltimesmaycauseneighboringautonomous
systemstosuppressprefixesforsometimeevenifthere
isnothingwrongwiththeroute.
Usingtheclearipbgp*[soft][in|out]commandisnot
regardedasaflap,andthiscommandshouldbeused
insteadofclearipbgp*forclearingtheneighbor
ConfiguringBGPRouteDampening

relationships.
Youcanchangealldefaultvaluesifyouspecifythemintheoptionalparametersof
thebgpdampeningcommand.Theper-flappenaltyistheonlyvaluethatisnot
configurable.
router(config-route-map)# set dampening half-life reuse suppress max-
suppress-time
This command sets the BGP dampening parameters for individual routes that a
route map entry matches.
Apply this route-map to the bgp dampening command instead of specifying
individual parameters.
Applications:
Less aggressive dampening of routes toward root DNS servers (or other
servers)
Dampening of smaller prefixes more aggressively
Selective dampening based on BGP neighbor and route-map match criteria
Manyserviceprovidersprefertoimplementselectivedampening.Largerprefixesare
usuallylesslikelytoflapandshouldnotbepenalizedasaggressivelyasthesmaller
prefixesthatpopulatemostoftheBGPtable.
Youcanusearoute-mapincombinationwithaprefix-listtomatchonprefixlength
andtosetdifferentroute-dampeningparametersforlargerprefixesthanforsmaller
ones.Apracticalserviceproviderpolicyistousearoute-maptoexcluderootDNS
serversfromdampeningaltogether.
Youcanthenattachtheroute-maptotheBGProute-dampeningprocesswiththe
bgpdampeningroute-mapcommand.

Overview
Throughthisdiscovery,youwilllearnhowtoconfigureBGProutedampening.You
willenableroutedampeningontheR2router.Youwillsimulateflappingofoneof
theadvertisednetworksontheISP1router.Consequently,thenetworkflappingwill
getsuppressedontheR2router,whereroutedampeningisenabled.
Discovery20:ConfigureBGPRouteDampening

Topology

Ifyoushutdownaninterfaceonarealrouterorswitch,the
connecteddevicewillseeitas"down/down."Dueto
virtualizationspecifics,IOLbehaviorisslightlydifferent.If
youshutdownaninterfaceonarouterorswitch,the
connecteddevicewillseeitas"up/up."InIOL,thestatus
ofaninterfacecanonlybe"up/up"or"administratively
down/down."
DeviceInformation
Device Interface IPaddress Description
R2 Ethernet0/0 172.16.22.2/24 ConnectiontoISP2
R2 Ethernet0/1 172.16.12.2/24 ConnectiontoISP1
R2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
10.0.0.1/28
10.0.0.17/28
10.0.0.33/28
10.0.0.49/28
10.0.0.65/28
Loopbackssimulate
LANnetworks
ISP1 Ethernet0/1 172.16.12.11/24 ConnectiontoR2
ISP1 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
10.0.1.1/28
10.0.1.17/28
10.0.1.33/28
10.0.1.49/28
10.0.1.65/28
10.0.1.81/28
Loopbackssimulate
LANnetworks
ISP1 Loopback21
Loopback37
Loopback40
10.0.21.1
10.0.37.1
10.0.40.1
Loopbackssimulate
extranetworksin
differentautonomous
systems.
ISP2 Ethernet0/0 172.16.22.22/24 ConnectiontoR2
ISP2 Loopback1
Loopback2
Loopback3
Loopback4
Loopback5
Loopback6
10.0.2.1/28
10.0.2.17/28
10.0.2.33/28
10.0.2.49/28
10.0.2.65/28
10.0.2.81/28
Loopbackssimulate
LANnetworks
ISP2 Loopback21
Loopback37
Loopback40
10.0.21.1
10.0.37.1
10.0.40.1
Loopbackssimulate
extranetworksin
differentASs.
IPaddressesandadvertisednetworksinBGParepreconfiguredasshownbelow:
JobAids

BGPisalsopreconfiguredasEBGP(R2toISP1andR2toISP2).TheISP1router
announcesthesenetworks:
10.0.1.0/28
10.0.1.16/28
10.0.1.32/28
10.0.1.48/28
10.0.1.64/28
10.0.1.80/28

Step1
OntheR2router,verifythatyoureceive10.0.1.48/28routetotheBGPtablefromthe
ISP1neighbor.
R2# show ip bgp
BGP table version is 24, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/24 0.0.0.0 0 32768 i
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*> 10.0.0.32/28 0.0.0.0 0 32768 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*> 10.0.0.64/28 0.0.0.0 0 32768 i
*> 10.0.1.0/28 172.16.12.11 0 0 100 i
*> 10.0.1.16/28 172.16.12.11 0 0 100 i
*> 10.0.1.32/28 172.16.12.11 0 0 100 i
*> 10.0.1.48/28 172.16.12.11 0 0 100 i
*> 10.0.1.64/28 172.16.12.11 0 0 100 i
*> 10.0.1.80/28 172.16.12.11 0 0 100 i
<... output omitted...>
Step2
EnableBGProutedampeningontheR2routerwithdefaultvaluesfor
dampeningparameters.
R2(config)# router bgp1
R2(config-router)# bgp dampening
Step3
EnabledebuggingforBGPdampeningontheR2router.
R2# debug ip bgp dampening
Step4
OntheISP1router,disableandenableinterfaceLoopback4(10.0.1.49/28)for
atleastthreetimes.Allowyourselfatleastaminutebeforenextcommandis
applied.
ISP1(config)# interface Loopback 4
ISP1(config-if)# shutdown
!wait for at least 30 seconds!
ISP1(config-if)# no shutdown
!wait for 30 seconds!
!repeat these steps for at least three times!
NOTE:Youwillsimulatetheflappingofthe10.0.1.48/28networkbyenabling
anddisablingloopbackinterfacefewtimesinshortamountoftime.
Step5
Observethedebuggingoutput.EachtimethatyoudisabletheinterfaceLoopback4,the10.0.1/48
networkwithexistingpathgetschargedwith1000points.Oncethesuppresspenaltypassesthe
thresholdof2000andyouenabletheinterfaceLoopback4,network10.0.1.0/48getssuppressed.
R2#
*Apr 1 08:36:29.423: EvD: charge penalty 1000, new accum. penalty 1000, flap count 1
*Apr 1 08:36:29.423: EvD: unsuppress item left in reuse timer array with penalty 1000
*Apr 1 08:36:29.423: BGP(0): charge penalty for 10.0.1.48/28 path 100 with halflife-
time 15 reuse/suppress 750/2000
*Apr 1 08:36:29.423: BGP(0): flapped 1 times since 00:00:00. New penalty is 1000
ConfigureBGPRouteDampening
DiscoverySteps

R2#
*Apr 1 08:37:12.319: EvD: accum. penalty decayed to 969 after 42 second(s)
R2#
*Apr 1 08:37:30.196: EvD: accum. penalty 957, not suppressed
R2#
*Apr 1 08:38:01.030: EvD: accum. penalty decayed to 935 after 31 second(s)
*Apr 1 08:38:01.030: EvD: charge penalty 1000, new accum. penalty 1935, flap count 2
*Apr 1 08:38:01.030: EvD: unsuppress item left in reuse timer array with penalty 1935
*Apr 1 08:38:01.030: BGP(0): charge penalty for 10.0.1.48/28 path 100 with halflife-
time 15 reuse/suppress 750/2000
*Apr 1 08:38:01.030: BGP(0): flapped 2 times since 00:01:31. New penalty is 1935
R2#
*Apr 1 08:38:12.380: EvD: accum. penalty decayed to 1920 after 11 second(s)
R2#
*Apr 1 08:38:31.858: EvD: accum. penalty 1890, not suppressed
R2#
*Apr 1 08:39:02.687: EvD: accum. penalty decayed to 1846 after 31 second(s)
*Apr 1 08:39:02.687: EvD: charge penalty 1000, new accum. penalty 2846, flap count 3
*Apr 1 08:39:02.687: EvD: unsuppress item left in reuse timer array with penalty 2846
*Apr 1 08:39:02.687: BGP(0): charge penalty for 10.0.1.48/28 path 100 with halflife-
time 15 reuse/suppress 750/2000
*Apr 1 08:39:02.687: BGP(0): flapped 3 times since 00:02:33. New penalty is 2846
R2#
*Apr 1 08:39:12.402: EvD: accum. penalty decayed to 2835 after 9 second(s)
R2#
*Apr 1 08:39:32.484: BGP(0): suppress 10.0.1.48/28 path 100 for 00:28:30 (penalty 2791)
*Apr 1 08:39:32.484: halflife-time 15, reuse/suppress 750/2000
*Apr 1 08:39:32.484: EvD: accum. penalty 2791, now suppressed with a reuse intervals of 171
MonitoringRouteDampening
router# show ip bgp dampened-paths
Displays the dampened routes
router# show ip bgp flap-statistics [{regexp regexp} | {filter-
list access-list} | {ip-address mask [longer-prefix]}]
Displays flap statistics for all routes with dampening history
Can match routes against regular expressions, AS-path access-lists, a specific
route, or more specific routes
router# debug ip bgp dampening
Displays the BGP dampening events
Thepenaltythatisplacedonanetworkisdecayeduntilthereuselimitisreached,
uponwhichtherouteisonceagainadvertised.Everytimethatarouteflapoccurs,
thepenaltyisrecalculated.Intherouter,thepenaltyisencodedasthetimethatit
takesforthepenaltytodecaybelowthereuselimit.Athalfofthereuselimit,the
dampeninginformationfortheroutetothenetworkisremoved.
Usetheshowipbgpdampened-pathscommandtolistallroutesthatarecurrently
suppressedbecauseofdampening.
Usetheshowipbgpflap-statisticscommandtolistallroutesthathaveapenalty
thatisstillabovethetime-to-forgetlimit.Youcanalsousethiscommandin
combinationwithregularexpressionsandfilter-lists.
Theshowipbgpflap-statisticsprefixcommanddisplaysdetaileddampening
informationaboutaspecificnetwork.
Theshowipbgpflap-statisticsprefixmasklonger-prefixcommanddisplays
dampeninginformationaboutaspecificnetworkanditssubnets.
UsethedebugipbgpdampeningcommandtodisplayBGPdampeningeventsas
theyoccurinrealtime.

Theexampleshowshow,afterthefirstflap(whenaroutebecomesunreachable),
therouterwithdrawstheroute.Howevertherouterkeepstherouteinitsown
databasetokeeptrackofthepenalty.Therouteentersthehistorystate.
Ifaprefixisinthehistorystate,itmeansthatitiscurrentlyunreachablebutthatthe
informationhasbeenkeptintheBGPtabletokeeptrackofthepenalty.
Theexamplehereshowshow,afterthethirdflap,thepenaltyoftherouteexceeds
thesuppresslimit,andtheroutecouldbesuppressed.Whentherouteexceedsthe
suppresslimit,oneoftwothingscouldhappen:
Therouterwillputtherouteinthehistorystateiftherouteiscurrently
unreachable.
Therouterwillsuppresstherouteiftherouteiscurrentlyreachable.

Thepenaltyoftherouteisdecreasedfollowinganexponentialcurve.Afterawhile,
thepenaltydropsbelowthesuppresslimit,buttherouteisnotyetreleased.The
routeisreleasedonlyafterthepenaltydropsfurtherbelowthereuselimit.Inthe
examplehere,therouteflapsagain,furtherincreasingthepenalty.
Intheexamplehere,theroutehasstabilized,andthepenaltygraduallydropsbelow
thereuselimit.Atthatpoint,theBGProuterreleasestheroute,anditcannowbe
selectedasthebestBGPpath.Iftherouterselectsthereleasedrouteasthebest
BGPpath,itisalsopropagatedtoBGPneighborsandusedfordataforwarding.
Whenthepenaltythatisassociatedwitharoutedropsbelowhalfofthereuselimit,
therouterclearsthepenaltyandtheflaphistorythatareassociatedwiththeroute.
Step6
OntheR2router,verifythe10.0.1.0/48entryintheBGPtable.
R2# show ip bgp 10.0.1.48/28
BGP routing table entry for 10.0.1.48/28, version 47
Paths: (1 available, no best path)
Not advertised to any peer
Refresh Epoch 1
100, (suppressed due to dampening)
172.16.12.11 from 172.16.12.11 (10.0.40.1)
Origin IGP, metric 0, localpref 100, valid, external
Dampinfo: penalty 2674, flapped 3 times in 00:04:00, reuse in 00:05:39
Youshouldseethatnetwork10.0.1.0/48receivedvia172.16.12.11neighborgets
suppressedduetodampening.
Step7
OntheR2router,verifythecontentofthewholeBGPtable.
R2# show ip bgp
BGP table version is 47, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/24 0.0.0.0 0 32768 i
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*> 10.0.0.32/28 0.0.0.0 0 32768 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*> 10.0.0.64/28 0.0.0.0 0 32768 i
*> 10.0.1.0/28 172.16.12.11 0 0 100 i
*> 10.0.1.16/28 172.16.12.11 0 0 100 i
*> 10.0.1.32/28 172.16.12.11 0 0 100 i
*d 10.0.1.48/28 172.16.12.11 0 0 100 i
*> 10.0.1.64/28 172.16.12.11 0 0 100 i

*> 10.0.1.80/28 172.16.12.11 0 0 100 i
<... output omitted...>
Youshouldseenetwork10.0.1.0/48markedasdampened.
Step8
OntheR2router,displayalldampenedpaths.
R2# show ip bgp dampening dampened-paths
BGP table version is 47, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network From Reuse Path
*d 10.0.1.48/28 172.16.12.11 00:04:49 100 i
Youshouldseethatnetwork10.0.1.0/48markedasdampenedforapathvia
172.16.12.11neighborinautonomoussystem100.
Step9
OntheR2router,displayflappingstatisticsforBGProutedampening.
R2# show ip bgp dampening flap-statistics
BGP table version is 47, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network From Flaps Duration Reuse Path
*d 10.0.1.48/28 172.16.12.11 3 00:05:20 00:04:19 100
Youshouldseethatnetwork10.0.1.0/48flappedthreetimes.
Step10
OntheR2router,displayBGPdampeningparameters.
R2# show ip bgp dampening parameters
dampening 15 750 2000 60 (DEFAULT)
Half-life time : 15 mins Decay Time : 2320 secs
Max suppress penalty: 12000 Max suppress time: 60 mins
Suppress penalty : 2000 Reuse penalty : 750
YoushouldseethedefaultBGPdampeningparameters,forinstancefor
suppresspenalty.Thedefaultvalueis2000.
ReleasingDampenedRoutes
MonitoringRouteReflectors
router# clear ip bgp ip-address flap-
statistics [{regexp regexp} | {filter-list list-name} | {ip-
address network-mask}]
Clears the flap statistics but does not release dampened routes.
router# clear ip bgp dampening [ip-address network-mask]
Releases all the dampened routes or just the specified network.
Flap statistics or dampened routes are also cleared when the BGP session with
the neighbor is lost.
Therearetwotimersthatarecalculatedforeveryroutewhenitflaps:

Timetoforget:Thetimethatittakesbeforeallflaphistoryisdeleted.Usingthe
clearipbgpflap-statisticscommanddeletesallpenaltyinformation,butitdoes
notreleasethedampenedpaths.
Timetoreuse:Thetimethatittakesbeforearoutecanbeconsideredforbest-
pathprocessing.Usingtheclearipbgpdampeningcommandresetsthistimer
forallnetworksorforspecifiednetworkssothattheyarenolongersuppressed.
Theflapstatistics,however,arestillkept,andthenextflapwillcausethe
previouslydampenedpathstobesuppressedagain.
clearipbgpflap-statistics
ToclearBGPflapstatistics,usetheclearipbgpflap-statisticsprivilegedEXEC
command.
clearipbgpip-addressflap-statistics[{regexpregexp}|{filter-listlist-name}|
{ip-addressnetwork-mask}]
SyntaxDescription
Parameter Description
ip-address (Optional)ClearsflapstatisticsforasingleentryatthisIP
address.Ifthisargumentisplacedbeforeflap-statistics,the
routerclearsflapstatisticsforallpathsfromtheneighboratthis
address.
regexpregexp (Optional)Clearsflapstatisticsforallthepathsthatmatchthe
regularexpression.
filter-listlist-name (Optional)Clearsflapstatisticsforallthepathsthatpassthe
access-list.
network-mask (Optional)Networkmaskthatisappliedtotheip-address
argument.
clearipbgpdampening
ToclearBGProute-dampeninginformationandunsuppressthesuppressedroutes,
usetheclearipbgpdampeningprivilegedEXECcommand.
clearipbgpdampening[ip-addressnetwork-mask]
SyntaxDescription
Parameter Description
ip-address (Optional)ClearsflapstatisticsforasingleentryatthisIP
address.Ifthisargumentisplacedbeforeflap-statistics,the
routerclearsflapstatisticsforallpathsfromtheneighboratthis
address.
network-mask (Optional)Networkmaskthatisappliedtotheip-address
argument.
Step11
CleartheBGPdampeninginformationontheR2router.
R2# clear ip bgp dampening
Step12
OntheR2router,verifythe10.0.1.0/48entryintheBGPtable.
R2# show ip bgp 10.0.1.48/28
BGP routing table entry for 10.0.1.48/28, version 48
Paths: (1 available, best #1, table default)
Advertised to update-groups:
2
Refresh Epoch 1
100
172.16.12.11 from 172.16.12.11 (10.0.40.1)
Origin IGP, metric 0, localpref 100, valid, external, best

Youshouldseethatnetwork10.0.1.0/48receivedvia172.16.12.11neighboris
notsuppressedanymore.
Step13
OntheR2router,verifythecontentofthewholeBGPtable.
R2# show ip bgp
BGP table version is 48, local router ID is 10.0.0.65
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/24 0.0.0.0 0 32768 i
*> 10.0.0.16/28 0.0.0.0 0 32768 i
*> 10.0.0.32/28 0.0.0.0 0 32768 i
*> 10.0.0.48/28 0.0.0.0 0 32768 i
*> 10.0.0.64/28 0.0.0.0 0 32768 i
*> 10.0.1.0/28 172.16.12.11 0 0 100 i
*> 10.0.1.16/28 172.16.12.11 0 0 100 i
*> 10.0.1.32/28 172.16.12.11 0 0 100 i
*> 10.0.1.48/28 172.16.12.11 0 0 100 i
*> 10.0.1.64/28 172.16.12.11 0 0 100 i
*> 10.0.1.80/28 172.16.12.11 0 0 100 i
<...output omitted...>
Youshouldseethatnetwork10.0.1.0/48isnotmarkedasdampenedanymore.

Thistopicsummarizesthekeypointsthatwerediscussedinthislesson.
Route dampening is a BGP feature that is designed to reduce BGP processing
requirements by minimizing the propagation of unstable routes to BGP peers.
A router with route dampening enabled keeps track of all routes and the
penalties that are assigned to them.
Each time a flap occurs, the flapping route receives 1000 penalty points.
If the route penalties reach the suppress limit, the route is no longer forwarded
to other neighbors until the assigned penalty has decayed below the reuse limit.
You can implement route dampening with the bgp dampening command either
globally in the BGP process or selectively using a route-map.
Use the clear ip bgp flap-statistics command to delete all penalty information
without releasing the dampened paths.
The clear ip bgp dampening command clears dampening information and
releases suppressed routes.
The show ip bgp dampened-paths command lists all routes that are currently
suppressed because of dampening, the
Summary

Overview
Thistopicsummarizesthekeypointsthatwerediscussedinthismodule.
Increased BGP convergence time and high CPU utilization caused by the BGP
scanner and BGP router processes can be reduced with Cisco IOS tools such
as PMTU discovery, BGP PIC, BFD, as well as by adjusting BGP timers and
intervals..
The maximum-prefix function is a scalable solution that limits the number of
routes that a BGP router can receive from a specific neighbor.
Peer groups are a fundamental BGP scalability tool and should be used in all
environments where a router has a large number of BGP neighbors.
Route dampening is a BGP feature that is designed to reduce BGP processing
requirements by minimizing the propagation of unstable routes to BGP peers.
ModuleSummary

Foradditionalinformation,refertotheseresources:
CiscoSystems,Inc.BGPRestartNeighborSessionAfterMaximum-PrefixLimit
Reached.
http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_bgp/configuration/15-
mt/irg-15-mt-book/BGP-Sub-Codes-for-BGP-Cease-Notification.pdf
CiscoSystems,Inc.BGPPeerGroups.
http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-
bgp/13755-29.html
CiscoSystems,Inc.BGPCaseStudies"BGPCaseStudies4."
http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-
bgp/26634-bgp-toc.html#case4
References
Usethequestionsheretoreviewwhatyoulearnedinthismodule.Thecorrect
answersandsolutionsarefoundintheModuleSelf-CheckAnswerKey.
ModuleSelf-Check

1. WhatarethreecharacteristicsofaconvergedBGPnetwork?
(Choosethree.)
Theinputqueueandoutputqueueforallpeersis0.
AllroutesintheBGPtablehavebeeninstalledintheroutingtable.
ThetableversionforallpeersequalsthetableversionoftheBGPtable.
Allrouteshavebeenaccepted.

1. WhichtwoofthefollowingmodificationsresultinimprovedBGP
convergence?(Choosetwo.)(Source:"ImprovingBGP
Convergence")
IncreasingthedefaultvalueofBGPholdtime.
LoweringthedefaultvalueofBGPscantime.
Increasingthedefaultvalueoftheneighboradvertisementintervals.
Loweringthedefaultvalueoftheneighboradvertisementintervals.

1. WhatisthemaintaskoftheBGPscannerprocess?(Source:
"ImprovingBGPConvergence")
SendsroutingupdatestoBGPneighbors.
WalkstheBGPtableforroutestoenterintotheIProutingtable.
ConfirmsthereachabilityofBGPnexthops.
ScanstherouterconfigurationtoestablishandmaintainBGPneighbors.

1. OneofyourBGPcoreroutersisexperiencingperiodicslow
responsestopingpacketsthatarebeingdirectedtoitfromthe
networkmanagementconsole.Therouterhasjustbeenconfigured
toreceivefullInternetroutes,andyoususpectthattheBGProuter
processiscausingCPUutilizationissuesinthecorerouter.Which
tworoutercommandsshouldyouusetoconfirmyoursuspicion?
(Choosetwo.)(Source:"ImprovingBGPConvergence")
showiproute
showipbgpsummary
showprocesscpu
showmemory

1. LookattheoutputoftheshowinterfacesEthernet0/0command.
HowhastheinterfacebeenmodifiedtoimproveBGPconvergence?
(Source:"ImprovingBGPConvergence")router#showinterfaces
Ethernet0/0
Ethernet0/0isup,lineprotocolisup
HardwareisDEC21140,addressis0000.0c0c.1111(bia
0002.eaa3.5a60)
Internetaddressis112.64.101.17255.255.255.240
MTU1460bytes,BW100000Kbit,DLY100usec,rely255/255,load
200/255
EncapsulationARPA,loopbacknotset,keepalivenotset,hdx,
100BaseTX
ARPtype:ARPA,ARPTimeout4:00:00
Lastinputnever,output0:00:16,outputhang0:28:01
Lastclearingof"showinterface"counters0:20:05
Outputqueue25/40,0drops;inputqueue50/500,1470drops
5minuteinputrate21666400bits/sec,1855packets/sec
5minuteoutputrate72221bits/sec,618packets/sec
Theoutputqueuehasbeendecreasedtoexpeditepacketforwardingout
theFastEthernetinterface.
Thedropthresholdoftheinputqueuehasbeensettobeginrandomly
discardingpacketsafterthequeuereaches50packetsdeep.
PMTUdiscoveryhasbeenenabledbysettingtheinterfaceMSSto1460
bytes.
PMTUdiscoveryhasbeenenabledbysettingtheinterfaceMSSto1460
bytes.

1. Refertotheoutput.Whichtwoparameterswouldindicatethatthe
BGPnetworkhasconverged?(Choosetwo.)(Source:"Improving
BGPConvergence")router#showipbgpsummary
BGProuteridentifier172.16.0.4,localASnumber1
BGPtableversionis16,mainroutingtableversion16
20networkentriesand20pathsusing2826bytesofmemory
8BGPpathattributeentriesusing480bytesofmemory
7BGPAS-PATHentriesusing168bytesofmemory
3BGPcommunityentriesusing72bytesofmemory
0BGProute-mapcacheentriesusing0bytesofmemory
3BGPfilter-listcacheentriesusing36bytesofmemory
BGPactivity20/0prefixes,24/4paths,scaninterval120secs
NeighborVASMsgRcvdMsgSentTblVerInQOutQ
Up/DownState/PfxRcd
172.16.0.1413030160000:23:135
172.16.0.2413330160000:23:155
172.16.0.3412730160000:23:145
192.168.21.994993135160000:23:045
TheTblVerforallneighborsis16.
Vissetto4forallneighbors.
TheInQandOutQforallneighborsis0.
AllneighborsareintheEstablishedstateandhavethesamePfxRcd
value.

1. Refertotheoutput.HowfrequentlytheBGPscannerprocesswill
runontherouter?(Source:"ImprovingBGPConvergence")router#
showipbgpsummary
BGProuteridentifier172.16.0.4,localASnumber1
BGPtableversionis16,mainroutingtableversion16
20networkentriesand20pathsusing2826bytesofmemory
8BGPpathattributeentriesusing480bytesofmemory
7BGPAS-PATHentriesusing168bytesofmemory
3BGPcommunityentriesusing72bytesofmemory
0BGProute-mapcacheentriesusing0bytesofmemory
3BGPfilter-listcacheentriesusing36bytesofmemory
BGPactivity20/0prefixes,24/4paths,scaninterval120secs
NeighborVASMsgRcvdMsgSentTblVerInQOutQ
Up/DownState/PfxRcd
172.16.0.1413030160000:23:135
172.16.0.2413330160000:23:155
172.16.0.3412730160000:23:145
192.168.21.994993135160000:23:045
Bydefault,theprocesswillrunevery60seconds.
Theprocesshasrun16timesandwillrunagainwhenthenextBGP
updatearrives.
Theprocesswillrunonthisrouterevery120seconds.
Itcannotbedeterminedfromthisoutput.

1. Whataretwopotentialissuesthatarecausedbymodifyingthe
defaultscantimeandadvertisementintervalonaBGProuter?
(Choosetwo.)(Source:"ImprovingBGPConvergence")
RouterCPUresourcescanbeexhausted.
Routermemoryresourcescanbedepleted.
Routingloopsaremorelikely.
BGPcouldconvergefasterthantheIGPandcausenetworkblackholes.

1. WhichoptioncanbeusedtosupporttrafficforwardingduringRP
switchover?(Source:"ImprovingBPGConvergence")
NonstopForwarding
CiscoExpressForwarding
PerfectForwardingRouting

1. Loweringthekeepalivetimerbetweensentkeepalivemessagestoa
BGPneighborwillimproveBGPconvergence.Trueorfalse?
(Source:"ImprovingBGPConvergence")
True
False

1. WhatarethreereasonstolimitthenumberofBGPprefixesthatare
receivedfromaneighbor?(Choosethree.)(Source:"Limitingthe
NumberofPrefixesReceivedfromaBGPNeighbor")
Topreventdenial-of-serviceattacks.
Toprotectagainstincorrectrouterconfigurationontheneighborside.
TopreventredundantroutinginformationfrombeingloadedintotheBGP
table.
ToavoidoverloadingroutermemoryandCPUresources.

1. InwhichtwosituationswouldadirectlyconnectedBGPneighbor
stayintheIdlestate?(Choosetwo.)(Source:"LimitingtheNumber
ofPrefixesReceivedfromaBGPNeighbor")
Theneighborhasexceededthemaximumnumberofallowedprefixes.
Themaximum-prefixthresholdhasbeenreached.
Therestartoptionhasnotbeenspecifiedwiththemaximum-prefix
command.
Theneighborismorethanonehopaway.

1. Whichtwoofthefollowingcharacteristicsaccuratelydescribethe
showipbgpneighborscommand?(Choosetwo.)(Source:
"LimitingtheNumberofPrefixesReceivedfromaBGPNeighbor")
Forneighborswiththemaximum-prefixfunctionconfigured,displaysthe
maximumnumberofprefixesandthewarningthreshold.
Forneighborsexceedingthemaximumnumberofprefixes,displaysthe
reasonthattheBGPsessionisidle.
Forneighborswithunstableroutes,displaysthefeasiblesuccessorfor
thoseroutes.
Forneighborsinconfederations,displaystheroutereflectorstatusof
thoseneighbors.

1. WhatistheneedforBGPpeergroups?(Source:"Implementing
BGPPeerGroups")
Canbeusedtoconfigurethesamesetofparametersforanumberof
BGPneighborsinacommontemplate.
CanbeusedtoallowanonymousBGPneighbors.
AllowEBGPpeerstobeconfiguredwiththesameASnumberand
parameters.
CanbeusedtohidetheidentityofBGPpeersfromexternalneighbors.

1. WhichofthefollowingstatementsaboutthebenefitofBGPpeer
groupsisaccurate?(Source:"ImplementingBGPPeerGroups")
WithBGPpeergroups,alloftherouterCPUutilizationthatisimposedby
BGPupdategenerationissignificantlyreduced.
WithBGPpeergroups,someoftherouterCPUutilizationthatisimposed
byBGPupdategenerationissignificantlyreduced.
Networkadministratorsshouldusepeergroupstomakesmallernetworks
moreproductive.
WithBGPpeergroups,neighborrelationshipsareautomaticallycreated.

1. WhataretwolimitationsofBGPpeergroupsonCiscorouters?
(Choosetwo.)(Source:"ImplementingBGPPeerGroups")
EBGPandIBGPneighborscannotbemembersofthesamepeergroup.
AllroutersinthepeergroupmustbelongtothesameAS.
Peergroupmemberscannotcontaindifferentoutboundfiltering
mechanisms.
Peergroupmembersmusthavethesameinboundfilteringmechanisms.

1. WhichtwoofthefollowingcharacteristicsaccuratelydescribeBGP
peergroups?(Choosetwo.)(Source:"ImplementingBGPPeer
Groups")
ABGPpeergroupcreatesaneighborparametertemplate.
Whenactualneighboringroutersareassignedtothepeergroupona
router,alloftheattributesthatareconfiguredforthepeergroupare
appliedtoselectedpeergroupmembers.
Oneoftheconfigurableparametersincludescommunitypropagation.
Individualparametersspecifiedinapeergroupcannotbeoverriddenona
neighbor-by-neighborbasis.

1. Whichtwoofthefollowingcharacteristicsaccuratelydescribethe
functionoftheBGPDynamicUpdatePeer-Groupsfeature?(Choose
two.)(Source:"ImplementingBGPPeerGroups")
Doesnotprovidetheoperatorwithtimetochangetheconfigurationifa
mistakeismade.
SeparatesBGPupdategenerationfrompeergroupconfiguration.
Doesnotrequireanyconfigurationbythenetworkoperator.
Requiresminimalconfigurationbythenetworkoperator.

1. Whichtwoofthefollowingstatementsaccuratelydescribethe
functionoftheBGPpeertemplatesfeature?(Choosetwo.)(Source:
"ImplementingBGPPeerGroups")
NetworkoperatorsmuststillconfiguresomepeergroupsinBGP,evenif
usingtheBGPConfigurationUsingPeerTemplatesfeature.
Peertemplatesovercomealllimitationsofpeergroups.
Peertemplatesimprovetheflexibilityandenhancethecapabilityof
neighborconfiguration.
Youcanchaintogetherpeertemplateconfigurationstocreatesimpleor
complexconfigurations.

1. WhatarethreestepsthatarerequiredtoproperlyconfigureBGP
peergroupsonCiscorouters?(Choosethree.)(Source:
"ImplementingBGPPeerGroups")
SpecifyparametersfortheBGPpeergroup
CreateaBGPpeergroup
EnablethepeergroupbyclearingtheBGPsession
Assignaneighborintothepeergroup

1. Whichcommanddoyouusetodisplaythesummarystatusofall
neighborsinapeergroup?(Source:"ImplementingBGPPeer
Groups")
showipbgp
showpeer-groupsummary
showipbgpneighbor
showipbgppeer-groupsummary

1. WhichtwodescriptionsofthepurposeofBGProutedampeningare
accurate?(Choosetwo.)(Source:"UsingBGPRouteDampening")
AtooldesignedtohelpminimizethenumberofBGPupdates
Suppressesroutesthatoccasionallyflap
Designedtoreducerouterprocessingloadcausedbyunstableroutes
Preventssustainedroutingoscillation,withsomeeffectonotherwell-
behavedroutes

1. WhichtwomechanismsarebuiltintoBGPtomakeitmorescalable
byreducingtheroute-processingrequirementsofBGProuters?
(Choosetwo.)(Source:"UsingBGPRouteDampening")
Splithorizon
Routedampening
Synchronization
Per-neighborupdatetimers

1. WhataretwothingsthathappentoanEBGProutethathasbecome
unreachablewhenBGProutedampeningisused?(Choosetwo.)
(Source:"UsingBGPRouteDampening")
ItisremovedfromtheIProutingtable.
ItisremovedfromtheBGPtable.
ItremainsintheIProutingtableaslongasitspenaltyremainsgreater
than50percentofthereuselimit.
ItiskeptintheBGPtableandmarkedasahistoryentry.

1. WhataretwomethodsofenablingroutedampeningonaCisco
router?(Choosetwo.)(Source:"UsingBGPRouteDampening",
Topic:"ConfiguringBGPRouteDampening")
Globally,byenablingroutedampeninginglobalrouterconfigurationmode
Globally,byenablingroutedampeningundertheBGProutingprocess
Onspecificroutesbyenablingroutedampeningonaspecificinterface
Byusingaroute-mapintheBGPprocesstoapplyroutedampeningto
specificroutes

1. WhichtwothingscouldhappentoaBGProutethatispenalized
abovethereuselimitbuthasanassignedpenaltythatisunderthe
suppresslimit?(Choosetwo.)(Source:"UsingBGPRoute
Dampening")
TherouteissuppressedfromBGPupdatesifitisreachable.
TherouteismarkedasahistoryentryintheBGPtable.
TherouteiswithdrawnfromtheIProutingtable.
Theroutecontinuestobeadvertised.

1. WhatarethreecharacteristicsofaconvergedBGPnetwork?
(Choosethree.)
Theinputqueueandoutputqueueforallpeersis0.
AllroutesintheBGPtablehavebeeninstalledintheroutingtable.
ThetableversionforallpeersequalsthetableversionoftheBGPtable.
Allrouteshavebeenaccepted.
AnswerKey

1. WhichtwoofthefollowingmodificationsresultinimprovedBGP
convergence?(Choosetwo.)(Source:"ImprovingBGP
Convergence")
IncreasingthedefaultvalueofBGPholdtime.
LoweringthedefaultvalueofBGPscantime.
Increasingthedefaultvalueoftheneighboradvertisementintervals.
Loweringthedefaultvalueoftheneighboradvertisementintervals.

1. WhatisthemaintaskoftheBGPscannerprocess?(Source:
"ImprovingBGPConvergence")
SendsroutingupdatestoBGPneighbors.
WalkstheBGPtableforroutestoenterintotheIProutingtable.
ConfirmsthereachabilityofBGPnexthops.
ScanstherouterconfigurationtoestablishandmaintainBGPneighbors.

1. OneofyourBGPcoreroutersisexperiencingperiodicslow
responsestopingpacketsthatarebeingdirectedtoitfromthe
networkmanagementconsole.Therouterhasjustbeenconfigured
toreceivefullInternetroutes,andyoususpectthattheBGProuter
processiscausingCPUutilizationissuesinthecorerouter.Which
tworoutercommandsshouldyouusetoconfirmyoursuspicion?
(Choosetwo.)(Source:"ImprovingBGPConvergence")
showiproute
showipbgpsummary
showprocesscpu
showmemory

1. LookattheoutputoftheshowinterfacesEthernet0/0command.
HowhastheinterfacebeenmodifiedtoimproveBGPconvergence?
(Source:"ImprovingBGPConvergence")router#showinterfaces
Ethernet0/0
Ethernet0/0isup,lineprotocolisup
HardwareisDEC21140,addressis0000.0c0c.1111(bia
0002.eaa3.5a60)
Internetaddressis112.64.101.17255.255.255.240
MTU1460bytes,BW100000Kbit,DLY100usec,rely255/255,load
200/255
EncapsulationARPA,loopbacknotset,keepalivenotset,hdx,
100BaseTX
ARPtype:ARPA,ARPTimeout4:00:00
Lastinputnever,output0:00:16,outputhang0:28:01
Lastclearingof"showinterface"counters0:20:05
Outputqueue25/40,0drops;inputqueue50/500,1470drops
5minuteinputrate21666400bits/sec,1855packets/sec
5minuteoutputrate72221bits/sec,618packets/sec
Theoutputqueuehasbeendecreasedtoexpeditepacketforwardingout
theFastEthernetinterface.
Thedropthresholdoftheinputqueuehasbeensettobeginrandomly
discardingpacketsafterthequeuereaches50packetsdeep.
PMTUdiscoveryhasbeenenabledbysettingtheinterfaceMSSto1460
bytes.
PMTUdiscoveryhasbeenenabledbysettingtheinterfaceMSSto1460
bytes.

1. Refertotheoutput.Whichtwoparameterswouldindicatethatthe
BGPnetworkhasconverged?(Choosetwo.)(Source:"Improving
BGPConvergence")router#showipbgpsummary
BGProuteridentifier172.16.0.4,localASnumber1
BGPtableversionis16,mainroutingtableversion16
20networkentriesand20pathsusing2826bytesofmemory
8BGPpathattributeentriesusing480bytesofmemory
7BGPAS-PATHentriesusing168bytesofmemory
3BGPcommunityentriesusing72bytesofmemory
0BGProute-mapcacheentriesusing0bytesofmemory
3BGPfilter-listcacheentriesusing36bytesofmemory
BGPactivity20/0prefixes,24/4paths,scaninterval120secs
NeighborVASMsgRcvdMsgSentTblVerInQOutQ
Up/DownState/PfxRcd
172.16.0.1413030160000:23:135
172.16.0.2413330160000:23:155
172.16.0.3412730160000:23:145
192.168.21.994993135160000:23:045
TheTblVerforallneighborsis16.
Vissetto4forallneighbors.
TheInQandOutQforallneighborsis0.
AllneighborsareintheEstablishedstateandhavethesamePfxRcd
value.

1. Refertotheoutput.HowfrequentlytheBGPscannerprocesswill
runontherouter?(Source:"ImprovingBGPConvergence")router#
showipbgpsummary
BGProuteridentifier172.16.0.4,localASnumber1
BGPtableversionis16,mainroutingtableversion16
20networkentriesand20pathsusing2826bytesofmemory
8BGPpathattributeentriesusing480bytesofmemory
7BGPAS-PATHentriesusing168bytesofmemory
3BGPcommunityentriesusing72bytesofmemory
0BGProute-mapcacheentriesusing0bytesofmemory
3BGPfilter-listcacheentriesusing36bytesofmemory
BGPactivity20/0prefixes,24/4paths,scaninterval120secs
NeighborVASMsgRcvdMsgSentTblVerInQOutQ
Up/DownState/PfxRcd
172.16.0.1413030160000:23:135
172.16.0.2413330160000:23:155
172.16.0.3412730160000:23:145
192.168.21.994993135160000:23:045
Bydefault,theprocesswillrunevery60seconds.
Theprocesshasrun16timesandwillrunagainwhenthenextBGP
updatearrives.
Theprocesswillrunonthisrouterevery120seconds.
Itcannotbedeterminedfromthisoutput.

1. Whataretwopotentialissuesthatarecausedbymodifyingthe
defaultscantimeandadvertisementintervalonaBGProuter?
(Choosetwo.)(Source:"ImprovingBGPConvergence")
RouterCPUresourcescanbeexhausted.
Routermemoryresourcescanbedepleted.
Routingloopsaremorelikely.
BGPcouldconvergefasterthantheIGPandcausenetworkblackholes.

1. WhichoptioncanbeusedtosupporttrafficforwardingduringRP
switchover?(Source:"ImprovingBPGConvergence")
NonstopForwarding
CiscoExpressForwarding
PerfectForwardingRouting

1. Loweringthekeepalivetimerbetweensentkeepalivemessagestoa
BGPneighborwillimproveBGPconvergence.Trueorfalse?
(Source:"ImprovingBGPConvergence")
True
False

1. WhatarethreereasonstolimitthenumberofBGPprefixesthatare
receivedfromaneighbor?(Choosethree.)(Source:"Limitingthe
NumberofPrefixesReceivedfromaBGPNeighbor")
Topreventdenial-of-serviceattacks.
Toprotectagainstincorrectrouterconfigurationontheneighborside.
TopreventredundantroutinginformationfrombeingloadedintotheBGP
table.
ToavoidoverloadingroutermemoryandCPUresources.

1. InwhichtwosituationswouldadirectlyconnectedBGPneighbor
stayintheIdlestate?(Choosetwo.)(Source:"LimitingtheNumber
ofPrefixesReceivedfromaBGPNeighbor")
Theneighborhasexceededthemaximumnumberofallowedprefixes.
Themaximum-prefixthresholdhasbeenreached.
Therestartoptionhasnotbeenspecifiedwiththemaximum-prefix
command.
Theneighborismorethanonehopaway.

1. Whichtwoofthefollowingcharacteristicsaccuratelydescribethe
showipbgpneighborscommand?(Choosetwo.)(Source:
"LimitingtheNumberofPrefixesReceivedfromaBGPNeighbor")
Forneighborswiththemaximum-prefixfunctionconfigured,displaysthe
maximumnumberofprefixesandthewarningthreshold.
Forneighborsexceedingthemaximumnumberofprefixes,displaysthe
reasonthattheBGPsessionisidle.
Forneighborswithunstableroutes,displaysthefeasiblesuccessorfor
thoseroutes.
Forneighborsinconfederations,displaystheroutereflectorstatusof
thoseneighbors.

1. WhatistheneedforBGPpeergroups?(Source:"Implementing
BGPPeerGroups")
Canbeusedtoconfigurethesamesetofparametersforanumberof
BGPneighborsinacommontemplate.
CanbeusedtoallowanonymousBGPneighbors.
AllowEBGPpeerstobeconfiguredwiththesameASnumberand
parameters.
CanbeusedtohidetheidentityofBGPpeersfromexternalneighbors.

1. WhichofthefollowingstatementsaboutthebenefitofBGPpeer
groupsisaccurate?(Source:"ImplementingBGPPeerGroups")
WithBGPpeergroups,alloftherouterCPUutilizationthatisimposedby
BGPupdategenerationissignificantlyreduced.
WithBGPpeergroups,someoftherouterCPUutilizationthatisimposed
byBGPupdategenerationissignificantlyreduced.
Networkadministratorsshouldusepeergroupstomakesmallernetworks
moreproductive.
WithBGPpeergroups,neighborrelationshipsareautomaticallycreated.

1. WhataretwolimitationsofBGPpeergroupsonCiscorouters?
(Choosetwo.)(Source:"ImplementingBGPPeerGroups")
EBGPandIBGPneighborscannotbemembersofthesamepeergroup.
AllroutersinthepeergroupmustbelongtothesameAS.
Peergroupmemberscannotcontaindifferentoutboundfiltering
mechanisms.
Peergroupmembersmusthavethesameinboundfilteringmechanisms.

1. WhichtwoofthefollowingcharacteristicsaccuratelydescribeBGP
peergroups?(Choosetwo.)(Source:"ImplementingBGPPeer
Groups")
ABGPpeergroupcreatesaneighborparametertemplate.
Whenactualneighboringroutersareassignedtothepeergroupona
router,alloftheattributesthatareconfiguredforthepeergroupare
appliedtoselectedpeergroupmembers.
Oneoftheconfigurableparametersincludescommunitypropagation.
Individualparametersspecifiedinapeergroupcannotbeoverriddenona
neighbor-by-neighborbasis.

1. Whichtwoofthefollowingcharacteristicsaccuratelydescribethe
functionoftheBGPDynamicUpdatePeer-Groupsfeature?(Choose
two.)(Source:"ImplementingBGPPeerGroups")
Doesnotprovidetheoperatorwithtimetochangetheconfigurationifa
mistakeismade.
SeparatesBGPupdategenerationfrompeergroupconfiguration.
Doesnotrequireanyconfigurationbythenetworkoperator.
Requiresminimalconfigurationbythenetworkoperator.

1. Whichtwoofthefollowingstatementsaccuratelydescribethe
functionoftheBGPpeertemplatesfeature?(Choosetwo.)(Source:
"ImplementingBGPPeerGroups")
NetworkoperatorsmuststillconfiguresomepeergroupsinBGP,evenif
usingtheBGPConfigurationUsingPeerTemplatesfeature.
Peertemplatesovercomealllimitationsofpeergroups.
Peertemplatesimprovetheflexibilityandenhancethecapabilityof
neighborconfiguration.
Youcanchaintogetherpeertemplateconfigurationstocreatesimpleor
complexconfigurations.

1. WhatarethreestepsthatarerequiredtoproperlyconfigureBGP
peergroupsonCiscorouters?(Choosethree.)(Source:
"ImplementingBGPPeerGroups")
SpecifyparametersfortheBGPpeergroup
CreateaBGPpeergroup
EnablethepeergroupbyclearingtheBGPsession
Assignaneighborintothepeergroup

1. Whichcommanddoyouusetodisplaythesummarystatusofall
neighborsinapeergroup?(Source:"ImplementingBGPPeer
Groups")
showipbgp
showpeer-groupsummary
showipbgpneighbor
showipbgppeer-groupsummary

1. WhichtwodescriptionsofthepurposeofBGProutedampeningare
accurate?(Choosetwo.)(Source:"UsingBGPRouteDampening")
AtooldesignedtohelpminimizethenumberofBGPupdates
Suppressesroutesthatoccasionallyflap
Designedtoreducerouterprocessingloadcausedbyunstableroutes
Preventssustainedroutingoscillation,withsomeeffectonotherwell-
behavedroutes

1. WhichtwomechanismsarebuiltintoBGPtomakeitmorescalable
byreducingtheroute-processingrequirementsofBGProuters?
(Choosetwo.)(Source:"UsingBGPRouteDampening")
Splithorizon
Routedampening
Synchronization
Per-neighborupdatetimers

1. WhataretwothingsthathappentoanEBGProutethathasbecome
unreachablewhenBGProutedampeningisused?(Choosetwo.)
(Source:"UsingBGPRouteDampening")
ItisremovedfromtheIProutingtable.
ItisremovedfromtheBGPtable.
ItremainsintheIProutingtableaslongasitspenaltyremainsgreater
than50percentofthereuselimit.
ItiskeptintheBGPtableandmarkedasahistoryentry.

1. WhataretwomethodsofenablingroutedampeningonaCisco
router?(Choosetwo.)(Source:"UsingBGPRouteDampening",
Topic:"ConfiguringBGPRouteDampening")
Globally,byenablingroutedampeninginglobalrouterconfigurationmode
Globally,byenablingroutedampeningundertheBGProutingprocess
Onspecificroutesbyenablingroutedampeningonaspecificinterface
Byusingaroute-mapintheBGPprocesstoapplyroutedampeningto
specificroutes

1. WhichtwothingscouldhappentoaBGProutethatispenalized
abovethereuselimitbuthasanassignedpenaltythatisunderthe
suppresslimit?(Choosetwo.)(Source:"UsingBGPRoute
Dampening")
TherouteissuppressedfromBGPupdatesifitisreachable.
TherouteismarkedasahistoryentryintheBGPtable.
TherouteiswithdrawnfromtheIProutingtable.
Theroutecontinuestobeadvertised.
Glossary
ACK
acknowledgment. Notification sent from one network device to another to acknowledge that some event occurred (for
example,thereceiptofamessage).
AD
administrative distance. Rating of the trustworthiness of a routing information source. Administrative distance often is
expressedasanumericalvaluebetween0and255.Thehigherthevalue,thelowerthetrustworthinessrating.
AFI
AddressFamilyIdentifier.
ARIN
American Registry for Internet Numbers. A nonprofit organization that administers and registers IP numbers for the
geographicalareasthatarecurrentlymanagedbyNetworkSolutions(InterNIC).Thoseareasinclude,butarenotlimitedto,
NorthAmerica,SouthAmerica,SouthAfrica,andtheCaribbean.
ARP
AddressResolutionProtocol.InternetprotocolthatisusedtomapanIPaddresstoaMACaddress.DefinedinRFC826.
AS
autonomous system. A collection of networks under a common administration sharing a common routing strategy.
Autonomoussystems aresubdividedby areas.An autonomous systemmustbe assigned a unique 16-bit number by the
IANA.
ATM
AsynchronousTransferMode.Theinternationalstandardforcellrelayinwhichmultipleservicetypes(suchasvoice,video,
ordata)areconveyedinfixed-length(53-byte)cells.Fixed-lengthcellsallowcellprocessingtooccurinhardware,thereby
reducingtransitdelays.ATMisdesignedtotakeadvantageofhigh-speedtransmissionmedia,suchasE3,SONET,andT3.
BFD
Bidirectional Forwarding Detection. A detection protocol that is designed to provide fast forwarding-path failure detection
timesformediatypes,encapsulations,topologies,androutingprotocols.
BGP
Border Gateway Protocol. Interdomain routing protocol that replaces EGP. BGP exchanges reachability information with
otherBGPsystems.ItisdefinedbyRFC1163.
BGP4
BorderGatewayProtocolversion4.
CE
customeredge.Identifiesthenetworkdevices,connectedtoaprovidernetwork,thatareundertheadministrativecontrolof
thecustomer.
CLI
command-lineinterface.Aninterfacethatallowstheusertointeractwiththeoperatingsystembyenteringcommandsand
optionalarguments.TheUNIXoperatingsystemandDOSprovideCLIs.
CPU
central processing unit. The hardware within a computer system or smartphone that carries out the instructions of a
computerprogrambyperformingthebasicarithmetical,logical,andinput-outputoperationsofthesystem.
DF
DonotFragment
DMVPN
DynamicMultipointVPN.
DMZ
demilitarizedzone.
DNS
DomainNameSystem.SystemusedontheInternetfortranslatingnamesofnetworknodesintoaddresses.
DoS
denialofservice.Anintentionalorunintentionalattackonadevicethatmakestheresourceunavailabletoperformitsnormal
function.
DPT
DynamicPacketTransport
DSL
digital subscriber line. Public network technology that delivers high bandwidth over conventional copper wiring at limited
distances. There are four types of DSL:ADSL, HDSL, SDSL, and VDSL. All are provisioned via modem pairs, with one
modemlocatedatacentralofficeandtheotheratthecustomersite.BecausemostDSLtechnologiesdonotusethewhole
bandwidthofthetwistedpair,thereisroomremainingforavoicechannel.
EBGP
ExteriorBorderGatewayProtocol
EGP
Exterior Gateway Protocol. It's the Internet protocol for exchanging routing information between autonomous systems.
Documentedin RFC 904.This isnot to beconfusedwiththe general termexteriorgatewayprotocol.EGPisan obsolete
protocolthatwasreplacedbyBGP.
EIGRP
Enhanced InteriorGateway Routing Protocol.It's the advanced version of IGRPdeveloped by Cisco. Itprovides superior
convergence properties and operating efficiency, and it combines the advantages of link-state protocols with those of
distancevectorprotocols.
Ethernet
Baseband LAN specification invented by Xerox Corporation and developed jointly by Xerox, Intel, and Digital Equipment
Corporation.EthernetnetworksuseCSMA/CDandrunoveravarietyofcabletypesat10Mbps.Ethernetissimilartothe
IEEE802.3seriesofstandards.ItisthemostcommonlyusedLANtechnologybecauseitsprotocoliseasytounderstand,
implement, manage, andmaintain.Itallowslow-costnetwork implementations,providesextensivetopologicalflexibilityfor
networkinstallation,andguaranteessuccessful interconnectionandoperationofstandards-compliantproducts,regardless
ofmanufacturer.
FastEthernet
Anyofanumberof100-MbpsEthernetspecifications.FastEthernetoffersaspeedincrease10timesthatofthe10BaseT
Ethernetspecificationwhilepreservingsuchqualitiesasframeformat,MACmechanisms,andMTU.Suchsimilaritiesallow
theuseofexisting10BaseTapplicationsandnetworkmanagementtoolsonFastEthernetnetworks.Basedonanextension
totheIEEE802.3specification.
FDDI
Fiber Distributed Data Interface. LAN standard, defined by ANSI X3T9.5, specifying a 100-Mbps token-passing network
usingfiber-opticcable,withtransmissiondistancesofupto2km.FDDIusesadual-ringarchitecturetoprovideredundancy.
FFTx
FiberFromThe"X",whereXstandsfordifferenttypeofdeployment(Building,Home,Premisses,etc.)
FIB
forwardinginformationbase.
FrameRelay
Industry-standard,packet-switcheddatalinklayerprotocolthathandlesmultiplevirtualcircuitsbetweenconnecteddevices.
GigabitEthernet
Standard for a high-speed Ethernet, approved by the IEEE (Institute of Electrical and Electronics Engineers) 802.3z
standardscommitteein1996.
IANA
Internet Assigned Numbers Authority. Organization operated under the auspices of the ISOC as a part of the IAB. IANA
delegatesauthorityforIPaddress-spaceallocationanddomain-nameassignmenttotheInterNICandotherorganizations.
IANAalso maintains a database of assigned protocol identifiers that is used in the TCP/IP stack, including autonomous
systemnumbers.
IBGP
InternalBorderGatewayProtocol.
ICMP
InternetControlMessageProtocol.NetworklayerInternetprotocolthatreportserrorsandprovidesotherinformationthatis
relevanttoIPpacketprocessing.DocumentedinRFC792.
IGP
interiorgatewayprotocol.Internetprotocolusedtoexchangeroutinginformationwithinanautonomoussystem.Examplesof
commonInternetIGPsincludeIGRP,OSPF,andRIP.
IOL
SpecialbuildofCiscoIOSSoftwareforLinux,createdspeciallyforvirtualizedenvironments.
IP
Internet Protocol. Network layer protocol in the TCP/IP stack offering a connectionless internetwork service. IP provides
featuresforaddressing,type-of-servicespecification,fragmentationandreassembly,andsecurity.DefinedinRFC791.
IPaddress
A 32-bit addressassigned tohostsusingTCP/IP.An IPaddress belongsto one offiveclasses(A, B, C, D,or E) and is
writtenas4octetsseparatedbyperiods(dotteddecimalformat).Each addressconsistsofanetworknumber,anoptional
subnetworknumber,andahostnumber.Thenetworkandsubnetworknumberstogetherareusedforrouting,andthehost
numberisusedtoaddressanindividualhostwithinthenetworkorsubnetwork.Asubnetmaskisused toextractnetwork
andsubnetworkinformationfromtheIPaddress.CIDRprovidesanewwayofrepresentingIPaddressesandsubnetmasks.
AlsocalledanInternetaddress.
IPv4
IPversion4.InternetProtocolversion4isthefourthversioninthedevelopmentoftheIPandthefirstversionoftheprotocol
tobewidelydeployed.AlongwithIPv6,IPv4isatthecoreofstandards-basedinternetworkingmethodsoftheInternet.IPv4
isstillusedtoroutemosttrafficacrosstheInternet.IPv4isaconnectionlessprotocolforuseonpacket-switchedlinklayer
networks(forexample,Ethernet).Itoperatesonabest-effortdeliverymodelinthatitdoesnotguaranteedeliveryanddoes
notassurepropersequencingoravoidanceofduplicatedelivery.
IPv6
IPversion6.ReplacementforthecurrentversionofIP(version4).IPv6includessupportforflowIDinthepacketheader,
whichcanbeusedtoidentifyflows.FormerlycalledIPng(nextgeneration).
IS-IS
IntermediateSystem-to-IntermediateSystem.OSIlink-statehierarchicalroutingprotocolbasedonDECnetPhaseVrouting,
wherebyISs(routers)exchangeroutinginformationbasedonasinglemetrictodeterminenetworktopology.
ISP
Internetserviceprovider.CompanythatprovidesInternetaccesstoothercompaniesandindividuals.
LAN
local-areanetwork.Ahigh-speed,low-errordatanetworkcoveringarelativelysmallgeographicarea(uptoafewthousand
meters). LANs connect workstations,peripherals, terminals, and other devices ina single building or othergeographically
limitedarea.LAN standards specifycablingand signalingat thephysicaland datalink layersof theOSImodel.Ethernet,
FDDI,andTokenRingarewidelyusedLANtechnologies.
LSA
link-stateadvertisement.Abroadcastpacketusedbylink-stateprotocolsthatcontainsinformationaboutneighborsandpath
costs.LSAsareusedbythereceivingrouterstomaintaintheirroutingtables.SometimescalledanLSP.
LSP
label-switchedpath.
MAC
MediaAccessControl.ThelowerofthetwosublayersofthedatalinklayerthatisdefinedbytheIEEE.TheMACsublayer
handlesaccesstosharedmedia,suchaswhethertokenpassingorcontentionwillbeused.
MACaddress
astandardizeddatalinklayeraddressthatisrequiredforeveryportordevicethatconnectstoaLAN.Otherdevicesinthe
network use these addresses to locate specific ports in the network and to create and update routing tables and data
structures.AMACaddressis6byteslongandiscontrolledbytheIEEE.Itisalsoknownasahardwareaddress,MAClayer
address,andphysicaladdress.
MD5
MessageDigest5.Aone-wayhashingalgorithmthatproducesa128-bithash.BothMD5andSecureHashAlgorithm(SHA)
are variations on MD4 andaredesigned tostrengthen thesecurity ofthe MD4 hashing algorithm. Cisco uses hashes for
authentication within the IPsec framework. MD5 is also used for message authentication in SNMP v.2. MD5 verifies the
integrityofthecommunication,authenticatestheorigin,andchecksfortimeliness.
MED
multi-exitdiscriminator.
MPLS
MultiprotocolLabelSwitching.aswitchingmethodthatforwardsIPtrafficusingalabel.Thislabelinstructstheroutersand
theswitchesinthenetworkwheretoforwardthepacketsbasedonpre-establishedIProutinginformation.
MSS
maximumsegmentsize.ATCPparameterthatspecifiesthemaximumamountofdatathatadevicecanreceiveinasingle
TCPsegment.
MTU
maximumtransmissionunit.Themaximumpacketsize,inbytes,thataparticularinterfacecanhandle.
NAT
Network Address Translation. A mechanism for reducing the need for globally unique IP addresses. NAT allows an
organization with addresses that are not globally unique to connect to the Internet by translating these addresses into
globallyroutableaddressspace.AlsoknownasNetworkAddressTranslator.
NHT
Nexthoptracking
NLRI
NetworkLayerReachabilityInformation.
NSF
NonstopForwarding.
ORF
outboundroutefilter.
OSPF
Open Shortest Path First. Link-state, hierarchical IGP routing algorithm proposed as a successor to RIP in the Internet
community. OSPF features include least-cost routing, multipath routing, and load balancing. OSPF was derived from an
earlyversionoftheIS-ISprotocol.
PA
provider-assigned.
PAaddress
provider-assignedaddress.
PE
provideredge.Identifiesthenetworkdevices,undertheadministrativecontroloftheprovider,thatconnecttoCEdevices.
PI
provider-independent.
PIaddress
provider-independentaddress.
PIC
Prefix-IndependentConvergence.
PMTU
pathmaximumtransmissionunit.
P-network
providernetwork.
POI
pointofinsertion.
POP
PostOfficeProtocol.Protocolthatclientemailapplicationsusetoretrievemailfromamailserver.
Prouter
providerrouter.
PVC
permanent virtual circuit (or connection). Virtual circuit that is permanently established. PVCs save bandwidth associated
with circuit establishment and tear down in situations where certain virtual circuits must exist all the time. In ATM
terminology,calledapermanentvirtualconnection.
QoS
quality of service. Measure of performance for a transmission system that reflects its transmission quality and service
availability.
RFC
Request for Comments. Document series that is used as the primary means for communicating information about the
Internet.SomeRFCsaredesignatedbytheIABasInternetstandards.MostRFCsdocumentprotocolspecifications,suchas
TelnetandFTP,butsomeRFCsarehumorousorhistorical.RFCsareavailableonlinefromnumeroussources.
RIB
routinginformationbase.
RIP
RoutingInformationProtocol.Adistance-vectorroutingprotocolthatuseshopcountasaroutingmetric.
RIPE
ReseauxIPEuropeens.GroupformedtocoordinateandpromoteTCP/IP-basednetworksinEurope.
RP
routeprocessor.
RST
reset.Atypeofmessage.
RT
routetarget.
SAFI
SubsequentAddressFamilyIdentifier.
SOO
SiteofOrigin.
SPD
SelectivePacketDiscard.
SSO
StatefulSwitchover.
SYN
synchronization.
SYN-ACK
synchronization-acknowledgment.
TCP
Transmission Control Protocol. Connection-oriented transport layer protocol that provides reliable full-duplex data
transmission.TCPispartoftheTCP/IPprotocolstack.
TCP/IP
TransmissionControlProtocol/InternetProtocol.CommonnameforthesuiteofprotocolsdevelopedbytheU.S.DoDinthe
1970stosupporttheconstructionofworldwideinternetworks.TCPandIParethetwobest-knownprotocolsinthesuite.
TLV
type,length,value.
TTL
TimetoLive.Amechanismthatlimitsthelifespanorlifetimeofdatainacomputerornetwork.
UNIX
operating system developed in 1969 at Bell Laboratories. UNIX has gone through several iterations since its inception.
These include UNIX 4.3 BSD (Berkeley Standard Distribution), developed at the University of California at Berkeley, and
UNIXSystemV,Release4.0,developedbyAT&T.
VPN
virtualprivatenetwork.Enables IPtraffictotravel securelyoverapublicTCP/IPnetworkby encrypting alltrafficfrom one
networktoanother.AVPNusestunnelingtoencryptallinformationattheIPlevel.
VPNv4
virtualprivatenetworkversion4.EnablesIPtraffictotravelsecurelyoverapublicTCP/IPnetworkbyencryptingall traffic
fromonenetworktoanother.AVPNusestunnelingtoencryptallinformationattheIPlevel.
VRF
aVPNrouting/forwardinginstance.AVRFconsistsofanIProutingtable,aderivedforwardingtable,asetofinterfacesthat
use the forwarding table, and a set of rules and routing protocols that determine what goes into the forwarding table. In
general,aVRFincludestheroutinginformationthatdefinesacustomerVPNsitethatisattachedtoaPErouter.
WAN
wide-area network. Data communications network that serves users across a broad geographic area and often uses
transmissiondevicesprovidedbycommoncarriers.FrameRelay,SMDS,andX.25areexamplesofWANs.