BGP问题,无法ping通

网络工程 思科 路由 BGP eigrp gns3
2022-02-05 19:29:30

我是初学者,我对 BGP 有问题。我真的不明白为什么它不能正常工作。

这是我的拓扑:

![拓扑

细节

我需要从 R8 ping 到 R10。

这是R8的配置:

!

!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R8
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
no ip icmp rate-limit unreachable
!
!
ip cef
no ip domain lookup
!
!
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
ip tcp synwait-time 5
! 
!
!
!
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
!
interface Serial1/0
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/1
 ip address 199.168.1.9 255.255.255.252
 serial restart-delay 0
!
interface Serial1/2
 ip address 50.1.0.1 255.0.0.0
 serial restart-delay 0
!
interface Serial1/3
 ip address 199.168.1.2 255.255.255.252
 serial restart-delay 0
!
interface FastEthernet2/0
 no ip address
 shutdown
 duplex half
!
interface FastEthernet3/0
 no ip address
 shutdown
 duplex half
!
interface FastEthernet4/0
 no ip address
 shutdown
 duplex half
!
interface Serial5/0
 ip address 199.168.1.22 255.255.255.252
 serial restart-delay 0
!
interface Serial5/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial5/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial5/3
 no ip address
 shutdown
 serial restart-delay 0
!
router eigrp 1
 redistribute bgp 100 metric 100 100 100 100 100
 network 199.168.1.0 0.0.0.3
 network 199.168.1.8 0.0.0.3
 network 199.168.1.20 0.0.0.3
 auto-summary
!
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 network 50.1.0.0 mask 255.255.255.0
 neighbor 50.1.0.2 remote-as 200
 neighbor 50.1.0.2 next-hop-self
 neighbor 199.168.1.1 remote-as 100
 no auto-summary
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
!
no cdp log mismatch duplex
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
 shutdown
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line vty 0 4
 login
 escape-character 3
line vty 5 15
 login
 escape-character 3
!
!
end

这是R10的配置:

!

!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R10
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
no ip icmp rate-limit unreachable
!
!
ip cef
no ip domain lookup
!
!
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
ip tcp synwait-time 5
! 
!
!
!
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
!
interface Serial1/0
 ip address 50.1.0.2 255.0.0.0
 serial restart-delay 0
!
interface Serial1/1
 ip address 195.16.1.10 255.255.255.252
 serial restart-delay 0
!
interface Serial1/2
 ip address 195.16.1.22 255.255.255.252
 serial restart-delay 0
!
interface Serial1/3
 ip address 195.16.1.13 255.255.255.252
 serial restart-delay 0
!
interface FastEthernet2/0
 no ip address
 shutdown
 duplex half
!
interface FastEthernet3/0
 no ip address
 shutdown
 duplex half
!
interface FastEthernet4/0
 no ip address
 shutdown
 duplex half
!
router eigrp 2
 redistribute bgp 200 metric 100 100 100 100 100
 network 195.16.1.8 0.0.0.3
 network 195.16.1.12 0.0.0.3
 network 195.16.1.20 0.0.0.3
 auto-summary
!
router bgp 200
 no synchronization
 bgp log-neighbor-changes
 network 50.1.0.0 mask 255.255.255.0
 redistribute eigrp 2
 neighbor 50.1.0.1 remote-as 100
 neighbor 50.1.0.1 next-hop-self
 neighbor 195.16.1.14 remote-as 200
 no auto-summary
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
!
no cdp log mismatch duplex
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
 shutdown
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line vty 0 4
 login
!
!
end

当我show ip bgp在 R8 中运行命令时,我有:

R8#show ip bgp
BGP table version is 7, local router ID is 199.168.1.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
* i195.16.1.0/30    20.1.0.2                 0    100      0 200 ?
*>                  50.1.0.2           2681856             0 200 ?
* i195.16.1.4/30    20.1.0.2           2681856    100      0 200 ?
*>                  50.1.0.2           2681856             0 200 ?
* i195.16.1.8/30    20.1.0.2           2681856    100      0 200 ?
*>                  50.1.0.2                 0             0 200 ?
* i195.16.1.12/30   20.1.0.2                 0    100      0 200 ?
*>                  50.1.0.2                 0             0 200 ?
* i195.16.1.16/30   20.1.0.2                 0    100      0 200 ?
*>                  50.1.0.2           2681856             0 200 ?
* i195.16.1.20/30   20.1.0.2           2681856    100      0 200 ?
*>                  50.1.0.2                 0             0 200 ?

请帮我。

2个回答

您尚未在连接的 DCE 端设置时钟速率。命令是clock rate <rate>请参阅Cisco IOS 接口和硬件组件命令参考

另一个问题是您有一个与实际网络不匹配的网络语句。您的接口在50.1.0.0/8网络中,但您的 BGP 网络语句是针对50.1.0.0/24网络的。BGP 只会通告存在于路由表中的确切网络,如果 network 语句不匹配,则不会通告。

您还通过重新分配创建了一个路由循环。eBGP 的 AD 低于 EIGRP,因此从两者接收到的任何路由都将首选 eBGP。你应该小心重新分配。您可以使用标签和社区来防止接收源自您的 AS 的路由从不同的 AS 接收,或者您可以删除 BGP 中的重新分配并仅使用 network 语句。

问题出在 OSPF 中,在区域 200 中实现的所有 ping 都是通过 BGP 实现的。我应该首先验证每个区域的 ping。