idnits 2.17.1 draft-ietf-mboned-mtrace-v2-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Sep 2009 rather than the newer Notice from 28 Dec 2009. (See https://trustee.ietf.org/license-info/) Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 7 instances of lines with non-RFC2606-compliant FQDNs in the document. == There are 1 instance of lines with multicast IPv4 addresses in the document. If these are generic example addresses, they should be changed to use the 233.252.0.x range defined in RFC 5771 Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords -- however, there's a paragraph with a matching beginning. Boilerplate error? (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document seems to contain a disclaimer for pre-RFC5378 work, and may have content which was first submitted before 10 November 2008. The disclaimer is necessary when there are original authors that you have been unable to contact, or if some do not wish to grant the BCP78 rights to the IETF Trust. If you are able to get all authors (current and original) to grant those rights, you can and should remove the disclaimer; otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (January 23, 2010) is 5200 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: '2' is defined on line 1321, but no explicit reference was found in the text == Unused Reference: '5' is defined on line 1330, but no explicit reference was found in the text ** Obsolete normative reference: RFC 2460 (ref. '2') (Obsoleted by RFC 8200) ** Obsolete normative reference: RFC 2373 (ref. '3') (Obsoleted by RFC 3513) ** Obsolete normative reference: RFC 2434 (ref. '4') (Obsoleted by RFC 5226) ** Downref: Normative reference to an Informational RFC: RFC 1071 (ref. '5') ** Obsolete normative reference: RFC 4601 (ref. '8') (Obsoleted by RFC 7761) == Outdated reference: A later version (-18) exists of draft-ietf-mboned-auto-multicast-08 Summary: 6 errors (**), 0 flaws (~~), 7 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 MBONED Working Group H. Asaeda 3 Internet-Draft Keio University 4 Intended status: Standards Track T. Jinmei 5 Expires: July 27, 2010 ISC 6 W. Fenner 7 Arastra, Inc. 8 S. Casner 9 Packet Design, Inc. 10 January 23, 2010 12 Mtrace Version 2: Traceroute Facility for IP Multicast 13 draft-ietf-mboned-mtrace-v2-06 15 Abstract 17 This document describes the IP multicast traceroute facility. Unlike 18 unicast traceroute, multicast traceroute requires special 19 implementations on the part of routers. This specification describes 20 the required functionality in multicast routers, as well as how 21 management applications can use the router functionality. 23 Status of this Memo 25 This Internet-Draft is submitted to IETF in full conformance with the 26 provisions of BCP 78 and BCP 79. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF), its areas, and its working groups. Note that 30 other groups may also distribute working documents as Internet- 31 Drafts. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 The list of current Internet-Drafts can be accessed at 39 http://www.ietf.org/ietf/1id-abstracts.txt. 41 The list of Internet-Draft Shadow Directories can be accessed at 42 http://www.ietf.org/shadow.html. 44 This Internet-Draft will expire on July 27, 2010. 46 Copyright Notice 48 Copyright (c) 2010 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents 53 (http://trustee.ietf.org/license-info) in effect on the date of 54 publication of this document. Please review these documents 55 carefully, as they describe your rights and restrictions with respect 56 to this document. Code Components extracted from this document must 57 include Simplified BSD License text as described in Section 4.e of 58 the Trust Legal Provisions and are provided without warranty as 59 described in the BSD License. 61 This document may contain material from IETF Documents or IETF 62 Contributions published or made publicly available before November 63 10, 2008. The person(s) controlling the copyright in some of this 64 material may not have granted the IETF Trust the right to allow 65 modifications of such material outside the IETF Standards Process. 66 Without obtaining an adequate license from the person(s) controlling 67 the copyright in such materials, this document may not be modified 68 outside the IETF Standards Process, and derivative works of it may 69 not be created outside the IETF Standards Process, except to format 70 it for publication as an RFC or to translate it into languages other 71 than English. 73 Table of Contents 75 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 6 76 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 7 77 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 78 4. Packet Formats . . . . . . . . . . . . . . . . . . . . . . . . 9 79 4.1. Mtrace2 TLV format . . . . . . . . . . . . . . . . . . . . 9 80 4.2. Defined TLVs . . . . . . . . . . . . . . . . . . . . . . . 9 81 5. Mtrace2 Query Header . . . . . . . . . . . . . . . . . . . . . 10 82 5.1. # hops: 8 bits . . . . . . . . . . . . . . . . . . . . . . 10 83 5.2. Multicast Address . . . . . . . . . . . . . . . . . . . . 10 84 5.3. Source Address . . . . . . . . . . . . . . . . . . . . . . 11 85 5.4. Destination Address . . . . . . . . . . . . . . . . . . . 11 86 5.5. Query ID: 16 bits . . . . . . . . . . . . . . . . . . . . 11 87 5.6. Client Port # . . . . . . . . . . . . . . . . . . . . . . 11 88 6. IPv4 Mtrace2 Standard Response Block . . . . . . . . . . . . . 12 89 6.1. Query Arrival Time: 32 bits . . . . . . . . . . . . . . . 12 90 6.2. Incoming Interface Address: 32 bits . . . . . . . . . . . 13 91 6.3. Outgoing Interface Address: 32 bits . . . . . . . . . . . 13 92 6.4. Previous-Hop Router Address: 32 bits . . . . . . . . . . . 13 93 6.5. Input packet count on incoming interface: 64 bits . . . . 13 94 6.6. Output packet count on incoming interface: 64 bits . . . . 13 95 6.7. Total number of packets for this source-group pair: 64 96 bits . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 97 6.8. Rtg Protocol: 16 bits . . . . . . . . . . . . . . . . . . 14 98 6.9. Multicast Rtg Protocol: 16 bits . . . . . . . . . . . . . 14 99 6.10. Fwd TTL: 8 bits . . . . . . . . . . . . . . . . . . . . . 14 100 6.11. MBZ: 8 bit . . . . . . . . . . . . . . . . . . . . . . . . 14 101 6.12. S: 1 bit . . . . . . . . . . . . . . . . . . . . . . . . . 14 102 6.13. Src Mask: 7 bits . . . . . . . . . . . . . . . . . . . . . 14 103 6.14. Forwarding Code: 8 bits . . . . . . . . . . . . . . . . . 14 104 7. IPv6 Mtrace2 Standard Response Block . . . . . . . . . . . . . 17 105 7.1. Query Arrival Time: 32 bits . . . . . . . . . . . . . . . 17 106 7.2. Incoming Interface ID: 32 bits . . . . . . . . . . . . . . 17 107 7.3. Outgoing Interface ID: 32 bits . . . . . . . . . . . . . . 18 108 7.4. Local Address . . . . . . . . . . . . . . . . . . . . . . 18 109 7.5. Remote Address . . . . . . . . . . . . . . . . . . . . . . 18 110 7.6. Input packet count on incoming interface . . . . . . . . . 18 111 7.7. Output packet count on incoming interface . . . . . . . . 18 112 7.8. Total number of packets for this source-group pair . . . . 18 113 7.9. Rtg Protocol: 16 bits . . . . . . . . . . . . . . . . . . 19 114 7.10. Multicast Rtg Protocol: 16 bits . . . . . . . . . . . . . 19 115 7.11. MBZ: 15 bits . . . . . . . . . . . . . . . . . . . . . . . 19 116 7.12. S: 1 bit . . . . . . . . . . . . . . . . . . . . . . . . . 19 117 7.13. Src Prefix Len: 8 bits . . . . . . . . . . . . . . . . . . 19 118 7.14. Forwarding Code: 8 bits . . . . . . . . . . . . . . . . . 19 119 8. Mtrace2 Augmented Response Block . . . . . . . . . . . . . . . 20 120 9. Router Behavior . . . . . . . . . . . . . . . . . . . . . . . 21 121 9.1. Traceroute Query . . . . . . . . . . . . . . . . . . . . . 21 122 9.1.1. Packet Verification . . . . . . . . . . . . . . . . . 21 123 9.1.2. Normal Processing . . . . . . . . . . . . . . . . . . 21 124 9.2. Mtrace2 Request . . . . . . . . . . . . . . . . . . . . . 21 125 9.2.1. Packet Verification . . . . . . . . . . . . . . . . . 22 126 9.2.2. Normal Processing . . . . . . . . . . . . . . . . . . 22 127 9.3. Forwarding Mtrace2 Requests . . . . . . . . . . . . . . . 24 128 9.4. Sending Mtrace2 Responses . . . . . . . . . . . . . . . . 24 129 9.4.1. Destination Address . . . . . . . . . . . . . . . . . 24 130 9.4.2. Source Address . . . . . . . . . . . . . . . . . . . . 24 131 9.5. Proxying Mtrace2 Queries . . . . . . . . . . . . . . . . . 24 132 9.6. Hiding Information . . . . . . . . . . . . . . . . . . . . 25 133 10. Client Behavior . . . . . . . . . . . . . . . . . . . . . . . 26 134 10.1. Sending Mtrace2 Queries . . . . . . . . . . . . . . . . . 26 135 10.2. Determining the Path . . . . . . . . . . . . . . . . . . . 26 136 10.3. Collecting Statistics . . . . . . . . . . . . . . . . . . 26 137 10.4. Last Hop Router . . . . . . . . . . . . . . . . . . . . . 26 138 10.5. First Hop Router . . . . . . . . . . . . . . . . . . . . . 27 139 10.6. Broken Intermediate Router . . . . . . . . . . . . . . . . 27 140 10.7. Mtrace2 Termination . . . . . . . . . . . . . . . . . . . 27 141 10.7.1. Arriving at source . . . . . . . . . . . . . . . . . . 27 142 10.7.2. Fatal error . . . . . . . . . . . . . . . . . . . . . 27 143 10.7.3. No previous hop . . . . . . . . . . . . . . . . . . . 27 144 10.7.4. Traceroute shorter than requested . . . . . . . . . . 28 145 10.8. Continuing after an error . . . . . . . . . . . . . . . . 28 146 11. Protocol-Specific Considerations . . . . . . . . . . . . . . . 29 147 11.1. PIM-SM . . . . . . . . . . . . . . . . . . . . . . . . . . 29 148 11.2. Bi-Directional PIM . . . . . . . . . . . . . . . . . . . . 29 149 11.3. PIM-DM . . . . . . . . . . . . . . . . . . . . . . . . . . 29 150 11.4. IGMP/MLD Proxy . . . . . . . . . . . . . . . . . . . . . . 29 151 11.5. AMT . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 152 12. Problem Diagnosis . . . . . . . . . . . . . . . . . . . . . . 31 153 12.1. Forwarding Inconsistencies . . . . . . . . . . . . . . . . 31 154 12.2. TTL or Hop Limit Problems . . . . . . . . . . . . . . . . 31 155 12.3. Packet Loss . . . . . . . . . . . . . . . . . . . . . . . 31 156 12.4. Link Utilization . . . . . . . . . . . . . . . . . . . . . 32 157 12.5. Time Delay . . . . . . . . . . . . . . . . . . . . . . . . 32 158 13. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 33 159 13.1. Forwarding Codes . . . . . . . . . . . . . . . . . . . . . 33 160 13.2. UDP Destination Port and IPv6 Address . . . . . . . . . . 33 161 14. Security Considerations . . . . . . . . . . . . . . . . . . . 34 162 14.1. Topology Discovery . . . . . . . . . . . . . . . . . . . . 34 163 14.2. Traffic Rates . . . . . . . . . . . . . . . . . . . . . . 34 164 14.3. Limiting Query/Request Rates . . . . . . . . . . . . . . . 34 165 15. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 35 166 16. References . . . . . . . . . . . . . . . . . . . . . . . . . . 36 167 16.1. Normative References . . . . . . . . . . . . . . . . . . . 36 168 16.2. Informative References . . . . . . . . . . . . . . . . . . 36 170 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 38 172 1. Introduction 174 The unicast "traceroute" program allows the tracing of a path from 175 one machine to another. The key mechanism for unicast traceroute is 176 the ICMP TTL exceeded message, which is specifically precluded as a 177 response to multicast packets. On the other hand, the multicast 178 traceroute facility allows the tracing of an IP multicast routing 179 paths. In this document, we specify the multicast "traceroute" 180 facility to be implemented in multicast routers and accessed by 181 diagnostic programs. The multicast traceroute described in this 182 document named as mtrace version 2 or mtrace2 provides additional 183 information about packet rates and losses that the unicast traceroute 184 cannot, and generally requires fewer packets to be sent. 186 o To be able to trace the path that a packet would take from some 187 source to some destination. 189 o To be able to isolate packet loss problems (e.g., congestion). 191 o To be able to isolate configuration problems (e.g., TTL 192 threshold). 194 o To minimize packets sent (e.g. no flooding, no implosion). 196 This document supports both IPv4 and IPv6 multicast traceroute 197 facility. The protocol design, concept, and program behavior are 198 same between IPv4 and IPv6 mtrace2. While the original IPv4 199 multicast traceroute, mtrace, the query and response messages are 200 implemented as IGMP messages [12], all mtrace2 messages are carried 201 on UDP. The packet formats of IPv4 and IPv6 mtrace2 are different 202 because of the different address families, but the syntax is similar. 204 2. Terminology 206 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL 207 NOT","SHOULD", "SHOULD NOT", "RECOMMENDED","MAY", and "OPTIONAL" in 208 this document are to be interpreted as described in RFC 2119 [1]. 210 Since multicast traceroutes flow in the opposite direction to the 211 data flow, we refer to "upstream" and "downstream" with respect to 212 data, unless explicitly specified. 214 Incoming interface: 215 The interface on which traffic is expected from the specified source 216 and group. 218 Outgoing interface: 219 The interface on which traffic is forwarded from the specified source 220 and group toward the destination. It is the interface on which the 221 multicast traceroute Request was received. 223 Previous-hop router: 224 The router that is on the link attached to the Incoming Interface and 225 is responsible for forwarding traffic for the specified source and 226 group. 228 Group state: 229 It is the state in which a shared-tree protocol (e.g., PIM-SM [8]) 230 running on a router chooses the previous-hop router toward the core 231 router or Rendezvous Point (RP) as its parent router. In this state, 232 source-specific state is not available for the corresponding 233 multicast address on the router. 235 Source-specific state: 236 It is the state in which a routing protocol running on a router 237 chooses the path that would be followed for a source-specific join. 239 ALL-[protocol]-ROUTERS.MCAST.NET: 240 It is a dedicated multicast address for a multicast router to 241 communicate with other routers that are working with the same routing 242 protocol. For instance,the address of ALL-PIM-ROUTERS.MCAST.NET is 243 '224.0.0.13' for IPv4 and 'ff02::d' for IPv6. 245 3. Overview 247 Given a multicast distribution tree, tracing from a source to a 248 multicast destination is hard, since you don't know down which branch 249 of the multicast tree the destination lies. This means that you have 250 to flood the whole tree to find the path from one source to one 251 destination. However, walking up the tree from destination to source 252 is easy, as most existing multicast routing protocols know the 253 previous hop for each source. Tracing from destination to source can 254 involve only routers on the direct path. 256 The party requesting the traceroute sends a traceroute Query packet 257 to the last-hop multicast router for the given destination. The 258 last-hop router turns the Query into a Request packet by adding a 259 response data block containing its interface addresses and packet 260 statistics, and then forwards the Request packet via unicast to the 261 router that it believes is the proper previous hop for the given 262 source and group. Each hop adds its response data to the end of the 263 Request packet, then unicast forwards it to the previous hop. The 264 first hop router (the router that believes that packets from the 265 source originate on one of its directly connected networks) changes 266 the packet type to indicate a Response packet and sends the completed 267 response to the response destination address. The response may be 268 returned before reaching the first hop router if a fatal error 269 condition such as "no route" is encountered along the path. 271 Multicast traceroute uses any information available to it in the 272 router to attempt to determine a previous hop to forward the trace 273 towards. Multicast routing protocols vary in the type and amount of 274 state they keep; multicast traceroute endeavors to work with all of 275 them by using whatever is available. For example, if a PIM-SM router 276 is on the (*,G) tree, it chooses the parent towards the RP as the 277 previous hop. In these cases, no source/group-specific state is 278 available, but the path may still be traced. 280 4. Packet Formats 282 Mtrace2 message is encoded in TLV format. If an implementation 283 receives a TLV whose length exceeds the TLV length specified in the 284 Length field, the TLV SHOULD be accepted but any additional data 285 SHOULD be ignored. 287 4.1. Mtrace2 TLV format 289 0 1 2 3 290 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 291 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 292 | Type | Length | Value .... | 293 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 295 Type (8 bits) 297 Length (16 bits) 299 Value (variable length) 301 4.2. Defined TLVs 303 The following TLV Types are defined: 305 Code Type 306 ====== ====================================== 307 1 Mtrace2 Query 308 2 Mtrace2 Response 309 3 Mtrace2 Standard Response Block 310 4 Mtrace2 Augmented Response Block 312 An mtrace2 message MUST contain one Mtrace2 Query or Response. An 313 mtrace2 message MAY contain one or multiple Mtrace2 Standard and 314 Augmented Responses. A multicast router that sends mtrace2 request 315 MUST NOT contain multiple Mtrace2 Standard blocks but MAY contain 316 multiple Augmented Response blocks. 318 The type field is defined to be "0x1" for mtrace2 queries and 319 requests. The type field is changed to "0x2" when the packet is 320 completed and sent as a response from the first hop router to the 321 querier. Two codes are required so that multicast routers will not 322 attempt to process a completed response in those cases where the 323 initial query was issued from a router. 325 5. Mtrace2 Query Header 327 The mtrace2 message is carried as a UDP packet. The UDP source port 328 is uniquely selected by the local host operating system. The UDP 329 destination port is the IANA reserved mtrace2 port number (see 330 Section 13). The UDP checksum MUST be valid in mtrace2 messages. 332 The mtrace2 message includes the common mtrace2 Query header as 333 follows. The header is only filled in by the originator of the 334 mtrace2 Query; intermediate routers MUST NOT modify any of the 335 fields. 337 0 1 2 3 338 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 339 +-+-+-+-+-+-+-+-+ 340 | # hops | 341 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 342 | | 343 | Multicast Address | 344 | | 345 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 346 | | 347 | Source Address | 348 | | 349 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 350 | | 351 | Destination Address | 352 | | 353 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 354 | Query ID | Client Port # | 355 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 357 Figure 1 359 5.1. # hops: 8 bits 361 This field specifies the maximum number of hops that the requester 362 wants to trace. If there is some error condition in the middle of 363 the path that keeps the mtrace2 request from reaching the first-hop 364 router, this field can be used to perform an expanding-ring search to 365 trace the path to just before the problem. 367 5.2. Multicast Address 369 This field specifies the 32 bits length IPv4 or 128 bits length IPv6 370 multicast address to be traced, or is filled with "all 1" in case of 371 IPv4 or with the unspecified address (::) in case of IPv6 if no 372 group-specific information is desired. Note that non-group-specific 373 mtrace2 MUST specify source address. 375 5.3. Source Address 377 This field specifies the 32 bits length IPv4 or 128 bits length IPv6 378 address of the multicast source for the path being traced, or is 379 filled with "all 1" in case of IPv4 or with the unspecified address 380 (::) in case of IPv6 if no source-specific information is desired. 381 Note that non-source-specific traceroutes may not be possible with 382 certain multicast routing protocols. 384 5.4. Destination Address 386 This field specifies the 32 bits length IPv4 or 128 bits length IPv6 387 address of the multicast receiver for the path being traced. The 388 trace starts at this destination and proceeds toward the traffic 389 source. 391 5.5. Query ID: 16 bits 393 This field is used as a unique identifier for this traceroute request 394 so that duplicate or delayed responses may be detected and to 395 minimize collisions when a multicast response address is used. 397 5.6. Client Port # 399 Mtrace2 response is sent back to the address specified in a 400 Destination Address field. This field specifies the UDP port number 401 the router will send Mtrace2 Response. This client port number MUST 402 NOT be changed by any router. 404 6. IPv4 Mtrace2 Standard Response Block 406 Each intermediate IPv4 router in a trace path appends "response data 407 block" to the forwarded trace packet. The standard response data 408 block looks as follows. 410 0 1 2 3 411 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 412 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 413 | Query Arrival Time | 414 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 415 | Incoming Interface Address | 416 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 417 | Outgoing Interface Address | 418 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 419 | Previous-Hop Router Address | 420 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 421 | | 422 . Input packet count on incoming interface . 423 | | 424 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 425 | | 426 . Output packet count on outgoing interface . 427 | | 428 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 429 | | 430 . Total number of packets for this source-group pair . 431 | | 432 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 433 | Rtg Protocol | Multicast Rtg Protocol | 434 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 435 | Fwd TTL | MBZ |S| Src Mask |Forwarding Code| 436 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 438 6.1. Query Arrival Time: 32 bits 440 The Query Arrival Time is a 32-bit NTP timestamp specifying the 441 arrival time of the traceroute request packet at this router. The 442 32-bit form of an NTP timestamp consists of the middle 32 bits of the 443 full 64-bit form; that is, the low 16 bits of the integer part and 444 the high 16 bits of the fractional part. 446 The following formula converts from a UNIX timeval to a 32-bit NTP 447 timestamp: 449 query_arrival_time 450 = (tv.tv_sec + 32384) << 16 + ((tv.tv_usec << 10) / 15625) 452 The constant 32384 is the number of seconds from Jan 1, 1900 to Jan 453 1, 1970 truncated to 16 bits. ((tv.tv_usec << 10) / 15625) is a 454 reduction of ((tv.tv_usec / 100000000) << 16). 456 6.2. Incoming Interface Address: 32 bits 458 This field specifies the address of the interface on which packets 459 from this source and group are expected to arrive, or 0 if unknown or 460 unnumbered. 462 6.3. Outgoing Interface Address: 32 bits 464 This field specifies the address of the interface on which packets 465 from this source and group flow to the specified destination, or 0 if 466 unknown or unnumbered. 468 6.4. Previous-Hop Router Address: 32 bits 470 This field specifies the router from which this router expects 471 packets from this source. This may be a multicast group (e.g. ALL- 472 [protocol]-ROUTERS.MCAST.NET) if the previous hop is not known 473 because of the workings of the multicast routing protocol. However, 474 it should be 0 if the incoming interface address is unknown or 475 unnumbered. 477 6.5. Input packet count on incoming interface: 64 bits 479 This field contains the number of multicast packets received for all 480 groups and sources on the incoming interface, or "all 1" if no count 481 can be reported. This counter may have the same value as 482 ifHCInMulticastPkts from the IF-MIB [14] for this interface. 484 6.6. Output packet count on incoming interface: 64 bits 486 This field contains the number of multicast packets that have been 487 transmitted or queued for transmission for all groups and sources on 488 the outgoing interface, or "all 1" if no count can be reported. This 489 counter may have the same value as ifHCOutMulticastPkts from the IF- 490 MIB for this interface. 492 6.7. Total number of packets for this source-group pair: 64 bits 494 This field counts the number of packets from the specified source 495 forwarded by this router to the specified group, or "all 1" if no 496 count can be reported. If the S bit is set, the count is for the 497 source network, as specified by the Src Mask field. If the S bit is 498 set and the Src Mask field is 63, indicating no source-specific 499 state, the count is for all sources sending to this group. This 500 counter should have the same value as ipMcastRoutePkts from the 501 IPMROUTE-STD-MIB [15] for this forwarding entry. 503 6.8. Rtg Protocol: 16 bits 505 This field describes the routing protocol used to decide an RPF 506 interface for the requested source. This value should have the same 507 value as ipMcastRouteRtProtocol from the IPMROUTE-STD-MIB [15] for 508 this entry. If the router does not able to obtain this value, "all 509 0" must be specified. 511 6.9. Multicast Rtg Protocol: 16 bits 513 This field describes the multicast routing protocol in use between 514 this router and the previous-hop router. This value should have the 515 same value as ipMcastRouteProtocol from the IPMROUTE-STD-MIB [15] for 516 this entry. If the router does not able to obtain this value, "all 517 0" must be specified. 519 6.10. Fwd TTL: 8 bits 521 This field contains the TTL that a packet is required to have before 522 it will be forwarded over the outgoing interface. 524 6.11. MBZ: 8 bit 526 Must be zeroed on transmission and ignored on reception. 528 6.12. S: 1 bit 530 This S bit indicates that the packet count for the source-group pair 531 is for the source network, as determined by masking the source 532 address with the Src Mask field. 534 6.13. Src Mask: 7 bits 536 This field contains the number of 1's in the netmask this router has 537 for the source (i.e. a value of 24 means the netmask is 0xffffff00). 538 If the router is forwarding solely on group state, this field is set 539 to 127 (0x7f). 541 6.14. Forwarding Code: 8 bits 543 This field contains a forwarding information/error code. Section 9.2 544 explains how and when the forwarding code is filled. Defined values 545 are as follows; 547 Value Name Description 548 ----- -------------- ------------------------------------------- 550 0x00 NO_ERROR No error 552 0x01 WRONG_IF Mtrace2 request arrived on an interface 553 to which this router would not forward for 554 this source, group, destination. 556 0x02 PRUNE_SENT This router has sent a prune upstream which 557 applies to the source and group in the 558 traceroute request. 560 0x03 PRUNE_RCVD This router has stopped forwarding for this 561 source and group in response to a request 562 from the next hop router. 564 0x04 SCOPED The group is subject to administrative 565 scoping at this hop. 567 0x05 NO_ROUTE This router has no route for the source or 568 group and no way to determine a potential 569 route. 571 0x06 WRONG_LAST_HOP This router is not the proper last-hop 572 router. 574 0x07 NOT_FORWARDING This router is not forwarding this source, 575 group out the outgoing interface for an 576 unspecified reason. 578 0x08 REACHED_RP Reached Rendezvous Point or Core 580 0x09 RPF_IF Mtrace2 request arrived on the expected 581 RPF interface for this source and group. 583 0x0A NO_MULTICAST Mtrace2 request arrived on an interface 584 which is not enabled for multicast. 586 0x0B INFO_HIDDEN One or more hops have been hidden from this 587 trace. 589 0x0C REACHED_GW Mtrace2 request arrived on a gateway (e.g., 590 a NAT or firewall) that hides the 591 information between this router and the 592 mtrace2 querier 594 0x81 NO_SPACE There was not enough room to insert another 595 response data block in the packet. 597 0x82 OLD_ROUTER The previous-hop router does not understand 598 mtrace2 requests. 600 0x83 ADMIN_PROHIB Mtrace2 is administratively prohibited. 602 Note that if a router discovers there is not enough room in a packet 603 to insert its response, it puts the NO_SPACE error code in the 604 previous router's Forwarding Code field, overwriting any error the 605 previous router placed there. After the router sends the response to 606 the Destination Address in the header, the router continues the 607 mtrace2 query by sending an mtrace2 request containing the same 608 mtrace2 query header. Section 9.3 and Section 10.8 include the 609 details. 611 The 0x80 bit of the Forwarding Code is used to indicate a fatal 612 error. A fatal error is one where the router may know the previous 613 hop but cannot forward the message to it. 615 7. IPv6 Mtrace2 Standard Response Block 617 Each intermediate IPv6 router in a trace path appends "response data 618 block" to the forwarded trace packet. The standard response data 619 block looks as follows. 621 0 1 2 3 622 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 623 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 624 | Query Arrival Time | 625 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 626 | Incoming Interface ID | 627 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 628 | Outgoing Interface ID | 629 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 630 | | 631 * Local Address * 632 | | 633 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 634 | | 635 * Remote Address * 636 | | 637 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 638 | | 639 . Input packet count on incoming interface . 640 | | 641 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 642 | | 643 . Output packet count on outgoing interface . 644 | | 645 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 646 | | 647 . Total number of packets for this source-group pair . 648 | | 649 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 650 | Rtg Protocol | Multicast Rtg Protocol | 651 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 652 | MBZ |S|Src Prefix Len |Forwarding Code| 653 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 655 7.1. Query Arrival Time: 32 bits 657 Same definition described in Section 6.1 659 7.2. Incoming Interface ID: 32 bits 661 This field specifies the interface ID on which packets from this 662 source and group are expected to arrive, or 0 if unknown. This ID 663 should be the value taken from InterfaceIndex of the IF-MIB [14] for 664 this interface. This field is carried in network byte order. 666 7.3. Outgoing Interface ID: 32 bits 668 This field specifies the interface ID on which packets from this 669 source and group flow to the specified destination, or 0 if unknown. 670 This ID should be the value taken from InterfaceIndex of the IF-MIB 671 for this interface. This field is carried in network byte order. 673 7.4. Local Address 675 This field specifies a global IPv6 address that uniquely identifies 676 the router. A unique local unicast address [13] SHOULD NOT be used 677 unless the router is only assigned link-local and unique local 678 addresses. If the router is only assigned link-local addresses, its 679 link-local address can be specified in this field. 681 7.5. Remote Address 683 This field specifies the address of the previous-hop router, which, 684 in most cases, is a link-local unicast address for the queried source 685 and destination addresses. 687 Although a link-local address does not have enough information to 688 identify a node, it is possible to detect the previous-hop router 689 with the assistance of Incoming Interface ID and the current router 690 address (i.e., Local Address). 692 This may be a multicast group (e.g., ALL-[protocol]- 693 ROUTERS.MCAST.NET) if the previous hop is not known because of the 694 workings of the multicast routing protocol. However, it should be 695 the unspecified address (::) if the incoming interface address is 696 unknown. 698 7.6. Input packet count on incoming interface 700 Same definition described in Section 6.5 702 7.7. Output packet count on incoming interface 704 Same definition described in Section 6.6 706 7.8. Total number of packets for this source-group pair 708 This field counts the number of packets from the specified source 709 forwarded by this router to the specified group, or "all 1" if no 710 count can be reported. If the S bit is set, the count is for the 711 source network, as specified by the Src Prefix Len field. If the S 712 bit is set and the Src Prefix Len field is 255, indicating no source- 713 specific state, the count is for all sources sending to this group. 714 This counter should have the same value as ipMcastRoutePkts from the 715 IPMROUTE-STD-MIB for this forwarding entry. 717 7.9. Rtg Protocol: 16 bits 719 Same definition described in Section 6.8 721 7.10. Multicast Rtg Protocol: 16 bits 723 Same definition described in Section 6.9 725 7.11. MBZ: 15 bits 727 Must be zeroed on transmission and ignored on reception. 729 7.12. S: 1 bit 731 This S bit indicates that the packet count for the source-group pair 732 is for the source network, as determined by masking the source 733 address with the Src Prefix Len field. 735 7.13. Src Prefix Len: 8 bits 737 This field contains the prefix length this router has for the source. 738 If the router is forwarding solely on group state, this field is set 739 to 255 (0xff) 741 7.14. Forwarding Code: 8 bits 743 Same definition described in Section 6.14 745 8. Mtrace2 Augmented Response Block 747 In addition to the standard response block, a multicast router on the 748 path will be able to add "augumented response block" when it sends 749 the request to its upstream router or sends the response to the 750 Destination Address. This augmented response block is flexible to 751 add various information. 753 0 1 2 3 754 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 755 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 756 | Type | Value .... | 757 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 759 The augmented response block is always appended to mtrace2 TLV header 760 (0x04). The 16 bits Type filed of the augmented response block is 761 defined for various purposes, such as diagnosis (as in Section 12) 762 and protocol verification. The packet length of the augmented 763 response block is specified in the augmented response block TLV 764 header as seen in Section 4.1. 766 The following augmented response block type is defined: 768 Code Type 769 ====== ================================================= 770 0x01 # Mtrace2 Standard Response Blocks Returned 772 When the NO_SPACE error occurs, the router sends back the mtrace2 773 response with contained data (i.e., all appended response blocks), 774 and continues the mtrace2 query by sending an mtrace2 request as will 775 be described in Section 9.3. In this mtrace2 request, the router 776 appends the augmented response block with the code "0x01" and the 777 number of returned mtrace2 response blocks. Every router between 778 this router and the first-hop router can recognize the limit number 779 of hops by referring this number and the # hops in the header. 781 This document only defines the above augmented response block type 782 and does not define other augmented response block types. Specifing 783 how to deal with diagnosis information will be also described in 784 separate documents. 786 9. Router Behavior 788 All of these actions are performed in addition to (NOT instead of) 789 forwarding the packet, if applicable. E.g. a multicast packet that 790 has TTL or the hop limit remaining MUST be forwarded normally, as 791 MUST a unicast packet that has TTL or the hop limit remaining and is 792 not addressed to this router. 794 9.1. Traceroute Query 796 An mtrace2 Query message is a traceroute message with no response 797 blocks filled in, and uses TLV type 0x1 for IPv4 and IPv6 mtrace2. 799 9.1.1. Packet Verification 801 Upon receiving an mtrace2 Query message, a router must examine the 802 Query to see if it is the proper last-hop router for the destination 803 address in the packet. It is the proper last-hop router if it has a 804 multicast-capable interface on the same subnet as the Destination 805 Address and is the router that would forward traffic from the given 806 (S,G) onto that subnet. 808 If the router determines that it is not the proper last-hop router, 809 or it cannot make that determination, it does one of two things 810 depending if the Query was received via multicast or unicast. If the 811 Query was received via multicast, then it MUST be silently dropped. 812 If it was received via unicast, a forwarding code of WRONG_LAST_HOP 813 is noted and processing continues as in Section 9.2 815 Duplicate Query messages as identified by the tuple (IP Source, Query 816 ID) SHOULD be ignored. This MAY be implemented using a simple 1-back 817 cache (i.e. remembering the IP source and Query ID of the previous 818 Query message that was processed, and ignoring future messages with 819 the same IP Source and Query ID). Duplicate Request messages MUST 820 NOT be ignored in this manner. 822 9.1.2. Normal Processing 824 When a router receives an mtrace2 Query and it determines that it is 825 the proper last-hop router, it treats it like an mtrace2 Request and 826 performs the steps listed in Section 9.2 828 9.2. Mtrace2 Request 830 An mtrace2 Request is a traceroute message with some number of 831 response blocks filled in, and uses TLV type 0x1 for IPv4 and IPv6 832 mtrace2. Routers can tell the difference between Queries and 833 Requests by checking the length of the packet. 835 9.2.1. Packet Verification 837 If the mtrace2 Request does not come from an adjacent host or router, 838 it MUST be silently ignored. If the mtrace2 Request is not addressed 839 to this router, or if the Request is addressed to a multicast group 840 which is not a link-scoped group (i.e. 224/24 for IPv4, FFx2::/16 [3] 841 for IPv6), it MUST be silently ignored. GTSM [16] SHOULD be used by 842 the router to determine whether the host or router is adjacent or 843 not. 845 9.2.2. Normal Processing 847 When a router receives an mtrace2 Request, it performs the following 848 steps. Note that it is possible to have multiple situations covered 849 by the Forwarding Codes. The first one encountered is the one that 850 is reported, i.e. all "note forwarding code N" should be interpreted 851 as "if forwarding code is not already set, set forwarding code to N". 853 1. If there is room in the current buffer (or the router can 854 efficiently allocate more space to use), insert a new response 855 block into the packet and fill in the Query Arrival Time, 856 Outgoing Interface Address (for IPv4 mtrace2) or Outgoing 857 Interface ID (for IPv6 mtrace2), Output Packet Count, and Fwd 858 TTL (for IPv4 mtrace2). If there was no room, fill in the 859 response code "NO_SPACE" in the *previous* hop's response block, 860 and forward the packet to the address specified in the 861 Destination Address field and continue the trace as described in 862 Section 9.3. 864 2. Attempt to determine the forwarding information for the source 865 and group specified, using the same mechanisms as would be used 866 when a packet is received from the source destined for the 867 group. State need not be instantiated, it can be "phantom" 868 state created only for the purpose of the trace, such as "dry- 869 run". 871 If using a shared-tree protocol and there is no source-specific 872 state, or if no source-specific information is desired (i.e., 873 "all 1" for IPv4 or unspecified address (::) for IPv6), group 874 state should be used. If there is no group state or no group- 875 specific information is desired, potential source state (i.e. 876 the path that would be followed for a source-specific Join) 877 should be used. If this router is the Core or RP and no source- 878 specific state is available (e.g., this router has been 879 receiving PIM Register messages from the first-hop router), note 880 a code of REACHED_RP. 882 3. If no forwarding information can be determined, the router notes 883 an error code of NO_ROUTE, sets the remaining fields that have 884 not yet been filled in to zero, and then forwards the packet to 885 the requester as described in Section 9.3. 887 4. Fill in the Incoming Interface Address, Previous-Hop Router 888 Address, Input Packet Count, Total Number of Packets, Routing 889 Protocol, S, and Src Mask from the forwarding information that 890 was determined. 892 5. If mtrace2 is administratively prohibited or the previous hop 893 router does not understand mtrace2 requests, note the 894 appropriate forwarding code (ADMIN_PROHIB or OLD_ROUTER). If 895 mtrace2 is administratively prohibited and any of the fields as 896 filled in step 4 are considered private information, zero out 897 the applicable fields. Then the packet is forwarded to the 898 requester as described in Section 9.3. 900 6. If the reception interface is not enabled for multicast, note 901 forwarding code NO_MULTICAST. If the reception interface is the 902 interface from which the router would expect data to arrive from 903 the source, note forwarding code RPF_IF. Otherwise, if the 904 reception interface is not one to which the router would forward 905 data from the source to the group, a forwarding code of WRONG_IF 906 is noted. 908 7. If the group is subject to administrative scoping on either the 909 Outgoing or Incoming interfaces, a forwarding code of SCOPED is 910 noted. 912 8. If this router is the Rendezvous Point or Core for the group, a 913 forwarding code of REACHED_RP is noted. 915 9. If this router has sent a prune upstream which applies to the 916 source and group in the mtrace2 Request, it notes forwarding 917 code PRUNE_SENT. If the router has stopped forwarding 918 downstream in response to a prune sent by the next hop router, 919 it notes forwarding code PRUNE_RCVD. If the router should 920 normally forward traffic for this source and group downstream 921 but is not, it notes forwarding code NOT_FORWARDING. 923 10. If this router is a gateway (e.g., a NAT or firewall) that hides 924 the information between this router and the mtrace2 querier, it 925 notes forwarding code REACHED_GW. 927 11. The packet is then sent on to the previous hop or the 928 Destination Address as described in Section 9.3. 930 9.3. Forwarding Mtrace2 Requests 932 If the Previous-hop router is known for this request and the number 933 of response blocks is less than the number requested (i.e., the "# 934 hops" field in mtrace2 header), the packet is sent to that router. 935 If the Incoming Interface is known but the Previous-hop router is not 936 known, the packet is sent to an appropriate multicast address on the 937 Incoming Interface. The appropriate multicast address may depend on 938 the routing protocol in use, MUST be a link-scoped group (i.e. 224/24 939 for IPv4, FF02::/16 for IPv6), MUST NOT be ALL-SYSTEMS.MCAST.NET 940 (224.0.0.1) for IPv4 and All Nodes Address (FF02::1) for IPv6, and 941 MAY be ALL-ROUTERS.MCAST.NET (224.0.0.2) for IPv4 or All Routers 942 Address (FF02::2) for IPv6 if the routing protocol in use does not 943 define a more appropriate group. Otherwise, it is sent to the 944 Destination Address in the header. 946 When the REACHED_GW code is noted, the router sends back the mtrace2 947 response as in Section 9.4. In addition to that, it must continue 948 the mtrace2 query by proxying the original querier as in Section 9.5. 950 When the NO_SPACE error occurs, the router sends back the mtrace2 951 response with contained data and the NO_SPACE error code as in 952 Section 9.4, and continues the mtrace2 query by sending an mtrace2 953 request containing the same mtrace2 query header and its standard and 954 augmented response blocks. The corresponding augmented response 955 block type is "# Mtrace2 Response Blocks Returned" described in 956 Section 8. 958 9.4. Sending Mtrace2 Responses 960 9.4.1. Destination Address 962 An mtrace2 Response must be sent to the address specified in the 963 Destination Address field in the mtrace2 query header. 965 9.4.2. Source Address 967 An mtrace2 Response must be sent with the address of the router's 968 reception interface. 970 9.5. Proxying Mtrace2 Queries 972 When a gateway (e.g., a NAT or firewall) that needs to block unicast 973 packets to the mtrace2 querier or hide information between the 974 gateway and the mtrace2 querier receives mtrace2 query from an 975 adjacent host or mtrace2 request from an adjacent router, it sends 976 back the mtrace2 response with contained data and the REACHED_GW code 977 to the address specified in the Destination Address field in the 978 mtrace2 query header. 980 At the same time, the gateway prepares a new mtrace2 query message. 981 The gateway uses the original mtrace2 query header as the base for 982 the new mtrace2 query; it sets the Destination Address to its 983 Incoming Interface address and the Client Port # to its own port 984 (which may be the same as the mtrace2 port as the gateway is 985 listening on that port), and decreases # hops according to the number 986 of standard response blocks in the returned mtrace2 response from the 987 gateway. The mtrace2 query message is sent to the previous-hop 988 router or to an appropriate multicast address on the Incoming 989 Interface. 991 When the gateway receives the mtrace2 response from the first-hop 992 router or any intermediate router, it MUST forward the mtrace2 993 response back to the mtrace2 querier with the original mtrace2 query 994 header. 996 9.6. Hiding Information 998 Information about a domain's topology and connectivity may be hidden 999 from multicast traceroute requests. The INFO_HIDDEN forwarding code 1000 may be used to note that, for example, the incoming interface address 1001 and packet count are for the entrance to the domain and the outgoing 1002 interface address and packet count are the exit from the domain. The 1003 source-group packet count may be from either router or not specified 1004 (all 1). 1006 10. Client Behavior 1008 10.1. Sending Mtrace2 Queries 1010 When the destination of the mtrace2 is the machine running the 1011 client, the mtrace2 Query packet can be sent to the ALL- 1012 ROUTERS.MCAST.NET (224.0.0.2) for IPv4 or All Routers Address 1013 (FF02::2) for IPv6. This will ensure that the packet is received by 1014 the last-hop router on the subnet. Otherwise, if the proper last-hop 1015 router is known for the mtrace2 destination, the Query could be 1016 unicasted to that router. 1018 See also Section 10.4 on determining the last-hop router. 1020 10.2. Determining the Path 1022 The client could send a small number of initial query messages with a 1023 large "# hops" field, in order to try to trace the full path. If 1024 this attempt fails, one strategy is to perform a linear search (as 1025 the traditional unicast traceroute program does); set the "# hops" 1026 field to 1 and try to get a response, then 2, and so on. If no 1027 response is received at a certain hop, the hop count can continue 1028 past the non-responding hop, in the hopes that further hops may 1029 respond. These attempts should continue until a user-defined timeout 1030 has occurred. 1032 See also Section 10.5 and Section 10.6 on receiving the results of a 1033 trace. 1035 10.3. Collecting Statistics 1037 After a client has determined that it has traced the whole path or as 1038 much as it can expect to (see Section 10.7), it might collect 1039 statistics by waiting a short time and performing a second trace. If 1040 the path is the same in the two traces, statistics can be displayed 1041 as described in Section 12.3 and Section 12.4. 1043 10.4. Last Hop Router 1045 The mtrace2 querier may not know which is the last hop router, or 1046 that router may be behind a firewall that blocks unicast packets but 1047 passes multicast packets. In these cases, the mtrace2 request should 1048 be multicasted to ALL-ROUTERS.MCAST.NET (224.0.0.2) for IPv4 or All 1049 Routers Address (FF02::2) for IPv6. All routers except the correct 1050 last hop router should ignore any mtrace2 request received via 1051 multicast. Mtrace2 requests which are multicasted to the group being 1052 traced must include the Router Alert option[6][7]. 1054 Another alternative is to unicast to the trace destination. Mtrace2 1055 requests which are unicasted to the trace destination must include 1056 the Router Alert option, in order that the last-hop router is aware 1057 of the packet. 1059 10.5. First Hop Router 1061 The IANA assigned 224.0.1.32, MTRACE.MCAST.NET as the default 1062 multicast group for IPv4 mtrace responses, in order to support mtrace 1063 queriers that are not unicast reachable from the first hop router. 1064 However, mtrace2 does not reserve any IPv4/IPv6 multicast addresses 1065 for mtrace2 responses. Every mtrace2 response is sent to the unicast 1066 address specified in the Destination Address field of the mtrace2 1067 query header. 1069 10.6. Broken Intermediate Router 1071 A broken intermediate router might simply not understand mtrace2 1072 packets, and drop them. The querier would then get no response at 1073 all from its mtrace2 requests. It should then perform a hop-by-hop 1074 search by setting the number of responses field until it gets a 1075 response (both linear and binary search are options, but binary is 1076 likely to be slower because a failure requires waiting for a 1077 timeout). 1079 10.7. Mtrace2 Termination 1081 When performing an expanding hop-by-hop trace, it is necessary to 1082 determine when to stop expanding. 1084 10.7.1. Arriving at source 1086 A trace can be determined to have arrived at the source if the 1087 Incoming Interface of the last router in the trace is non-zero, but 1088 the Previous Hop router is zero. 1090 10.7.2. Fatal error 1092 A trace has encountered a fatal error if the last Forwarding Error in 1093 the trace has the 0x80 bit set. 1095 10.7.3. No previous hop 1097 A trace can not continue if the last Previous Hop in the trace is set 1098 to 0. 1100 10.7.4. Traceroute shorter than requested 1102 If the trace that is returned is shorter than requested (i.e. the 1103 number of response blocks is smaller than the "# hops" field), the 1104 trace encountered an error and could not continue. 1106 10.8. Continuing after an error 1108 When the NO_SPACE error occurs, as described in Section 9.3, the 1109 multicast routers sends back the mtrace2 response to the address 1110 specified in the Destination Address field in the mtrace2 query 1111 header. In this case, the mtrace2 client may receive multiple 1112 mtrace2 responses from different routers (along the path). After the 1113 client receives multiple mtrace2 response messages, it integrates 1114 (i.e. constructs) them as a single mtrace2 response message. 1116 If a trace times out, it is likely to be because a router in the 1117 middle of the path does not support multicast traceroute. That 1118 router's address will be in the Previous Hop field of the last entry 1119 in the last response packet received. A client may be able to 1120 determine (via mrinfo or SNMP [13][15]) a list of neighbors of the 1121 non-responding router. If desired, each of those neighbors could be 1122 probed to determine the remainder of the path. Unfortunately, this 1123 heuristic may end up with multiple paths, since there is no way of 1124 knowing what the non-responding router's algorithm for choosing a 1125 previous-hop router is. However, if all paths but one flow back 1126 towards the non-responding router, it is possible to be sure that 1127 this is the correct path. 1129 11. Protocol-Specific Considerations 1131 11.1. PIM-SM 1133 When a multicast traceroute reaches a PIM-SM RP and the RP does not 1134 forward the trace on, it means that the RP has not performed a 1135 source-specific join so there is no more state to trace. However, 1136 the path that traffic would use if the RP did perform a source- 1137 specific join can be traced by setting the trace destination to the 1138 RP, the trace source to the traffic source, and the trace group to 0. 1139 This trace Query may be unicasted to the RP. 1141 11.2. Bi-Directional PIM 1143 Bi-directional PIM [9] is a variant of PIM-SM that builds bi- 1144 directional shared trees connecting multicast sources and receivers. 1145 Along the bi-directional shared trees, multicast data is natively 1146 forwarded from sources to the RPA (Rendezvous Point Address) and from 1147 the RPA to receivers without requiring source-specific state. In 1148 contrast to PIM-SM, RP always has the state to trace. 1150 A Designated Forwarder (DF) for a given RPA is in charge of 1151 forwarding downstream traffic onto its link, and forwarding upstream 1152 traffic from its link towards the RPL (Rendezvous Point Link) that 1153 the RPA belongs to. Hence mtrace2 reports DF addresses or RPA along 1154 the path. 1156 11.3. PIM-DM 1158 Routers running PIM Dense Mode do not know the path packets would 1159 take unless traffic is flowing. Without some extra protocol 1160 mechanism, this means that in an environment with multiple possible 1161 paths with branch points on shared media, multicast traceroute can 1162 only trace existing paths, not potential paths. When there are 1163 multiple possible paths but the branch points are not on shared 1164 media, the previous hop router is known, but the last hop router may 1165 not know that it is the appropriate last hop. 1167 When traffic is flowing, PIM Dense Mode routers know whether or not 1168 they are the last-hop forwarder for the link (because they won or 1169 lost an Assert battle) and know who the previous hop is (because it 1170 won an Assert battle). Therefore, multicast traceroute is always 1171 able to follow the proper path when traffic is flowing. 1173 11.4. IGMP/MLD Proxy 1175 When a mtrace2 Query packet reaches an incoming interface of IGMP/MLD 1176 Proxy [10], it puts a WRONG_IF (0x01) value in Forwarding Code of 1177 mtrace2 standard response block (as in Section 6.14) and sends the 1178 mtrace2 response back to the Destination Address. When a mtrace2 1179 Query packet reaches an outgoing interface of IGMP/MLD proxy, it is 1180 forwarded through its incoming interface towards the upstream router. 1182 11.5. AMT 1184 AMT [11] provides the multicast connectivity to the unicast-only 1185 inter-network. To do this, multicast packets being sent to or from a 1186 site are encapsulated in unicast packets. When a mtrace2 query 1187 packet reaches an AMT pseudo-interface of an AMT gateway, the AMT 1188 gateway encapsulats it to a particular AMT relay reachable across the 1189 unicast-only infrastructure. Then the AMT relay decapsulates the 1190 mtrace2 query packet and forwards the mtrace2 request to the 1191 appropriate multicast router. 1193 12. Problem Diagnosis 1195 12.1. Forwarding Inconsistencies 1197 The forwarding error code can tell if a group is unexpectedly pruned 1198 or administratively scoped. 1200 12.2. TTL or Hop Limit Problems 1202 By taking the maximum of hops (from source + forwarding TTL (or hop 1203 limit) threshold) over all hops, it is possible to discover the TTL 1204 or hop limit required for the source to reach the destination. 1206 12.3. Packet Loss 1208 By taking two traces, it is possible to find packet loss information 1209 by comparing the difference in input packet counts to the difference 1210 in output packet counts for the specified source-group address pair 1211 at the previous hop. On a point-to-point link, any difference in 1212 these numbers implies packet loss. Since the packet counts may be 1213 changing as the mtrace2 query is propagating, there may be small 1214 errors (off by 1 or 2 or more) in these statistics. However, these 1215 errors will not accumulate if multiple traces are taken to expand the 1216 measurement period. On a shared link, the count of input packets can 1217 be larger than the number of output packets at the previous hop, due 1218 to other routers or hosts on the link injecting packets. This 1219 appears as "negative loss" which may mask real packet loss. 1221 In addition to the counts of input and output packets for all 1222 multicast traffic on the interfaces, the response data includes a 1223 count of the packets forwarded by a node for the specified source- 1224 group pair. Taking the difference in this count between two traces 1225 and then comparing those differences between two hops gives a measure 1226 of packet loss just for traffic from the specified source to the 1227 specified receiver via the specified group. This measure is not 1228 affected by shared links. 1230 On a point-to-point link that is a multicast tunnel, packet loss is 1231 usually due to congestion in unicast routers along the path of that 1232 tunnel. On native multicast links, loss is more likely in the output 1233 queue of one hop, perhaps due to priority dropping, or in the input 1234 queue at the next hop. The counters in the response data do not 1235 allow these cases to be distinguished. Differences in packet counts 1236 between the incoming and outgoing interfaces on one node cannot 1237 generally be used to measure queue overflow in the node. 1239 12.4. Link Utilization 1241 Again, with two traces, you can divide the difference in the input or 1242 output packet counts at some hop by the difference in time stamps 1243 from the same hop to obtain the packet rate over the link. If the 1244 average packet size is known, then the link utilization can also be 1245 estimated to see whether packet loss may be due to the rate limit or 1246 the physical capacity on a particular link being exceeded. 1248 12.5. Time Delay 1250 If the routers have synchronized clocks, it is possible to estimate 1251 propagation and queuing delay from the differences between the 1252 timestamps at successive hops. However, this delay includes control 1253 processing overhead, so is not necessarily indicative of the delay 1254 that data traffic would experience. 1256 13. IANA Considerations 1258 The following new assignments can only be made via a Standards Action 1259 as specified in [4]. 1261 13.1. Forwarding Codes 1263 New Forwarding codes must only be created by an RFC that modifies 1264 this document's Section 10, fully describing the conditions under 1265 which the new forwarding code is used. The IANA may act as a central 1266 repository so that there is a single place to look up forwarding 1267 codes and the document in which they are defined. 1269 13.2. UDP Destination Port and IPv6 Address 1271 The IANA should allocate UDP destination port for multicast 1272 traceroute version 2 upon publication of the first RFC. 1274 14. Security Considerations 1276 14.1. Topology Discovery 1278 Mtrace2 can be used to discover any actively-used topology. If your 1279 network topology is a secret, mtrace2 may be restricted at the border 1280 of your domain, using the ADMIN_PROHIB forwarding code. 1282 14.2. Traffic Rates 1284 Mtrace2 can be used to discover what sources are sending to what 1285 groups and at what rates. If this information is a secret, mtrace2 1286 may be restricted at the border of your domain, using the 1287 ADMIN_PROHIB forwarding code. 1289 14.3. Limiting Query/Request Rates 1291 Routers should limit mtrace2 queries and requests by ignoring the 1292 received messages. Routers MAY randomly ignore the received messages 1293 to minimize the processing overhead, i.e., to keep fairness in 1294 processing queries. 1296 15. Acknowledgements 1298 This specification started largely as a transcription of Van 1299 Jacobson's slides from the 30th IETF, and the implementation in 1300 mrouted 3.3 by Ajit Thyagarajan. Van's original slides credit Steve 1301 Casner, Steve Deering, Dino Farinacci and Deb Agrawal. The original 1302 multicast traceroute client, mtrace (version 1), has been implemented 1303 by Ajit Thyagarajan, Steve Casner and Bill Fenner. 1305 The idea of unicasting a multicast traceroute Query to the 1306 destination of the trace with Router Alert set is due to Tony 1307 Ballardie. The idea of the "S" bit to allow statistics for a source 1308 subnet is due to Tom Pusateri. 1310 For the mtrace version 2 specification, extensive comments were 1311 received from Yiqun Cai, Liu Hui, Bharat Joshi, Pekka Savola, 1312 Shinsuke Suzuki, Dave Thaler, Achmad Husni Thamrin, and Cao Wei. 1314 16. References 1316 16.1. Normative References 1318 [1] Bradner, S., "Key words for use in RFCs to indicate requirement 1319 levels", RFC 2119, March 1997. 1321 [2] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) 1322 Specification", RFC 2460, December 1998. 1324 [3] Hinden, R. and S. Deering, "IP Version 6 Addressing 1325 Architecture", RFC 2373, July 1998. 1327 [4] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA 1328 Considerations Section in RFCs", RFC 2434, October 1998. 1330 [5] Braden, B., Borman, D., and C. Partridge, "Computing the 1331 Internet Checksum", RFC 1071, September 1988. 1333 [6] Katz, D., "IP Router Alert Option", RFC 2113, February 1997. 1335 [7] Partridge, C. and A. Jackson, "IPv6 Router Alert Option", 1336 RFC 2711, October 1999. 1338 [8] Fenner, B., Handley, M., Holbrook, H., and I. Kouvelas, 1339 "Protocol Independent Multicast - Sparse Mode (PIM-SM): 1340 Protocol Specification (Revised)", RFC 4601, August 2006. 1342 [9] Handley, M., Kouvelas, I., Speakman, T., and L. Vicisano, 1343 "Bidirectional Protocol Independent Multicast (BIDIR-PIM)", 1344 RFC 5015, October 2007. 1346 [10] Fenner, B., He, H., Haberman, B., and H. Sandick, "Internet 1347 Group Management Protocol (IGMP) / Multicast Listener Discovery 1348 (MLD)-Based Multicast Forwarding ("IGMP/MLD Proxying")", 1349 RFC 4605, August 2006. 1351 [11] Thaler, D., Talwar, M., Aggarwal, A., Vicisano, L., and T. 1352 Pusateri, "Automatic IP Multicast Without Explicit Tunnels 1353 (AMT)", draft-ietf-mboned-auto-multicast-08.txt (work in 1354 progress), October 2007. 1356 16.2. Informative References 1358 [12] Cain, B., Deering, S., Kouvelas, I., Fenner, B., and A. 1359 Thyagarajan, "Internet Group Management Protocol, Version 3", 1360 RFC 3376, October 2002. 1362 [13] Draves, R. and D. Thaler, "Default Router Preferences and More- 1363 Specific Routes", RFC 4191, November 2005. 1365 [14] McCloghrie, K. and F. Kastenholz, "The Interfaces Group MIB", 1366 RFC 2863, June 2000. 1368 [15] McWalter, D., Thaler, D., and A. Kessler, "IP Multicast MIB", 1369 RFC 5132, December 2007. 1371 [16] Gill, V., Heasley, J., Meyer, D., Savola, P., and C. Pignataro, 1372 "The Generalized TTL Security Mechanism (GTSM)", RFC 5082, 1373 October 2007. 1375 Authors' Addresses 1377 Hitoshi Asaeda 1378 Keio University 1379 Graduate School of Media and Governance 1380 Fujisawa, Kanagawa 252-8520 1381 Japan 1383 Email: asaeda@wide.ad.jp 1384 URI: http://www.sfc.wide.ad.jp/~asaeda/ 1386 Tatuya Jinmei 1387 Internet Systems Consortium 1388 Redwood City, CA 94063 1389 US 1391 Email: Jinmei_Tatuya@isc.org 1393 William C. Fenner 1394 Arastra, Inc. 1395 Menlo Park, CA 94025 1396 US 1398 Email: fenner@fenron.com 1400 Stephen L. Casner 1401 Packet Design, Inc. 1402 Palo Alto, CA 94304 1403 US 1405 Email: casner@packetdesign.com