BGP的next-hop-self问题
请大家看看这张拓扑下面是各路由器配置
R1:
router bgp 100
no synchronization
bgp log-neighbor-changes
network 1.1.1.0 mask 255.255.255.0
network 192.168.1.0
neighbor 192.168.1.2 remote-as 200
no auto-summary
R2:
router ospf 100
log-adjacency-changes
network 2.2.2.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
network 192.168.3.0 0.0.0.255 area 0
!
router bgp 200
no synchronization
bgp log-neighbor-changes
network 2.2.2.0 mask 255.255.255.0
network 22.22.22.0 mask 255.255.255.0
network 192.168.1.0
neighbor 3.3.3.3 remote-as 200
neighbor 3.3.3.3 update-source Loopback0
neighbor 3.3.3.3 next-hop-self
neighbor 4.4.4.4 remote-as 200
neighbor 4.4.4.4 update-source Loopback0
neighbor 4.4.4.4 next-hop-self
neighbor 192.168.1.1 remote-as 100
no auto-summary
R3:
router ospf 100
log-adjacency-changes
network 3.3.3.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
network 192.168.4.0 0.0.0.255 area 0
!
router bgp 200
no synchronization
bgp log-neighbor-changes
network 3.3.3.0 mask 255.255.255.0
network 33.33.33.0 mask 255.255.255.0
neighbor 2.2.2.2 remote-as 200
neighbor 2.2.2.2 update-source Loopback0
neighbor 5.5.5.5 remote-as 200
neighbor 5.5.5.5 update-source Loopback0
no auto-summary
R4:
router ospf 100
log-adjacency-changes
network 4.4.4.0 0.0.0.255 area 0
network 192.168.3.0 0.0.0.255 area 0
network 192.168.5.0 0.0.0.255 area 0
!
router bgp 200
no synchronization
bgp log-neighbor-changes
network 4.4.4.0 mask 255.255.255.0
network 44.44.44.0 mask 255.255.255.0
neighbor 2.2.2.2 remote-as 200
neighbor 2.2.2.2 update-source Loopback0
neighbor 5.5.5.5 remote-as 200
neighbor 5.5.5.5 update-source Loopback0
no auto-summary
现在的问题是R4ping不通R1的1.1.1.1但是R1却可以ping通R4的4.4.4.4也可以ping通R4的loopback 1的44.44.44.44,,
R3ping不通R1的1.1.1.1但是R1却可以ping通R4的3.3.3.3也可以ping通R3的loopback 1的33.33.33.33
下面是R1的BGP表 TCP表
R1#show ip bgp
BGP table version is 9, local router ID is 1.1.2.1
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
*> 1.1.1.0/24 0.0.0.0 0 32768 i
*> 2.2.2.0/24 192.168.1.2 0 0 200 i
*> 3.3.3.0/24 192.168.1.2 0 200 i
*> 4.4.4.0/24 192.168.1.2 0 200 i
*> 22.22.22.0/24 192.168.1.2 0 0 200 i
*> 33.33.33.0/24 192.168.1.2 0 200 i
*> 44.44.44.0/24 192.168.1.2 0 200 i
* 192.168.1.0 192.168.1.2 0 0 200 i
*> 0.0.0.0 0 32768 i
R1#show tcp bri
TCB Local Address Foreign Address (state)
63E47D50 192.168.1.1.36536 192.168.1.2.179 ESTAB
R2:
R2#show ip bgp
BGP table version is 9, local router ID is 22.22.22.22
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
*> 1.1.1.0/24 192.168.1.1 0 0 100 i
*> 2.2.2.0/24 0.0.0.0 0 32768 i
*>i3.3.3.0/24 3.3.3.3 0 100 0 i
*>i4.4.4.0/24 4.4.4.4 0 100 0 i
*> 22.22.22.0/24 0.0.0.0 0 32768 i
*>i33.33.33.0/24 3.3.3.3 0 100 0 i
*>i44.44.44.0/24 4.4.4.4 0 100 0 i
* 192.168.1.0 192.168.1.1 0 0 100 i
*> 0.0.0.0 0 32768 i
R2#show tcp bri
TCB Local Address Foreign Address (state)
63EA8760 2.2.2.2.179 3.3.3.3.41651 ESTAB
63ED2C88 192.168.1.2.179 192.168.1.1.36536 ESTAB
63EA8C04 2.2.2.2.57766 4.4.4.4.179 ESTAB
R4和R3是一样的情况我只复制R4的给大家看看吧
R4#show ip bgp
BGP table version is 12, local router ID is 44.44.44.44
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
*>i1.1.1.0/24 2.2.2.2 0 100 0 100 i
*>i2.2.2.0/24 2.2.2.2 0 100 0 i
*> 4.4.4.0/24 0.0.0.0 0 32768 i
*>i5.5.5.0/24 5.5.5.5 0 100 0 i
*>i6.6.6.0/24 192.168.6.2 0 100 0 300 i
*>i22.22.22.0/24 2.2.2.2 0 100 0 i
*> 44.44.44.0/24 0.0.0.0 0 32768 i
*>i55.55.55.0/24 5.5.5.5 0 100 0 i
*>i192.168.1.0 2.2.2.2 0 100 0 i
*>i192.168.6.0 5.5.5.5 0 100 0 i
R4#show tcp bri
TCB Local Address Foreign Address (state)
63EA7B24 4.4.4.4.179 5.5.5.5.12273 ESTAB
63EA683C 4.4.4.4.179 2.2.2.2.57766 ESTAB
{:6_278:}{:6_278:}{:6_278:} 真是无语了这个论坛的水太多了 {:soso_e136:} 本帖最后由 qq360870025 于 2012-5-16 09:28 编辑
那是因为你把R1与R2直连网段宣告了 ,所以你直接ping 是用192.168.1.0/24这个网段ping的,双方都有路由
你R4要ping R1 。你直接ping的话 用的是192.168.3.0/24这个网段,R1路由表没有这路由,回包过能过来
你因该用R4的源为Loopback 0 pingR1 这样才能通信。 Ping 1.1.1.1 source 4.4.4.4这样你双方都有路由
你R3也同理
带源地址为loopback就能通,已经解决了宣告了互连接口不用加源就可以通了 TCP/IP都不可达 学习学习{:6_267:} {:6_267:} 本帖最后由 xtp263 于 2012-8-22 14:51 编辑
BGP网络是传过去了,但是具体能不能够ping通,还得看tcp可不可达,也就是你的路由表中有没有去往该网络的路由,你show ip route看一下在R1、R2、R4看一下。
页:
[1]