您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 销售管理 > 001. BGP概述
BorderGatewayProtocolOverview©2003,CiscoSystems,Inc.Allrightsreserved.1©2003,CiscoSystems,Inc.Allrightsreserved.BSCI2.0—7-2BGPAutonomousSystems•AnASisacollectionofnetworksunderasingletechnicaladministration.(自治系统经典定义:在单一技术下管理下,采用同一种内部网关协议和统一度量值在AS内转发数据包,并采用一种外部协议将数据包转发到其他AS的一组路由器.)•IGPsoperatewithinanAS.•BGPisusedbetweenAutonomousSystems.•Exchangeofloop-freeroutinginformationisguaranteed.(BGP的主要目标是提供一种能够保证自治系统间无环路的路由选择信息交换的域间路由系统.)©2003,CiscoSystems,Inc.Allrightsreserved.BSCI2.0—7-3自主系统号-ASAS是一个16位的数字,其取值范围从1-65535;64512-65535的AS号保留给私用,这类似于私有IP地址。仅当组织打算使用诸如BGP等EGP来连接到互联网时,才需要使用IANA分配的自治系统号。在互联网上有15000多个AS号;有20000多台路由器在运行,均与有限数量的BGP路由器建立邻接关系。Chinanet骨干网申请的自治域号为4134,Chinanet作为一个独立的自治域,采用BGP路由协议与国际internet及各省接入网交换路由信息。©2003,CiscoSystems,Inc.Allrightsreserved.BSCI2.0—7-4何时选择BGP?何时不选择BGP?•BGPismostappropriate(恰当)whenatleastoneofthefollowingconditionsexists:–AnASallowspacketstotransitthroughittoreachotherAutonomousSystems(AS允许数据包穿过它到达其他自治系统).–AnAShasmultipleconnectionstootherAutonomousSystems.(多条外部连接,多个运营商之间;拥有多条到互联网的连接时。)–RoutingpolicyandrouteselectionfortrafficenteringandleavingyourASmustbemanipulated.(必须对进入和离开AS的数据流进行控制.)•BGPisnotalwaysappropriate.DonotuseBGPifyouhaveoneofthefollowingconditions:–SingleconnectiontotheInternetorotherAS(仅单一连接)–LacksmemoryorprocessorpowertohandleconstantupdatesonBGProuters(内存和CPU性能不佳时)–LimitedunderstandingofroutefilteringandBGPpathselectionprocess(没有能力实施路由过滤或BGP路径选择时.)–LowbandwidthbetweenAutonomousSystems(自治系统间带宽较低时.)©2003,CiscoSystems,Inc.Allrightsreserved.BSCI2.0—7-5BGPCharacteristics(特征)BGPisadistance-vectorprotocolwiththefollowingenhancements:•Reliableupdates:BGPrunsontopofTCP(port179;可靠通信.)•Incremental,triggeredupdatesonly(增量更新,触发更新)•PeriodickeepalivemessagestoverifyTCPconnectivity(周期性通过keepalive包发送消息.)•Richmetrics(calledpathvectorsorattributes,丰富的计量值,一一比较,BGP中称为属性;类似于IGP中的开销值.)•Designedtoscaletohugeinternetworks(e.g.,theInternet;专门为大型互联网络而设计.)•支持VLSM可变长子网掩码。©2003,CiscoSystems,Inc.Allrightsreserved.BSCI2.0—7-6BGP:一种基于策略的路由协议,控制数据传输•IGPsannouncenetworksanddescribethecosttoreachthosenetworks.(IGP宣告域内网络,并描述到目标网络的开销.)•BGPannouncespathwaysandthenetworksthatarereachableattheendofthepathway.BGPdescribesthepathwaybyusingattributes(属性)whicharesimilartometrics.•BGPallowsadministratorstodefinepoliciesorrulesforhowdatawillflow(穿越)throughtheAutonomousSystems.©2003,CiscoSystems,Inc.Allrightsreserved.BSCI2.0—7-7BGPPolicy-BasedRouting•BGPcansupportanypolicyconformingtothehop-by-hop(AS-by-AS)routingparadigm.•路由选择策略或规则的设置被称为基于策略的路由选择.©2003,CiscoSystems,Inc.Allrightsreserved.BSCI2.0—7-8BGPDatabases(数据表)•Neighbortable–ListofBGPneighbors(BGP对等体,邻居,交换路径信息,与RIP类似.)–可以直连可以不直连.–邻居关系建立在TCP连接之上.•BGPforwardingtable/database–Listofallnetworkslearnedfromeachneighbor–Cancontainmultiplepathwaystodestinationnetworks–DatabasecontainsBGPattributesforeachpathway•IProutingtable–Listofbestpathstodestinationnetworks(列出了到目标网络的最佳路径)©2003,CiscoSystems,Inc.Allrightsreserved.BSCI2.0—7-9BGP表运行BGP的路由器保存着一个独立于IP路由表的BGP表.SHOWIPBGPBGPtableversionis23,localrouterIDis192.168.1.49Statuscodes:ssuppressed,ddamped,hhistory,*valid,best,i-internalOrigincodes:i-IGP,e-EGP,?-incompleteNetworkNextHopMetricLocPrfWeightPath*10.0.0.010.1.1.1000065200i*172.16.10.0/2410.1.1.1000065200i©2003,CiscoSystems,Inc.Allrightsreserved.BSCI2.0—7-10BGPMessageTypesBGPdefinesthefollowingmessagetypes:•Open:(版本号4,AS号,保持时间,路由器ID)–IncludesholdtimeandBGProuterID•Keepalive:(类似HELLO包)•Update:(撤消路由,路径属性,网络层可达信息)–Informationforonepathonly(couldbetomultiplenetworks)–Includespathattributesandnetworks•Notification:(通告消息,检测到出错条件时,发送通知消息)–Whenerrorisdetected–BGPconnectionisclosedaftersent©2003,CiscoSystems,Inc.Allrightsreserved.BSCI2.0—7-11BGPStatesWhenestablishingaBGPsession,BGPgoesthroughthefollowingsteps:Idle(闲置状态):Routerissearchingroutingtabletoseeifarouteexiststoreachtheneighbor.Connect(连接状态):Routerfoundrouteandhascompletedthree-wayTCPhandshake.Opensent(发送消息):Openmessagesentwiththeparameters(参数)fortheBGPsession.Openconfirm(确认消息):Routerreceivedagreementontheparametersforestablishingsession.Established(建立邻居,开始路由):Peeringisestablished;routingbegins.©2003,CiscoSystems,Inc.Allrightsreserved.BSCI2.0—7-12BGPSessionEstablishmentdebugipbgpeventsBGPeventsdebuggingisonRouterA#BGP:172.16.1.2passiveopenBGP:172.16.1.2wentfromidletoconnectBGP:172.16.1.2openrcvd,version4BGP:172.16.1.2wentfromconnecttoopensentBGP:172.16.1.2sendingopen,version4BGP:172.16.1.2wentfromopensenttoopenconfirmBGP:ScanningroutingtablesBGP:172.16.1.2wentfromopenconfirmtoestablishedThebestwaytoseesessionsetupiswiththefollowingcommand:Router#©2003,CiscoSystems,Inc.Allrightsreserved.BSCI2.0—7-13BGP常用术语PeerIBGPEBGP©2003,CiscoSystems,Inc.Allrightsreserved.BSCI2.0—7-14Peers=Neighbors•ABGPpeer,alsoknownasaBGPneighbor,isaspecifictermthatisusedforBGPspeakersthathaveestablishedaneighborrelationship.•AnytworoutersthathaveformedaTCPconnectiontoexchangeBGProutinginformationarecalledpeersorneighbors.©2003,CiscoSystems,Inc.Allrightsreserved.BSCI2.0—7-15InternalBGP•IGBPreferstothepresenceofBGPneighborswithinthesameAS.•
本文标题:001. BGP概述
链接地址:https://www.777doc.com/doc-5448481 .html