簡介
本檔案將介紹IS-IS微迴路的技術概述,解釋發生微迴路的條件,以及用來防止微迴路的原理和機制。
必要條件
需求
思科建議您瞭解中間系統到中間系統(ISIS)分段路由(SR)版本6的基本知識。
採用元件
本檔案中的資訊是根據Device:網路聚合系統(NCS)540、NCS 5500。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
Microloop概述
IS-IS是一種廣泛部署的鏈路狀態路由協定,用於大型服務提供商網路,因為它具有快速收斂性和可擴充性。但是,在拓撲更改(如鏈路或節點故障)期間,當路由器在不同時間更新其轉發資訊庫(FIB)時,可能會發生臨時轉發不一致(通常稱為微環路)。這些微環路會導致暫時的資料包丟失、延遲增加或流量黑洞,從而對即時和延遲敏感型應用產生負面影響。
IS-IS路由協定利用分段路由(SR和SRv6)微環路避免機制,以便在網路收斂期間防止此類臨時轉發環路。即使網路正在轉換到新的穩定狀態,這些機制也可確保無環轉發。

圖1.網路拓撲圖
通用配置
interface Loopback100
ipv6 address <>
interface <>
ipv6 enable
router isis <>
is-type level-2-only
net <>
address-family ipv6 unicast
metric-style wide
microloop avoidance segment-routing ## enables Microloop avoidance mechanism
microloop avoidance rib-update-delay <> ## specify the time in ms
router-id Loopback100
segment-routing srv6
locator <>
interface Loopback100
address-family ipv6 unicast
interface <>
point-to-point
address-family ipv6 unicast
fast-reroute per-prefix
fast-reroute per-prefix ti-lfa ## enables topology-independent loop-free alternates (TI-LFA)
segment-routing
srv6
encapsulation
source-address <>
!
locators
locator <>
micro-segment behavior unode psp-usd ## enables SRv6 Micro-SIDs (uSIDs) the PSP-USD (Penultimate Segment Pop - Ultimate Segment Pop) flavor
prefix <configure the locator >
router bgp <>
vrf <>
address-family <> unicast
segment-routing srv6 ## steering the packet using SRv6 uSID
locator <>
處於穩定狀態
當網路沒有發生更改時,提供商邊緣1(PE1)通過邊界網關協定(BGP)向提供商邊緣2(PE2)通告10.10.1.0/24網路,而PE2則向PE1通告10.10.20.0/24網路。
RP/0/RP0/CPU0:PE1#show bgp vrf mobility 10.10.1.0/24 detail
BGP routing table entry for 10.10.1.0/24, Route Distinguisher: 10.10.11.11:0
SRv6-VPN SID: fc00:1000:a810:e003::/64
Local
0.0.0.0 from 0.0.0.0 (10.10.11.11), if-handle 0x3c000090
Origin incomplete, metric 0, localpref 100, weight 32768, valid, redistributed, best, group-best, import-candidate
Received Path ID 0, Local Path ID 1, version 8
Extended community:
附註:PE1的fc00:1000:a810:e003::/64 >> fc00:1000:a810 ##定位器,e003 ##函式。
RP/0/RP0/CPU0: PE1#show bgp vrf mobility 10.10.20.0/24 detail
Local
fc00:1000:a822::22 (metric 2000) from fc00:1000:a822::22 (10.10.22.22), if-handle 0x00000000
Received Label 0xe0030
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 714
Extended community:
PSID-Type:L3, SubTLV Count:1, R:0x00,
SubTLV:
T:1(Sid information), Sid:fc00:1000:a820::, F:0x00, R2:0x00, Behavior:63, R3:0x00, SS-TLV Count:1
SubSubTLV:
T:1(Sid structure):
Length [Loc-blk,Loc-node,Func,Arg]:[32,16,16,0], Tpose-len:16, Tpose-offset:48
Source AFI: VPNv4 Unicast, Source VRF: default, Source Route Distinguisher: 10.10.22.22:2
附註:此10.10.20.0/24是從PE1上的PE2接收的,定位符為fc00:1000:a820::和函式e0030。
RP/0/RP0/CPU0: PE1#show route vrf mobility 10.10.20.0/24 detail
Known via "bgp 100", distance 200, metric 0, type internal
Routing Descriptor Blocks
fc00:1000:a822::22, from fc00:1000:a822::22
<snip>
SRv6 Headend: H.Encaps.Red [f3216], SID-list {fc00:1000:a820:e003::}
附註:在穩定狀態下,將目的地為客戶邊緣2(CE2)的資料包傳送到PE2,其中包含Internet協定版本6(IPv6)報頭目標地址fc00:1000:a820:e003::。
PE1傳送的資料包處於穩定狀態。
Frame 2: 136 bytes on wire (1088 bits), 136 bytes captured (1088 bits)
Ethernet II, Src: Cisco_a7:8a:0d (c4:b2:39:a7:8a:0d), Dst: Cisco_ff:d4:16 (a0:b4:39:ff:d4:16)
Destination: Cisco_ff:d4:16 (a0:b4:39:ff:d4:16)
Source: Cisco_a7:8a:0d (c4:b2:39:a7:8a:0d)
Type: IPv6 (0x86dd)
Internet Protocol Version 6, Src: fc00:1000:a811::11, Dst: fc00:1000:a820:e003::
0110 .... = Version: 6
<0110 .... = Version: 6 [This field makes the filter match on "ip.version == 6" possible]>
.... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT)
.... 0000 0000 0000 1110 1111 = Flow Label: 0x000ef
Payload Length: 82
Next Header: IPIP (4)
Hop Limit: 254
Source Address: fc00:1000:a811::11
<Source or Destination Address: fc00:1000:a811::11>
<[Source Host: fc00:1000:a811::11]>
<[Source or Destination Host: fc00:1000:a811::11]>
Destination Address: fc00:1000:a820:e003::
<Source or Destination Address: fc00:1000:a820:e003::>
<[Destination Host: fc00:1000:a820:e003::]>
<[Source or Destination Host: fc00:1000:a820:e003::]>
Internet Protocol Version 4, Src: 10.10.1.2, Dst: 10.10.20.2
0100 .... = Version: 4
.... 0101 = Header Length: 20 bytes (5)
Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
附註:
- 源:PE1的fc00:1000:a811::11 >>環回100用作源地址。
- Dst :fc00:1000:a820:e003:>> PE2定位器:功能.
- ipv6傳輸報頭,接下來是IPv4負載。
通過拓撲獨立 — 無環路備用(TI-LFA)按計算的主路徑和備用路徑。
RP/0/RP0/CPU0:PE1#show cef ipv6 fc00:1000:a820::
via fe80::a2b4:39ff:feff:d416/128, TenGigE0/0/0/9, 11 dependencies, weight 0, class 0, backup (TI-LFA) [flags 0xb00]
path-idx 0 NHID 0x0 [0x8ef0f2b0 0x0]
next hop fe80::a2b4:39ff:feff:d416/128, Repair Node(s): fc00:1000:a802::2
local adjacency
SRv6 H.Insert.Red SID-list {fc00:1000:a802::}
via fe80::9ee1:76ff:feca:e8a8/128, TenGigE0/0/0/8, 4 dependencies, weight 0, class 0, protected [flags 0x400]
path-idx 1 bkup-idx 0 NHID 0x0 [0x8f2db710 0x0]
next hop fe80::9ee1:76ff:feca:e8a8/128
PE1上的介面TenGigE0/0/0/8(主路徑)關閉時的事件順序

圖2.微循環的出現
在PE1上,當鏈路tengig 0/0/8關閉時,在PE1和P1之間的備用路徑上,懷疑存在微環路,微環路反過來會觸發PE1上的微環規避(MLA)機制。
RP/0/RP0/CPU0:PE1#show logging
RP/0/RP0/CPU0:Mar 21 08:30:10.244 UTC: ifmgr[307]: %PKT_INFRA-LINK-5-CHANGED : Interface TenGigE0/0/0/8, changed state to Administratively Down
當介面TenGigE0/0/0/8關閉時,首先發生快速重新路由(FRR)事件,即,流量在TI-LFA路徑上傳送。
RP/0/RP0/CPU0:PE1#show cef trace
Mar 21 08:30:10.244 fib/common/frr 0/RP0/CPU0 43# t5991 Common: FRR-ITF-EVENT: proto=3 type=0 ifh=0x3c0000a0
Mar 21 08:30:10.244 fib/common/frr 0/RP0/CPU0 13# t5991 IPv6: FRR-LOOKUP-DONE: evt=0, ifh=0x3c0000a0, main_ifh=0, proto=1
Mar 21 08:30:10.244 fib/common/frr 0/RP0/CPU0 12# t5991 IPv6: FRR-ITF-EVENT: Global Active; handle:0x3c0000a0[0x0]
Mar 21 08:30:10.244 fib/common/frr 0/RP0/CPU0 13# t5991 IPv6: FRR-ITF-EVENT: FRR Active; handle:0x3c0000a0[0x0]
Mar 21 08:30:10.244 fib/common/frr 0/RP0/CPU0 1# t5991 IPv6: FRR-EVENT: evt=0, notify protocol=1, ifh=0x0, switched=111768 ns
Mar 21 08:30:10.244 fib/common/fast 0/RP0/CPU0 20# t5991 Common: PLAT-UPD-FAST: Proto=common, Obj[FIB_DATA_TYPE2_ALL]=0, flags=0 Acttype=FRR_EOD
在08:30:10:307,存在IS-IS刪除鄰接關係。
RP/0/RP0/CPU0:PE1#show isis lsp last 20
08:30:10:307 1 Te0/0/0/8 DELADJ
在08:30:10:358,收到標籤交換路徑(LSP),計算小型封裝熱插拔(SFP)並啟用uloop。
RP/0/RP0/CPU0:PE1#show isis spf-log detail
08:30:10:358 FSPF 2 5 2 PE1.00-00 DELADJ LINKBAD
Delay: 50ms (since first trigger)
46257ms (since end of last calculation)
Trigger Link: P3.00
Trigger Next Hop: P3
New LSP Arrivals: 0
SR uloop: Link Down
在IS-IS跟蹤中更詳細地檢視這些事件,在這種情況下,配置的路由資訊庫(RIB)更新延遲時間為:65535 ms ~ 65秒
RP/0/RP0/CPU0:PE1#show isis trace all
Mar 21 08:30:10.308 isis/Mring_2801/std 0/RP0/CPU0 t8712 isis_roca_event_schedule_result_debug:329 SPF_TRIGGER_PRIMARY L2 IPv6 Unicast
Mar 21 08:30:10.308 isis/Mring_2801/spf 0/RP0/CPU0 t8712 isis_roca_spf_linkchanged_trigger:2609 SPF_TRIGGER_LINKCHANGED_ADD L2 IPv6 Unicast 0370.0011.0011.00
Mar 21 08:30:10.358 isis/Mring_2801/std 0/RP0/CPU0 6669# t8712 isis_roca_event_start:1541 SPF_ROCA_START L2 IPv6 Unicast SPF Type: Full >>>>>>>>. SPF was trigger
Mar 21 08:30:10.358 isis/Mring_2801/sr_ 0/RP0/CPU0 t8712 isis_roca_sr_uloop_prep:3069 SR_ULOOP_SPF_PREP_START L2 IPv6 Unicast SPF Type: Full>>>>>>>> uloop activated and uloop path installed
Mar 21 08:30:10.358 isis/Mring_2801/sr_ 0/RP0/CPU0 8451# t8712 isis_roca_uloop_install_exp_path:3915 SR_ULOOP_DETAIL_ADD_EXP_PATH L2 IPv6 Unicast SPF Type: Full
Mar 21 08:30:10.358 isis/Mring_2801/sr_ 0/RP0/CPU0 t8712 isis_roca_prefix_update_run:1040 SR_ULOOP_SPF_START_DELAYED_UPD_TIMER_8 L2 IPv6 Unicast SPF Type: Full 65535 >>>>>> the MLA timer has began
Mar 21 08:30:10.864 isis/Mring_2801/std 0/RP0/CPU0 t8712 isis_roca_frr_run:1538 SPF_FRR_DEFERRED_ULOOP L2 IPv6 Unicast
Mar 21 08:31:15.893 isis/Mring_2801/sr_ 0/RP0/CPU0 t8712 isis_ip_rib_worker_delayed_update_run:2344 SR_ULOOP_EVENT_DELAYED_UPDATE L2 IPv6 Unicast >> after 65 seconds the rib is updated and MLA is deactivated
MLA處於活動狀態時的RIB狀態。
RP/0/RP0/CPU0:PE1#show route ipv6 fc00:1000:a820:: detail
Routing entry for fc00:1000:a820::/48
Routing Descriptor Blocks
fe80::a2b4:39ff:feff:d416, from fc00:1000:a822::22, via TenGigE0/0/0/9
Route metric is 6000
<snip>
SRv6 Headend: H.Insert.Red [f3216], SID-list {fc00:1000:a802::} ##this locator of P2 is inserted before the SRH
MLA處於作用中時的Cisco Express Forwarding(CEF)狀態。
RP/0/RP0/CPU0: PE1#show cef ipv6 fc00:1000:a820:: detail
local adjacency to TenGigE0/0/0/9
<snip>
via fe80::a2b4:39ff:feff:d416/128, TenGigE0/0/0/9, 10 dependencies, weight 0, class 0 [flags 0x0]
SRv6 H.Insert.Red SID-list {fc00:1000:a802::} ## P node (locator of P2)sid is inserted into the packet
Load distribution: 0 (refcount 9)
Hash OK Interface Address
0 Y TenGigE0/0/0/9 fe80::a2b4:39ff:feff:d416
源自PE1的資料包通過P1轉發,其中P2s微段識別符號(uSID)作為第一個活動目標。當資料包到達P2時,與uSID關聯的SRv6行為會觸發分段路由報頭(SRH)解封,在此之後,原始資料包在MLA轉發下轉發到PE2。

圖3.在MLA期間採用的路徑
資料包在MLA期間由PE1和P1轉發。
Frame 1: 160 bytes on wire (1280 bits), 160 bytes captured (1280 bits)
Ethernet II, Src: Cisco_a7:8a:0d (c4:b2:39:a7:8a:0d), Dst: Cisco_ff:d4:16 (a0:b4:39:ff:d4:16)
Internet Protocol Version 6, Src: fc00:1000:a811::11, Dst: fc00:1000:a802:: >> during MLA the 1st active destination locator is of P2
0110 .... = Version: 6
<0110 .... = Version: 6 [This field makes the filter match on "ip.version == 6" possible]>
.... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT)
.... 0000 0000 0000 1110 1111 = Flow Label: 0x000ef
Payload Length: 106
Next Header: Routing Header for IPv6 (43) >> indicates the next header is a SRH
Hop Limit: 254
Source Address: fc00:1000:a811::11
<Source or Destination Address: fc00:1000:a811::11>
<[Source Host: fc00:1000:a811::11]>
<[Source or Destination Host: fc00:1000:a811::11]>
Destination Address: fc00:1000:a802::
<Source or Destination Address: fc00:1000:a802::>
<[Destination Host: fc00:1000:a802::]>
<[Source or Destination Host: fc00:1000:a802::]>
Routing Header for IPv6 (Segment Routing) >>>>>>>>> SRH header which contains the orginal PE2 locator
Next Header: IPIP (4)
Length: 2
[Length: 24 bytes]
Type: Segment Routing (4)
Segments Left: 1
Last Entry: 0
Flags: 0x00
Tag: 0000
Address[0]: fc00:1000:a820:e003:: >>>>>>>>>>>>>>>> PE2 locator : function
Internet Protocol Version 4, Src: 10.10.1.2, Dst: 10.10.20.2
0100 .... = Version: 4
.... 0101 = Header Length: 20 bytes (5)
解除封裝後,P2傳送原始資料包,在MLA期間,P2刪除SRH。
Frame 1: 136 bytes on wire (1088 bits), 136 bytes captured (1088 bits)
Ethernet II, Src: Cisco_87:d8:58 (b0:a6:51:87:d8:58), Dst: Cisco_af:48:01 (c8:47:09:af:48:01)
Internet Protocol Version 6, Src: fc00:1000:a811::11, Dst: fc00:1000:a820:e003::
0110 .... = Version: 6
<0110 .... = Version: 6 [This field makes the filter match on "ip.version == 6" possible]>
.... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT)
.... 0000 0000 0000 1110 1111 = Flow Label: 0x000ef
Payload Length: 82
Next Header: IPIP (4)
Hop Limit: 252
Source Address: fc00:1000:a811::11
<Source or Destination Address: fc00:1000:a811::11>
<[Source Host: fc00:1000:a811::11]>
<[Source or Destination Host: fc00:1000:a811::11]>
Destination Address: fc00:1000:a820:e003::
<Source or Destination Address: fc00:1000:a820:e003::>
<[Destination Host: fc00:1000:a820:e003::]>
<[Source or Destination Host: fc00:1000:a820:e003::]>
Internet Protocol Version 4, Src: 10.10.1.2, Dst: 10.10.20.2
Data (62 bytes)
收斂之後(在RIB更新延遲計時器之後),刪除插入的SRH,並在收斂的最佳內部網關協定(IGP)路徑上傳送資料包。
RP/0/RP0/CPU0: PE1#show cef ipv6 fc00:1000:a822::22/128
local adjacency to TenGigE0/0/0/9
Prefix Len 128, traffic index 0, precedence n/a, priority 1
via fe80::a2b4:39ff:feff:d416/128, TenGigE0/0/0/9, 9 dependencies, weight 0, class 0 [flags 0x0]
path-idx 0 NHID 0x0 [0x8ef0f2b0 0x0]
next hop fe80::a2b4:39ff:feff:d416/128
local adjacency
日程表摘要
|
時間
|
動作
|
機制
|
|
08:30:10.244
|
鏈路故障,流量轉移到備用路徑
|
TI-LFA
|
|
08:30:10:307
|
收到LSP,已計算新的最短路徑優先(SPF)
|
MLA(觸發)
|
|
08:30:10.358
|
RIB更新延遲,流量使用MLA隧道
|
MLA(活動)
|
|
08:31:15.893
|
延遲計時器過期,最終路徑安裝在FIB中
|
完全收斂
|
結論
本文檔詳細介紹了IS-IS通告的SRv6 uSID路徑在網路融合期間如何支援MLA。通過將有序的拓撲意圖編碼到uSID清單中,流量通過確定的節點序列導向,確保無環轉發,即使IS-IS SPF計算在網路中暫時不一致。
在收斂過程中,從入口PE出發的資料包採用預先計算的uSID序列,遍歷中間P節點,而不依賴瞬時IGP下一跳決策。指定uSID端點上的解除封裝行為可確保受保護網段完成之後乾淨地轉換回本機轉發。IS-IS控制平面更新和SRv6 uSID資料平面行為之間的這種緊密耦合互動實現了快速且確定的重路由。
基於IS-IS uSID的MLA為無微環收斂提供了可擴展的、拓撲感知且操作簡單的解決方案,使其非常適合支援SRv6的大型網路,在這些網路中,快速重新路由和確定性流量控制至關重要。
命令
- #show isis例項<> ipv6 microloop avoidance <prefix>詳細資訊
- #show isis