在多路访问网络环境中,用直连接口建立邻居关系,会产生第三方下一跳。
1.多路访问网络(包括broadcast和NBMA)
2.前缀是通过EBGP宣告的。

默认条件下,IBGP会话是不会改变前缀的下一跳属性的。对IBGP讨论第三方下一跳是没有意义的。
3.宣告前缀的接口地址&neighbor指向的地址&该前缀的下一跳地址,三个地址在同一网段

宣告前缀的接口地址&neighbor后指向的地址在同一网段,意味着EBGP必须使用直连接口建立对等体关系,才会出现第三方下一跳行为。
结果:下一跳不会改变为那个宣告前缀的地址,还是原来该前缀的下一跳地址

有图有真相:

EBGP的第三方下一跳行为_第三方

RTA

interface FastEthernet0/0
ip address 10.10.10.1 255.255.255.0
duplex auto
speed auto
!
router bgp 100
no synchronization
bgp log-neighbor-changes
neighbor 10.10.10.2 remote-as 200
no auto-summary

RTC

interface FastEthernet0/0
ip address 10.10.10.2 255.255.255.0
duplex auto
speed auto
!
router ospf 10
log-adjacency-changes
network 10.10.10.2 0.0.0.0 area 0
!
router bgp 200
no synchronization
bgp log-neighbor-changes
network 11.11.11.0 mask 255.255.255.0
neighbor 10.10.10.1 remote-as 100
no auto-summary

RTB

interface Loopback0
ip address 11.11.11.11 255.255.255.0
ip ospf network point-to-point
!
interface FastEthernet0/0
ip address 10.10.10.3 255.255.255.0
duplex auto
speed auto
!
router ospf 10
log-adjacency-changes
network 10.10.10.3 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0

RTA

show ip route

Gateway of last resort is not set

     10.0.0.0/24 is subnetted, 1 subnets
C       10.10.10.0 is directly connected, FastEthernet0/0
     11.0.0.0/24 is subnetted, 1 subnets
B       11.11.11.0 [20/2] via 10.10.10.3, 00:02:44

下一跳不是宣告前缀的接口地址10.10.10.2,而是10.10.10.3

这样,RTA到达11.11.11.0/24的路由就不需要经过RTC再到达RTB,是不是很智能!

然而,智能的第三方系一条有时候会产生问题

EBGP的第三方下一跳行为_休闲_02

如果帧中继网络的PVC是全互联的,是没有什么问题的。

但是考虑到费用的原因,实际部署帧中继的时候不可能全互联的,大多数是采用hub-spoke模型。

如图,RTC作为hub,RTA和RTC是spoke,EBGP第三方下一跳行为会让RTA学到的11.11.11.0/24的路由下一跳是10.10.10.3,而RTA又没有到达10.10.10.3的PVC时,

11.11.11.0/24是不可达的。

解决方法:

RTC:

router bgp 200

neighbor 10.10.10.2 next-hop-self