MBONED Working Group H. Asaeda Internet-DraftKeio UniversityNICT Intended status: Standards TrackT. Jinmei Expires: July 11, 2011 ISCW.Fenner Arastra, Inc. S. Casner Packet Design,Lee, Ed. Expires: April 25, 2013 Juniper Networks, Inc.January 7, 2011October 22, 2012 Mtrace Version 2: Traceroute Facility for IP Multicastdraft-ietf-mboned-mtrace-v2-08draft-ietf-mboned-mtrace-v2-09 Abstract This document describes the IP multicast traceroutefacility.facility, named Mtrace version 2 (Mtrace2). Unlike unicast traceroute,multicast tracerouteMtrace2 requires special implementations on the part of routers. This specification describes the required functionality in multicast routers, as well as howmanagement applications can use the router functionality.an Mtrace2 client invokes a query and receives a reply. Status of this Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire onJuly 11, 2011.April 25, 2013. Copyright Notice Copyright (c)20112012 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . .64 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . .8 3. Overview . . . .6 2.1. Definitions . . . . . . . . . . . . . . . . . . . . . . .9 4.6 3. Packet Formats . . . . . . . . . . . . . . . . . . . . . . . .10 4.1.7 3.1. Mtrace2 TLV format . . . . . . . . . . . . . . . . . . . .10 4.2.8 3.2. Defined TLVs . . . . . . . . . . . . . . . . . . . . . . .10 5.8 3.2.1. Mtrace2 QueryHeader. . . . . . . . . . . . . . . . . . . . 9 3.2.2. Mtrace2 Extended Query Block . . . .12 5.1. # hops: 8 bits. . . . . . . . . 10 3.2.3. Mtrace2 Request . . . . . . . . . . . . . .12 5.2. Multicast Address. . . . . 11 3.2.4. Mtrace2 Reply . . . . . . . . . . . . . . . .13 5.3. Source Address. . . . 11 3.2.5. IPv4 Mtrace2 Standard Response Block . . . . . . . . . 12 3.2.6. IPv6 Mtrace2 Standard Response Block . . . . . . . . .13 5.4.16 3.2.7. Mtrace2Client AddressAugmented Response Block . . . . . . . . . . . 19 4. Router Behavior . . . . . . .13 5.5. Query ID: 16 bits. . . . . . . . . . . . . . . . 20 4.1. Receiving Mtrace2 Query . . . .13 5.6. Client Port #. . . . . . . . . . . . . 20 4.1.1. Query Packet Verification . . . . . . . . .13 6. IPv4 Mtrace2 Standard Response Block. . . . . 20 4.1.2. Query Normal Processing . . . . . . . .14 6.1. MBZ: 8 bit. . . . . . . 21 4.2. Receiving Mtrace2 Request . . . . . . . . . . . . . . . . 21 4.2.1. Request Packet Verification .14 6.2. Query Arrival Time: 32 bits. . . . . . . . . . . . 21 4.2.2. Request Normal Processing . . .14 6.3. Incoming Interface Address: 32 bits. . . . . . . . . . .15 6.4. Outgoing Interface Address: 32 bits22 4.3. Forwarding Mtrace2 Request . . . . . . . . . . .15 6.5. Previous-Hop Router Address: 32 bits. . . . . 23 4.3.1. Destination Address . . . . . .15 6.6. Input packet count on incoming interface: 64 bits .. . .15 6.7. Output packet count on outgoing interface: 64 bits. . . .16 6.8. Total number of packets for this source-group pair: 64 bits. . . . 24 4.3.2. Source Address . . . . . . . . . . . . . . . . . . . . 24 4.3.3. Appending Standard Response Block . . .16 6.9. Rtg Protocol: 16 bits. . . . . . . 24 4.4. Sending Mtrace2 Reply . . . . . . . . . . .16 6.10. Multicast Rtg Protocol: 16 bits. . . . . . . 24 4.4.1. Destination Address . . . . . .16 6.11. Fwd TTL: 8 bits. . . . . . . . . . . 25 4.4.2. Source Address . . . . . . . . . .16 6.12. S: 1 bit. . . . . . . . . . 25 4.4.3. Appending Standard Response Block . . . . . . . . . . 25 4.5. Proxying Mtrace2 Query . . . . .16 6.13. Src Mask: 7 bits. . . . . . . . . . . . . 25 4.6. Hiding Information . . . . . . . .17 6.14. Forwarding Code: 8 bits. . . . . . . . . . . . 26 5. Client Behavior . . . . .17 7. IPv6 Mtrace2 Standard Response Block. . . . . . . . . . . . .19 7.1. MBZ: 8 bit. . . . . 26 5.1. Sending Mtrace2 Query . . . . . . . . . . . . . . . . . . 26 5.1.1. Destination Address .19 7.2. Query Arrival Time: 32 bits. . . . . . . . . . . . . . .20 7.3. Incoming Interface ID: 32 bits. 26 5.1.2. Source Address . . . . . . . . . . . . .20 7.4. Outgoing Interface ID: 32 bits. . . . . . . 26 5.2. Determining the Path . . . . . . .20 7.5. Local Address. . . . . . . . . . . . 26 5.3. Collecting Statistics . . . . . . . . . .20 7.6. Remote Address. . . . . . . . 27 5.4. Last Hop Router (LHR) . . . . . . . . . . . . . .20 7.7. Input packet count on incoming interface. . . . 27 5.5. First Hop Router (FHR) . . . . .20 7.8. Output packet count on outgoing interface. . . . . . . .21 7.9. Total number of packets for this source-group pair. . . .21 7.10. Rtg Protocol: 16 bits. 27 5.6. Broken Intermediate Router . . . . . . . . . . . . . . . . 27 5.7. Non-Supported Router .21 7.11. Multicast Rtg Protocol: 16 bits. . . . . . . . . . . . .21 7.12. S: 1 bit. . . . . 28 5.8. Mtrace2 Termination . . . . . . . . . . . . . . . . . . . 28 5.8.1. Arriving at Source .21 7.13. Src Prefix Len: 8 bits. . . . . . . . . . . . . . . . . 28 5.8.2. Fatal Error .21 7.14. Forwarding Code: 8 bits. . . . . . . . . . . . . . . . .21 8. Mtrace2 Augmented Response Block. . . 28 5.8.3. No Upstream Router . . . . . . . . . . . .22 9. Router Behavior. . . . . . 28 5.8.4. Reply Timeout . . . . . . . . . . . . . . . . .23 9.1. Receiving Mtrace2 Query. . . 28 5.9. Continuing after an Error . . . . . . . . . . . . . .23 9.1.1. Packet Verification. . 28 6. Protocol-Specific Considerations . . . . . . . . . . . . . . .23 9.1.2. Normal Processing . . . . .29 6.1. PIM-SM . . . . . . . . . . . . .23 9.1.3. Mtrace2 Query Received by Non-Supported Router. . . .23 9.2. Receiving Mtrace2 Request. . . . . . . . . 29 6.2. Bi-Directional PIM . . . . . . .24 9.2.1. Packet Verification. . . . . . . . . . . . . 29 6.3. PIM-DM . . . .24 9.2.2. Normal Processing. . . . . . . . . . . . . . . . . .24 9.2.3. Mtrace2 Request Received by Non-Supported Router. . .26 9.3. Forwarding Mtrace2 Request. 30 6.4. IGMP/MLD Proxy . . . . . . . . . . . . . . .26 9.3.1. Destination Address. . . . . . . 30 7. Problem Diagnosis . . . . . . . . . .26 9.3.2. Source Address. . . . . . . . . . . . 30 7.1. Forwarding Inconsistencies . . . . . . . .26 9.4. Sending Mtrace2 Reply. . . . . . . . 30 7.2. TTL or Hop Limit Problems . . . . . . . . . .27 9.4.1. Destination Address. . . . . . 30 7.3. Packet Loss . . . . . . . . . . .27 9.4.2. Source Address. . . . . . . . . . . . 30 7.4. Link Utilization . . . . . . . .27 9.5. Proxying Mtrace2 Query. . . . . . . . . . . . . 31 7.5. Time Delay . . . . .27 9.6. Hiding Information. . . . . . . . . . . . . . . . . . . 31 8. IANA Considerations .28 10. Client Behavior. . . . . . . . . . . . . . . . . . . . 32 8.1. Forwarding Codes . . .29 10.1. Sending Mtrace2 Query. . . . . . . . . . . . . . . . . .29 10.1.1.32 8.2. UDP DestinationAddress . . . . . . . . . . . . . . . . . 29 10.1.2. Source Address . . . . . . . . . . . . . . . . . . . . 29 10.2. Determining the Path . .Port . . . . . . . . . . . . . . . . .29 10.3. Collecting Statistics. . 32 9. Security Considerations . . . . . . . . . . . . . . . .29 10.4. Last Hop Router. . . 32 9.1. Addresses in Mtrace2 Header . . . . . . . . . . . . . . . 32 9.2. Topology Discovery . . .29 10.5. First Hop Router. . . . . . . . . . . . . . . . . 32 9.3. Characteristics of Multicast Channel . . . .30 10.6. Broken Intermediate Router. . . . . . . 32 9.4. Limiting Query/Request Rates . . . . . . . . .30 10.7. Mtrace2 Termination. . . . . . 33 9.5. Limiting Reply Rates . . . . . . . . . . . . .30 10.7.1. Arriving at source. . . . . . 33 10. Acknowledgements . . . . . . . . . . . .30 10.7.2. Fatal error. . . . . . . . . . . 33 11. References . . . . . . . . . .30 10.7.3. No previous hop. . . . . . . . . . . . . . . . 33 11.1. Normative References . . .30 10.7.4. Traceroute shorter than requested. . . . . . . . . .30 10.8. Continuing after an error. . . . . . 33 11.2. Informative References . . . . . . . . . .31 11. Protocol-Specific Considerations. . . . . . . . 34 Authors' Addresses . . . . . . .32 11.1. PIM-SM. . . . . . . . . . . . . . . . .. . . . . . . . . 32 11.2. Bi-Directional PIM . . . . . . . . . . . . . . . . . . . . 32 11.3. PIM-DM . . . . . . . . . . . . . . . . . . . . . . . . . . 32 11.4. IGMP/MLD Proxy . . . . . . . . . . . . . . . . . . . . . . 32 11.5. AMT . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 12. Problem Diagnosis . . . . . . . . . . . . . . . . . . . . . . 34 12.1. Forwarding Inconsistencies . . . . . . . . . . . . . . . . 34 12.2. TTL or Hop Limit Problems . . . . . . . . . . . . . . . . 34 12.3. Packet Loss . . . . . . . . . . . . . . . . . . . . . . . 34 12.4. Link Utilization . . . . . . . . . . . . . . . . . . . . . 35 12.5. Time Delay . . . . . . . . . . . . . . . . . . . . . . . . 35 13. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 36 13.1. Forwarding Codes . . . . . . . . . . . . . . . . . . . . . 36 13.2. UDP Destination Port and IPv6 Address . . . . . . . . . . 36 14. Security Considerations . . . . . . . . . . . . . . . . . . . 37 14.1. Topology Discovery . . . . . . . . . . . . . . . . . . . . 37 14.2. Traffic Rates . . . . . . . . . . . . . . . . . . . . . . 37 14.3. Limiting Query/Request Rates . . . . . . . . . . . . . . . 37 15. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 38 16. References . . . . . . . . . . . . . . . . . . . . . . . . . . 39 16.1. Normative References . . . . . . . . . . . . . . . . . . . 39 16.2. Informative References . . . . . . . . . . . . . . . . . . 39 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 4134 1. Introduction Given a multicast distribution tree, tracing from a multicast source to a receiver is difficult, since we do not know which branch of the multicast tree the receiver lies. This means that we have to flood the whole tree to find the path from a source to a receiver. On the other hand, walking up the tree from a receiver to a source is easy, as most existing multicast routing protocols know the upstream router for each source. Tracing from a receiver to a source can involve only the routers on the direct path. This document specifies the multicast traceroute facility namedmtraceMtrace version 2 ormtrace2.Mtrace2 which allows the tracing of an IP multicast routingpaths.path. Mtrace2 is usually initiated from a Mtrace2 client towards a specified source, or a Rendezvous Point (RP) if no source address is specified. RP is a special router where the source and receiver meet in PIM-SM [1]. Moreover, Mtrace2 provides additional informationaboutsuch as the packet rates and losses,oras well as other diagnosis information.For instance, mtrace2 isEspecially, Mtrace2 can be used for the followingpurposes.purposes: o To trace the path that a packet would take fromsomea source tosome destination.a receiver. o To isolate packet loss problems (e.g., congestion). o To isolate configuration problems (e.g., TTL threshold). Figure 1 shows a typical case on how Mtrace2consists of the client and router programs. The mtrace2 client programisinvoked from somewhere inused. FHR represents themulticast tree, on a host,first-hop router,or proxy such as IGMP/MLD proxy [8]. TheLHR represents the last-hop router, and the arrow lines represent the Mtrace2 messages that are sent from one nodeinvokingto another. The numbers before theprogram is calledMtrace2 messages represent themtrace2 client.sequence of the messages that would happen. Source, Receiver and Mtrace2 client are typically a host on the Internet. 2. Request 2. Request +----+ +----+ | | | | v | v | +--------+ +-----+ +-----+ +----------+ | Source |----| FHR |----- Themtrace2Internet -----| LHR |----| Receiver | +--------+ +-----+ | +-----+ +----------+ \ | ^ \ | / \ | / \ | / 3. Reply \ | / 1. Query \ | / \ | / \ +---------+ / v | Mtrace2 |/ | clientprogram creates| +---------+ Figure 1 When an Mtrace2 client initiates a multicast trace anywhere on themtrace2Internet, it sends an Mtrace2 Querymessage, which includespacket to the LHR for asource andmulticastaddress specified bygroup and a source address. The LHR turns theclient,Query packet into a Request, appends a standard response block containing its interface addresses and packet statistics to the Request packet, then forwards themessagepacket towards the source. The Request packet is either unicasted to itsneighborupstream routeror proxy. This initiates a trace of a multicast routing path from the client towardtowards thespecifiedsource, or multicasted to the group ifno sourcethe upsteam router's IP address isspecified, toward a core router if such a router exists.not known. Inthe case of PIM-SM [6], the core router is an RP maintaining the specified multicast address. Whena similar fashion, each routeror proxy receives an mtrace2 Query message and hasalong thecorresponding routing state regardingpath to the sourceand multicast addresses specified in the Query, the router or proxy invokes the mtrace2 router program. The mtrace2 router program creates an mtrace2 Request message correspondingappends a standard response block to thequery and forwardsend of the Requesttoward the specified source or the corepacket before forwarding it to its upstream router. Whena first-hop router or proxy (a single hop from the source specified in the request) orthecore routerFHR receivesan mtrace2 Query orthe Requestmessage,packet, it appends its own standard response block, turns therouter or proxy invokesRequest packet into a Reply, and unicasts themtrace2 router program. The mtrace2 router program creates an mtrace2Replymessage.back to the Mtrace2 client. The Mtrace2 Replymessagemay be returned before reaching the FHR if it reaches the RP first, or a fatal error condition such as "no route" isforwarded toencountered along themtrace2 client, thus completingpath, or themtrace2 Request.hop count is exceeded. Themtrace2Mtrace2 clientprogramwaits for themtrace2Mtrace2 Reply message and displays the results. When not receiving anmtrace2Mtrace2 Reply messagedoes not comedue to network congestion, a broken router (see Section10.6)5.6), or anon-respondingnon- responding router (see Section10.8),5.7), themtrace2Mtrace2 clientprogram canmay resendan mtrace2another Mtrace2 Query with a lower hop count (see Section5.1)3.2.1), and repeat the process until it receives anmtrace2Mtrace2 Reply message. Themtrace2details are Mtrace2 clientshould also be aware that the mtrace2 Query may follow the control path on the routers, inspecific, and it is outside thecasescope of this document. Note that when a router's control plane and forwarding plane arenot synchronized, e.g., a buggy implementation. In this case, mtrace2out of sync, the Mtrace2 Requestswillmight be forwardedtoward the specified source orbased on thecore router becausecontrol states instead. In which case, therouter doestraced path might nothave any forwarding state forrepresent thequery. The mtrace2real path the data packets would follow. Mtrace2 supports both IPv4 andIPv6 multicast traceroute facility. The protocol design, concept, and program behavior are same between IPv4 and IPv6 mtrace2. While the original IPv4 multicast traceroute, mtrace,IPv6. Unlike the previous version of Mtrace, which implements its query and responsemessages are implementedas IGMP messages[10],[8], allmtrace2Mtrace2 messages arecarried on UDP. TheUDP-based. Although the packet formats of IPv4 and IPv6mtrace2Mtrace2 are different because of thedifferentaddress families,butthe syntax between them is similar. 2. TerminologyTheIn this document, the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALLNOT","SHOULD",NOT", "SHOULD", "SHOULD NOT","RECOMMENDED","MAY","RECOMMENDED", "MAY", and "OPTIONAL"in this documentare to be interpreted as described in RFC 2119[1].[2], and indicate requirement levels for compliant Mtrace2 implementations. 2.1. Definitions Sincemulticast traceroutesMtrace2 Queries and Requests flow in the opposite direction to the data flow, we refer to "upstream" and "downstream" with respect to data, unless explicitly specified. Incominginterface:interface The interface on whichtrafficdata is expected to arrive from the specified source and group. Outgoinginterface:interface The interfaceonto whichtraffic is forwardeddata from the source or RP is expected to transmit for the specified source andgroup toward the destination.group. It is also the interface on which themtrace2 Query orMtrace2 Requestwaswill be received.Previous-hop router: TheUpstream routerthat is on the link attachedThe router, connecting to the Incoming interfaceandof the current router, which is responsible for forwardingtrafficdata for the specified source andgroup. Last-hop router:group to the current router. First-hop router (FHR) The router that isondirectly connected to thelink attachedsource the Mtrace2 Query specifies. Last-hop router (LHR) The router that is directly connected to theOutgoing interface andreceivers. It is also the router that receives themtrace2Mtrace2 Query fromthe adjacent mtrace2an Mtrace2 client. Groupstate:state It is the statein whicha shared-treeprotocol (e.g.,protocol, such as PIM-SM[6]) running on a router chooses[1], uses to choose theprevious-hopupstream routertowardtowards thecore router or Rendezvous Point (RP) as its parent router.RP for the specified group. In this state, source-specific state is not available for the correspondingmulticastgroup address on the router. Source-specificstate:state It is the statein which a routing protocol running on a router choosesthat is used to choose the paththat would be followedtowards the source fora source-specific join. ALL-[protocol]-ROUTERS.MCAST.NET:the specified source and group. ALL-[protocol]-ROUTERS.MCAST.NET It is adedicatedlink-local multicast address foramulticastrouterrouters to communicate withothertheir adjacent routers that areworking withrunning the same routing protocol. For instance, the address ofALL-PIM-ROUTERS.MCAST.NET [6]ALL-PIM- ROUTERS.MCAST.NET [1] is '224.0.0.13' for IPv4 and 'ff02::d' for IPv6. 3.Overview Given a multicast distribution tree, tracing from a source to a multicast destination is hard, since you do not know down which branch ofPacket Formats This section describes themulticast treedetails of thedestination lies. This means that you have to floodpacket formats for Mtrace2 messages. All Mtrace2 messages are encoded in TLV format (see Section 3.1). If an implementation receives an unknown TLV, it SHOULD ignored and silently discarded thewhole tree to findunknown TLV. If thepath from one source to one destination. However, walking uplength of a TLV exceeds thetree from destination to source is easy, as most existing multicast routing protocols knowlength specified in theprevious hop for each source. Tracing from destination to source can involve only routers onTLV, thedirect path. The party requestingTLV SHOULD be accepted; however, any additional data after themulticast traceroute sends a tracerouteTLV SHOULD be ignored. All Mtrace2 messages are UDP packets. For IPv4, Mtrace2 Query and Request messages MUST NOT be fragmented. For IPv6, the packettosize for thelast-hop multicast routerMtrace2 messages MUST NOT exceed 1280 bytes, which is the smallest MTU for an IPv6 interface [3]. The source port is uniquely selected by thegiven multicast address.local host operating system. Thelast-hop router turnsdestination port is theQuery intoIANA reserved Mtrace2 port number (see Section 8). All Mtrace2 messages MUST have aRequest packet by changing the packet typevalid UDP checksum. Additionally, Mtrace2 supports both IPv4 andadding a response data block containing its interfaceIPv6, but not mixed. For example, if an Mtrace2 Query or Reply message arrives in as an IPv4 packet, all addressesand packet statistics, and then forwardsspecified in theRequest packet via unicastMtrace2 messages MUST be IPv4 as well. Same rule applies to IPv6 Mtrace2 messages. 3.1. Mtrace2 TLV format 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 | Value .... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Type: 8 bits Describes therouter that the last- hop router believes is the proper previous hop forformat of thegiven source and group. Each hop adds its response data toValue field. For all theendavailable types, please see Section 3.2 Length: 16 bits Length of Type, Length, and Value fields in octets. Minimum length required is 6 octets. The maximum TLV length is not defined; however theRequest packet, then unicast forwards it toentired Mtrace2 packet length should not exceeed theprevious hop.available MTU. Value: variable length Thefirst-hop router (the router that believes that packets from the source originateformat is based onone of its directly connected networks) changes the packet type to indicate a Reply packet and sendsthecompleted Reply toType value. The length of themtrace2 client address specifiedvalue field is Length field minus 3. All reserved fields in theQuery header. The Reply mayValue field MUST bereturned before reaching the first-hop router if a fatal error condition suchtransmitted as"no route" is encountered along the pathzeros and ignored on receipt. 3.2. Defined TLVs The following TLV Types are defined: Code Type ==== ================================ 0x01 Mtrace2 Query 0x02 Mtrace2 Request 0x03 Mtrace2 Reply 0x04 Mtrace2 Standard Response Block 0x05 Mtrace2 Augmented Response Block 0x06 Mtrace2 Extended Query Block Each Mtrace2 message MUST begin with either a Query, Request orhop count is exceeded. Multicast traceroute uses any information available to it inReply TLV. The first TLV determines therouter to attempt to determinetype of each Mtrace2 message. Following this TLV, there can be aprevious hop to forwardsequence of optional Extended Query Blocks. In thetrace towards. Multicast routing protocols vary incase of thetypeRequest andamount of state they keep; multicast traceroute endeavors to work with all of them by using whateverReply message, it isavailable. For example, ifthen followed by aPIM-SMsequence of Standard Response Blocks, each from a multicast routerison the(*,G) tree, it chooses the parentpath towards theRP assource or theprevious hop.RP. Inthese cases, no source/group-specific state is available, butthepath may still be traced. 4. Packet Formats The mtrace2 messagecase more information iscarried asneeded, aUDP packet. The destination address of mtrace2 Query messages is either the last-hop router unicast address or multicast address if the mtrace2 client does not know the proper last-hop router address. The destination address of mtrace2 Report messages is the address specified in Previous-Hop Router Address field in the last appended mtrace2Standard ResponseBlock, which is either the previous-hop router unicast addressBlock can be followed by one ormulticast address. Detailedmultiple Augmented Response Blocks. We will describe each message type inSection 9.3.details in the next few sections. 3.2.1. Mtrace2messageQuery An Mtrace2 query isencoded in TLV format. Ifusually originated by animplementation receives a TLV whose length exceedsMtrace2 client which sends an Mtrace2 Query message to theTLV length specified inLHR. When tracing towards theLength field,source or theTLV SHOULD be accepted but any additional data SHOULD be ignored. If an implementation receives a TLV whose type value is unknown,RP, the intermediate routers MUST NOT modify themtrace2Query messageSHOULD be ignored and silently dropped. 4.1.except the Type field. An Mtrace2TLV formatQuery message is shown as follows: 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 |Value ....# Hops | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Type (8 bits) Length (16 bits) Value (variable length) 4.2. Defined TLVs The following TLV Types are defined: Code Type ====== ====================================== 1| | | Multicast Address | | | +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ | | | Source Address | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Mtrace2 Client Address | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Query ID | Client Port # | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 2 # Hops: 8 bits This field specifies the maximum number of hops that the Mtrace2Request 3client wants to trace. If there are some error conditions in the middle of the path that prevent an Mtrace2 Reply4 Mtrace2 Standard Response Block 5 Mtrace2 Augmented Response Block An mtrace2 message MUST contain exactly onefrom being received by the client, the client MAY issues another Mtrace2 Queryheader. A multicast router that sends an mtrace2 Request orwith the lower number of hops until it receives a Replymessage MUST add one mtrace2 Standard Response block to given mtrace2 message but MUST NOT add multiple mtrace2 Standard Response blocks to it. A multicast router that adds one mtrace2 Standard Response block to given mtrace2 message MAY append onefrom the FHR. Multicast Address: 32 bits ormultiple Augmented Response blocks. The TLV type128 bits This fieldis definedspecifies an IPv4 or IPv6 address, which can be either: m-1: a multicast group address to be"0x1" and "0x2" for mtrace2 Queries and Requests, respectively. An mtrace2 message containingtraced; or, m-2: all 1's in case of IPv4 or thetype "0x1" is an mtrace2 Query. Itunspecified address (::) in case of IPv6 if no group-specific information issent bydesired. Source Address: 32 bits or 128 bits This field specifies anmtrace2 querier (i.e.,IPv4 or IPv6 address, which can be either: s-1: anmtrace2 client). It is changedunicast address of the source to"0x2" bybe traced; or, s-2: all 1's in case of IPv4 or theproper last-hop router. The type fieldunspecified address (::) in case of IPv6 if no source-specific information ischanged to "0x3" whendesired. For example, thepacketclient iscompleted and sent astracing a (*,g) group state. Note that it is invalid to have a source-group combination of (s-2, m-2). If a router receives such combination in anmtrace2 Reply fromMtrace2 Query, it MUST silently discard thefirst-hop router toQuery. Mtrace2 Client Address: 32 bits or 128 bits This field specifies thequerier. 5.Mtrace2Query Header The mtrace2 supports bothclient's IPv4 address or IPv6 global address. This address MUST be a valid unicast address, andIPv6. If the mtrace2 Querytherefore, MUST NOT be all 1's orReply arrives inanIPv4 packet, all addresses specified in the mtrace2 messages must be with IPv4 addresses.unspecified address. Themtrace2 messageMtrace2 Reply will be sent to this address. Query ID: 16 bits This field iscarriedused as aUDP packet. The UDP source port is uniquely selected byunique identifier for this Mtrace2 Query so that duplicate or delayed Reply messages may be detected. Client Port #: 16 bits This field specifies thelocal host operating system. The UDPdestinationport is the IANA reserved mtrace2UDP port number(see Section 13). The UDP checksum MUSTfor receiving the Mtrace2 Reply packet. 3.2.2. Mtrace2 Extended Query Block There may be a sequence of optional Extended Query Blocks that follow an Mtrace2 Query to further specify any information needed for the Query. For example, an Mtrace2 client might bevalidinterested inmtrace2 messages. The mtrace2 message includestracing thecommon mtrace2 Query headerpath the specified source and group would take based on a certain topology. In which case, the client can pass in the multi-topology ID asfollows.the Value for an Extended Query Type (see below). TheheaderExtended Query Type isonly filled in by the originator ofextensible and themtrace2 Query; intermediate routers MUST NOT modify anybehavior of thefields.new types will be addressed by seperate documents. The Mtrace2 Extended Query Block is formatted as follows: 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+-+-+-+-+-+-+-+-+ | # hops | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Multicast Address | | | +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ | | | Source Address | | |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length |Mtrace2 Client Address | | |MBZ |T| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Extended QueryIDType |Client Port #Value .... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Figure 1 5.1. # hops: 8MBZ: 7 bits This fieldspecifies the maximum number of hops that the mtrace2 client wants to trace.must be zeroed on transmission and ignored on reception. T-bit (Transitive Attribute): 1 bit Ifthere is some error condition in the middle ofthepath that prevents an mtrace2 Reply from being receivedTLV type is unrecognized by theclient, the client issues another mtrace2 Query with the lower number of hops until it receives a Reply from the first-hop router. 5.2. Multicast Address This field specifies the 32 bits length IPv4 or 128 bits length IPv6 multicast address to be traced, orreceiving router, then this TLV isfilled with "all 1" in case of IPv4either discarded or forwarded along with theunspecified address (::) in caseQuery, depending on the value ofIPv6 if no group-specific informationthis bit. If this bit is set, then the router MUST forward this TLV. If this bit isdesired. Note that non-group-specific mtrace2clear, the router MUSTspecify source address. 5.3. Source Addresssend an mtrace2 Reply with an UNKNOWN_QUERY error. Extended Query Type: 16 bits This field specifies the32 bits length IPv4 or 128 bits length IPv6 addresstype of themulticast source forExtended Query Block. Value: 16 bits This field specifies thepath being traced, or is filled with "all 1" in casevalue ofIPv4 or with the unspecified address (::) in casethis Extended Query. 3.2.3. Mtrace2 Request The format ofIPv6 if no source-specific information such as a trace for RPT in PIM-SMan Mtrace2 Request message isdesired. Note that non-source-specific traceroutes may not be possible with certain multicast routing protocols. 5.4.similar to an Mtrace2Client Address ThisQuery except the Type fieldspecifiesis 0x02. When a LHR receives an Mtrace2 Query message, it would turn the32 bits length IPv4 or 128 bits length IPv6 global addressQuery into a Request by changing the Type field of themtrace2 client.Query from 0x01 to 0x02. Thetrace starts at this client address and proceeds towardLHR would then append an Mtrace2 Standard Response Block (see Section 3.2.5) of its own to thetraffic source. 5.5.Request message before sending it upstream. The upstream routers would do the same without changing the Type field until one of them is ready to send a Reply. 3.2.4. Mtrace2 Reply The format of an Mtrace2 Reply message is similar to an Mtrace2 QueryID: 16 bits Thisexcept the Type field isused as0x03. When aunique identifier for this mtrace2FHR or a RP receives an Mtrace2 Request message which is destined to itself, it would append an Mtrace2 Standard Response Block (see Section 3.2.5) of its own to the Request message. Next, it would turn the Request message into a Reply by changing the Type field of the Requestso that duplicate or delayed Replies may be detected. 5.6. Client Port # Mtrace2from 0x02 to 0x03. The Replyis sent backmessage would then be unicated to theaddressMtrace2 client specified inanthe Mtrace2 Client Address field.This field specifies the UDP portThere are a numbertheof cases an intermediate routerwill send Mtrace2 Reply. This client port number MUST NOT be changed by any router. 6.might return a Reply before a Request reaches the FHR or the RP. See Section 4.1.1, Section 4.2.2, Section 4.3.3, and Section 4.5 for more details. 3.2.5. IPv4 Mtrace2 Standard Response BlockEach intermediate IPv4 router in a trace path appends "response data block" toThis section describes theforwarded trace packet.message format of an IPv4 Mtrace2 Standard Response Block. Thestandard response data block looks as follows.Type field is 0x04. 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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Previous-HopUpstream 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| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+6.1.MBZ: 8bit Mustbits This field must be zeroed on transmission and ignored on reception.6.2.Query Arrival Time: 32 bits The Query Arrival Time is a 32-bit NTP timestamp specifying the arrival time of themtrace2Mtrace2 Query or Request packet at this router. The32- bit32-bit form of an NTP timestamp consists of the middle 32 bits of the full 64-bit form; that is, the low 16 bits of the integer part and the high 16 bits of the fractional part. The following formula converts from a UNIX timeval to a 32-bit NTP timestamp: query_arrival_time = (tv.tv_sec + 32384) << 16 + ((tv.tv_usec << 10) / 15625) The constant 32384 is the number of seconds from Jan 1, 1900 to Jan 1, 1970 truncated to 16 bits. ((tv.tv_usec << 10) / 15625) is a reduction of ((tv.tv_usec / 100000000) << 16).However, mtrace2Note that Mtrace2 does not requiresynchronizing NTP timestamp amongall the routersalong pathson the path to have synchronized clocks in order to measure one-way latency.The use ofAdditionally, Query Arrival Time is usefulto measurefor measuring thepackets per second (PPS). Supposepacket rate. For example, suppose that a client issues twoqueries Q1 and Q2,queries, and the corresponding requests R1 and R2 arrive at router X att1time T1 andt2,T2, then the client would be able tocalculatecompute thePPS atpacket rate on router X by using the packet countresults at t1information stored in the R1 andt2. 6.3.R2, and the time T1 and T2. Incoming Interface Address: 32 bits This field specifies the address of the interface on which packets fromthisthe sourceand groupor the RP are expected to arrive, or 0 if unknown or unnumbered.6.4.Outgoing Interface Address: 32 bits This field specifies the address of the interface on which packets fromthisthe sourceand group flowor the RP are expected to transmit towards thespecified destination,receiver, or 0 if unknown or unnumbered.6.5. Previous-HopThis is also the address of the interface on which the Mtrace2 Query or Request arrives. Upstream Router Address: 32 bits This field specifies the address of the upstream router from which this router expects packets from this source. This may be a multicast group (e.g.ALL- [protocol]-ROUTERS.MCAST.NET)ALL-[protocol]-ROUTERS.MCAST.NET) if theprevious hopupstream router is not known because of the workings of the multicast routing protocol. However, it should be 0 if the incoming interface address is unknown or unnumbered.6.6.Input packet count on incoming interface: 64 bits This field contains the number of multicast packets received for all groups and sources on the incoming interface, or"all 1"all 1's if no count can be reported. This counter may have the same value as ifHCInMulticastPkts from the IF-MIB[12][9] for this interface.6.7.Output packet count on outgoing interface: 64bitsbit This field contains the number of multicast packets that have been transmitted or queued for transmission for all groups and sources on the outgoing interface, or"all 1"all 1's if no count can be reported. This counter may have the same value as ifHCOutMulticastPkts from theIF- MIBIF-MIB [9] for this interface.6.8.Total number of packets for this source-group pair: 64 bits This field counts the number of packets from the specified source forwarded bythisthe router to the specified group, or"all 1"all 1's if no count can be reported. If the S bit isset,set (see below), the count is for the source network, as specified by the Src Maskfield.field (see below). If the S bit is set and the Src Mask field is 63, indicating no source-specific state, the count is for all sources sending to this group. This counter should have the same value as ipMcastRoutePkts from the IPMROUTE-STD-MIB[13][10] for this forwarding entry.6.9.Rtg Protocol: 16 bits This field describes therouting protocolunicast routing protocol running between this router and the upstream router, and it is used todecide andetermine the RPF interface for therequested source.specified source or RP. This value should have the same value as ipMcastRouteRtProtocol from the IPMROUTE-STD-MIB[13][10] for this entry. If the router is not able to obtain this value,"all 0"all 0's must be specified.6.10.Multicast Rtg Protocol: 16 bits This field describes the multicast routing protocol in use betweenthisthe router and theprevious-hopupstream router. This value should have the same value as ipMcastRouteProtocol from the IPMROUTE-STD-MIB[13][10] for this entry. If the routerdoes not able tocannot obtain this value,"all 0"all 0's must be specified.6.11.Fwd TTL: 8 bits This field contains the TTLthat ain which an Mtrace2 Request packetis required to have before it willcan be forwardedovertowards theoutgoing interface. 6.12.source or the RP. S: 1 bitThis SIf this bit is set, it indicates that the packet count for the source-group pair is for the source network, as determined by masking the source address with the Src Mask field.6.13.Src Mask: 7 bits This field contains the number of 1's in the netmaskthisthe router has for the source (i.e. a value of 24 means the netmask is 0xffffff00). If the router is forwarding solely on group state, this field is set to 127 (0x7f).6.14.Forwarding Code: 8 bits This field contains a forwarding information/error code. Section9.2 explains4.1 and Section 4.2 will explain how and when theforwarding codeForwarding Code is filled. Defined values are asfollows;follows: Value Name Description ----- ------------------------------------------------------------------------------------------------------- 0x00 NO_ERROR No error 0x01 WRONG_IF Mtrace2 Request arrived on an interface to which this router would not forward forthis source, group, destination.the specified group towards the source or RP. 0x02 PRUNE_SENT This router has sent a prune upstream which applies to the source and group in themtrace2Mtrace2 Request. 0x03 PRUNE_RCVD This router has stopped forwarding for this source and group in response to a request from thenext hopdownstream router. 0x04 SCOPED The group is subject to administrative scoping at thishop.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 properlast-hop router.LHR. 0x07 NOT_FORWARDING This router is not forwarding thissource,source and group out the outgoing interface for an unspecified reason. 0x08 REACHED_RP Reached the RendezvousPoint or CorePoint. 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 which 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 themtrace2 querier 0x81 NO_SPACE There was not enough room to insert another response data block in the packet. 0x82 ADMIN_PROHIBMtrace2is administratively prohibited. Note that ifclient. 0x0D UNKNOWN_QUERY A non-transitive Extended Query Type was received by a routerdiscovers there iswhich does notenough room in a packet to insert its response, it puts the NO_SPACE code value in the previous router's Forwarding Code field, overwriting any error the previous router placed there. After the router sends the Reply to the Mtrace2 Client Address in the header, the router continues the mtrace2 Query by sending an mtrace2 Request containing the same mtrace2 Query header. Section 9.3 and Section 10.8 includesupport thedetails. Thetype. 0x80bit of the Forwarding Code is used to indicate a fatal error.FATAL_ERROR A fatal error is one where the router may know theprevious hopupstream router but cannot forward the message to it.7. IPv6 Mtrace20x81 NO_SPACE There was not enough room to insert another Standard Response BlockEach intermediate IPv6 routerina trace path appends "response data block" totheforwarded tracepacket. 0x83 ADMIN_PROHIB Mtrace2 is administratively prohibited. 3.2.6. IPv6 Mtrace2 Standard Response Block This section describes the message format of an IPv6 Mtrace2 Standard Response Block. Thestandard response data block looks as follows.Type field is also 0x04. 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 ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Outgoing Interface ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | * Local Address * | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | * Remote 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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MBZ 2 |S|Src Prefix Len |Forwarding Code| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+7.1.MBZ: 8bit Mustbits This field must be zeroed on transmission and ignored on reception.7.2.Query Arrival Time: 32 bits Same definitiondescribedas inSection 6.2 7.3.IPv4. Incoming Interface ID: 32 bits This field specifies the interface ID on which packets fromthisthe sourceand groupor RP are expected to arrive, or 0 if unknown. This ID should be the value taken from InterfaceIndex of the IF-MIB[12][9] for this interface.This field is carried in network byte order. 7.4.Outgoing Interface ID: 32 bits This field specifies the interface IDonto which packets fromthisthe sourceand group flowor RP are expected tothe specified destination,transmit, or 0 if unknown. This ID should be the value taken from InterfaceIndex of the IF-MIB [9] for thisinterface. This field is carried in network byte order. 7.5.interface LocalAddressAddress: 128 bits This field specifies a global IPv6 address that uniquely identifies the router.AAn unique local unicast address [11] SHOULD NOT be used unless the router is only assigned link-local and unique local addresses. If the router is only assignedlink-locallink- local addresses, its link-local address can be specified in this field.7.6.RemoteAddressAddress: 128 bits This field specifies the address of theprevious-hopupstream router, which, in most cases, is a link-local unicast address for thequeried source and destination addresses.upstream router. Although a link-local address does not have enough information to identify a node, it is possible to detect theprevious-hopupstream router with the assistance of Incoming Interface ID and the current router address (i.e., Local Address).ThisNote that this may be a multicast group (e.g., ALL-[protocol]- ROUTERS.MCAST.NET) if theprevious hopupstream router is not known because of the workings ofthea multicast routing protocol. However, it should be the unspecified address (::) if the incoming interface address is unknown.7.7.Input packet count on incominginterfaceinterface: 64 bits Same definitiondescribedas inSection 6.6 7.8.IPv4. Output packet count on outgoinginterfaceinterface: 64 bits Same definitiondescribedas inSection 6.7 7.9.IPv4. Total number of packets for this source-grouppair This field counts the number of packets from the specified source forwarded by this router to the specified group, or "all 1"pair: 64 bits Same definition as in IPv4, except ifno count can be reported. Ifthe S bit isset,set (see below), the count is for the source network, as specified by the Src Prefix Len field. If the S bit is set and the Src Prefix Len field is 255, indicating nosource- specificsource-specific state, the count is for all sources sending to this group. This counter should have the same value as ipMcastRoutePkts from the IPMROUTE-STD-MIB [10] for this forwarding entry.7.10.Rtg Protocol: 16 bits Same definitiondescribedas inSection 6.9 7.11.IPv4. Multicast Rtg Protocol: 16 bits Same definitiondescribedas inSection 6.10 7.12.IPv4. MBZ 2: 15 bits This field must be zeroed on transmission and ignored on reception. S: 1 bitThis S bit indicates that the packet count for the source-group pair is for the source network,Same definition asdetermined by masking the source address within IPv4, except the Src Prefix Lenfield. 7.13.field is used to mask the source address. Src Prefix Len: 8 bits This field contains the prefix length this router has for the source. If the router is forwarding solely on group state, this field is set to 255(0xff) 7.14.(0xff). Forwarding Code: 8 bits Same definitiondescribedas inSection 6.14 8.IPv4. 3.2.7. Mtrace2 Augmented Response Block In addition to thestandard response block,Standard Response Block, a multicast router on the traced pathwill be able tocan optionally add"augumented response block" when it sendsone or multiple Augmented Response Blocks before sending themtrace2Request to its upstreamrouter or sends the Reply to the Mtrace2 Client Address. This augmented response blockrouter. The Augmented Response Block is flexibleto addfor variousinformation.purposes such as providing diagnosis information (see Section 7) and protocol verification. It's Type field is 0x05, and its format is as follows: 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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Augmented Response Type | Value .... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+The augmented response block is always appended to mtrace2 TLV header (0x04). TheMBZ: 8 bits This field must be zeroed on transmission and ignored on reception. Augmented Response Type: 16 bitsType filed ofThis field specifies theaugmented response block is defined fortype of variouspurposes, suchresponses from a multicast router that might need to communicate back to the Mtrace2 client as well asdiagnosis (as in Section 12) and protocol verification. The packet length oftheaugmented response block is specified inmulticast routers on theaugmented response block TLV header as seen in Section 4.1.traced path. Thefollowing augmented response block typeAugmented Response Type isdefined:defined as follows: Code Type====== ===================================================== =============================================== 0x01 #Mtrace2of the returned Standard Response BlocksReturnedWhen the NO_SPACE erroroccurs,occurs on a router, the routersends back the mtrace2 Reply with contained data (i.e., all appended response blocks), and continuesshould send themtrace2 Query by sending an mtrace2original Mtrace2 Request received from the downstream router aswill be described in Section 9.3.a Reply back to the Mtrace2 client, and continue with a new Mtrace2 Request. Inthis mtrace2the new Request, the routerappends the augmented response blockwould add a Standard Response Block followed by an Augmented Response Block with 0x01 as thecode "0x01"Augmented Response Type, and the number of the returnedmtrace2 response blocks. Every router between this router andMtrace2 Standard Response Blocks as thefirst-hopValue. Each upstream routercanwould recognize thelimittotal number of hops the Request has been traced so far byreferringadding this number and the# hopsnumber of the Standard Response Block in theheader.current Request message. This document only definesthe above augmented response block type and does not define other augmented response block types. Specifingone Augmented Response Type in the Augmented Response Block. The description on how todeal withprovide diagnosis information using the Augmented Response Block is out of the scope of this document, and will bealso describedaddressed in separate documents.9. Router Behavior AllValue: variable length The format is based on the Augmented Response Type value. The length ofthese actions are performed in addition to (NOT instead of) forwardingthepacket, if applicable. E.g. a multicast packet that has TTL orvalue field is Length field minus 6. 4. Router Behavior This section describes thehop limit remaining MUST be forwarded normally, as MUST a unicast packet that has TTL orrouter behavior in thehop limit remaining and is not addressed to this router. 9.1.context of Mtrace2 in details. 4.1. Receiving Mtrace2 Query Anmtrace2Mtrace2 Query message is anmtrace2Mtrace2 message with no response blocks filled in, and uses TLV type0x1 for IPv4 and IPv6 mtrace2. 9.1.1.of 0x01. 4.1.1. Query Packet Verification Upon receiving anmtrace2Mtrace2 Query message, a router MUST examine whether the Multicast Address and the Source Address are a valid combination as specified in Section 3.2.1, and whether the Mtrace2 Client Address is a valid IP unicast address. If either one is invalid, the Query MUST be silently ignored. Mtrace2 supports non-local client to the LHR. It is up to the implementation to filter out such queries. In the case when it is a local client, the router must then examine the Query to see if it is the properlast-hop routerLHR for the destination address in the packet. It is the properlast-hop routerLHR if it has a multicast-capable interface on the same subnet as the Mtrace2 Client Address and is the router that would forward traffic from the given (S,G) or (*,G) onto that subnet. If the router determines that it is not the properlast-hop router,LHR, or it cannot make that determination, it does one of two things dependingifon whether the Query was received via multicast or unicast. If the Query was received via multicast, then it MUST be silentlydropped.discarded. If it was received via unicast, the router turns the Query into aforwarding code of WRONG_LAST_HOP is notedReply message by changing the TLV type to 0x03 andprocessing continuesappending a Standard Response Block with a Forwarding Code of WRONG_LAST_HOP. The rest of the fields in the Standard Response Block MUST be zeroed. The router then sends the Reply message to the Mtrace2 Client Address on the Client Port # as specified inSection 9.2.the Mtrace2 Query. Duplicate Query messages as identified by the tuple (Mtrace2 Client Address, Query ID) SHOULD be ignored. This MAY be implemented using asimple 1-backcache(i.e. rememberingof previously processed queries keyed by the Mtrace2 Client Address and Query ID pair. The duration of theprevious Query message that was processed, and ignoring future messages with the same Mtrace2 Client Address and Query ID).cached entries is implementation specific. Duplicate Request messages MUST NOT be ignored in this manner.9.1.2.4.1.2. Query Normal Processing When a router receives anmtrace2Mtrace2 Query and it determines that it is the properlast-hop router,LHR, itit changesturns the Query to a Request by changing the TLV type from 0x01 to0x2 and treats it like an mtrace2 Request0x02, and performs the steps listed in Section9.2. 9.1.3. Mtrace2 Query Received by Non-Supported Router When a router that does not support mtrace2 receives an mtrace2 Query message whose destination address is multicast, the router will silently discard the message. When the router receives an mtrace2 Query message whose destination address is the router's interface address, the router returns an ICMP Port unreachable to the Mtrace2 Client Address. 9.2.4.2. 4.2. Receiving Mtrace2 Request Anmtrace2Mtrace2 Request isa traceroutean Mtrace2 messagewith some number of response blocks filled in, andthat uses TLV type0x2 for IPv4 and IPv6 mtrace2. 9.2.1.of 0x02. With the exception of the LHR, whose Request was just converted from a Query, each Request received by a router should have at least one Standard Response Block filled in. 4.2.1. Request Packet Verification If themtrace2Mtrace2 Request does not come from an adjacenthost orrouter,it MUST be silently ignored. Ifor if themtrace2Request is not addressed to this router, or if the Request is addressed to a multicast group which is not a link-scoped group (i.e. 224/24 for IPv4, FFx2::/16[3][4] for IPv6), it MUST be silently ignored. GTSM[14][12] SHOULD be used by the router to determine whether thehost orrouter is adjacent or not.9.2.2.If the sum of the number of the Standard Response Blocks in the received Mtrace2 Request and the value of the Augmented Response Type of 0x01, if any, is equal or more than the # Hops in the Mtrace2 Request, it MUST be silently ignored. 4.2.2. Request Normal Processing When a router receives anmtrace2 Request,Mtrace2 Request message, it performs the following steps. Note that it is possible to have multiple situations covered by the Forwarding Codes. The first one encountered is the one that is reported, i.e. all "noteforwarding codeForwarding Code N" should be interpreted as "ifforwarding codeForwarding Code is not already set, setforwarding codeForwarding Code to N". 1.If there is room in the current buffer (or the router can efficiently allocate more space to use), insertPrepare anew response block intoStandard Response Block to be appended to the packet and fill in the Query Arrival Time, Outgoing Interface Address (forIPv4 mtrace2)IPv4) or Outgoing Interface ID (forIPv6 mtrace2),IPv6), Output Packet Count, and Fwd TTL (forIPv4 mtrace2). If there was no room, fill in the forwarding code "NO_SPACE" in the *previous* hop's response block, and forwardIPv4). Note that thepacket toOutgoing Interface is theaddress specified inone on which the Mtrace2Client Address field and continue the trace as described in Section 9.3.Request message arrives. 2. Attempt to determine the forwarding information for the specified source andgroup specified,group, using the same mechanisms as would be used when a packet is received from the source destined for the group. A state need not be instantiated, it can be a "phantom" state created only for the purpose of the trace, such as"dry- run"."dry-run." If using a shared-tree protocol and there is no source-specific state, or if no source-specific information is desired (i.e.,"all 1"all 1's for IPv4 or unspecified address (::) for IPv6), group state should be used. If there is no group state or no group- specific information is desired, potential source state (i.e., the path that would be followed for a source-specific Join) should be used.If this router is the Core or RP and no source- specific state is available (e.g., this router has been receiving PIM Register messages from the first-hop router), note a code of REACHED_RP.3. If no forwarding information can be determined, the router notes aforwarding codeForwarding Code of NO_ROUTE, sets the remaining fields that have not yet been filled in to zero, and thenforwards the packetsends an Mtrace2 Reply back to themtrace2 client as described in Section 9.3.Mtrace2 client. 4. Fill in the Incoming Interface Address,Previous-HopUpstream Router Address, Input Packet Count, Total Number of Packets, Routing Protocol, S, and Src Maskfrom(or Src Prefix Len for IPv6) using the forwarding informationthat was determined.determined by the step 2. 5. Ifmtrace2Mtrace2 is administratively prohibited, note theappropriate forwarding code (ADMIN_PROHIB).Forwarding Code of ADMIN_PROHIB. Ifmtrace2Mtrace2 is administratively prohibited and any of the fields as filled in the step 4 are considered private information, zero out the applicable fields.Then the packet is forwarded to the mtrace2 client as described in Section 9.3.6. If thereceptionOutgoing interface is not enabled for multicast, noteforwarding codeForwarding Code of NO_MULTICAST. If thereceptionOutgoing interface is the interface from which the router would expect data to arrive from the source, note forwarding code RPF_IF.Otherwise, ifIf thereceptionOutgoing interface is not one to which the router would forward data from the source or RP to the group, aforwardingForwarding code of WRONG_IF is noted. In the above three cases, the router will return an Mtrace2 Reply and terminate the trace. 7. If the group is subject to administrative scoping on either the Outgoing or Incoming interfaces, aforwarding codeForwarding Code of SCOPED is noted. 8. If this router is theRendezvous Point or CoreRP for the group, note aforwarding codeForwarding Code ofREACHED_RP is noted.REACHED_RP. The router will send an Mtrace2 Reply and terminate the trace. 9. If this router has sent a prune upstream which applies to the source and group in themtrace2Mtrace2 Request, it notesforwarding codeForwarding Code of PRUNE_SENT. If the router has stopped forwarding downstream in response to a prune sent by thenext hopdownstream router, it notesforwarding codeForwarding Code of PRUNE_RCVD. If the router should normally forward traffic downstream for this source and groupdownstreambut is not, it notesforwarding codeForwarding Code of NOT_FORWARDING. 10. If this router is a gateway (e.g., a NAT or firewall) that hides the information between this router and themtrace2 querier, it notes forwarding code REACHED_GW. 11. TheMtrace2 client, it notes Forwarding Code of REACHED_GW. The router continues the processing as described in Section 4.5. 11. If the total number of the Standard Response Blocks, including the newly prepared one, and the value of the Augmented Response Type of 0x01, if any, is less than the # Hops in the Request, the packet is thensent onforwarded to theprevious hop or the Mtrace2 Client Addressupstream router as described in Section9.3. 9.2.3. Mtrace2 Request Received by Non-Supported Router When a router that does not understand mtrace2 Request messages receives an mtrace2 Request message whose destination address is multicast,4.3; otherwise, therouter will silently discard the message. When the router receives an mtrace2 Request message whose destination addresspacket isthe router's interface address, the router returnssent as anICMP Port unreachableMtrace2 Reply to the Mtrace2Client Address, and the mtrace2clientmay then issue another mtrace2 Query with the lower number of # hops. 9.3.as described in Section 4.4. 4.3. Forwarding Mtrace2 Request9.3.1.This section describes how an Mtrace2 Request should be forwarded. 4.3.1. Destination Address If thePrevious-hopupstream router for themtrace2Mtrace2 Request is known for thisrequest and the number of response blocks is less than the number requested (i.e., the "# hops" field in the mtrace2 Query header),request, thepacketMtrace2 Request is sent to that router. If the IncomingInterfaceinterface is known but thePrevious-hopupstream router isnot known,not, thepacketMtrace2 Request is sent to an appropriate multicast address on the IncomingInterface.interface. Theappropriatemulticast addressmaySHOULD depend on the multicast routing protocol in use, such as ALL-[protocol]-ROUTERS.MCAST.NET. It MUST be a link-scoped group (i.e. 224/24 for IPv4, FF02::/16 for IPv6), and MUST NOT be ALL-SYSTEMS.MCAST.NET (224.0.0.1) for IPv4 and All Nodes Address (FF02::1) forIPv6, andIPv6. It MAY also beALL-ROUTERS.MCAST.NETALL- ROUTERS.MCAST.NET (224.0.0.2) for IPv4 or All Routers Address (FF02::2) for IPv6 if the routing protocol in use does not define a more appropriategroup. Otherwise, it is sent to the Mtrace2 Client Address in the header. 9.3.2.multicast address. 4.3.2. Source Address Anmtrace2Mtrace2 Request should be sent with the address of therouter's receptionIncoming interface. However, if therouter'sIncoming interfaceaddressis unnumbered, the router can use one of its numbered interface address as the source address.When4.3.3. Appending Standard Response Block An Mtrace2 Request MUST be sent upstream towards the source or the RP after appending a Standard Response Block to the end of the received Mtrace2 Request. The Standard Response Block includes the multicast states and statistics information of the router described in Section 3.2.5. If appending the Standard Response Block would make the Mtrace2 Request packet longer than the MTU of the Incoming Interface, or, in the case of IPv6, longer than 1280 bytes, the router MUST change the Forwarding Code in theREACHED_GW code is noted,last Standard Response Block of the received Mtrace2 Request into NO_SPACE. The router then turns the Request into a Reply, and sendsbackthemtrace2Reply as described in Section9.4. In addition to that, it must4.4. The router will continuethe mtrace2 Querywith a new Request byproxying the original querier as in Section 9.5. Whencopying from theNO_SPACE error occurs,old Request excluding all therouter sends backresponse blocks, followed by themtrace2 Replypreviously prepared Standard Response Block, and an Augmented Response Block withcontained dataAugmented Response Type of 0x01 and theNO_SPACE error codenumber of the returned Standard Response Blocks asin Section 9.4, and continuesthemtrace2 Query by sending an mtrace2value. The new Requestcontainingis then forwarded upstream. 4.4. Sending Mtrace2 Reply An Mtrace2 Reply MUST be returned to thesame mtrace2 Query header and its standard and augmented response blocks.client by a router if the total number of the traced routers is equal to the # Hops in the Request. Thecorresponding augmented response block typetotal number of the traced routers is"# Mtrace2the sum of the Standard Response BlocksReturned" describedinSection 8. 9.4. Sending Mtrace2 Reply 9.4.1.the Request (including the one just added) and the number of the returned blocks, if any. 4.4.1. Destination Address Anmtrace2Mtrace2 ReplymustMUST be sent to the address specified in the Mtrace2 Client Address field in themtrace2 Query header. 9.4.2.Mtrace2 Request. 4.4.2. Source Address Anmtrace2Mtrace2 ReplyshouldSHOULD be sent with the address of the router'sreceptionOutgoing interface. However, if therouter'sOutgoing interface address is unnumbered, the router can use one of its numbered interface address as the source address.9.5.4.4.3. Appending Standard Response Block An Mtrace2 Reply MUST be sent with the prepared Standard Response Block appended at the end of the received Mtrace2 Request except in the case of NO_SPACE forwarding code. 4.5. Proxying Mtrace2 Query When a gateway (e.g., a NAT orfirewall) thatfirewall), which needs to block unicast packets to themtrace2 querierMtrace2 client, or hide information between the gateway and themtrace2 querier receives mtrace2Mtrace2 client, receives an Mtrace2 Query from an adjacent host or Mtrace2 Request from an adjacent router, it appends a Standard Response Block with REACHED_GW as the Forwarding Code, and turns the Queryfrom an adjacent hostormtrace2Requestfrom an adjacent router, itas a Reply, and sendsbackthemtrace2Replywith contained data and the REACHED_GW codeback to theaddress specified in the Mtrace2 Client Address field in the mtrace2 Query header.client. At the same time, the gatewaypreparesoriginates a newmtrace2Mtrace2 Querymessage. The gateway usesmessage by copying the originalmtrace2 QueryMtrace2 headeras(the Query or Request without any of thebase forresponse blocks), and makes thenew mtrace2 Query; itchanges as follows: o sets theMtrace2 Client Address to its Incoming InterfaceRPF interface's addressandas the Mtrace2 ClientPort # toAddress; o uses its own port(which may be the same as the mtrace2 portnumber as thegateway is listening on that port), andClient Port #; and, o decreases #hops according toHops by the number ofstandard response blocks inthe Standard Response Block that was just returnedmtrace2 Reply from the gateway.as a Reply. Themtrace2new Mtrace2 Query message is then sent to theprevious-hopupstream router or to an appropriate multicast address on theIncoming Interface.RPF interface. When the gateway receivesthe mtrace2an Mtrace2 Replyfromwhose Query ID matches thefirst-hop router or any intermediate router,one in the original Mtrace2 header, it MUSTforwardrelay themtrace2Mtrace2 Reply back to themtrace2 querierMtrace2 client by replacing the Reply's header with the originalmtrace2 QueryMtrace2 header.9.6.If the gateway does not receive the corresponding Mtrace2 Reply within the [Mtrace Reply Timeout] period (see Section 5.8.4), then it silently discards the original Mtrace2 Query or Request message, and terminates the trace. 4.6. Hiding Information Information about a domain's topology and connectivity may be hidden frommtrace2the Mtrace2 Requests. The Forwarding Code of INFO_HIDDENforwarding codemay be used to notethat, forthat. For example, the incoming interface address and packet countare for the entrance toon thedomainingress router of a domain, and the outgoing interface address and packet countareon theexit fromegress router of the domainby specifying "all 1". Thecan be specified as all 1's. Additionally, the source-group packet count(Section 6.8(see Section 3.2.5 and Section7.9) is from router, but3.2.6) within the domain may be"all 1"all 1's if it is hidden.10.5. Client Behavior10.1.This section describes the behavior of an Mtrace2 client in details. 5.1. Sending Mtrace2 Query10.1.1.An Mtrace2 client initiates an Mtrace2 Query by sending the Query to the LHR of interest. 5.1.1. Destination Address If an Mtrace2 client knows the proper LHR, it unicasts an Mtrace2 Query packet to that router; otherwise, it MAY send the Mtrace2 Query packetcan be sentto the ALL-ROUTERS.MCAST.NET (224.0.0.2) for IPv4 or All Routers Address (FF02::2) for IPv6. This will ensure that the packet is received by thelast-hop routerLHR on the subnet.Otherwise, if the proper last-hop router is known for the mtrace2 destination, the Query is unicasted to that router.See also Section10.45.4 on determining thelast-hop router. 10.1.2.LHR. 5.1.2. Source Address Anmtrace2Mtrace2 QuerymustMUST be sent with theaddress of the mtrace2 querier's reception interface,client's interface address, which would be the Mtrace2 Client Address.10.2.5.2. Determining the PathTheAn Mtrace2 client could senda small number ofan initialqueryQuery messages with a large"# hops" field,# Hops, in order to try to trace the full path. If this attempt fails, one strategy is to perform a linear search (as the traditional unicast traceroute program does); set the"# hops"# Hops field to 1 and try to get a Reply, then 2, and so on. If no Reply is received at a certain hop, the hop count can continue past thenon- respondingnon-responding hop, in the hopes that further hops may respond. These attempts should continue untila user-definedthe [Mtrace Reply Timeout] timeout has occurred. See also Section10.65.6 on receiving the results of a trace.10.3.5.3. Collecting Statistics After a client has determined that it has traced the whole path or as much as it can expect to (see Section10.7),5.8), it might collect statistics by waiting a short time and performing a second trace. If the path is the same in the two traces, statistics can be displayed as described in Section12.37.3 and Section12.4. 10.4.7.4. 5.4. Last Hop Router (LHR) Themtrace2 querierMtrace2 client may not know which is the last-hop router, or that router may be behind a firewall that blocks unicast packets but passes multicast packets. In these cases, themtrace2Mtrace2 Request should be multicasted to ALL-ROUTERS.MCAST.NET (224.0.0.2) for IPv4 or All Routers Address (FF02::2) for IPv6. All routers except the correct last-hop router SHOULD ignore anymtrace2Mtrace2 Request received via multicast.10.5.5.5. First Hop Router (FHR) The IANA assigned 224.0.1.32, MTRACE.MCAST.NET as the default multicast group for old IPv4 mtrace (v1) responses, in order to support mtracequeriersclients that are not unicast reachable from thefirst-hopfirst- hop router.However, mtrace2Mtrace2, however, does notreserverequire any IPv4/IPv6 multicast addresses formtrace2the Mtrace2 Replies. Everymtrace2Mtrace2 Reply is sent to theunicast address specified inunicast address specified in the Mtrace2 Client Address field of the Mtrace2 Reply. 5.6. Broken Intermediate Router A broken intermediate router might simply not understand Mtrace2 packets, and drop them. The Mtrace2 client will get no Reply at all as a result. It should then perform a hop-by-hop search by setting the # Hops field until it gets an Mtrace2 Reply. The client may use linear or binary search; however, the latter is likely to be slower because a failure requires waiting for the [Mtrace Reply Timeout] period. 5.7. Non-Supported Router When a non-supported router receives an Mtrace2 Query or Request message whose destination address is a multicast address, the router will silently discard the message. When the router receives an Mtrace2 Query which is destined to itself, the router would return an ICMP port unreachable to the Mtrace2 client. On the other hand, when the router receives an Mtrace2 Request which is destined to itself, the router would return an ICMP port unreachable to its adjacent router from which the Request receives. Therefore, the Mtrace2Client Address field ofclient needs to terminate themtrace2 Query header. 10.6. Broken Intermediate Router A broken intermediate router might simply not understand mtrace2 packets, and drop them. The querier would then get notrace when the [Mtrace Replyat all from its mtrace2 Requests. It shouldTimeout] timeout has occurred, and may thenperformissue another Query with ahop-by-hop search by setting thelower number ofhops field until it gets a Reply (both linear and binary search are options, but binary is likely to be slower because a failure requires waiting for a timeout). 10.7.# Hops. 5.8. Mtrace2 Termination When performing an expanding hop-by-hop trace, it is necessary to determine when to stop expanding.10.7.1.5.8.1. Arriving atsourceSource A trace can be determined to have arrived at the source if the Incoming Interface of the last router in the trace is non-zero, but thePrevious-hop routerUpstream Router is zero.10.7.2.5.8.2. FatalerrorError A trace has encountered a fatal error if the last Forwarding Error in the trace has the 0x80 bit set.10.7.3.5.8.3. Noprevious hopUpstream Router A trace can not continue if the lastPrevious-hopUpstream Router in the trace is set to 0.10.7.4. Traceroute shorter than requested If5.8.4. Reply Timeout This document defines thetrace that is returned[Mtrace Reply Timeout] value, which isshorter than requested (i.e. the number of response blocksused to time out an Mtrace2 Reply as seen in Section 4.5, Section 5.2, and Section 5.7. The default [Mtrace Reply Timeout] value issmaller than the "# hops" field),10 (seconds), and can be manually changed on thetrace encountered an errorMtrace2 client andcould not continue. 10.8.routers. 5.9. Continuing after anerrorError When the NO_SPACE error occurs, as described in Section9.3, the multicast routers sends4.2, a router will send backthe mtrace2an Mtrace2 Reply to theaddress specified in theMtrace2Client Address field in the mtrace2 Query header.client, and continue with a new Request (see Section 4.3.3). Inthiswhich case, themtrace2Mtrace2 client may receive multiplemtrace2Mtrace2 Replies from different routers(alongalong thepath). Afterpath. When this happens, the clientreceives multiple mtrace2 Reply messages, it integrates (i.e. constructs)MUST treat them as a singlemtrace2Mtrace2 Reply message. If a trace times out, it is very likelyto be becausethat a router in the middle of the path does not supportmtrace2.Mtrace2. That router's address will be in thePrevious-hop routerUpstream Router field of the lastentryStandard Response Block in the lastresponse packet received.received Reply. A client may be able to determine (via mrinfo or SNMP[11][13])[11][10]) a list of neighbors of thenon- respondingnon-responding router. If desired, each of those neighbors could be probed to determine the remainder of the path. Unfortunately, this heuristic may end up with multiple paths, since there is no way of knowing what the non-responding router's algorithm for choosinga previous-hopan upstream router is. However, if all paths but one flow back towards thenon-respondingnon- responding router, it is possible to be sure that this is the correct path.11.6. Protocol-Specific Considerations11.1.This section describes the Mtrace2 behavior with the present of different multicast protocols. 6.1. PIM-SM When anmtrace2Mtrace2 reaches a PIM-SMRPRP, and the RP does not forward the trace on, it means that the RP has not performed a source-specific join so there is no more state to trace. However, the path that traffic would use if the RP did perform a source-specific join can be traced by setting the trace destination to the RP, the trace source to the traffic source, and the trace group to 0. ThistraceMtrace2 Query may be unicasted to the RP.11.2.6.2. Bi-Directional PIM Bi-directional PIM[7][5] is a variant of PIM-SM that builds bi- directional shared trees connecting multicast sources and receivers. Along the bi-directional shared trees, multicast data is natively forwarded from the sources to theRPA (RendezvousRendezvous PointAddress)Link (RPL), and fromthe RPAwhich, to receivers without requiring source-specific state. In contrast to PIM-SM,RPBi-directional PIM always has the state to trace. A Designated Forwarder (DF) for a givenRPARendezvous Point Address (RPA) is in charge of forwarding downstream traffic onto its link, and forwarding upstream traffic from its link towards the RPL(Rendezvous Point Link)that the RPA belongs to. Hencemtrace2Mtrace2 Reply reports DF addresses or RPA along the path.11.3.6.3. PIM-DM Routers running PIM Dense Mode[15][13] do not know the path packets would take unless traffic is flowing. Without some extra protocol mechanism, this means that in an environment with multiple possible paths with branch points on shared media,mtrace2Mtrace2 can only trace existing paths, not potential paths. When there are multiple possible paths but the branch points are not on shared media, theprevious hopupstream router is known, but thelast-hop routerLHR may not know that it is the appropriate last hop. When traffic is flowing, PIM Dense Mode routers know whether or not they are thelast-hop forwarderLHR for the link (because they won or lost an Assert battle) and know who theprevious hopupstream router is (because it won an Assert battle). Therefore,mtrace2Mtrace2 is always able to follow the proper path when traffic is flowing.11.4.6.4. IGMP/MLD Proxy When anmtrace2IGMP/MLD Proxy [6] receives an Mtrace2 Query packetreacheson an incominginterface of IGMP/ MLD Proxy [8],interface, itputsnotes a WRONG_IF(0x01) valuein the Forwarding Code ofmtrace2 standard response block (as inthe last Standard Response Block (see Section6.14)3.2.5), and sends themtrace2Mtrace2 Reply back to the Mtrace2Client Address. Whenclient. On the other hand, when anmtrace2Mtrace2 Query packet reaches an outgoing interface of the IGMP/MLD proxy, it is forwardedthroughonto its incoming interface towards the upstream router.11.5. AMT AMT [9] provides the multicast connectivity to the unicast-only inter-network. To do this, multicast packets being sent to or from a site are encapsulated in unicast packets. When an mtrace2 Query packet reaches an AMT pseudo-interface of an AMT gateway, the AMT gateway encapsulats it to a particular AMT relay reachable across the unicast-only infrastructure. Then the AMT relay decapsulates the mtrace2 Query packet and forwards the mtrace2 Request7. Problem Diagnosis This section describes different scenarios Mtrace2 can be used to diagnose theappropriatemulticastrouter. 12. Problem Diagnosis 12.1.problems. 7.1. Forwarding Inconsistencies Theforwarding errorForwarding Error code can tell if a group is unexpectedly pruned or administratively scoped.12.2.7.2. TTL or Hop Limit Problems By taking the maximum of hops(fromfrom the source+and forwarding TTL(or hop limit) threshold)threshold over all hops, it is possible to discover the TTL or hop limit required for the source to reach the destination.12.3.7.3. Packet Loss By taking two traces, it is possible to find packet loss information by comparing the difference in input packet counts to the difference in output packet counts for the specified source-group address pair at the previous hop. On a point-to-point link, any difference in these numbers implies packet loss. Since the packet counts may be changing as themtrace2 QueryMtrace2 Request is propagating, there may be small errors (off by 1 or 2 or more) in these statistics. However, these errors will not accumulate if multiple traces are taken to expand the measurement period. On a shared link, the count of input packets can be larger than the number of output packets at the previous hop, due to other routers or hosts on the link injecting packets. This appears as "negative loss" which may mask real packet loss. In addition to the counts of input and output packets for all multicast traffic on the interfaces, theresponse dataStandard Response Block includes a count of the packets forwarded by a node for the specifiedsource- groupsource-group pair. Taking the difference in this count between two traces and then comparing those differences between two hops gives a measure of packet loss just for traffic from the specified source to the specified receiver via the specified group. This measure is not affected by shared links. On a point-to-point link that is a multicast tunnel, packet loss is usually due to congestion in unicast routers along the path of that tunnel. On native multicast links, loss is more likely in the output queue of one hop, perhaps due to priority dropping, or in the input queue at the next hop. The counters in theresponse dataStandard Response Block do not allow these cases to be distinguished. Differences in packet counts between the incoming and outgoing interfaces on one node cannot generally be used to measure queue overflow in the node.12.4.7.4. Link Utilization Again, with two traces, you can divide the difference in the input or output packet counts at some hop by the difference in time stamps from the same hop to obtain the packet rate over the link. If the average packet size is known, then the link utilization can also be estimated to see whether packet loss may be due to the rate limit or the physical capacity on a particular link being exceeded.12.5.7.5. Time Delay If the routers have synchronized clocks, it is possible to estimate propagation and queuing delay from the differences between the timestamps at successive hops. However, this delay includes control processing overhead, so is not necessarily indicative of the delay that data traffic would experience.13.8. IANA Considerations The following new assignments can only be made via a Standards Action as specified in[4]. 13.1.[7]. 8.1. Forwarding Codes New ForwardingcodesCodes must only be created by an RFC that modifies this document's Section10,3.2.5 and Section 3.2.6, fully describing the conditions under which the newforwarding codeForwarding Code is used. The IANA may act as a central repository so that there is a single place to look upforwarding codesForwarding Codes and the document in which they are defined.13.2.8.2. UDP Destination Portand IPv6 AddressThe IANA should allocate UDP destination port formulticast traceroute version 2Mtrace2 upon publication of the first RFC.14.9. Security Considerations14.1.This section addresses some of the security considerations related to Mtrace2. 9.1. Addresses in Mtrace2 Header An Mtrace2 header includes three addresses, source address, multicast address, and Mtrace2 client address. These addresses MUST be congruent with the definition defined in Section 3.2.1 and forwarding Mtrace2 messages having invalid addresses MUST be prohibited. For instance, if Mtrace2 Client Address specified in an Mtrace header is a multicast address, then a router that receives the Mtrace2 message MUST silently discard it. 9.2. Topology Discovery Mtrace2 can be used to discover any actively-used topology. If your network topology is a secret,mtrace2Mtrace2 may be restricted at the border of your domain, using the ADMIN_PROHIB forwarding code.14.2. Traffic Rates9.3. Characteristics of Multicast Channel Mtrace2 can be used to discover what sources are sending to what groups and at what rates. If this information is a secret,mtrace2Mtrace2 may be restricted at the border of your domain, using the ADMIN_PROHIB forwarding code.14.3.9.4. Limiting Query/Request RatesRouters shouldA router may limitmtrace2Mtrace2 Queries and Requests by ignoring some of thereceivedconsecutive messages.RoutersThe router MAY randomly ignore the received messages to minimize the processing overhead, i.e., to keep fairness in processingqueries.queries, or prevent traffic amplification. The rate limit is left to the router's implementation. 9.5. Limiting Reply Rates The proxying and NO_SPACE behaviors may result in one Query returning multiple Reply messages. In order to prevent abuse, the routers in the traced MAY need to rate-limit the Replies. The rate limit function is left to the router's implementation.15.10. Acknowledgements This specification started largely as a transcription of Van Jacobson's slides from the 30th IETF, and the implementation in mrouted 3.3 by Ajit Thyagarajan. Van's original slides credit Steve Casner, Steve Deering, Dino Farinacci and Deb Agrawal. The original multicast traceroute client, mtrace (version 1), has been implemented by Ajit Thyagarajan, Steve Casner and Bill Fenner. The idea of the "S" bit to allow statistics for a source subnet is due to Tom Pusateri. For themtraceMtrace version 2 specification, the authors would like to give special thanks to Tatsuya Jinmei, Bill Fenner, and Steve Casner. Also, extensive comments were received from David L. Black, Ronald Bonica, Yiqun Cai, Liu Hui, Bharat Joshi, Robert W. Kebler, Heidi Ou, Pekka Savola, Shinsuke Suzuki, Dave Thaler, Achmad Husni Thamrin, and Cao Wei.16.11. References16.1.11.1. Normative References [1] Fenner, B., Handley, M., Holbrook, H., and I. Kouvelas, "Protocol Independent Multicast - Sparse Mode (PIM-SM): Protocol Specification (Revised)", RFC 4601, August 2006. [2] Bradner, S., "Key words for use in RFCs to indicate requirement levels", RFC 2119, March 1997.[2][3] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", RFC 2460, December 1998.[3][4] Hinden, R. and S. Deering, "IP Version 6 Addressing Architecture", RFC2373, July 1998. [4] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", RFC 2434, October 1998. [5] Braden, B., Borman, D., and C. Partridge, "Computing the Internet Checksum", RFC 1071, September 1988. [6] Fenner, B., Handley, M., Holbrook, H., and I. Kouvelas, "Protocol Independent Multicast - Sparse Mode (PIM-SM): Protocol Specification (Revised)", RFC 4601, August4291, February 2006.[7][5] Handley, M., Kouvelas, I., Speakman, T., and L. Vicisano, "Bidirectional Protocol Independent Multicast (BIDIR-PIM)", RFC 5015, October 2007.[8][6] Fenner, B., He, H., Haberman, B., and H. Sandick, "Internet Group Management Protocol (IGMP) / Multicast Listener Discovery (MLD)-Based Multicast Forwarding ("IGMP/MLD Proxying")", RFC 4605, August 2006.[9] Thaler, D., Talwar, M., Aggarwal, A., Vicisano, L., and[7] Narten, T.Pusateri, "Automatic IP Multicast Without Explicit Tunnels (AMT)", draft-ietf-mboned-auto-multicast-08.txt (workand H. Alvestrand, "Guidelines for Writing an IANA Considerations Section inprogress), October 2007. 16.2.RFCs", RFC 5226, May 2008. 11.2. Informative References[10][8] Cain, B., Deering, S., Kouvelas, I., Fenner, B., and A. Thyagarajan, "Internet Group Management Protocol, Version 3", RFC 3376, October 2002.[11] Draves, R. and D. Thaler, "Default Router Preferences and More- Specific Routes", RFC 4191, November 2005. [12][9] McCloghrie, K. and F. Kastenholz, "The Interfaces Group MIB", RFC 2863, June 2000.[13][10] McWalter, D., Thaler, D., and A. Kessler, "IP Multicast MIB", RFC 5132, December 2007.[14][11] Draves, R. and D. Thaler, "Default Router Preferences and More- Specific Routes", RFC 4191, November 2005. [12] Gill, V., Heasley, J., Meyer, D., Savola, P., and C. Pignataro, "The Generalized TTL Security Mechanism (GTSM)", RFC 5082, October 2007.[15][13] Adams, A., Nicholas, J., and W. Siadak, "Protocol Independent Multicast - Dense Mode (PIM-DM): Protocol Specification (Revised)", RFC 3973, January 2005. Authors' Addresses Hitoshi AsaedaKeio University Graduate School of Media and Governance Fujisawa, Kanagawa 252-0882National Institute of Information and Communications Technology 4-2-1 Nukui-Kitamachi Koganei, Tokyo 184-8795 Japan Email:asaeda@wide.ad.jp URI: http://www.sfc.wide.ad.jp/~asaeda/ Tatuya Jinmei Internet Systems Consortium Redwood City, CA 94063 US Email: Jinmei_Tatuya@isc.org William C. Fenner Arastra, Inc. Menlo Park, CA 94025 US Email: fenner@fenron.net Stephen L. Casner Packet Design,asaeda@nict.go.jp WeeSan Lee (editor) Juniper Networks, Inc.Palo Alto,1194 North Mathilda Avenue Sunnyvale, CA9430494089-1206 US Email:casner@packetdesign.comweesan@juniper.net