cisco BGP.docx

上传人:黑** 文档编号:71917252 上传时间:2022-04-07 格式:DOCX 页数:7 大小:50.60KB
收藏 版权申诉 举报 下载
cisco BGP.docx_第1页
第1页 / 共7页
cisco BGP.docx_第2页
第2页 / 共7页
cisco BGP.docx_第3页
第3页 / 共7页
资源描述:

《cisco BGP.docx》由会员分享,可在线阅读,更多相关《cisco BGP.docx(7页珍藏版)》请在装配图网上搜索。

1、BGP基本配置实验目的:BGP的基本配置以及原理实验拓扑:R3AS 65001AS 65005实验步骤:主要配置如下(其中AS 65003中启eigrp)R1R1 (config)#router bgp 65001RI (config-router)# neighbor 2.2.2.2 remote-as 65003(建邻居时使用对方的回环口和 AS 号)R1 (config-router)# neighbor 2.2.2.2 update-source LoopbackO (loopbackO 为自己的回环口 )R1 (config-routcr)# neighbor 2.2.2.2 cbg

2、p-multihopR1 (config-router)#exitR1 (config)#ip route 2.2.2.2 255.255.255.255 12.1.1.2 (目标网段的下一跳地址或送出接口)R1 (config)#ip route 2.2.2.2 255.255.255.255 172.16.1.25 (目标网段的下一跳地址或送出接口, 管理距离修改成5,使串口线为备 用)Rl(config)#cxitR1 #wrR2R2(config)#router eigrp 10R2(config-router)# no auto-suinmaryR2(config-router)#e

3、xitR2(config)#routcr bgp 65003R2(config-router)# neighbor 1.1.1.1 remote-as 65001R2(config-router)# neighbor 1.1.1.1 update-source LoopbackOR2(config-router)# neighbor 1.1.1.1 ebgp-multihopR2(config-router)# neighbor A peer-groupR2(config-routcr)# neighbor A rcmotc-as 65003R2(con fig-router)# neighb

4、or A update-source LoopbackOR2(config-router)# neighbor A next-hop-selfR2(config-router)# neighbor 33.3.3 peer-group AR2(config-router)# neighbor 4.4.4.4 peer-group AR2(config-router)#exitR2(config)#ip route 1.1.1.】 255.255.255.255 172.16.1.1 5Rl(config)#exitR2#wrR3R3(config)#router eigrp 1()R3(conf

5、ig-router)# no auto-summaryR3(conflg-router)#exi(R3(config)#router bgp 65003R3(config-router)# neighbor B peer-groupR3(config-router)# neighbor B remote-as 65003R3(config-router)# neighbor B update-source LoopbackO (下面就不用把自己指定成下一跳了,其实指不指都可以)R3(config-router)# neighbor 2.2.2.2 peer-group BR3(config-r

6、outer)# neighbor 4.4.4.4 peer-group BR3#wrR4R4(config)#routcr cigrp 10R4(config-router)# no au(o-suinmaryR4(config-router)#exitR4(config)#router bgp 65003R4(config-routcr)# neighbor 5.5.5.5 rcmote-as 65005R4(config-router)# neighbor 5.5.5.5 update-source LoopbackOR4(config-router)# neighbor 5.5.5.5

7、ebgp-multihopR4(config-router)# neighbor C peer-groupR4(config-router)# neighbor C remote-as 65003R4(config-router)# neighbor C update-source LoopbackOR4(config-routcr)# neighbor C ncxt-hop-sclfR4(config-router)# neighbor 2.2.2.2 peer-group CR4(config-router)# neighbor 3.3.3.3 peer-group C R4(config

8、-router)#exitR4(config)#ip route 5.5.5.5 255.255.255.255 192.168.1.1 Rl(config)#exitR4#wrR5R5(config)#routcr bgp 65005R5(config-router)# neighbor 4.4.4.4 remote-as 65003R5(config-router)# neighbor 4.4.4.4 update-source LoopbackOR5(config-router)# neighbor 4.4.4.4 ebgp-multihopR5(config-routcr)# netw

9、ork 5.5.5.0 mask 255.255.255.0 R5(config-router)#exitR5(config)#ip route 4.4.4.4 255.255.255.255 192.168.1.2 Rl(config)#exitR5#wr分析使用show ip bgp summary可查看邻居,其中“Statc/PfxRcd”是数字,代表已经建立了邻居, 如果是字母,说明邻居正在建立。R1DynaMips(l): Rl Console port* D|PRlfshow xp kxjp suramziryBGP router identifier 11.11.11.llr l

10、ocal AS number 65001BGP cable version Is 6r main roueIng cable version 65 network entries usxna 585 bytea of memory5entries using 260 bytes of memory5/4 BGP path/kest:pat:h arerxbure entries usxng 620 bytes of memory2 BGP AS-PATH entries using 48 bytes of memory0 BGP route-raap cache entries uslnq 0

11、 bytes of memory0 BGP filter-list cache entries using 0 bytes of memoryBGP usxng 1S13 t:ocal bytes of memoryBGP activity 5/0 prefixes, 5/0 pachs, scan interval 60 secsNeigHtxrV AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down Srare/PfxRcd4 6S0032321600 00:17:074R113回区I13回区IR2Dyna*xps(2): R2. Console portR

12、2#show ip bgp stmcnaryBGP router identifier 22.22.22.22, local AS number 6S003BGP table version xs 8, main routing t;able version 85 network entries using 585 byres of laemory5 path entries using 260 byres of memory5/4 BGP path/bestpath attribute entries using 620 bytes of memory2 BGP AS-PATH entrie

13、s using 48 bytes of memory0 BGP route-map cache entries using 0 bytes of memory0 BGP filter-list cache entries using 0 bytes of memoryBGP using 1513 total bytes of memory5/0 prefixesr 5/0 paths, scan interval 60 secs5/0 prefixesr 5/0 paths, scan interval 60 secsBGP activityNeighbor34Neighbor34V AS4

14、650014 650034 65003MsgRcvd MsgSent242624 2525 25TblVer InQ OurQ Up/Down State/PfxRcd800 00:20:381800 00:20:421800 00:20:412R3回区回区R3#show ip bgp summaryBGP router identifier 33.33.33.33, local AS number 65003BGP table version is 8, main routing table version 85 network entries using 585 bytes of menj

15、ory5 path entries using 260 bytes of memory5/4 BGP path/besrpath attribute entries using 620 bytes of memory2 BGP AS-PATH entries using 48 bytes of memory0 BGP route-map cache entries using 00 BGP filter-list cache entries usingBGP using 1513 total bytes of memoryBGP activityR3#show ip bgp summaryBG

16、P router identifier 33.33.33.33, local AS number 65003BGP table version is 8, main routing table version 85 network entries using 585 bytes of menjory5 path entries using 260 bytes of memory5/4 BGP path/besrpath attribute entries using 620 bytes of memory2 BGP AS-PATH entries using 48 bytes of memor

17、y0 BGP route-map cache entries using 00 BGP filter-list cache entries usingBGP using 1513 total bytes of memoryBGP activity6/1 prefixes, 6/1 paths.bytes of memory 0 bytes of memoryscan interval 60 secsNeighborR3#lNeighborR3#lV AS MsgRcvd MsgSent4 6500326254 650032625TblVer InQ OutQ Up/Down Srate/Pfx

18、Rcd00 00:21:42200 00:21:322R4R4闭 Dynaaips (0) : R4, Console portR4tshow ip bgp suncnaryQBGP router identifier 44.44.44.44, local AS number 65003,BGP table version is 8, main routing table version 8I5 network entries using 585 bytes of memory5 path entries using 260 bytes of memoryI5/4 BGP path/bestp

19、ath actribute entries using 620 bytes of memory.2 BGP AS-PATH entries using 48 bytes of memoryJ0 BGP route-map cache entries using 0 bytes of memory0 BGP filter-list cache entries using 0 bytes of memoryHBGP using 1513 total bytes of memoryBGP activity 5/0 prefixes, S/0 paths, scan interval 60 secsR

20、”,NeighborVASMsgRcvd MsgSentTblVerInQ OutQ Up/DownState/PfxRcd2.2.2.24650032727800 00:22:3923.3.3.34650032627800 00:22:311S . 5 S . 54650052628800 00:22:181R5Dynaaips (4) : R5, Console portIpRSfshow ip bgp summaryBGP router identifier 55.55.55.55, local AS number 65005BGP table version is 6, main ro

21、uting table version 65 network entries using 585 bytes of memory5 path entries using 260 bytes of memory5/4 BGP parh/bestparh attribute entries using 620 bytes of memory2 BGP AS-PATH entries using 48 bytes of memory0 BGP route-map cache entries using 0 bytes of memory0 BGP filter-list cache entries

22、using 0 bytes of memoryBGP using 1513 total bytes of memoryBGP activity 5/0 prefixes, 5/0 paths, scan interval 60 secsNeighborV AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down Stace/PfxRcd4 6S0032927600 00:23:244R5|使用show ip bgp可查看bgp表,可查看路径优与否。其中*代表可可用,代表最优,i代表 从IBGP中学到的。R1R2Dyna*xps(1): Rl. Console por

23、t盘回xlRltshowr xp bgpIBGP table version is 8r local roucer IDStatuscodes: 3suppressed, d danqed hhistory * validr best;, iinternal.rRIB-rallurer S ScaleOrigincodes: i-IGPr e - EGP, ? - xncoxnpleeeflNetworkNext HopMetric LocPrf WeightPath* 1.11.0/240327681* 2.22.0/2400650031;* 3.33.0/24065003i*4.44.0/

24、240650031 5.55.0/2406500365005 ii/1 DynaMips (2):K2, Console portEJ回区R2#showr ip tgpaBGP t:able version is llr local router22Statuscodes: asuppressed, d damped.h history, * valid, 1estr i 一xncernal.rRIB-failurer S ScaleOriQincodes: i一 IGP, e 一 EGPr ? - incompleteflNetworkNext HopMetric LocPrfWelghcP

25、ach* 1.11.0/241.1.1.10065001 1* 2.22.0/240.0.0.00327681ri3.33.0/243.3.3.301000iri4.44.0/2401000i*x5.55.0/240100065005 iLJR2*lR3LiDynaMips (3):R3. Console port日回区1R3f show ip toPBGP table version is 18, local routerID is 33.33.33.:33Status codes: ssuppressed, d dancedh history* validr 1xsc. -internal

26、/rRIB-failure S StaleOrigin codes: i-IGPr e - EGP, ? - incompleteNetworkNext HopMetricLocPrfWeightPach0100065001 1010001032768101000i010006S005 iR3f|y 1R4iF Dynaaips (0):R4, Console port口回区R4#show ip bgpBGP table version is 11, local router ID is 44.| JStatus codes: asuppressed, d danced, h history

27、* valid, best, i - internal, rRIB-failure, S StaleOrigin codes: i-IGP, e - EGP, ? - Incomplete1NetworkNext HopMetricLocPrf Weight PathH01000 65001 i01000 i01000 i032768 i00 65005 i.r4|HR5 Dynasips (4):R5, Console port13回区R5fshow ip bgpBGP table version is 8, local router IDStatus codes: ssuppressed,

28、 d damped, hhistory valid, 13est, i,一internal.rRIB-failure, S StaleOrigin codes: 1-IGP, e - EGP, ? - incompleteNetworkNext HopMetric LocPrf WeightPathR06500365001 X065003i065003i0065003i0327681LI|R5f|H实验总结:EBGP:用回环口建邻居时,要指定更新源,因为BGP属于TCP协议,面向连接,用回环口时, 源和目标不一致。 在EBGP中要使用多跳,因为BGP默认跳数为1,要路由到对方回环口需要2跳(1

29、 跳路由器,2跳回环口),设置后为255跳。 设置静态是为了获取回环口,在此实骚中,因为EBGP和【BGP之间是不能获取路 由的,所以指一条静态来获取对方的回环口地址。此实验中,串口的静态管理距离 要改为5,使串口成为备用。(静态默认管理距离为1)。IBGP:为防止BGP的路由黑洞,IBGP中全部建立邻居关系。 IBGP中的路由器同样用回环I I建立邻居,所以也要指定更新源。 由于BGP是AS-by-AS方式,所以拓扑图中R1传到AS 65003的默认下一跳都是 EBGP中的出站口(f0/0),这样的话,对于IBGP中就不是最优路径了,所以,要 强制指定下一跳为自己,且此方法只能在IBGP中使

30、用。其次,影响最优路径的还 有no synchronizat ionM (同步),到 bgp 进程 “no synchronization”即可。(注:此实验中强制指定下一跳只在R2和R4上面配置)IBGP中使用peer group可以优化配置,节省路由资源,且此方法只能在IBGP 中使用。如下四条:R2(config-router)# neighbor A peer-groupR2(config-router)# neighbor A remote-as 65003R2(config-router)# neighbor A updatc-sourcc LoopbackOR2(config-r

31、outer)# neighbor A next-hop-self调用时:R2(conHg-router)# neighbor 33.3.3 peer-group AR2(config-router)# neighbor 4.4.4.4 peer-group A 此实验中,R2、R3、R4可以不把自己的回环口宣告到bgp进程中,R1样能ping 通R5,原因是R1与R2之间有静态路由,R4与R5之间也有静态路由,所以,R1 和R5可以通过R2、R4的邻居关系把自己的回环口告知对方。(eg, R1告知R5自 己的回环口: R2通过静态路由学习到了 R1的回环口,写进路由表,由于R2与R4 的IBG

32、P邻居关系,R4可以通过R2学习到了 R1的回环口,写进路由表。最终由 于R4与R5是EBGP关系,所以R5可以通过R4学习到R1的回环口。同理,R5告 知R1自己的回环口也用同样的方式)但R2、R3、R4都不宣告自己的回环口,那么R1只能ping通R2和R5, R5只能ping通R4和R1,要想bgp全互联就全部R 宣告回环口。(注:ping 时,Rl#ping 5. 5. 5. 5 source 1.1.1.1)(注:BGP中只要是学到的路由(路由表中有的)都可以通告)(注:建立邻居是双向的,做了 R1的配置与R2建立邻居后,还要做R2的配置与R1建立邻居)检验用到的命令:pingping命令查看bgp的详细信息(邻居)show ip bgp summaryshow ip bgpshow ip routeshow ip bgp neighborsshow run I b r b查看bgp表 查看路由表 查看bgp邻居详细信息查看bgp配置

展开阅读全文
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!