




已阅读5页,还剩23页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
组网一:BGP路由黑洞问题拓扑图:Ip地址配置:R1:interface Loopback0 ip address 10.0.0.1 255.255.255.255!interface Serial0/0 ip address 10.0.1.6 255.255.255.252 serial restart-delay 0 no dce-terminal-timing-enable!interface Serial0/1 ip address 10.0.15.1 255.255.255.252 serial restart-delay 0 no dce-terminal-timing-enableR2:interface Loopback0 ip address 10.0.0.2 255.255.255.255!interface Serial0/0 ip address 10.0.1.10 255.255.255.252 serial restart-delay 0 no dce-terminal-timing-enable!interface Serial0/1 ip address 10.0.26.1 255.255.255.252 serial restart-delay 0 no dce-terminal-timing-enabler3:interface Loopback0 ip address 10.0.0.3 255.255.255.255!interface Serial0/0 ip address 10.0.1.5 255.255.255.252 serial restart-delay 0 no dce-terminal-timing-enableinterface FastEthernet1/0 ip address 10.0.1.1 255.255.255.252 ip ospf network point-to-point /*配置成点对点类型 ip ospf cost 100 /*ospf cost值配为100 duplex auto speed auto!interface Ethernet3/0 ip address 10.3.3.1 255.255.255.0 half-duplexR4:interface FastEthernet1/0 ip address 10.0.1.2 255.255.255.252 ip ospf network point-to-point /*接口类型点对点 ip ospf cost 100 /*cost为100 duplex auto speed auto!interface Ethernet3/0 ip address 10.3.4.1 255.255.255.0 half-duplexinterface Loopback0 ip address 10.0.0.4 255.255.255.255!interface Serial0/0 ip address 10.0.1.9 255.255.255.252 serial restart-delay 0 no dce-terminal-timing-enableR5:interface Loopback0 ip address 10.5.0.1 255.255.255.255!interface Serial0/0 ip address 10.0.15.2 255.255.255.252 serial restart-delay 0 no dce-terminal-timing-enableinterface Ethernet3/0 ip address 10.5.5.1 255.255.255.0 half-duplexR6:interface Ethernet3/0 ip address 10.6.6.1 255.255.255.0 half-duplexinterface Loopback0 ip address 10.6.0.1 255.255.255.255!interface Serial0/0 ip address 10.0.26.2 255.255.255.252 serial restart-delay 0 no dce-terminal-timing-enableIGP配置:R1router ospf 1 router-id 1.1.1.1 log-adjacency-changes network 10.0.0.1 0.0.0.0 area 0 network 10.0.1.4 0.0.0.3 area 0 network 10.0.15.0 0.0.0.3 area 0R2router ospf 1 router-id 2.2.2.2 log-adjacency-changes network 10.0.0.2 0.0.0.0 area 0 network 10.0.1.8 0.0.0.3 area 0 network 10.0.26.0 0.0.0.3 area 0R3:router ospf 1 router-id 3.3.3.3 log-adjacency-changes network 10.0.0.3 0.0.0.0 area 0 network 10.0.1.0 0.0.0.3 area 0 network 10.0.1.4 0.0.0.3 area 0 network 10.3.3.0 0.0.0.255 area 0R4:router ospf 1 router-id 4.4.4.4 log-adjacency-changes network 10.0.0.4 0.0.0.0 area 0 network 10.0.1.0 0.0.0.3 area 0 network 10.0.1.8 0.0.0.3 area 0 network 10.3.4.0 0.0.0.255 area 0BGP配置:R1:router bgp 65000 no synchronization bgp log-neighbor-changes network 10.0.0.0 mask 255.255.0.0 network 10.3.0.0 mask 255.255.0.0 neighbor 10.0.0.2 remote-as 65000 neighbor 10.0.0.2 update-source Loopback0 neighbor 10.0.0.2 next-hop-self neighbor 10.0.15.2 remote-as 65001 no auto-summaryR2:router bgp 65000 no synchronization bgp log-neighbor-changes network 10.0.0.0 mask 255.255.0.0 network 10.3.0.0 mask 255.255.0.0 neighbor 10.0.0.1 remote-as 65000 neighbor 10.0.0.1 update-source Loopback0 neighbor 10.0.0.1 next-hop-self neighbor 10.0.26.2 remote-as 65002 no auto-summaryR5:router bgp 65001 no synchronization bgp log-neighbor-changes network 10.5.0.0 mask 255.255.0.0 neighbor 10.0.15.1 remote-as 65000 no auto-summaryR6:router bgp 65002 no synchronization bgp log-neighbor-changes network 10.6.0.0 mask 255.255.0.0 neighbor 10.0.26.1 remote-as 65000 no auto-summary以10.5.5.1为源traceroute 10.6.6.1,查看数据包经过的路径,同时在r3上debug ip packet:r5#traceroute 10.6.6.1 source 10.5.5.1Type escape sequence to abort.Tracing the route to 10.6.6.1 1 10.0.15.1 AS 65000 36 msec 60 msec 56 msec /*数据包首先经过了r1 2 * * * 3 * * *r3#debug ip packet*Mar 1 01:48:46.291: IP: s=10.0.1.5 (local), d=10.5.5.1, len 56, unroutabler3#*Mar 1 01:48:48.299: IP: s=10.0.1.6 (Serial0/0), d=224.0.0.5, len 80, rcvd 0r3#*Mar 1 01:48:49.303: IP: s=10.0.1.5 (local), d=10.5.5.1, len 56, unroutable /*到r3后查看路由表后发现目标不可达*Mar 1 01:48:49.763: IP: s=10.0.1.2 (FastEthernet1/0), d=224.0.0.5, len 80, rcvd 0broad/multicast*Mar 1 01:48:52.303: IP: s=10.0.1.5 (local), d=10.5.5.1, len 56, unroutable*Mar 1 01:48:55.311: IP: s=10.5.5.1 (Serial0/0), d=10.6.6.1, len 28, unroutable*Mar 1 01:48:55.315: IP: s=10.0.1.5 (local), d=10.5.5.1, len 56, unroutable*Mar 1 01:48:58.291: IP: s=10.0.1.6 (Serial0/0), d=224.0.0.5, len 80, rcvd 0*Mar 1 01:48:58.387: IP: s=10.5.5.1 (Serial0/0), d=10.6.6.1, len 28, unroutable*Mar 1 01:48:58.391: IP: s=10.0.1.5 (local), d=10.5.5.1, len 56, unroutable黑洞分析:R5的路由表:r5#show ip route 10.0.0.0/8 is variably subnetted, 7 subnets, 4 masksC 10.0.15.0/30 is directly connected, Serial0/0B 10.3.0.0/16 20/0 via 10.0.15.1, 00:32:08C 10.5.5.0/24 is directly connected, Ethernet3/0B 10.0.0.0/16 20/0 via 10.0.15.1, 00:32:08B 10.6.0.0/16 20/0 via 10.0.15.1, 00:30:55/*R5上有去往10.6.0.0的路由下一跳为R1C 10.5.0.1/32 is directly connected, Loopback0S 10.5.0.0/16 is directly connected, Null0查看R1路由表:rt1#show ip route 10.0.0.0/8 is variably subnetted, 15 subnets, 4 masksO 10.0.1.8/30 110/228 via 10.0.1.5, 00:37:53, Serial0/0C 10.0.15.0/30 is directly connected, Serial0/1O 10.0.0.2/32 110/229 via 10.0.1.5, 00:37:53, Serial0/0S 10.3.0.0/16 is directly connected, Null0O 10.0.0.3/32 110/65 via 10.0.1.5, 00:37:53, Serial0/0O 10.3.3.0/24 110/74 via 10.0.1.5, 00:37:53, Serial0/0S 10.0.0.0/16 is directly connected, Null0O 10.0.1.0/30 110/164 via 10.0.1.5, 00:37:53, Serial0/0C 10.0.0.1/32 is directly connected, Loopback0B 10.6.0.0/16 200/0 via 10.0.0.2, 00:32:59/*通过递归查找发现去往10.6.0.0的路由直连下一跳为R3的10.0.1.5O 10.3.4.0/24 110/174 via 10.0.1.5, 00:37:53, Serial0/0O 10.0.0.4/32 110/165 via 10.0.1.5, 00:37:53, Serial0/0B 10.5.0.0/16 20/0 via 10.0.15.2, 00:34:13C 10.0.1.4/30 is directly connected, Serial0/0O 10.0.26.0/30 110/292 via 10.0.1.5, 00:37:54, Serial0/0查看R3的路由表:r3#show ip route 10.0.0.0/8 is variably subnetted, 11 subnets, 3 masksO 10.0.1.8/30 110/164 via 10.0.1.2, 00:40:32, FastEthernet1/0O 10.0.15.0/30 110/128 via 10.0.1.6, 00:40:32, Serial0/0O 10.0.0.2/32 110/165 via 10.0.1.2, 00:40:32, FastEthernet1/0C 10.0.0.3/32 is directly connected, Loopback0C 10.3.3.0/24 is directly connected, Ethernet3/0C 10.0.1.0/30 is directly connected, FastEthernet1/0O 10.0.0.1/32 110/65 via 10.0.1.6, 00:40:32, Serial0/0O 10.3.4.0/24 110/110 via 10.0.1.2, 00:40:32, FastEthernet1/0O 10.0.0.4/32 110/101 via 10.0.1.2, 00:40:32, FastEthernet1/0C 10.0.1.4/30 is directly connected, Serial0/0O 10.0.26.0/30 110/228 via 10.0.1.2, 00:40:32, FastEthernet1/0/*在R3上只有IGP路由,不可能学习到10.6.0.0的路由数据包在此丢弃.组网二:BGP同步对同步的分析理解:1.两种状态非同步状态下,会将从IBGP学到的路由通告给他的EBGP邻居。同步状态下,只将达到同步的路由通告给它的EBGP邻居,即如果一条从IBGP学到的路由,也能从IGP学到,那么这条路由将通告给它的EGP邻居2怎样达到同步将从EBGP学到的路由重发布至IGP中3.将BGP路由重发布进IGP的危害BGP路由一般比较复杂,往往会超过IGP所能承受的极限,导致崩溃。4.什么情况下可以关同步本Asnei yunxing MPLS,且本AS不是transmit AS,本as内的所有提供转发服务的路由器都能从BGP学到其他AS的路由rt1#show ip bgp Network Next Hop Metric LocPrf Weight Path* i10.0.0.0/16 10.0.0.2 0 100 0 i* 0.0.0.0 0 32768 i* i10.3.0.0/16 10.0.0.2 0 100 0 i* 0.0.0.0 0 32768 i* 10.5.0.0/16 10.0.15.2 0 0 65001 i*i10.6.0.0/16 10.0.0.2 0 100 0 65002 i/*标记下与开同步后进行对比r2#show ip bgp Network Next Hop Metric LocPrf Weight Path* 10.0.0.0/16 0.0.0.0 0 32768 i* i 10.0.0.1 0 100 0 i* 10.3.0.0/16 0.0.0.0 0 32768 i* i 10.0.0.1 0 100 0 i*i10.5.0.0/16 10.0.0.1 0 100 0 65001 i* 10.6.0.0/16 10.0.26.2 0 0 65002 i/*标记好进行对比r5#show ip bgp Network Next Hop Metric LocPrf Weight Path* 10.0.0.0/16 10.0.15.1 0 0 65000 i* 10.3.0.0/16 10.0.15.1 0 0 65000 i* 10.5.0.0/16 0.0.0.0 0 32768 ir6#show ip bgp Network Next Hop Metric LocPrf Weight Path* 10.0.0.0/16 10.0.26.1 0 0 65000 i* 10.3.0.0/16 10.0.26.1 0 0 65000 i* 10.6.0.0/16 0.0.0.0 0 32768 i在实验组网一的配置下,是关闭同步的,所以开同步:rt1(config)#router bgp 65000rt1(config-router)#synchronizationr2(config)#router bgp 65000r2(config-router)#syn查看开启同步后bgp表的变化:rt1#show ip bgp Network Next Hop Metric LocPrf Weight Path* i10.0.0.0/16 10.0.0.2 0 100 0 i* 0.0.0.0 0 32768 i* i10.3.0.0/16 10.0.0.2 0 100 0 i* 0.0.0.0 0 32768 i* 10.5.0.0/16 10.0.15.2 0 0 65001 i* i10.6.0.0/16 10.0.0.2 0 100 0 65002 i/*因为10.6.0.0网段是r2通bgp从r6学到的,再通过ibgp告诉r1,但r1不能从igp学到这条路由,所以这条路由不能进路由表rt1#show ip route 10.0.0.0/8 is variably subnetted, 14 subnets, 4 masksO 10.0.1.8/30 110/228 via 10.0.1.5, 01:20:07, Serial0/0C 10.0.15.0/30 is directly connected, Serial0/1O 10.0.0.2/32 110/229 via 10.0.1.5, 01:20:07, Serial0/0S 10.3.0.0/16 is directly connected, Null0O 10.0.0.3/32 110/65 via 10.0.1.5, 01:20:07, Serial0/0O 10.3.3.0/24 110/74 via 10.0.1.5, 01:20:07, Serial0/0S 10.0.0.0/16 is directly connected, Null0O 10.0.1.0/30 110/164 via 10.0.1.5, 01:20:07, Serial0/0C 10.0.0.1/32 is directly connected, Loopback0O 10.3.4.0/24 110/174 via 10.0.1.5, 01:20:07, Serial0/0O 10.0.0.4/32 110/165 via 10.0.1.5, 01:20:07, Serial0/0B 10.5.0.0/16 20/0 via 10.0.15.2, 00:19:18C 10.0.1.4/30 is directly connected, Serial0/0O 10.0.26.0/30 110/292 via 10.0.1.5, 01:20:08, Serial0/0/*路由表中没有了去往10.6.0.0的路由r2#show ip bgp Network Next Hop Metric LocPrf Weight Path* 10.0.0.0/16 0.0.0.0 0 32768 i* i 10.0.0.1 0 100 0 i* 10.3.0.0/16 0.0.0.0 0 32768 i* i 10.0.0.1 0 100 0 i* i10.5.0.0/16 10.0.0.1 0 100 0 65001 i/*同样r2上也没有了关于10.5.0.0的路由* 10.6.0.0/16 10.0.26.2 0 0 65002 i解决方法是做重发布:将bgp路由重发布进igprt1(config)#router ospf 1rt1(config-router)#redistribute bgp 65000 subnets metric 4000r2(config)#router ospf 1r2(config-router)#redistribute bgp 65000 subnets metric 4000中间清bgp表,然后要等一小会再次查看bgp表:rt1#show ip bgp Network Next Hop Metric LocPrf Weight Path* i10.0.0.0/16 10.0.0.2 0 100 0 i* 0.0.0.0 0 32768 i* i10.3.0.0/16 10.0.0.2 0 100 0 i* 0.0.0.0 0 32768 i* 10.5.0.0/16 10.0.15.2 0 0 65001 iri10.6.0.0/16 10.0.0.2 0 100 0 65002 ir2#show ip bgp Network Next Hop Metric LocPrf Weight Path* 10.0.0.0/16 0.0.0.0 0 32768 i* i 10.0.0.1 0 100 0 i* 10.3.0.0/16 0.0.0.0 0 32768 i* i 10.0.0.1 0 100 0 iri10.5.0.0/16 10.0.0.1 0 100 0 65001 i* 10.6.0.0/16 10.0.26.2 0 0 65002 i由于作了重发布,r3将会以ospf的路由学到r5和r6的路由r5#ping 10.6.6.1 source 10.5.5.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 10.6.6.1, timeout is 2 seconds:Packet sent with a source address of 10.5.5.1 !Success rate is 100 percent (5/5), round-trip min/avg/max = 72/96/120 ms组网三:IBGP全连接取消BGP至IGP的重发布,关同步R1:router bgp 65000 no synchronization bgp log-neighbor-changes network 10.0.0.0 mask 255.255.0.0 /*发布汇总路由 network 10.3.0.0 mask 255.255.0.0 neighbor as65000 peer-group /*定义名为as65000的peer-group neighbor as65000 remote-as 65000 /*定义将在AS65000内充当这组共享路由器中的成员 neighbor as65000 update-source Loopback0 /*定义建立BGP邻居的接口为loopback0接口 neighbor as65000 next-hop-self /*定义发送的下一跳为自己 neighbor 10.0.0.2 peer-group as65000 neighbor 10.0.0.3 peer-group as65000 neighbor 10.0.0.4 peer-group as65000 neighbor 10.0.15.2 remote-as 65001 no auto-summaryR2:router bgp 65000 no synchronization bgp log-neighbor-changes network 10.0.0.0 mask 255.255.0.0 network 10.3.0.0 mask 255.255.0.0 neighbor as65000 peer-group neighbor as65000 remote-as 65000 neighbor as65000 update-source Loopback0 neighbor as65000 next-hop-self neighbor 10.0.0.1 peer-group as65000 neighbor 10.0.0.3 peer-group as65000 neighbor 10.0.0.4 peer-group as65000 neighbor 10.0.26.2 remote-as 65002 no auto-summaryR3:router bgp 65000 no synchronization bgp log-neighbor-changes neighbor as65000 peer-group neighbor as65000 remote-as 65000 neighbor as65000 update-source Loopback0 neighbor as65000 next-hop-self neighbor 10.0.0.1 peer-group as65000 neighbor 10.0.0.2 peer-group as65000 neighbor 10.0.0.4 peer-group as65000 no auto-summaryR4:router bgp 65000 no synchronization bgp log-neighbor-changes neighbor as65000 peer-group neighbor as65000 remote-as 65000 neighbor as65000 update-source Loopback0 neighbor as65000 next-hop-self neighbor 10.0.0.1 peer-group as65000 neighbor 10.0.0.2 peer-group as65000 neighbor 10.0.0.3 peer-group as65000 no auto-summaryR5:router bgp 65001 no synchronization bgp log-neighbor-changes network 10.5.0.0 mask 255.255.0.0 neighbor 10.0.15.1 remote-as 65000 no auto-summaryR6:router bgp 65002 no synchronization bgp log-neighbor-changes network 10.6.0.0 mask 255.255.0.0 neighbor 10.0.26.1 remote-as 65000 no auto-summary查看各路由器BGP路由表rt1#show ip route bgp 10.0.0.0/8 is variably subnetted, 13 subnets, 4 masksB 10.6.0.0/16 200/0 via 10.0.0.2, 00:05:23B 10.5.0.0/16 20/0 via 10.0.15.2, 00:33:30r2#show ip route bgp 10.0.0.0/8 is variably subnetted, 13 subnets, 4 masksB 10.6.0.0/16 20/0 via 10.0.26.2, 00:06:06B 10.5.0.0/16 200/0 via 10.0.0.1, 00:06:06r3#show ip route bgp 10.0.0.0/8 is variably subnetted, 13 subnets, 4 masksB 10.6.0.0/16 200/0 via 10.0.0.2, 00:06:23B 10.5.0.0/16 200/0 via 10.0.0.1, 00:34:31r4#show ip route bgp 10.0.0.0/8 is variably subnetted, 13 subnets, 4 masksB 10.6.0.0/16 200/0 via 10.0.0.2, 00:06:37B 10.5.0.0/16 200/0 via 10.0.0.1, 00:34:44r5#show ip route bgp 10.0.0.0/8 is variably subnetted, 5 subnets, 4 masksB 10.6.0.0/16 20/0 via 10.0.15.1, 00:07:35r6#show ip route bgp 10.0.0.0/8 is variably subnetted, 5 subnets, 4 masksB 10.5.0.0/16 20/0 via 10.0.26.1, 00:07:15/*R5和R6都能通过IGP学到对方网段查看全局路由表:rt1#show ip route 10.0.0.0/8 is variably subnetted, 13 subnets, 4 masksO 10.0.1.8/30 110/228 via 10.0.1.5, 00:56:13, Serial0/0C 10.0.15.0/30 is directly connected, Serial0/1O 10.0.0.2/32 110/229 via 10.0.1.5, 00:56:13, Serial0/0O 10.0.0.3/32 110/65 via 10.0.1.5, 00:56:13, Serial0/0O 10.3.3.0/24 110/74 via 10.0.1.5, 00:56:13, Serial0/0O 10.0.1.0/30 110/164 via 10.0.1.5, 00:56:13, Serial0/0C 10.0.0.1/32 is directly connected, Loopback0B 10.6.0.0/16 200/0 via 10.0.0.2, 00:10:19O 10.3.4.0/24 110/174 via 10.0.1.5, 00:56:13, Serial0/0O 10.0.0.4/32 110/165 via 10.0.1.5, 00:56:13, Serial0/0B 10.5.0.0/16 20/0 via 10.0.15.2, 00:38:27C 10.0.1.4/30 is directly connected, Serial0/0O 10.0.26.0/30 110/292 via 10.0.1.5, 00:56:14, Serial0/0r2#show ip route 10.0.0.0/8 is variably subnetted, 13 subnets, 4 masksC 10.0.1.8/30 is directly connected, Serial0/0O 10.0.15.0/30 110/292 via 10.0.1.9, 00:56:20, Serial0/0C 10.0.0.2/32 is directly connected, Loopback0O 10.0.0.3/32 110/165 via 10.0.1.9, 00:56:20, Serial0/0O 10.3.3.0/24 110/174 via 10.0.1.9, 00:56:20, Serial0/0O 10.0.1.0/30 110/164 via 10.0.1.9, 00:56:20, Serial0/0O 10.0.0.1/32 110/229 via 10.0.1.9, 00:56:20, Serial0/0B 10.6.0.0/16 20/0 via 10.0.26.2, 00:10:26O 10.3.4.0/24 110/74 via 10.0.1.9, 00:56:20, Serial0/0O 10.0.0.4/32 110/65 via 10.0.1.9, 00:56:20, Serial0/0B 10.5.0.0/16 200/0 via 10.0.0.1, 00:10:26O 10.0.1.4/30 110/228 via 10.0.1.9, 00:56:20, Serial0/0C 10.0.26.0/30 is directly connected, Serial0/1r3#show ip route 10.0.0.0/8 is variably subnetted, 13 subnets, 4 masksO 10.0.1.8/30 110/164 via 10.0.1.2, 00:56:24, FastEthernet1/0O 10.0.15.0/30 110/128 via 10.0.1.6, 00:56:24, Serial0/0O 10.0.0.2/32 110/165 via 10.0.1.2, 00:56:24, FastEth
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年食品杀菌设备合作协议书
- 心理健康课件存档方法
- 空乘说课课件视频大全
- 空中飞屋儿童课件视频
- 2025年消防装备生产与销售承包合同
- 二零二五年度二手电力设备买卖与检修合同
- 二零二五年度商业地产物业管理租赁合同
- 2025版银行定期存款提前支取合同模板
- 二零二五年度冷链食品运输质量保障合同
- 2025版旅游景区夜间守护更夫工作聘用合同样本
- 建筑工程消防验收与备案服务协议
- 超高层公共建筑 投标方案方案投标文件(技术方案)
- 2025桥梁检测车租赁合同
- 膝骨关节炎中医护理
- 数控车床安全培训课件
- 全媒体运营师舆情监测技巧与建议
- 2025届广东广州地铁集团有限公司校园招聘笔试参考题库附带答案详解
- 2025海域价格评估技术规范
- 2020-2025年中国船用发动机行业发展趋势预测及投资战略咨询报告
- 《国别和区域研究专题》教学大纲
- 煤矿多工作面平行交叉协调作业措施
评论
0/150
提交评论