记得在学习CCNP的课程的时候,问过老师这样一个问题:如果两个企业做vpn,用BGP可不可以,两边企业会有公网地址,TCP肯定能够正常通信,如果这样建立EBGP是不是类似与GRE呢?最后得到2个答案:1,EBGP建立邻居会受到条数影响如果超过了255跳无法建立邻居关系.2,在ISP内部不会存在私网路由,也就是说会存在路由黑洞问题.
后来学习到了MPLS发现可以解决路由黑洞的问题,但是如果ISP内部跳数超过了255跳就不能建立邻居关系了嘛?如果是传统的MPLS网络,那么TTL值在MPLS内部网络是保持不变的.但是如果是在传统的IP网络中,EBGP建立邻居关系默认是需要直连的.如果非直连,需要使用neighbor x.x.x.x ebgp-multihop 255来修改EBGP的最大跳数.
现在简单介绍下,如果跳出超过255跳如何去建立EBGP邻居.
R1-----F0/0-------R2
实验很简单,R1 R2用loopback0建立EBGP邻居关系,但是不去使用ebgp-multihop参数.
首先R1 R2运行OSPF使得loopback0接口TCP能够正常通信.然后再去建立EBGP邻居关系.
配置如下:
R1(config)#router bgp 1
R1(config-router)#no auto-summary
R1(config-router)#bgp router-id 1.1.1.1
R1(config-router)#neighbor 2.2.2.2 remote-as 2
R1(config-router)#no auto-summary
R1(config-router)#bgp router-id 1.1.1.1
R1(config-router)#neighbor 2.2.2.2 remote-as 2
R1(config-router)#neighbor 2.2.2.2 update-source loopback0
R1(config-router)#neighbor 2.2.2.2 disable-connected-check
R2(config)#router bgp 2
R2(config-router)#no auto-summary
R2(config-router)#bgp router-id 2.2.2.2
R2(config-router)#neighbor 1.1.1.1 remote-as 1
R2(config-router)#neighbor 1.1.1.1 update-source loopback0
R2(config-router)#neighbor 1.1.1.1 disable-connected-check
这里使用了一条命令neighbor x.x.x.x disable-connected-check,意思跟简单,就是建立EBGP关系的时候不检查直连的问题.也就是说只要TCP能够通信了,EBGP关键就能够建立,这样就没有了EBGP最大255跳的限制了.
R2(config-router)#neighbor 1.1.1.1 disable-connected-check
这里使用了一条命令neighbor x.x.x.x disable-connected-check,意思跟简单,就是建立EBGP关系的时候不检查直连的问题.也就是说只要TCP能够通信了,EBGP关键就能够建立,这样就没有了EBGP最大255跳的限制了.
R1#sh ip bgp summary
BGP router identifier 1.1.1.1, local AS number 1
BGP table version is 2, main routing table version 2
1 network entries using 120 bytes of memory
1 path entries using 52 bytes of memory
2/1 BGP path/bestpath attribute entries using 248 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
Bitfield cache entries: current 1 (at peak 1) using 32 bytes of memory
BGP using 452 total bytes of memory
BGP activity 2/1 prefixes, 2/1 paths, scan interval 60 secs
BGP router identifier 1.1.1.1, local AS number 1
BGP table version is 2, main routing table version 2
1 network entries using 120 bytes of memory
1 path entries using 52 bytes of memory
2/1 BGP path/bestpath attribute entries using 248 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
Bitfield cache entries: current 1 (at peak 1) using 32 bytes of memory
BGP using 452 total bytes of memory
BGP activity 2/1 prefixes, 2/1 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 2 4 5 2 0 0 00:00:52 0
2.2.2.2 4 2 4 5 2 0 0 00:00:52 0
R2#sh ip bgp
BGP table version is 2, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
BGP table version is 2, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 11.11.11.11/32 1.1.1.1 0 0 1 i
*> 11.11.11.11/32 1.1.1.1 0 0 1 i







发表评论 评论 (8 个评论)