本產品的文件集力求使用無偏見用語。針對本文件集的目的,無偏見係定義為未根據年齡、身心障礙、性別、種族身分、民族身分、性別傾向、社會經濟地位及交織性表示歧視的用語。由於本產品軟體使用者介面中硬式編碼的語言、根據 RFP 文件使用的語言,或引用第三方產品的語言,因此本文件中可能會出現例外狀況。深入瞭解思科如何使用包容性用語。
思科已使用電腦和人工技術翻譯本文件,讓全世界的使用者能夠以自己的語言理解支援內容。請注意,即使是最佳機器翻譯,也不如專業譯者翻譯的內容準確。Cisco Systems, Inc. 對這些翻譯的準確度概不負責,並建議一律查看原始英文文件(提供連結)。
本檔案介紹Cisco IOS® XR中的mtrace版本2。
本文件沒有特定需求。
本檔案特定於Cisco IOS®XR,但並不限於特定軟體版本或硬體。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路正在作用,請確保您已瞭解任何指令可能造成的影響。
附註:cisco IOS XR軟體上的MTRACE v2使用非標準連線埠33433,而不是標準RFC連線埠33435。
有三類資料包用於mtrace。這三個資料包共同使mtrace正常運行。建立者會向最後躍點路由器傳送一個mtrace查詢封包。此LHR將查詢轉換為請求資料包。然後,此資料包會逐跳單播轉發到上游路由器。LHR和每個上游路由器都新增了一個響應資料塊,其中包含介面地址、路由協定、轉發代碼等有用資訊。當請求到達FHR時,它會將請求轉換為回複資料包並將其轉發給發起方。如果跟蹤未完成,例如發生致命錯誤,如「no route」,則中間路由器可能還會將回覆返回到發起者。
請檢視此映像,瞭解該過程以及三種mtrace資料包型別的處理。
發起方為R-10。LHR為LHR-4。FHR為FHR-3。RP為RP-5。網路運行PIM稀疏模式或任何源組播(ASM)。
mtrace請求消息如下所示。
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length | # Hops |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Multicast Address |
| |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
| |
| Source Address |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Mtrace2 Client Address |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Query ID | Client Port # |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
使用者端位址是建立者的位址,因此是執行mTrace v2指令的路由器。
響應資料塊儲存感興趣的資訊。此資訊將新增到請求消息中。每台路由器都會向請求消息新增一個響應資料塊。以下是響應資料塊。
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length | MBZ |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Query Arrival Time |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Incoming Interface Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Outgoing Interface Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Upstream Router Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
. Input packet count on Incoming Interface .
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
. Output packet count on Outgoing Interface .
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
. Total number of packets for this source-group pair .
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Rtg Protocol | Multicast Rtg Protocol |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Fwd TTL | MBZ |S| Src Mask |Forwarding Code|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
此響應塊資訊用於顯示traceroute輸出。每個響應塊都是mtrace輸出中的一行。
路由協定和組播路由協定編號與IP組播MIB中的ipMcastRouteRtProtocol的值相同(RFC 5132)。 它們與mtrace v1中使用的值不同。
IANA列出如下:
路由協定:
other (1), -- not specified
local (2), -- local interface
netmgmt (3), -- static route
icmp (4), -- result of ICMP Redirect
-- the following are all dynamic
-- routing protocols
egp (5), -- Exterior Gateway Protocol
ggp (6), -- Gateway-Gateway Protocol
hello (7), -- FuzzBall HelloSpeak
rip (8), -- Berkeley RIP or RIP-II
isIs (9), -- Dual IS-IS
esIs (10), -- ISO 9542
ciscoIgrp (11), -- Cisco IGRP
bbnSpfIgp (12), -- BBN SPF IGP
ospf (13), -- Open Shortest Path First
bgp (14), -- Border Gateway Protocol
idpr (15), -- InterDomain Policy Routing
ciscoEigrp (16), -- Cisco EIGRP
dvmrp (17), -- DVMRP
rpl (18), -- RPL [RFC-ietf-roll-rpl-19]
dhcp (19), -- DHCP [RFC2132]
組播路由協定:
other(1), -- none of the following
local(2), -- e.g., manually configured
netmgmt(3), -- set via net.mgmt protocol
dvmrp(4),
mospf(5),
pimSparseDense(6), -- PIMv1, both DM and SM
cbt(7),
pimSparseMode(8), -- PIM-SM
pimDenseMode(9), -- PIM-DM
igmpOnly(10),
bgmp(11),
msdp(12)
此處顯示了mtrace v2的轉發代碼。它們與mtrace v1中的不同。
Value Name Description
----- -------------- ----------------------------------------------
0x00 NO_ERROR No error.
0x01 WRONG_IF Mtrace2 Request arrived on an interface
for which this router does not perform
forwarding for the specified group to the
source or RP.
0x02 PRUNE_SENT This router has sent a prune upstream that
applies to the source and group in the
Mtrace2 Request.
0x03 PRUNE_RCVD This router has stopped forwarding for this
source and group in response to a Request
from the downstream router.
0x04 SCOPED The group is subject to administrative
scoping at this router.
0x05 NO_ROUTE This router has no route for the source or
group and no way to determine a potential
route.
0x06 WRONG_LAST_HOP This router is not the proper LHR.
0x07 NOT_FORWARDING This router is not forwarding this source and
group out the Outgoing Interface for an
unspecified reason.
0x08 REACHED_RP Reached the Rendezvous Point.
0x09 RPF_IF Mtrace2 Request arrived on the expected
RPF interface for this source and group.
0x0A NO_MULTICAST Mtrace2 Request arrived on an interface
that is not enabled for multicast.
0x0B INFO_HIDDEN One or more hops have been hidden from this
trace.
0x0C REACHED_GW Mtrace2 Request arrived on a gateway (e.g.,
a NAT or firewall) that hides the
information between this router and the
Mtrace2 client.
0x0D UNKNOWN_QUERY A non-transitive Extended Query Type was
received by a router that does not support
the type.
0x80 FATAL_ERROR A fatal error is one where the router may
know the upstream router but cannot forward
the message to it.
0x81 NO_SPACE There was not enough room to insert another
Standard Response Block in the packet.
0x83 ADMIN_PROHIB Mtrace2 is administratively prohibited.
用法: mtrace
確保指定2以便使用mtrace v2。
RP/0/RP0/CPU0:R-10#mtrace?
mtrace mtrace2
RP/0/RP0/CPU0:R-10#mtrace2 ?
ipv4 IPv4 Address family
ipv6 ipv6 Address Family
RP/0/RP0/CPU0:R-10#mtrace2 ipv4 ?
Hostname or A.B.C.D Source to trace route from
來源位址是建立者的位址。
RP/0/RP0/CPU0:R-10#mtrace2 ipv4 10.1.3.3 ?
Hostname or A.B.C.D Destination of route
debug Mtrace client-side debugging(cisco-support)
目的地址是LHR的地址。
RP/0/RP0/CPU0:R-10#mtrace2 ipv4 10.1.3.3 10.2.4.4 ?
Hostname or A.B.C.D Group to trace route via
debug Mtrace client-side debugging(cisco-support)
組地址是正在跟蹤的多播流的組地址。
RP/0/RP0/CPU0:R-10#mtrace2 ipv4 10.1.3.3 10.2.4.4 225.1.1.1 ?
Hostname or A.B.C.D response address to receive response
debug Mtrace client-side debugging(cisco-support)
響應地址是traceroute回覆返回的地址。
RP/0/RP0/CPU0:R-10#mtrace2 ipv4 10.1.3.3 10.2.4.4 225.1.1.1 10.0.0.10 ?
<1-255> Time-to-live for multicasted trace request
debug Mtrace client-side debugging(cisco-support)
請注意,此命令可從網路中的任何路由器啟動,而不一定是啟用了PIM/組播的路由器,也可從正在調查的特定共用樹或源樹啟動。
RP/0/RP0/CPU0:R-10#mtrace2 ipv4 10.1.3.3 10.2.4.4 225.1.1.1 10.0.0.10
Type escape sequence to abort.
Mtrace from 10.1.3.3 to 10.2.4.4
via group 225.1.1.1
From source (?) to destination (?)
Querying full reverse path...
0 10.2.4.4
-1 10.4.7.4 PIM [10.1.3.0/24]
-2 10.5.7.7 PIM [10.1.3.0/24]
-3 0.0.0.0 PIM Reached RP/Core [10.1.3.0/24]
您可以看到已針對共用樹(*,G)執行mtrace。 mtrace從最後一跳路由器10.2.4.4開始,然後在共用樹上返回到RP(10.0.0.5)。 原因是LHR-4路由器沒有用於組225.1.1.1的源10.1.3.3的(S,G)MRIB條目。
[10.1.3.0/24]部分是用於RPF資訊的單播路由。IOS-XR中的RPF資訊始終是IPv4的/32條目。此資訊源自單播路由。系統會顯示此單播路由。
顯示了組播協定。這是PIM
跳數反向顯示,從最後一跳路由器的0開始,一直負到到達第一跳路由器。
下一個是源樹的情況。
RP/0/RP0/CPU0:LHR-4#show mrib route 225.1.1.1
IP Multicast Routing Information Base
Entry flags: L - Domain-Local Source, E - External Source to the Domain,
C - Directly-Connected Check, S - Signal, IA - Inherit Accept,
IF - Inherit From, D - Drop, ME - MDT Encap, EID - Encap ID,
MD - MDT Decap, MT - MDT Threshold Crossed, MH - MDT interface handle
CD - Conditional Decap, MPLS - MPLS Decap, EX - Extranet
MoFE - MoFRR Enabled, MoFS - MoFRR State, MoFP - MoFRR Primary
MoFB - MoFRR Backup, RPFID - RPF ID Set, X - VXLAN
Interface flags: F - Forward, A - Accept, IC - Internal Copy,
NS - Negate Signal, DP - Don't Preserve, SP - Signal Present,
II - Internal Interest, ID - Internal Disinterest, LI - Local Interest,
LD - Local Disinterest, DI - Decapsulation Interface
EI - Encapsulation Interface, MI - MDT Interface, LVIF - MPLS Encap,
EX - Extranet, A2 - Secondary Accept, MT - MDT Threshold Crossed,
MA - Data MDT Assigned, LMI - mLDP MDT Interface, TMI - P2MP-TE MDT Interface
IRMI - IR MDT Interface, TRMI - TREE SID MDT Interface, MH - Multihome Interface
(*,225.1.1.1) RPF nbr: 10.4.7.7 Flags: C RPF
Up: 1d21h
Incoming Interface List
GigabitEthernet0/0/0/1 Flags: A NS, Up: 1d21h
Outgoing Interface List
GigabitEthernet0/0/0/0 Flags: F NS LI, Up: 1d21h
(10.1.3.1,225.1.1.1) RPF nbr: 10.4.9.9 Flags: RPF
Up: 1d18h
Incoming Interface List
GigabitEthernet0/0/0/2 Flags: A, Up: 1d18h
Outgoing Interface List
GigabitEthernet0/0/0/0 Flags: F NS, Up: 1d18h
源10.1.3.1有一個MRIB條目。對該源完成時,mtrace命令會顯示不同的輸出。
RP/0/RP0/CPU0:R-10#mtrace2 ipv4 10.1.3.1 10.2.4.4 225.1.1.1 10.0.0.10
Type escape sequence to abort.
Mtrace from 10.1.3.1 to 10.2.4.4
via group 225.1.1.1
From source (?) to destination (?)
Querying full reverse path...
0 10.2.4.4
-1 10.4.9.4 PIM [10.1.3.0/24]
-2 10.8.9.9 PIM [10.1.3.0/24]
-3 10.3.8.8 PIM [10.1.3.0/24]
-4 10.1.3.3 PIM [10.1.3.0/24]
請注意,反向路徑現在是LHR4 - IR-9 - IR-8 - FHR-3。這是從FHR-3到LHR-4的源樹。該路徑與(S,G)的MRIB條目匹配。
RP/0/RP0/CPU0:FHR-3#show mrib route 225.1.1.1
IP Multicast Routing Information Base
Entry flags: L - Domain-Local Source, E - External Source to the Domain,
C - Directly-Connected Check, S - Signal, IA - Inherit Accept,
IF - Inherit From, D - Drop, ME - MDT Encap, EID - Encap ID,
MD - MDT Decap, MT - MDT Threshold Crossed, MH - MDT interface handle
CD - Conditional Decap, MPLS - MPLS Decap, EX - Extranet
MoFE - MoFRR Enabled, MoFS - MoFRR State, MoFP - MoFRR Primary
MoFB - MoFRR Backup, RPFID - RPF ID Set, X - VXLAN
Interface flags: F - Forward, A - Accept, IC - Internal Copy,
NS - Negate Signal, DP - Don't Preserve, SP - Signal Present,
II - Internal Interest, ID - Internal Disinterest, LI - Local Interest,
LD - Local Disinterest, DI - Decapsulation Interface
EI - Encapsulation Interface, MI - MDT Interface, LVIF - MPLS Encap,
EX - Extranet, A2 - Secondary Accept, MT - MDT Threshold Crossed,
MA - Data MDT Assigned, LMI - mLDP MDT Interface, TMI - P2MP-TE MDT Interface
IRMI - IR MDT Interface, TRMI - TREE SID MDT Interface, MH - Multihome Interface
(10.1.3.1,225.1.1.1) RPF nbr: 10.1.3.1 Flags: RPF
Up: 1d21h
Incoming Interface List
GigabitEthernet0/0/0/0 Flags: A, Up: 1d21h
Outgoing Interface List
GigabitEthernet0/0/0/2 Flags: F NS, Up: 1d18h
您可以將mtrace vdebug IGMP
1一起使用,以便顯示trace路徑沿途任何路由器上的mTrace資料包。mtrace v2使用UDP資料包,因此IGMP調試不能用於mtrace v2。
但是您可以集中注意IOS-XR上的mtrace v2資料包使用的UDP埠33433。
範例:
在中間路由器上調試UDP mtracev2資料包。
IR-9:
RP/0/RP0/CPU0:IR-9#show access-lists
ipv4 access-list mtracev2
10 permit udp any eq 33433 any eq 33433
RP/0/RP0/CPU0:IR-9#debug udp packet v4-access-list mtracev2 location 0/RP0/CPU0
RP/0/RP0/CPU0:IR-9#show debug
#### debug flags set from tty 'con0_RP0_CPU0' ####
udp packet flag is ON with value '0x1:0x0:0x4:mtracev2:0x0:::'
RP/0/RP0/CPU0:IR-9#RP/0/RP0/CPU0:IR-9#
RP/0/RP0/CPU0:IR-9#
RP/0/RP0/CPU0:Jun 19 07:20:13.123 UTC: syslog_dev[115]: udp[214] PID-22001: R 42469 ms LEN 60 10.4.9.4:33433 <-> 10.4.9.9:33433
RP/0/RP0/CPU0:Jun 19 07:20:13.123 UTC: syslog_dev[115]: udp[214] PID-22001:
RP/0/RP0/CPU0:Jun 19 07:20:13.139 UTC: syslog_dev[115]: udp[214] PID-22062: S 15 ms LEN 100 10.8.9.9:33433 <-> 10.8.9.8:33433
RP/0/RP0/CPU0:Jun 19 07:20:13.139 UTC: syslog_dev[115]: udp[214] PID-22062:
中繼路由器接收並傳送mtrace v2消息。
確保您知道哪些路由器是FHR和LHR。其他路由器無法完成mtrace。
如果路由器具有同步的時鐘,則由於存在時間戳,您可以測量傳播mtrace消息所需的時間。此時間僅作為指示,因為這些消息在每個躍點都被視為控制消息。
修訂 | 發佈日期 | 意見 |
---|---|---|
1.0 |
01-Jul-2024 |
初始版本 |