本檔案介紹「表版本」,這是邊界閘道通訊協定(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
輸出顯示原始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
輸出顯示Origin Incomplete。
Table Version number是一個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。只有字首作為BGP字首位於RIB中時,才會更改BGP字首的RIB。如果任何其他路由協定在路由中放置該字首,則BGP字首將標籤為RIB-failure。在這種情況下,即使最佳路徑發生更改,表版本也不會更改。
以下示例中的BGP表版本未更改。從R4獲知的BGP字首10.100.1.1/32也通過R1上配置的靜態路由獲知。因此,R1在RIB中安裝靜態路由,而BGP onR1將字首標籤為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必須向該對等體傳送該首碼的更新。例如,如果對等體10.1.1.2的對等體表版本為60,則該對等體對於字首表版本為60或更低版本的所有字首都是最新的。路由器必須針對字首表版本高於60的所有字首傳送BGP更新。
一旦路由器更新BGP對等體以獲得最佳路徑更改字首,路由器就會更新此對等體的對等體表版本。調整此對等體表版本值,以匹配更新此BGP對等體的所有字首的最高字首表版本值。假設對等體表版本為60,且有兩個字首表版本61和62的字首。一旦路由器將這兩個字首的新最佳路徑傳送給該BGP對等體,對等體表版本更新為62。
Prefix Table Version是附加到BGP字首的表版本號。當該首碼的最佳路徑變更時,此狀態會變更。每次更改一個BGP字首的最佳路徑時,其字首表版本都會發生顛覆,這意味著它將更新為等於下一個可用版本號。假設字首10.0.0.0/8的字首表版本為27,且BGP表版本為30。在這種情況下,當字首10.0.0.0/8的最佳路徑發生更改時,其字首表版本將跳至31。
RIB表版本用於跟蹤BGP最佳路徑發生更改後是否需要更新RIB。必須通知RIB具有高於RIB表版本的字首表版本的BGP字首。對於這些字首,有一個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路由表。通常,幾乎每秒在網際網路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的路徑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 |
初始版本 |