Local
在您的问题中突出显示的关键字意味着前缀在该路由器的 AS 中本地来源(即没有 AS 路径)。
考虑两个配置,其中路由器之间有 BGP 会话,并DEN-EDGE-01
宣布 10.204.1.1/32。
Announce:10.204.1.1/32
DEN-EDGE-01----------------DEN-EDGE-02
172.16.1.203 172.16.1.204
同一个 ASN 内的对等互连:Local
显示的关键字
DEN-EDGE-01
在 AS100 中配置为发送 10.204.1.1...
router bgp 100
no synchronization
bgp log-neighbor-changes
network 10.204.1.1 mask 255.255.255.255
! Send 10.204.1.1 to DEN-EDGE-02
neighbor 172.16.2.204 remote-as 100
no auto-summary
DEN-EDGE-02
在 AS100 中配置了...
router bgp 100
no synchronization
bgp log-neighbor-changes
! Just receive routes from DEN-EDGE-01
neighbor 172.16.2.203 remote-as 100
no auto-summary
!
当我在 上收到 10.204.1.1 时DEN-EDGE-02
,没有 AS-path,只有Local
DEN-EDGE-02#sh ip bgp 10.204.1.1
BGP routing table entry for 10.204.1.1/32, version 2
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Not advertised to any peer
Local <------------
172.16.2.203 from 172.16.2.203 (172.16.2.203)
Origin IGP, metric 0, localpref 100, valid, internal, best
DEN-EDGE-02#
使用不同的 ASN 对等互连:显示的 AS 路径
现在我们重新配置两个路由器……一个在 AS100 中,另一个在 AS200 中。 DEN-EDGE-01
在 AS100 中配置为发送 10.204.1.1...
router bgp 100
no synchronization
bgp log-neighbor-changes
network 10.204.1.1 mask 255.255.255.255
! Send 10.204.1.1 to DEN-EDGE-02
neighbor 172.16.2.204 remote-as 200
no auto-summary
DEN-EDGE-02
在AS200中配置了...
router bgp 200
no synchronization
bgp log-neighbor-changes
! Just receive routes from DEN-EDGE-01
neighbor 172.16.2.203 remote-as 100
no auto-summary
!
当我收到 10.204.1.1 时DEN-EDGE-02
,现在我们看到了一个真正的 AS 路径,因为DEN-EDGE-01
在不同的 AS 中。
DEN-EDGE-02#sh ip bgp 10.204.1.1
BGP routing table entry for 10.204.1.1/32, version 2
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Not advertised to any peer
100 <------------
172.16.2.203 from 172.16.2.203 (172.16.2.203)
Origin IGP, metric 0, localpref 100, valid, external, best
DEN-EDGE-02#