ibgp配置问题

网络工程 思科 路由 路由器 BGP
2022-03-03 03:35:02

我正在尝试设置此配置以进行测试,但它根本不起作用,我不知道为什么:

在此处输入图像描述

问题是 R3 没有从 bgp 邻居接收到任何学习到的路由

配置:

路由器 R1

interface FastEthernet0/0
 ip address 192.168.35.209 255.255.255.240
 speed 100
 full-duplex
!
interface FastEthernet0/1
 ip address 192.168.34.10 255.255.255.128
 duplex auto
 speed auto
!
router bgp 35
 no synchronization
 bgp log-neighbor-changes
 redistribute connected
 neighbor 192.168.34.3 remote-as 33
 neighbor 192.168.35.210 remote-as 35
 no auto-summary
!

路由器 R2

 interface GigabitEthernet0/0
     ip address 192.168.35.225 255.255.255.240
     duplex full
     speed 100
    !
    interface GigabitEthernet0/1
     ip address 192.168.35.210 255.255.255.240
     duplex full
     speed 100
    !
    router bgp 35
     bgp log-neighbor-changes
     redistribute connected
     neighbor 192.168.35.209 remote-as 35
     neighbor 192.168.35.226 remote-as 35
     no auto-summary
    !

路由器 R3

interface FastEthernet0/0
 ip address 192.168.35.241 255.255.255.240
 speed 100
 full-duplex
!
interface FastEthernet0/1
 ip address 192.168.35.226 255.255.255.240
 speed 100
 full-duplex
!
router ospf 1
 no compatible rfc1583
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0
!
router bgp 35
 no synchronization
 bgp log-neighbor-changes
 redistribute connected
 neighbor 192.168.35.225 remote-as 35
 no auto-summary
!

192.168.34.0/25正如我之前所说,R3 不接收来自BGP 邻居的路由,例如,F0/1R1 的路由。

ROUTER3#sh ip bgp
BGP table version is 14, local router ID is 192.168.35.241
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
*>i192.168.35.208/28
                    192.168.35.225           0    100      0 ?
*> 192.168.35.224/28
                    0.0.0.0                  0         32768 ?
* i                 192.168.35.225           0    100      0 ?
*> 192.168.35.240/28
                    0.0.0.0                  0         32768 ?
ROUTER_OP1.3#

但是,R2 和 R1 正在接收所有路由:

ROUTER1#sh ip bgp
BGP table version is 292, local router ID is 1.1.35.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
*> 10.194.0.0/20    192.168.34.3                           0 33 i
*> 10.197.48.0/20   192.168.34.3                           0 33 i
*> 172.31.48.0/24   192.168.34.3                           0 33 i
*> 172.31.49.0/24   192.168.34.3                           0 33 i
*> 192.168.34.0/25  0.0.0.0                  0         32768 ?
* i192.168.35.208/28
                    192.168.35.210           0    100      0 ?
*>                  0.0.0.0                  0         32768 ?
*>i192.168.35.224/28
                    192.168.35.210           0    100      0 ?
ROUTER1#

ROUTER2#sh ip bgp
BGP table version is 343, local router ID is 1.1.35.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-externa
l
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i10.194.0.0/20    192.168.34.3             0    100      0 33 i
*>i10.197.48.0/20   192.168.34.3             0    100      0 33 i
*>i172.31.48.0/24   192.168.34.3             0    100      0 33 i
*>i172.31.49.0/24   192.168.34.3             0    100      0 33 i
*>i192.168.34.0/25  192.168.35.209           0    100      0 ?
*> 192.168.35.208/28
                    0.0.0.0                  0         32768 ?
* i                 192.168.35.209           0    100      0 ?
* i192.168.35.224/28
                    192.168.35.226           0    100      0 ?
*>                  0.0.0.0                  0         32768 ?
*>i192.168.35.240/28
                    192.168.35.226           0    100      0 ?

如果您需要更多信息,请询问更多

1个回答

iBGP 的规则是,一个 iBGP 对等体不能公布从另一个 iBGP 对等体学到的 iBGP 路由。这意味着每个 iBGP 对等体必须与所有其他 iBGP 对等体处于完全网格中,或者您必须使用缓解措施,例如路由反射器或联盟。这是一种循环预防机制。

R3 只能从 R1 学习 eBGP 路由,因为 R2 无法将源自 R1 的 iBGP 路由传递给 R3。R3 还需要直接与 R1 对等,这通常涉及 IGP。或者,您可以将 R2 配置为路由反射器。