资源描述
实验五:BGP的路由反射器实验目标:1.熟练BGP的基本配置2.掌握BGP路由反射器的原理实验TOP:物理拓扑(原错误拓扑图)物理拓扑(修改后的拓扑结构)逻辑拓扑基本配置:R1的配置:01!0203hostnamer10405!0607interface Loopback00809ip address 1.1.1.1 255.255.255.01011!1213interface Ethernet0/01415no shu1617!1819interface Ethernet0/0.142021encapsulation dot1Q 142223ip address 10.1.1.1 255.255.255.02425no shu2627!2829interface Ethernet0/0.153031encapsulation dot1Q 153233ip address 20.1.1.1 255.255.255.03435no shu3637!3839interface Serial1/04041ip address 12.1.1.1 255.255.255.04243no shu4445!4647interface Serial2/04849ip address 13.1.1.1 255.255.255.05051no shu5253!5455router ospf 105657network 10.1.1.0 0.0.0.255 area 05859network 12.1.1.0 0.0.0.255 area 06061network 13.1.1.0 0.0.0.255 area 06263network 20.1.1.0 0.0.0.255 area 06465!6667router bgp 106869no synchronization7071bgp router-id1.1.1.17273network 1.1.1.0 mask 255.255.255.07475neighbor 10.1.1.4 remote-as 207677neighbor 12.1.1.2 remote-as 107879neighbor 13.1.1.3 remote-as 108081neighbor 20.1.1.5 remote-as 108283no auto-summary8485!868788line con 08990exec-timeout 0 09192logging synchronous9394!R2的配置:01!0203hostnamer20405!0607interface Loopback00809ip address 2.2.2.2 255.255.255.01011!1213!1415interface Serial2/01617ip address 12.1.1.2 255.255.255.01819no shu2021!2223router ospf 102425network 12.1.1.0 0.0.0.255 area 02627!2829router bgp 103031no synchronization3233bgp router-id2.2.2.23435network 2.2.2.0 mask 255.255.255.03637neighbor 12.1.1.1 remote-as 103839no auto-summary4041!4243line con 04445exec-timeout 0 04647logging synchronous4849!R3的配置:01!0203hostnamer30405!0607interface Loopback00809ip address 3.3.3.3 255.255.255.01011!1213interface Serial1/01415ip address 13.1.1.3 255.255.255.01617no shu1819!2021!2223router ospf 102425network 13.1.1.0 0.0.0.255 area 02627!2829router bgp 103031no synchronization3233bgp router-id3.3.3.33435network 3.3.3.0 mask 255.255.255.03637neighbor 13.1.1.1 remote-as 103839no auto-summary4041!4243line con 04445exec-timeout 0 04647logging synchronous4849!R4的配置:01!0203hostnamer40405!0607interface Loopback00809ip address 4.4.4.4 255.255.255.01011!1213interface Ethernet0/01415no shu1617!1819interface Ethernet0/0.142021encapsulation dot1Q 142223ip address 10.1.1.4 255.255.255.02425no shu2627!2829!3031router ospf 103233network 10.1.1.0 0.0.0.255 area 03435!3637router bgp 203839no synchronization4041bgp router-id4.4.4.44243network 4.4.4.0 mask 255.255.255.04445neighbor 10.1.1.1 remote-as 104647no auto-summary4849!5051line con 05253exec-timeout 0 05455logging synchronous5657!R5的配置:01!0203hostnamer50405!0607interface Loopback00809ip address 5.5.5.5 255.255.255.01011!1213interface Ethernet0/01415no shu1617!1819interface Ethernet0/0.152021encapsulation dot1Q 152223ip address 20.1.1.5 255.255.255.02425no shu2627!2829!3031router ospf 103233network 20.1.1.0 0.0.0.255 area 03435!3637router bgp 103839no synchronization4041bgp router-id5.5.5.54243network 5.5.5.0 mask 255.255.255.04445neighbor 20.1.1.1 remote-as 104647no auto-summary4849!5051line con 05253exec-timeout 0 05455logging synchronous5657!验证:下面我们查看一下每个路由器的BGP表,目的是验证BGP中路由条目传递的原则。r1的BGP表r1#show ip bgpBGP table version is 6, local router ID is 1.1.1.1Status 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* 1.1.1.0/24 0.0.0.0 0 32768 i*i2.2.2.0/24 12.1.1.2 0 100 0 i*i3.3.3.0/24 13.1.1.3 0 100 0 i* 4.4.4.0/24 10.1.1.4 0 0 20 i*i5.5.5.0/24 20.1.1.5 0 100 0 ir2的BGP表r2#show ip bgpBGP table version is 4, local router ID is 2.2.2.2Status 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*i1.1.1.0/24 12.1.1.1 0 100 0 i* 2.2.2.0/24 0.0.0.0 0 32768 i*i4.4.4.0/24 10.1.1.4 0 100 0 20 ir3的BGP表r3#show ip bgpBGP table version is 4, local router ID is 3.3.3.3Status 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*i1.1.1.0/24 13.1.1.1 0 100 0 i* 3.3.3.0/24 0.0.0.0 0 32768 i*i4.4.4.0/24 10.1.1.4 0 100 0 20 ir4的BGP表r4#show ip bgpBGP table version is 6, local router ID is 4.4.4.4Status 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* 1.1.1.0/24 10.1.1.1 0 0 10 i* 2.2.2.0/24 10.1.1.1 0 10 i* 3.3.3.0/24 10.1.1.1 0 10 i* 4.4.4.0/24 0.0.0.0 0 32768 i* 5.5.5.0/24 10.1.1.1 0 10 ir5的BGP表r5#show ip bgpBGP table version is 4, local router ID is 5.5.5.5Status 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*i1.1.1.0/24 20.1.1.1 0 100 0 i*i4.4.4.0/24 10.1.1.4 0 100 0 20 i* 5.5.5.0/24 0.0.0.0 0 32768 i从上面每个路由器的BGP表中我们可以得知,默认情况下,IBGP对等体学习到的路由,在满足同步、可达的前提下,仍不会向其他IBGP对等体通告。但会向EBGP对等体通告。,下面我们把R2做成R1路由反射器的客户来观察一下实验现象。配置如下:r1(config)#router bgp 10r1(config-router)#neighbor 12.1.1.2route-reflector-client下面我们来看一R2的BGP表r2#show ip bgpBGP table version is 10, local router ID is 2.2.2.2Status 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*i1.1.1.0/24 12.1.1.1 0 100 0 i* 2.2.2.0/24 0.0.0.0 0 32768 i*i3.3.3.0/24 13.1.1.3 0 100 0 i*i4.4.4.0/24 10.1.1.4 0 100 0 20 i*i5.5.5.0/24 20.1.1.5 0 100 0 i从上面可以得之,R2从R1学到了所有IBGP对等体的路由条目下面再来看一下R3和R5的BGP表r3#show ip bgpBGP table version is 5, local router ID is 3.3.3.3Status 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*i1.1.1.0/24 13.1.1.1 0 100 0 i*i2.2.2.0/24 12.1.1.2 0 100 0 i* 3.3.3.0/24 0.0.0.0 0 32768 i*i4.4.4.0/24 10.1.1.4 0 100 0 20 ir5#show ip bgpBGP table version is 5, local router ID is 5.5.5.5Status 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*i1.1.1.0/24 20.1.1.1 0 100 0 i*i2.2.2.0/24 12.1.1.2 0 100 0 i*i4.4.4.0/24 10.1.1.4 0 100 0 20 i* 5.5.5.0/24 0.0.0.0 0 32768 i这就证明了路由是从客户处学习到的,将它反射给除了发起该路由的客户外的所有非客户以及客户。反射器从各客户端收到的更新,会向非客户端通告。 IPA-task packet010:ISIS的L2路由泄露IPA-task packet008:OSPF的特殊区域类型之NSSA和Totally NSSA 添加新评论aiqing由aiqing在 星期一, 02/28/2011 - 16:41 发表。景辉:关于对RR的阐述和实验基本上没有问题,不过,在语言的表述上希望可以改善一下,让帖子的可读性更强一些。关于RR,我们做如下总结:对于RR而言,(1)RR的bgp对等体(包括客户端和非客户端)都会向RR发送bgp路由更新。(2)RR会将自己学习到的bgp路由(包括客户端和非客户端以及自己的原有bgp路由)向自己的客户端通告。(3)RR也会将自己从客户端学习过来的bgp路由向非客户端通告。(4)RR不会向非客户端通告从其他非客户端对等体学习到的bgp路由。 回复孙家琪由sundyplay在 星期六, 03/12/2011 - 22:19 发表。R1的配置:BGP邻居指的好像跟拓扑图有出入;指R5邻居:neighbor 10.1.1.4 remote-as 20 应该是neighbor 10.1.1.5 remote-as 10指R4邻居:neighbor 20.1.1.5 remote-as 10 应该是neighbor 20.1.1.4 remote-as 20
展开阅读全文