iBGP 的一个潜在问题是它不会更改下一跳 IP 地址, 有时这会导致可达性问题,让我们看一个例子:
上面运行 iBGP 的 AS 12 中的有 R1 和 R2, R3 在 AS 3 中,我们在 R2 和 R3 之间使用 eBGP,一旦我们在 R3 上通告网络 3.3.3.0 /24,那么 R2 将学习此前缀并将其存储在其 BGP 表中,下一跳 IP 地址将为 192.168.23.3。
一旦 R1 获知前缀 3.3.3.0 /24,则下一跳 IP 地址将保持为 192.168.23.3,当 R1 不知道如何到达此 IP 地址时,它将无法在其路由表中安装 3.3.3.0 /24。
让我们来看看配置,将向您展示我们如何处理这个问题的两种方法:
配置
这是我们将使用的 BGP 配置:
R1(config)#router bgp 12
R1(config-router)#neighbor 192.168.12.2 remote-as 12
R2(config)#router bgp 12
R2(config-router)#neighbor 192.168.12.1 remote-as 12
R2(config-router)#neighbor 192.168.23.3 remote-as 3
R3(config)#router bgp 3
R3(config-router)#neighbor 192.168.23.2 remote-as 12
R3(config-router)#network 3.3.3.0 mask 255.255.255.0
配置非常简单,我们在 R1/R2 之间使用 iBGP,在 R2/R3 之间使用 eBGP,在 R3 上,我们在 BGP 中通告了 3.3.3.0 /24,来看看BGP表: