已阅读5页,还剩247页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
BGP命令与配置手册实验本书上面的实验全部取材于红盟过客的2008+BGP命令与配置手册实验笔记,自己在看着他的这本书的做实验的时候,根据自己的实验情况写的实验手册,可以说是对红盟过客那本书上的实验的重新验证。实验的全部过程是在GNS3上面模拟的用的路由器的操作系统是“c3640-jk9o3s-mz.124-7a.bin”注意:需要说明的是,在该操作系统默认情况下:BGP的自动汇总和同步都是关闭的,有些实验需要手动开启才可以完成实验。本实验有些实验的结果和红盟过客的书上描写的有些差异,由于我自己对BGP不甚精通,故并没有找到原因,希望各位看官如果发现原因,可以告诉我,并且欢迎各位看官斧正。O(_)O互相交流技术,互相进步。作者:实心大白菜联系方式:936055160取材于:2008+BGP命令与配置手册实验笔记实验环境:GNS3(0.7.4),路由器IOS :c3640-jk9o3s-mz.124-7a.bin本书完工于:2012年1月14日目录一、BGP的同步21.要点解释22.实验拓扑23.基本配置24.BGP配置25.查看BGP路由表26.同步实验2二、环回接口实验21.要点解释22.实验一23.实验二: 建立IBGP邻居关系,中间经过路由器R22三、通过路由协议来建立邻居21.要点解释22.实验拓扑23.配置24.验证2四、修改BGP的存活时间与保持时间21.要点解释22.实验拓扑23.配置24.验证2五、Bgp fast-external-fallover(20)21.要点解释22.配置23.Bgp fast-external-fallover2六、手工设置路由器的ID21.要点解释22.实验拓扑23.配置24.物理地址作为路由器ID25.设置环回接口使其作为路由器ID26.手工改变路由器ID2七、修改BGP的触发时间21.要点解释22.实验拓扑23.配置24.验证25.修改触发时间2八、Ebgp邻居不直连,指定跳数21.要点解释22.实验拓扑23.配置24.验证2九、路由汇总21.要点解释22.实验一:发送路由器进行汇总23.实验二:接收路由器进行汇总24.实验三:明确路由信息的AS路径25.实验四:只广播一条聚合路由,而抑制明确路由26.实验五:使用标准访问列表基本路由过滤2十、操作AS路径信息21.要点说明22.实验拓扑23.配置24.验证25.指定特定的AS路由信息2十一、修改社区属性community21.要点说明22.实验拓扑23.配置24.修改社区属性community2十二、使用标准的访问列表过滤21.要点说明22.实验拓扑23.配置24.验证2十三、使用一个ip扩展访问列表来过滤21.要点说明22.实验拓扑23.配置25.验证2十四、基本的BGP属性实验21.实验拓扑22.基本配置23.验证24.实验一:将所有的接收到的条目权重全部都设置成10025.实验二:有选择的属性操作26.基于AS路径信息的过滤器27.抑制明确路由条目下广播聚合路由2十五、Auto summary21.要点说明22.实验拓扑23.配置2十六、修改路由器收到的路由条目的权重21.要点说明22.实验拓扑23.配置24.验证25.修改收到的路由的权重26.验证效果2十七、用filter-list 来精确过滤路由条目21.要点说明22.实验拓扑23.配置24.验证25.实验一:过滤起始于AS3的路由条目26.允许经过AS3的路由条目,拒绝始发于AS3的条目27.拒绝所有含AS3的路由条目28.拒绝所有起始于直接相连的ebgp邻居的所有的路由2十八、将下一跳改为自己21.要点说明22.实验拓扑23.配置24.验证25.更改下一跳为自己26.验证效果2十九、在BGP上启用MD5认证21.要点说明22.实验拓扑23.配置24.验证25.增加MD5认证26.验证效果2二十、BGP路由惩罚21.要点说明22.实验拓扑23.配置24.验证25.启用路由惩罚26.验证效果2二十一、修改半衰期时间21.要点说明22.实验拓扑23.配置24.验证25.实验一:通过route-map来设置变量26.实验二:将不同的变量用在不同的AS上面2二十二、修改管理距离,忽略EBGP的管理距离21.要点说明22.实验拓扑23.配置24.验证25.忽略EBGP的管理距离26.验证效果2二十三、允许邻居广播默认路由21.要点说明22.实验拓扑23.配置24.配置通过默认路由,让R1通25.验证2二十四、通过route-map来有条件的广播路由21.要点说明22.实验拓扑23.配置24.验证25.验证静态路由的关闭对该路由条目的影响26.验证有无route-map对该路由条目的影响2二十五、修改管理距离21.实验拓扑22.配置23.验证24.通过命令来修改管理距离25.验证效果2二十六、通过ACL控制修改管理距离21.要点说明22.实验拓扑23.配置24.验证25.实验一:修改从IBGP学习的路由的管理距离26.实验二:通过调用访问控制列表来修改不同的管理距离2二十七、指定重新分配路由的一个度量/MED21.要点说明22.实验拓扑23.配置24.验证25.使用default-metric26.验证效果2二十八、使BGP比较来自所有AS的MED值21.要点说明22.实验拓扑23.配置24.验证25.通过命令将不同的AS的MED进行比较26.验证效果2二十九、设置本地优先级21.要点说明22.配置23.验证24.改变广播的权重大小2三十、修改BGP在路由表中安装的路径数量21.要点说明22.实验拓扑23.配置24.验证25.把两条路径都放到路由表中26.在EBGP环境中修改路径数量2三十一、在BGP中创建默认路由21.要点说明22.实验拓扑23.配置24.验证25.建立静态路由2三十二、在BGP中创建多个默认路由21.要点说明22.实验拓扑23.配置24.验证2三十三、在选路时忽略AS-path 属性21.实验拓扑22.配置23.验证24.忽略as-path不参与最好路径的选择25.验证配置效果2三十四、前缀列表21.要点说明22.实验拓扑23.配置24.验证25.实验一:只允许收到聚合的前缀26.实验二:允许明确路由,拒绝聚合路由2三十五、使用非抑制的映射21.要点说明22.实验拓扑23.配置24.验证25.在R2上不抑制 并能向外传递出去2三十六、通过AS路径来过滤特定的更新21.要点说明22.实验拓扑23.配置24.验证25.实验一:过滤从AS3始发的路由26.实验二:拒绝起始于AS3的路由,允许AS3 经过的路由27.实验二:拒绝起始于AS3的路由,允许AS3经过的路由28.实验三:拒绝所有包含AS3的路由条目 deny_3_29.实验四:拒绝起始于直接相连的EBGP所有的路由2三十七、修改聚合后的度量/med21.要点说明22.实验拓扑23.配置24.启用聚合路由25.验证26.修改聚合后的度量2三十八、限制从特定邻居得到的前缀数目21.要点说明22.实验拓扑23.配置24.验证2三十九、路由映射21.要点说明22.实验拓扑23.配置24.验证25.实验一:使用空的route-map26.实验二:否定空的route-map27.实验三:只允许收到特定的路由条目28.实验四:更改路由条目的度量29.实验四:拒绝的语句使用注意事项2四十、把更新中私有的自治系统移出对等组中21.要点说明22.实验拓扑23.配置24.验证25.使用neighbor _ remove-private-as2四十一、BGP路由重分配21.要点说明22.实验拓扑23.配置24.实验一:eigrp的路由注入25.实验二:在R1,R2上面运行ospf26.实验三:redistribute protocol metric metric27.实验四:使用route-map过滤学到的路由条目2四十二、路由反射器21.要点说明22.实验拓扑23.配置24.验证2四十三、过滤总结21.要点说明22.实验拓扑23.配置24.验证25.在R1 上面将起始于as3 的路由条目权重改为9992一、 BGP的同步1. 要点解释l 不学习或宣告从IBGP学习到的路由信息给EBGP的邻居,除非从IGP路由信息中有这条路由信息l 如果不是通过IGP得到的路由,或者下一跳不可达。就不能将IBGP学习到的路由安装在路由表中,原因:如果一台IBGP路由器后面接一个AS,那么就满足上条BGP同步定义。2. 实验拓扑注意:由于GNS3无法实现时钟频率的设置(我做实验的时候设置了也没有起作用),故在实验配置中,无该配置,真实情况下是需要配置的。各个路由器中设置环回接口:分别为R1 /24,R2 /24,R3 /24。3. 基本配置 R1:R1enable R1#conf tR1(config)#interface serial 0/0R1(config-if)#no shutdown R1(config-if)#ip address R1(config)#interface loopback 0R1(config-if)#ip address R2:R2enable R2#conf tR2(config)#interface serial 0/0R2(config-if)#ip add R2(config-if)#no shutdownR2(config-if)#interface serial 0/1 R2(config-if)#ip address R2(config-if)#no shutdownR2(config)#interface loopback 0R2(config-if)#ip address R3:R3enable R3#configure terminal R3(config)#interface serial 0/0R3(config-if)#ip address R3(config-if)#no shutdownR3(config)#interface loopback 0R3(config-if)#ip address 4. BGP配置 R1:R1(config-if)#router bgp 1R1(config-router)#neighbor remote-as 2R1(config-router)#network mask R2:R2(config-if)#router bgp 2R2(config-router)#neighbor remote-as 1R2(config-router)#neighbor remote-as 2 R3:R3(config-if)#router bgp 2R3(config-router)#neighbor remote-as 2R3(config-router)#network mask 5. 查看BGP路由表 R1:R1(config-if)#do show ip bgp BGP table version is 2, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path* /24 0 32768 i R2:R2(config-router)#do show ip bgpBGP table version is 2, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path*i/24 0 100 0 i R3:R3(config-router)#do show ip bgpBGP table version is 2, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path* /24 0 32768 i6. 同步实验从上可以看出:R1中没有/24这条路由条目,原因就是由于同步,R2不会传给R1,原因:不学习或宣告从IBGP学习到的路由信息给EBGP邻居,除非从IGP路由信息中有这条路由信息。(一) 验证同步第一条定律不学习或宣告从IBGP学习到的路由信息给EBGP的邻居,除非从IGP路由信息中有这条路由信息1) 关闭R2上的同步看效果:R2(config-router)#no synchronization / 关闭同步R2(config-router)#do clear ip bgp * /重新建立BGP关系2) 重新查看BGP路由表 R1:R1#show ip bgp BGP table version is 3, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path* /24 0 32768 i* /24 0 2 i R2:R2(config-router)#do show ip bgpBGP table version is 3, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path* /24 0 0 1 i*i/24 0 100 0 i R3:R3(config-router)#do show ip bgpBGP table version is 2, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path* i/24 0 100 0 1 i* /24 0 32768 i3) 查看链路是否连通虽然有在BGP路由表上是有路由条目的,但是由于没有IGP路由信息,所以是ping不通的。R1#ping Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:.Success rate is 0 percent (0/5)R1#show ip route bgp /24 is subnetted, 1 subnetsB 20/0 via , 00:02:00(二) 验证同步第二条定律如果不是通过IGP得到的路由,或者下一跳不可达,就不能讲IBGP学习到的路由安装在路由表中:1) 查看路由表项 R3 BGP表R3(config-router)#do show ip bgpBGP table version is 2, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path* i/24 0 100 0 1 i* /24 0 32768 i R3路由表R3(config-router)#do show ip routeCodes: 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 routeGateway of last resort is not set /24 is subnetted, 1 subnetsC is directly connected, Loopback0 /24 is subnetted, 1 subnetsC is directly connected, Serial0/0由上可以看出R3路由表中,并没有R1的路由条目。2) 关闭R3的同步R3(config-router)#no synchronization /关闭同步R3(config-router)#do clear ip bgp *3) 再次查看R3路由表:R3(config-router)#do show ip routeCodes: 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 routeGateway of last resort is not set /24 is subnetted, 1 subnetsC is directly connected, Loopback0 /24 is subnetted, 1 subnetsC is directly connected, Serial0/0仍然没有R1的路由条目,原因是下一跳不可达:R3(config-router)#do ping Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:.Success rate is 0 percent (0/5)4) IGP学习全部路由信息:R1#conf tR1(config)#router eigrp 1R1(config-router)#network R1(config-router)#network R1(config-router)#no auto-summaryR2(config-router)#router eigrp 1R2(config-router)#network R2(config-router)#network R2(config-router)#no auto-summaryR3(config-router)#router eigrp 1R3(config-router)#network R3(config-router)#network R3(config-router)#no auto-summary5) 测试u 查看R1路由表R1(config-router)#do show ip routeCodes: 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 routeGateway of last resort is not set /24 is subnetted, 1 subnetsC is directly connected, Loopback0 /24 is subnetted, 1 subnetsB 20/0 via , 00:04:01 /24 is subnetted, 1 subnetsC is directly connected, Serial0/0 /24 is subnetted, 1 subnetsD 90/2681856 via , 00:01:06, Serial0/0u 在R1上测试R1和R3的连通性R1(config-router)#do ping Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 28/66/104 msu 查看R3路由表中的BGP路由条目:R3(config-router)#do show ip route bgp /24 is subnetted, 1 subnetsB 200/0 via , 00:01:32u 在R3上测试连通性R3(config-router)#do ping Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 44/77/124 ms全网互通6) 只让R2和R3运行IGPu 在R1上关闭EIGRPR1(config-router)#no router eigrp 1u 将R1的IGP去除以后,马上R3不能ping通R1R3(config-router)#do ping Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:.Success rate is 0 percent (0/5)R3(config-router)#do show ip route bgp /24 is subnetted, 1 subnetsB 200/0 via , 00:06:42u 查看R3路由表R3(config-router)#do show ip bgpBGP table version is 3, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path*i/24 0 100 0 1 i* /24 0 32768 iu 用R3 pingR3(config-router)#do ping Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:.Success rate is 0 percent (0/5)不通u 现在在R2中宣告到达R2(config)#router bgp 2R2(config-router)#R2(config-router)# network mask R3(config-router)#do ping Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to , timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 36/75/120 ms通u 查看R3路由表中的BGP条目R3(config-router)#do show ip route bgp /24 is subnetted, 1 subnetsB 200/0 via , 00:02:25(跟红盟过客上面的描述有所差别,他上面路由表中的BGP条目为R3#sh ip rou b/24 is subnetted, 1 subnetsB 200/0 via , 00:02:11/16 is variably subnetted, 2 subnets, 2 masksB /16 200/0 via , 00:02:07而我做实验的时候并没有该条目)R3(config-router)#do show ip route Codes: 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 routeGateway of last resort is not set /24 is subnetted, 1 subnetsB 200/0 via , 00:03:03 /24 is subnetted, 1 subnetsC is directly connected, Loopback0 /24 is subnetted, 1 subnetsD 90/2681856 via , 00:03:09, Serial0/0 /24 is subnetted, 1 subnetsC is directly connected, Serial0/0备注:在同步时,一定要注意下一跳是否可达二、 环回接口实验1. 要点解释l Neighbor ip address/ peer-grouup-name update-source interface-name用环回接口作为邻居时比用物理接口稳定,指定用环回接口时,一定用指定源IP地址。update-source interface-name2. 实验一建立IBGP邻居关系,两台路由器直连(一) 实验拓扑注意:现在R1与R3相连,用环回接口来建立BGP(二) 基本配置包含BGP配置 R1:R1enable R1#conf tR1(config)#interface loopback 0R1(config-if)#ip address 55 R1(config-if)#interface fastethernet 1/0R1(config-if)#no shutdown R1(config-if)#ip address 52R1(config-if)#router bgp 1R1(config-router)#neighbor remote-as 1 /环回接口建立BGP邻居R1(config-router)#neighbor update-source loopback 0 /指定源地址 R3:R3enable R3#conf tR3(config)#interface loopback 0R3(config-if)#ip address 55R3(config-if)#interface fastethernet 1/0R3(config-if)#no shutdown R3(config-if)#ip address 52 R3(config-if)#router bgp 1 R3(config-router)#neighbor remote-as 1 /环回接口建立BGP邻居R3(config-router)#neighbor update-source loopback 0 /指定源地址(三) 验证u 查看R1的BGP建立情况R1(config-router)#do show ip bgp summaryBGP router identifier , local AS number 1BGP table version is 1, main routing table version 1Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/Pf
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年幼儿园预防传染病安全知识秋季
- 2026年生态环境科普知识集合
- 2026年一建市政工程实务仿真题精
- 2026年中石化校园招聘面试风险控制预测题
- 7. Kipper's Idea说课稿-2025-2026学年小学英语3a典范英语(Good English)
- 2026年版新能源汽车动力电池及控制系统检测与维修考试题库及答案
- 2026年羽毛球说课稿工作室logo
- 初中2025师生沟通技巧主题班会说课稿
- 第一节 生物变异的来源说课稿2025学年高中生物浙科版必修2遗传与进化-浙科版
- 第6课 渐入佳境成作品说课稿2025学年初中信息技术鲁教版新版2018第3册-鲁教版2018
- 2026年四川成都市中考地理试卷含答案
- 2025-2026 学年人音版初中音乐八年级下册全册知识点梳理
- 2026年自贡市自流井区社区工作者招聘笔试参考试题及答案解析
- 2026年版闲鱼卖货实战手册(选品+定价+爆款打造完整攻略)
- 雨课堂学堂在线学堂云审计法律研究与案例(西南政法大学)单元测试考核答案
- “十五五”规划纲要应知应会100题及答案
- 2026安徽合肥市发展和改革委员会上半年招聘事业单位工作人员20人考试备考试题及答案解析
- 限额以下小型工程常见安全隐患指导手册(2026版)
- 年龄相关性黄斑变性课件
- 小水电生态流量监测项目招标文件
- 银行AI算力云平台建设-第1篇
评论
0/150
提交评论