本文档介绍表版本,这是边界网关协议(BGP)用于跟踪BGP前缀的最佳路径更改传播到哪些BGP对等体的编号。它是BGP软件使用的编号。如果输入show命令,可查看表版本号,这有助于网络管理员排除故障。
本文使用的网络图如下:
BGP前缀具有一个或多个路径,因为BGP前缀是从不同的BGP对等体和源获取的。
以下是具有多条路径的BGP前缀的示例。有两条路径,最佳路径是第二条。
R1#show bgp ipv4 unicast 10.100.1.1
BGP routing table entry for 10.100.1.1/32, version 2
Paths: (2 available, best #2, table default)
Advertised to update-groups:
1
Refresh Epoch 1
5 4
10.1.5.5 from 10.1.5.5 (10.1.5.5)
Origin IGP, localpref 100, valid, external
rx pathid: 0, tx pathid: 0
Refresh Epoch 1
4
10.1.3.4 from 10.1.3.4 (10.100.1.1)
Origin IGP, metric 0, localpref 100, valid, external, best
rx pathid: 0, tx pathid: 0x0
根据BGP最佳路径算法,仅选择一条路径作为BGP最佳路径。这一切始终如一。有关详细信息,请参阅BGP最佳路径选择算法文章。
该路径从BGP对等体或从源获取,例如从路由协议重分发到BGP。当最佳路径发生更改时,BGP必须通过发送更新或撤消来通知其对等体。当删除BGP前缀的最后路径时,将发送撤消。
以下示例中,前缀由network命令本地产生:
R4#show bgp ipv4 unicast 10.100.1.1
BGP routing table entry for 10.100.1.1/32, version 4
Paths: (1 available, best #1, table default)
Advertised to update-groups:
1
Refresh Epoch 1
Local
0.0.0.0 from 0.0.0.0 (10.1.3.4)
Origin IGP, metric 0, localpref 100, weight 32768, valid, sourced, local, best
rx pathid: 0, tx pathid: 0x0
输出显示Origin IGP。
以下是前缀由redistribution connected命令本地产生的示例:
R4#show bgp ipv4 unicast 10.100.1.1
BGP routing table entry for 10.100.1.1/32, version 7
Paths: (1 available, best #1, table default)
Flag: 0x820
Not advertised to any peer
Refresh Epoch 1
Local
0.0.0.0 from 0.0.0.0 (10.1.3.4)
Origin incomplete, metric 0, localpref 100, weight 32768, valid, sourced, best
rx pathid: 0, tx pathid: 0x0
输出显示“原始不完整”。
表版本号是32位值,表版本有四种类型:
这些内容在表版本的使用部分中进一步说明。
当BGP尚未获知任何前缀时,全局表版本、RIB表版本和对等表版本为1,这是表版本号的起点。
带有summary关键字的BGP命令可为您提供三个表版本号。summary关键字可以提供给BGP中的所有地址系列。
R1#show bgp ipv4 unicast summary
BGP router identifier 10.1.3.1, local AS number 1
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.1.1.2 4 2 4 4 1 0 0 00:01:15 0
10.1.2.3 4 3 4 4 1 0 0 00:01:06 0
10.1.3.4 4 4 4 4 1 0 0 00:01:33 0
如果查看BGP表中的前缀,则可以查看前缀表版本。
R1#show bgp ipv4 unicast 10.100.1.1/32
BGP routing table entry for 10.100.1.1/32, version 2
Paths: (1 available, best #1, table default)
Advertised to update-groups:
1
Refresh Epoch 1
4
10.1.3.4 from 10.1.3.4 (10.1.3.4)
Origin IGP, metric 0, localpref 100, valid, external, best
rx pathid: 0, tx pathid: 0x0
如果输入show ip bgp internal命令,则可以查看表版本:
R1#show ip bgp internal
Time left for bestpath timer: 964 secs
Consistency-checker not enabled
Update generation pool version 8, messages 0, in pool 0, below 00:00:24.432.
Enhanced Refresh EOR Stalepath-time disabled
Enhanced Refresh max-eor-time disabled
Total number of BGP Accepter process: 50, Spawned count: 0
Total number of neighbors: 4
Total number of sessions : 4
Established : 4
OpenConfirm : 0
OpenSent : 0
Active : 0
Connect : 0
Idle : 0
Closing : 0
Uninitialized : 0
Address-family IPv4 Unicast, Mode : RW
Table Versions : Current 39 Init 2 RIB 39
Start time : 00:00:18.919 Time elapsed 22:15:38.198
First Peer up in : 00:00:06.830 Exited Read-Only in : 00:01:07.966
Done with Install in : 00:01:07.967 Last Update-done in : 00:01:07.969
0 updates expanded
L3VPN Tunnel Encapsulated Paths : 0
Slow-peer detection is disabled BGP Nexthop scan:-
penalty: 0, Time since last run: 21:19:42.174, Next due in: none
Max runtime : 0 ms Latest runtime : 0 ms Scan count: 2
BGP General Scan:-
Max runtime : 1 ms Latest runtime : 0 ms Scan count: 0
BGP future scanner version: 1333
BGP scanner version: 0
Address-family IPv4 Multicast, Mode : RW
Table Versions : Current 1 Init 1 RIB 1
Start time : 00:00:18.919 Time elapsed 22:15:38.199
First Peer up in : never Exited Read-Only in : 00:00:10.286
Done with Install in : 00:00:10.286 Last Update-done in : never
0 updates expanded
L3VPN Tunnel Encapsulated Paths : 0
Slow-peer detection is disabled BGP Nexthop scan:-
penalty: 0, Time since last run: never, Next due in: none
Max runtime : 0 ms Latest runtime : 0 ms Scan count: 0
BGP General Scan:-
Max runtime : 1 ms Latest runtime : 0 ms Scan count: 0
BGP future scanner version: 1334
BGP scanner version: 0
Address-family MVPNv4 Unicast, Mode : RW
Table Versions : Current 1 Init 1 RIB 1
Start time : 00:00:18.919 Time elapsed 22:15:38.200
First Peer up in : never Exited Read-Only in : 00:00:10.286
Done with Install in : 00:00:10.286 Last Update-done in : never
0 updates expanded
L3VPN Tunnel Encapsulated Paths : 0
Slow-peer detection is disabled BGP Nexthop scan:-
penalty: 0, Time since last run: never, Next due in: none
Max runtime : 0 ms Latest runtime : 0 ms Scan count: 0
BGP General Scan:-
Max runtime : 1 ms Latest runtime : 0 ms Scan count: 0
BGP future scanner version: 1334
TX VPN optimization enabled.
要更改BGP表版本号,最佳路径必须发生更改,并且更改传播到RIB。仅当前缀在RIB中作为BGP前缀时,才会更改BGP前缀的RIB。如果任何其他路由协议将前缀放在路由中,则BGP前缀会标记为RIB故障。在这种情况下,即使最佳路径发生更改,表版本也不会更改。
以下是BGP表版本不更改的示例。从R4获知的BGP前缀10.100.1.1/32也通过R1上配置的静态路由获知。因此,R1 将静态路由安装在RIB中,而R1上的BGP将该前缀标记为RIB故障,因为在RIB中安装该前缀的不是BGP。对此前缀的BGP路径的任何更改都不会传播到RIB。因此,即使存在最佳路径更改,BGP表版本也不会被颠簸,因为RIB没有更新。
R1#show bgp ipv4 unicast 10.100.1.1/32
BGP routing table entry for 10.100.1.1/32, version 8
Paths: (2 available, best #1, table default, RIB-failure(17))
Advertised to update-groups:
2
Refresh Epoch 2
4
10.1.3.4 from 10.1.3.4 (10.100.1.1)
Origin IGP, metric 0, localpref 100, valid, external, best
rx pathid: 0, tx pathid: 0x0
Refresh Epoch 2
5 4
10.1.5.5 from 10.1.5.5 (10.1.5.5)
Origin IGP, localpref 100, valid, external
rx pathid: 0, tx pathid: 0
R1#show ip route 10.100.1.1
Routing entry for 10.100.1.1/32
Known via "static", distance 1, metric 0 (connected)
Routing Descriptor Blocks:
* directly connected, via Loopback0
Route metric is 0, traffic share count is 1
当最佳路径更改BGP前缀时,必须执行以下几项操作:
BGP表版本是使用的主编号。此编号与特定地址系列的任何BGP前缀的最高前缀表版本相同。假设BGP表中有五个前缀,前缀表版本3、6、8、10和18。BGP表版本将是18。
使用对等表版本以跟踪哪些对等体必须获知哪些前缀在最佳路径中发生了更改。根据前缀的前缀表版本检查每个对等体的对等表版本。如果前缀的前缀表版本低于对等表版本,则BGP必须向该BGP对等体发送该前缀的更新。例如,如果对等体10.1.1.2的对等表版本为60,则该对等体对于前缀表版本为60及更低版本的所有前缀都是最新的。路由器必须发送前缀表版本高于60的所有前缀的BGP更新。
路由器更新BGP对等体以获取最佳路径更改前缀后,会更新此对等体的对等表版本。调整此对等表版本值以匹配为其更新此BGP对等体的所有前缀的最高前缀表版本的值。假设对等表版本为60,并且有两个前缀的前缀的前缀的前缀版本为61和62。一旦路由器将这两个前缀的新最佳路径发送到该BGP对等体,则对等表版本将更新为62。
前缀表版本是附加到BGP前缀的表版本号。当该前缀的最佳路径更改时,它会更改。每次为一个BGP前缀更改最佳路径时,其前缀表版本都会被颠覆,这意味着它会更新为等于下一个可用版本号。假设前缀10.0.0.0/8具有前缀表版本27,而BGP表版本为30。在这种情况下,当前缀10.0.0.0/8的最佳路径更改时,其前缀表版本将被重新推到31。
RIB表版本用于跟踪BGP最佳路径更改后是否需要更新RIB。必须通知RIB BGP前缀,这些前缀的前缀表版本高于RIB表版本。对于这些前缀,存在RIB ADD、DELETE或MODIFY事件。
要了解BGP何时收敛,请输入show bgp summary命令。如果对等BGP表版本等于BGP表版本,则该对等体已收敛。如果主路由表版本等于BGP表版本,则RIB已收敛。
R1#show bgp ipv4 unicast summary
BGP router identifier 10.1.3.1, local AS number 1
BGP table version is 2, main routing table version 2
1 network entries using 144 bytes of memory
1 path entries using 80 bytes of memory
1/1 BGP path/bestpath attribute entries using 144 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 392 total bytes of memory
BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.1.1.2 4 2 69 69 2 0 0 01:00:54 0
10.1.2.3 4 3 69 70 2 0 0 01:00:45 0
10.1.3.4 4 4 72 70 2 0 0 01:01:12 1
BGP表版本可能有许多更改,这并不总是表示出了问题。
假设路由器已连接到Internet,并且具有完整的Internet路由表。通常,Internet BGP表几乎每秒钟都会发生一些更改。然后,路由器必须重新计算某些前缀的最佳路径,并更新其RIB及其BGP对等体。这是预料之中的现象。
假设您清除BGP对等体(会话重置),则路由器必须向该对等体通告其完整BGP表。预期该对等体的表版本会增加。当对等体再次接收BGP前缀时,表版本会增加。发送的BGP对等体不会增加BGP前缀的表版本。
下面是一个示例。表版本以28开头。
R1#show bgp ipv4 unicast summary
BGP router identifier 10.1.3.1, local AS number 1
BGP table version is 28, main routing table version 281
network entries using 144 bytes of memory2 path entries using 160 bytes of memory
2/1 BGP path/bestpath attribute entries using 288 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 640 total bytes of memory
BGP activity 1/0 prefixes, 16/14 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.1.1.2 4 2 117 125 28 0 0 01:43:50 0
10.1.2.3 4 3 117 125 28 0 0 01:43:53 0
10.1.3.4 4 4 10 12 28 0 0 00:04:22 1
10.1.5.5 4 5 55 63 28 0 0 00:45:45 1
R1#show bgp ipv4 unicast 10.100.1.1/32
BGP routing table entry for 10.100.1.1/32, version 28
Paths: (2 available, best #1, table default)
Advertised to update-groups:
1
Refresh Epoch 2
4
10.1.3.4 from 10.1.3.4 (10.100.1.1) <<< path from R4
Origin IGP, metric 0, localpref 100, valid, external, best
rx pathid: 0, tx pathid: 0x0
Refresh Epoch 2
5 4
10.1.5.5 from 10.1.5.5 (10.1.5.5) <<< path from R5
Origin IGP, localpref 100, valid, external
rx pathid: 0, tx pathid: 0
对对等体10.1.3.4(R4)上指向R1的BGP会话执行硬性清除。 对等体只向R1通告一个前缀10.100.1.1/32。从R4和R5获知10.100.1.1/32。最佳路径是从R4通过的路径。
确保已启用debug ip bgp internal ,以查看BGP表版本的情况。您应该启用debug ip bgp updates,以查看更新到达时会发生什么情况。
R1#debug ip bgp updates
BGP updates debugging is on for address family: IPv4 Unicast
R1#debug ip bgp internal
BGP internal debugging is on
R1#show debugging
IP routing:
BGP internal debugging is on
BGP updates debugging is on for address family: IPv4 Unicast
R1#
%BGP-5-NBR_RESET: Neighbor 10.1.3.4 reset (Peer closed the session) <<< BGP
session to R4 goes down
BGP: TX IPv4 Unicast Net global 10.100.1.1/32 Changed.
BGP: TX IPv4 Unicast Net global 10.100.1.1/32 RIB done.
BGP: TX IPv4 Unicast Net global 10.100.1.1/32 Changed.
BGP: TX IPv4 Unicast Mem global 1 1 10.1.3.4 Resetting counters.
BGP: TX IPv4 Unicast Mem global 1 1 10.1.3.4 Ignoring dummy policy change.
BGP: TX IPv4 Unicast Mem global 1 1 10.1.3.4 Resetting counters.
BGP: TX IPv4 Unicast Mem global 1 1 10.1.3.4 Ignoring dummy policy change.
BGP: TX IPv4 Unicast Mem global 1 1 10.1.3.4 Changing state from ACTIVE to DOWN
(session not established).
BGP: TX IPv4 Unicast Mem global 1 1 10.1.3.4 Removing from group (3 members left).
%BGP-5-ADJCHANGE: neighbor 10.1.3.4 Down Peer closed the session
%BGP_SESSION-5-ADJCHANGE: neighbor 10.1.3.4 IPv4 Unicast topology base removed
from session Peer
closed the session
BGP: TX IPv4 Unicast Mem global 10.1.3.4 State is DOWN (session not established).
BGP: net global:IPv4 Unicast:base 10.100.1.1/32 RIB-INSTALL Attempting to
install. <<< RIB gets informed
BGP: net global:IPv4 Unicast:base 10.100.1.1/32 RIB-INSTALL Built route type:
1024, flags: 200000, tag: 5,
metric: 0 path: 1.
BGP: net global:IPv4 Unicast:base 10.100.1.1/32 RIB-INSTALL Path 1, type: DEF,
gw: 10.1.5.5, idb: N/A,
topo_id: 0, src: 1.1.5.5, lbl: 1048577, flags: 0.
BGP: net global:IPv4 Unicast:base 10.100.1.1/32 RIB-INSTALL Installing 1 paths,
multipath limit 1 (from 1).
BGP(0): Revise route installing 1 of 1 routes for 10.100.1.1/32 -> 10.1.5.5
(global) to main IP table <<< The remaining path through R5 gets installed
in the RIB
BGP: net global:IPv4 Unicast:base 10.100.1.1/32 RIB-INSTALL Install successful.
BGP: TX IPv4 Unicast Net global 10.100.1.1/32 RIB done.
BGP: TX IPv4 Unicast Net global 10.100.1.1/32 RIB done.
BGP: TX IPv4 Unicast Tab RIB walk done version 29, added 1 topologies.
BGP: TX IPv4 Unicast Tab Executing.
BGP: TX IPv4 Unicast Wkr global 1 Cur Processing.
BGP: TX IPv4 Unicast Top global Appending nets from attr 0x9362CB4.
BGP: TX IPv4 Unicast Wkr global 1 Cur Attr change from 0x0 to 0x9362CB4.
BGP(0): (base) 10.1.1.2 send UPDATE (format) 10.100.1.1/32, next 10.1.1.1,
metric 0, path 5 4 <<< R1 sends update for 10.100.1.1/32 for Table Version 29.
(bestpath is still the one from R5, i.e. the only one R1 has at this moment)
BGP: TX IPv4 Unicast Wkr global 1 Cur Net 10.100.1.1/32 (Pxt 0x9F58FA0:0x0)
Formatted.
BGP: TX IPv4 Unicast Top global No attributes with modified nets.
BGP: TX IPv4 Unicast Top global Added tail marker with version 29.
BGP: TX IPv4 Unicast Wkr global 1 Cur Reached marker with version 29.
BGP: TX IPv4 Unicast Top global No attributes with modified nets.
BGP: TX IPv4 Unicast Wkr global 1 Cur Replicating.
BGP: TX IPv4 Unicast Wkr global 1 Cur Done (end of list), processed 1 attr(s),
1/1 net(s), 0 pos.
BGP: TX IPv4 Unicast Grp global 1 Checking EORs again (3/3).
BGP: TX IPv4 Unicast Grp global 1 Start minimum advertisement timer (30 secs).
BGP: TX IPv4 Unicast Wkr global 1 Cur Blocked (minimum advertisement interval).
BGP: TX IPv4 Unicast Wkr global 1 Cur Reached end of list.
BGP: TX IPv4 Unicast Grp global 1 Converged.
BGP: TX IPv4 Unicast Tab Processed 1 walker(s).
BGP: TX IPv4 Unicast Tab Generation completed.
BGP: TX IPv4 Unicast Top global Deleting first marker with version 28.
BGP: TX IPv4 Unicast Top global Collection reached marker 28 after 0 path
extension(s).
BGP: TX IPv4 Unicast Top global Collection done on marker 29 after 1 path
extension(s).
BGP: TX IPv4 Unicast Top global Collection done on marker 29 after 0 path
extension(s).
BGP: TX IPv4 Unicast Mem global 10.1.3.4 Policy change while no group and
member is DOWN.
BGP: TX IPv4 Unicast Mem global 10.1.3.4 Changing state from DOWN to WAIT
(pending advertised bit allocation).
BGP: TX IPv4 Unicast Mem global 1 1 10.1.3.4 Added to group (now has
4 members).
BGP: TX IPv4 Unicast Mem global 1 1 10.1.3.4 Continuing into ACTIVE state.
BGP: TX IPv4 Unicast Mem global 1 1 10.1.3.4 Refresh Start-of-rib for afi 1,
safi 1.
BGP: TX IPv4 Unicast Mem global 1 1 10.1.3.4 Full refresh requested.
BGP: TX IPv4 Unicast Mem global 1 1 10.1.3.4 Refresh has to wait for pathext
prepend.
%BGP-5-ADJCHANGE: neighbor 10.1.3.4 Up <<< BGP session to R4 is up again.
But, R1 did not learn the prefix 10.100.1.1/32 yet from R4.
BGP: nbr_topo global 10.1.3.4 IPv4 Unicast:base (0x63D50D0:1) rcvd Refresh
Start-of-RIB
BGP: nbr_topo global 10.1.3.4 IPv4 Unicast:base (0x63D50D0:1) refresh_epoch
is 2
BGP: TX IPv4 Unicast Top global Start pathext prepend.
BGP: TX IPv4 Unicast Tab Pathext prepend full table refresh.
BGP: TX IPv4 Unicast Tab Pathext prepend full table refresh.
BGP: TX IPv4 Unicast Top global Inserting initial marker.
BGP: TX IPv4 Unicast Top global Done pathext prepend (1 attrs).
BGP: TX IPv4 Unicast Grp global 1 Starting refresh after prepend completion.
BGP: TX IPv4 Unicast Mem global 1 1 10.1.3.4 Starting refresh (first member,
1, 0, marker).
BGP: TX IPv4 Unicast Wkr global 1 Ref Start at marker 1.
BGP: TX IPv4 Unicast Wkr global 1 Ref Unblocked
BGP: TX IPv4 Unicast Top global Collection done on marker 1 after 0 path
extension(s).
BGP: TX IPv4 Unicast Tab Executing.
BGP: TX IPv4 Unicast Wkr global 1 Ref Processing.
BGP: TX IPv4 Unicast Wkr global 1 Ref Attr change from 0x0 to 0x9362CB4.
BGP(0): (base) 10.1.1.2 send UPDATE (format) 10.100.1.1/32, next 10.1.1.1,
metric 0, path 5 4
BGP: TX IPv4 Unicast Wkr global 1 Ref Net 10.100.1.1/32 (Pxt 0x9F58FA0:0x0)
Formatted.
BGP: TX IPv4 Unicast Wkr global 1 Ref Reached marker with version 29.
BGP: TX IPv4 Unicast Wkr global 1 Ref Replicating (pending member_pos
processing).
BGP: TX IPv4 Unicast Mem global 1 1 10.1.3.4 Completed refresh.
BGP: TX IPv4 Unicast Mem global 1 1 10.1.3.4 Refresh stop.
BGP: TX IPv4 Unicast Grp global 1 Refresh complete.
BGP: TX IPv4 Unicast Wkr global 1 Ref Stop.
BGP: TX IPv4 Unicast Wkr global 1 Ref Blocked (not in list).
BGP: TX IPv4 Unicast Grp global 1 Converged.
BGP: TX IPv4 Unicast Mem global 1 1 10.1.3.4 Send EOR.
BGP: TX IPv4 Unicast Wkr global 1 Ref Suspending / blocked (member marker),
processed 1 attr(s), 1/1 net(s),
1 pos.
BGP: TX IPv4 Unicast Tab Processed 1 walker(s).
BGP: TX IPv4 Unicast Tab Generation completed.
BGP: TX IPv4 Unicast Top global Deleting first marker with version 1.
BGP: TX IPv4 Unicast Top global Collection reached marker 1 after 0 path
extension(s).
BGP: TX IPv4 Unicast Top global Collection done on marker 29 after 1 path
extension(s).
BGP: TX IPv4 Unicast Top global Collection done on marker 29 after 0 path
extension(s).
BGP(0): 10.1.3.4 rcvd UPDATE w/ attr: nexthop 10.1.3.4, origin i, metric 0,
merged path4, AS_PATH
BGP(0): 10.1.3.4 rcvd 10.100.1.1/32 <<< R1 received 10.100.1.1/32 from
R4 again
BGP: TX IPv4 Unicast Net global 10.100.1.1/32 Changed.
BGP: nbr_topo global 10.1.3.4 IPv4 Unicast:base (0x63D50D0:1) rcvd Refresh
End-of-RIB
BGP: net global:IPv4 Unicast:base 10.100.1.1/32 RIB-INSTALL Attempting to install.
BGP: net global:IPv4 Unicast:base 10.100.1.1/32 RIB-INSTALL Built route type:
1024, flags: 200000, tag: 4, metric: 0 path: 1.
BGP: net global:IPv4 Unicast:base 10.100.1.1/32 RIB-INSTALL Path 1, type: DEF,
gw: 10.1.3.4, idb: N/A, topo_id: 0, src: 1.1.3.4, lbl: 1048577, flags: 0.
BGP: net global:IPv4 Unicast:base 10.100.1.1/32 RIB-INSTALL Installing 1 paths,
multipath limit 1 (from 1).
BGP(0): Revise route installing 1 of 1 routes for 10.100.1.1/32 -> 10.1.3.4
(global) to main IP table
BGP: net global:IPv4 Unicast:base 10.100.1.1/32 RIB-INSTALL Install successful.
BGP: TX IPv4 Unicast Net global 10.100.1.1/32 RIB done.
BGP: TX IPv4 Unicast Net global 10.100.1.1/32 RIB done.
BGP: TX IPv4 Unicast Tab RIB walk done version 30, added 1 topologies.
BGP: TX IPv4 Unicast Tab Executing.
BGP: TX IPv4 Unicast Tab Generation completed.
BGP: TX Member message pool under period (60 < 600).
BGP: TX IPv4 Unicast Mem global 1 1 10.1.2.3 State is ACTIVE (ready).
BGP: TX IPv4 Unicast Grp global 1 Minimum advertisement timer expired.
BGP: TX IPv4 Unicast Wkr global 1 Cur Unblocked
BGP: TX IPv4 Unicast Tab Executing.
BGP: TX IPv4 Unicast Wkr global 1 Cur Processing.
BGP: TX IPv4 Unicast Top global Appending nets from attr 0x9362D54.
BGP: TX IPv4 Unicast Wkr global 1 Cur Attr change from 0x0 to 0x9362D54.
BGP(0): (base) 10.1.1.2 send UPDATE (format) 10.100.1.1/32, next 10.1.1.1,
metric 0, path 4 <<< R1 sends an update for 10.100.1.1/32 for Table Version
30 (bestpath is again the one from R4)
BGP: TX IPv4 Unicast Wkr global 1 Cur Net 10.100.1.1/32 (Pxt 0x9F58FA0:0x0)
Formatted.
BGP: TX IPv4 Unicast Top global No attributes with modified nets.
BGP: TX IPv4 Unicast Top global Added tail marker with version 30.
BGP: TX IPv4 Unicast Wkr global 1 Cur Reached marker with version 30.
BGP: TX IPv4 Unicast Top global No attributes with modified nets.
BGP: TX IPv4 Unicast Wkr global 1 Cur Replicating.
BGP: TX IPv4 Unicast Wkr global 1 Cur Done (end of list), processed 1
attr(s), 1/1 net(s), 0 pos.
BGP: TX IPv4 Unicast Grp global 1 Checking EORs again (4/4).
BGP: TX IPv4 Unicast Grp global 1 Start minimum advertisement timer (30 secs).
BGP: TX IPv4 Unicast Wkr global 1 Cur Blocked (minimum advertisement interval).
BGP: TX IPv4 Unicast Wkr global 1 Cur Reached end of list.
BGP: TX IPv4 Unicast Grp global 1 Converged.
BGP: TX IPv4 Unicast Tab Processed 1 walker(s).
BGP: TX IPv4 Unicast Tab Generation completed.
BGP: TX IPv4 Unicast Top global Deleting first marker with version 29.
BGP: TX IPv4 Unicast Top global Collection reached marker 29 after 0 path
extension(s).
BGP: TX IPv4 Unicast Top global Collection done on marker 30 after 1 path
extension(s).
BGP: TX IPv4 Unicast Top global Collection done on marker 30 after 0 path
extension(s).
BGP: TX IPv4 Unicast Tab RIB walk done version 30, added 0 topologies.
所有表版本现在为30版:
R1#show bgp ipv4 unicast summary
BGP router identifier 10.1.3.1, local AS number 1
BGP table version is 30, main routing table version 30
1 network entries using 144 bytes of memory
2 path entries using 160 bytes of memory
2/1 BGP path/bestpath attribute entries using 288 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 640 total bytes of memory
BGP activity 1/0 prefixes, 17/15 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.1.1.2 4 2 127 135 30 0 0 01:52:42 0
10.1.2.3 4 3 126 136 30 0 0 01:52:45 0
10.1.3.4 4 4 12 14 30 0 0 00:06:25 1
10.1.5.5 4 5 64 73 30 0 0 00:54:37 1
R1#show bgp ipv4 unicast 10.100.1.1/32
BGP routing table entry for 10.100.1.1/32, version 30
Paths: (2 available, best #1, table default)
Advertised to update-groups:
1
Refresh Epoch 2
4
10.1.3.4 from 10.1.3.4 (10.100.1.1)
Origin IGP, metric 0, localpref 100, valid, external, best
rx pathid: 0, tx pathid: 0x0
Refresh Epoch 2
5 4
10.1.5.5 from 10.1.5.5 (10.1.5.5)
Origin IGP, localpref 100, valid, external
rx pathid: 0, tx pathid: 0
最后,在R1上有两个最佳路径更改。桌子版本被撞了2。
首先,对等体10.1.3.4在R1上断开。最佳路径更改为从R5接收的路径。表版本增加到下一个可用编号,即29。前缀表版本也被推到29。RIB已使用此新最佳路径更新。RIB的表版本已增加到29。然后,R1向BGP对等体10.1.1.2发送了新最佳路径的更新,并将对等体表版本更新为29。其他对等体也进行了更新。
其次,当对等体10.1.3.4重新启动后,R1从R4接收10.100.1.1/32的更新并重新计算了最佳路径。从R4到的路径是新的最佳路径,导致表版本和前缀表版本被重新限定为下一个可用数30。同样,RIB和所有其他BGP对等体被更新,RIB和对等表版本被更新为30。表版本仅被重新限定每次在这里。但是,如果其他BGP前缀发生其他更改,则此表版本将被多个版本颠倒,因为它每次跳到下一个可用号码。
如果为BGP对等体输入clear ip bgp out命令,则该路由器会将其BGP前缀重新发送到该对等体。这不会导致接收BGP对等体上最佳路径的更改。因此,该对等体上的表版本没有更改。
在接收路由器上运行debug ip bgp updates时,您会看到:
BGP(0): 10.1.3.4 rcvd UPDATE w/ attr: nexthop 10.1.3.4, origin i,
metric 0, merged path 4, AS_PATH
BGP(0): 10.1.3.4 rcvd 10.100.1.1/32...duplicate ignored
接收的更新被识别为重复,因此会忽略它,不会发生最佳路径更改。
假设BGP表中有一个前缀为100.000的路由器,并且BGP表版本每分钟增加100.000。这不是预期的,必须检查行为。此行为的一个原因可能是BGP前缀的下一跳每分钟对所有前缀都抖动。
当BGP表版本快速增加时,其中一个结果是进程BGP路由器和BGP IO繁忙,这可能导致路由器CPU持续高位。
版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
30-Sep-2013 |
初始版本 |