您的位置:首页 > 其它

BGP邻居建立+BGP路由传递解决方案之BGP反射器(Route-Reflector)+BGP联邦综合实验2

2012-07-06 19:10 573 查看
上接实验一 http://3824597.blog.51cto.com/3814597/922532


BGP联邦其实就把一个AS(AS123)看成一个国家,然后国家里面有省(联邦65012和联邦65003),换句话说把大的AS划分成几个小的AS。所以在联邦内用自己的小AS,而对外的时候,需要声明自己是大AS(123)首先删除R1,R2,R3上的 BGPR1(config)#no router bgp 123R2(config)#no router bgp 123R3(config)#no router bgp 123然后再AS123内运行私有的AS,R1和R2为一个联邦AS65012,R3为一个联邦AS65003R2(config)#router bgpR2(config)#router bgp 65012R2(config-router)#bgp router-id 2.2.2.2
R2(config-router)#no syR2(config-router)#no auR2(config-router)#nei 24.1.1.4 remote 400R2(config-router)#nei 1.1.1.1 remote 65012R2(config-router)#nei 1.1.1.1 up lo 0R2(config-router)#nei 1.1.1.1 next-hop-self
*Mar1 02:27:54.183: %BGP-3-NOTIFICATION: received from neighbor 24.1.1.4 2/2 (peer in wrong AS) 2 bytes FDF4
注意路由器提示的错误信息,BGP错误,这是必然的,因为R4上指明的是邻居AS为123,而这里是私有的AS65012,所以要解决这个问题,就要打上如下命令:R2(config-router)#bgp confederation identifier 123R2(config-router)#*Mar1 02:30:41.539: %BGP-5-ADJCHANGE: neighbor 24.1.1.4 Up邻居起来了注意:在所有的联邦都路由器上打上这条命令R3 R1上同理。R1(config)#router bgp 65012R1(config-router)#bgp router-id 1.1.1.1R1(config-router)#no syR1(config-router)#no auR1(config-router)#nei 2.2.2.2 remote 65012R1(config-router)#nei 2.2.2.2 up lo 0R1(config-router)#nei 2.2.2.2 next-hop-selfR1(config-router)#nei 3.3.3.3 remote 65003R1(config-router)#nei 3.3.3.3 update-source lo 0R1(config-router)#nei 3.3.3.3 next-hop-self
R3(config)#router bgp 65003R3(config-router)#bgp router-id 3.3.3.3R3(config-router)#no syR3(config-router)#no auR3(config-router)#nei 1.1.1.1 remote 65012R3(config-router)#nei 1.1.1.1 up lo 0R3(config-router)#nei 1.1.1.1 next-hop-selfR3(config-router)#nei 35.1.1.5 remote 400R3(config-router)#bgp confederation identifier 123打完上面的命令后,查看R1,R2,R3 BGPR1#show ip bgp summaryNeighborVAS MsgRcvd MsgSentTblVerInQ OutQ Up/DownState/PfxRcd2.2.2.24 650121312200 00:08:1713.3.3.34 6500300000 neverIdleR2#show ip bgp summaryNeighborVAS MsgRcvd MsgSentTblVerInQ OutQ Up/DownState/PfxRcd1.1.1.14 650121213200 00:08:03024.1.1.444002221200 00:10:351R3#show ip bgp summaryNeighborVAS MsgRcvd MsgSentTblVerInQ OutQ Up/DownState/PfxRcd1.1.1.14 6501200000 neverIdle35.1.1.5450054 100 00:00:101发现R1和R3的邻居关系没有建立起来,为毛会这样啦?因为 R1和R3分别属于两个联邦,相当于他们是一个联邦EBGP邻居,要想建立,则需要下面的命令才行:R1(config-router)#bgp confederation peers 65003 相当于说明他自己的链表65012等价于65003,或者65003是EBGP邻居,就需要配置多跳属性R1(config-router)#nei 3.3.3.3 ebgp-multihop 2 //多跳R3(config-router)#bgp confederation peers 65012R3(config-router)#nei 1.1.1.1 ebgp-multihop 2然后再查看:R1#show ip bgp sumNeighborVAS MsgRcvd MsgSentTblVerInQ OutQ Up/DownState/PfxRcd2.2.2.24 650121818300 00:13:1613.3.3.34 6500355300 00:00:441邻居起来了路由也学到了R1#show ip bgpNetworkNext HopMetric LocPrf Weight Path*>i4.4.4.0/242.2.2.201000 400 i*> 5.5.5.0/243.3.3.301000 (65003) 500 iR2#show ip bgpNetworkNext HopMetric LocPrf Weight Path*> 4.4.4.0/2424.1.1.400 400 i*>i5.5.5.0/241.1.1.101000 (65003) 500 iR3#show ip bgpNetworkNext HopMetric LocPrf Weight Path*> 4.4.4.0/241.1.1.101000 65012 400 i*> 5.5.5.0/2435.1.1.500 500 i
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  路由传递 BGP邻居