idnits 2.17.1 draft-ietf-mboned-mtrace-v2-11.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. 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. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (October 26, 2014) is 3469 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 2460 (ref. '2') (Obsoleted by RFC 8200) ** Obsolete normative reference: RFC 5226 (ref. '4') (Obsoleted by RFC 8126) ** Obsolete normative reference: RFC 4601 (ref. '5') (Obsoleted by RFC 7761) Summary: 3 errors (**), 0 flaws (~~), 4 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 MBONED Working Group H. Asaeda 3 Internet-Draft NICT 4 Intended status: Standards Track W. Lee, Ed. 5 Expires: April 29, 2015 6 October 26, 2014 8 Mtrace Version 2: Traceroute Facility for IP Multicast 9 draft-ietf-mboned-mtrace-v2-11 11 Abstract 13 This document describes the IP multicast traceroute facility, named 14 Mtrace version 2 (Mtrace2). Unlike unicast traceroute, Mtrace2 15 requires special implementations on the part of routers. This 16 specification describes the required functionality in multicast 17 routers, as well as how an Mtrace2 client invokes a query and 18 receives a reply. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at http://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on April 29, 2015. 37 Copyright Notice 39 Copyright (c) 2014 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (http://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 55 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 56 2.1. Definitions . . . . . . . . . . . . . . . . . . . . . . . 5 57 3. Packet Formats . . . . . . . . . . . . . . . . . . . . . . . 6 58 3.1. Mtrace2 TLV format . . . . . . . . . . . . . . . . . . . 7 59 3.2. Defined TLVs . . . . . . . . . . . . . . . . . . . . . . 7 60 3.2.1. Mtrace2 Query . . . . . . . . . . . . . . . . . . . . 8 61 3.2.2. Mtrace2 Request . . . . . . . . . . . . . . . . . . . 10 62 3.2.3. Mtrace2 Reply . . . . . . . . . . . . . . . . . . . . 10 63 3.2.4. IPv4 Mtrace2 Standard Response Block . . . . . . . . 11 64 3.2.5. IPv6 Mtrace2 Standard Response Block . . . . . . . . 14 65 3.2.6. Mtrace2 Augmented Response Block . . . . . . . . . . 17 66 3.2.7. Mtrace2 Extended Query Block . . . . . . . . . . . . 18 67 4. Router Behavior . . . . . . . . . . . . . . . . . . . . . . . 19 68 4.1. Receiving Mtrace2 Query . . . . . . . . . . . . . . . . . 19 69 4.1.1. Query Packet Verification . . . . . . . . . . . . . . 19 70 4.1.2. Query Normal Processing . . . . . . . . . . . . . . . 20 71 4.2. Receiving Mtrace2 Request . . . . . . . . . . . . . . . . 20 72 4.2.1. Request Packet Verification . . . . . . . . . . . . . 20 73 4.2.2. Request Normal Processing . . . . . . . . . . . . . . 20 74 4.3. Forwarding Mtrace2 Request . . . . . . . . . . . . . . . 22 75 4.3.1. Destination Address . . . . . . . . . . . . . . . . . 22 76 4.3.2. Source Address . . . . . . . . . . . . . . . . . . . 23 77 4.3.3. Appending Standard Response Block . . . . . . . . . . 23 78 4.4. Sending Mtrace2 Reply . . . . . . . . . . . . . . . . . . 23 79 4.4.1. Destination Address . . . . . . . . . . . . . . . . . 23 80 4.4.2. Source Address . . . . . . . . . . . . . . . . . . . 23 81 4.4.3. Appending Standard Response Block . . . . . . . . . . 24 82 4.5. Proxying Mtrace2 Query . . . . . . . . . . . . . . . . . 24 83 4.6. Hiding Information . . . . . . . . . . . . . . . . . . . 24 84 5. Client Behavior . . . . . . . . . . . . . . . . . . . . . . . 25 85 5.1. Sending Mtrace2 Query . . . . . . . . . . . . . . . . . . 25 86 5.1.1. Destination Address . . . . . . . . . . . . . . . . . 25 87 5.1.2. Source Address . . . . . . . . . . . . . . . . . . . 25 88 5.2. Determining the Path . . . . . . . . . . . . . . . . . . 25 89 5.3. Collecting Statistics . . . . . . . . . . . . . . . . . . 25 90 5.4. Last Hop Router (LHR) . . . . . . . . . . . . . . . . . . 26 91 5.5. First Hop Router (FHR) . . . . . . . . . . . . . . . . . 26 92 5.6. Broken Intermediate Router . . . . . . . . . . . . . . . 26 93 5.7. Non-Supported Router . . . . . . . . . . . . . . . . . . 26 94 5.8. Mtrace2 Termination . . . . . . . . . . . . . . . . . . . 27 95 5.8.1. Arriving at Source . . . . . . . . . . . . . . . . . 27 96 5.8.2. Fatal Error . . . . . . . . . . . . . . . . . . . . . 27 97 5.8.3. No Upstream Router . . . . . . . . . . . . . . . . . 27 98 5.8.4. Reply Timeout . . . . . . . . . . . . . . . . . . . . 27 99 5.9. Continuing after an Error . . . . . . . . . . . . . . . . 27 100 6. Protocol-Specific Considerations . . . . . . . . . . . . . . 28 101 6.1. PIM-SM . . . . . . . . . . . . . . . . . . . . . . . . . 28 102 6.2. Bi-Directional PIM . . . . . . . . . . . . . . . . . . . 28 103 6.3. PIM-DM . . . . . . . . . . . . . . . . . . . . . . . . . 28 104 6.4. IGMP/MLD Proxy . . . . . . . . . . . . . . . . . . . . . 29 105 7. Problem Diagnosis . . . . . . . . . . . . . . . . . . . . . . 29 106 7.1. Forwarding Inconsistencies . . . . . . . . . . . . . . . 29 107 7.2. TTL or Hop Limit Problems . . . . . . . . . . . . . . . . 29 108 7.3. Packet Loss . . . . . . . . . . . . . . . . . . . . . . . 29 109 7.4. Link Utilization . . . . . . . . . . . . . . . . . . . . 30 110 7.5. Time Delay . . . . . . . . . . . . . . . . . . . . . . . 30 111 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 30 112 8.1. Forwarding Codes . . . . . . . . . . . . . . . . . . . . 30 113 8.2. UDP Destination Port . . . . . . . . . . . . . . . . . . 31 114 9. Security Considerations . . . . . . . . . . . . . . . . . . . 31 115 9.1. Addresses in Mtrace2 Header . . . . . . . . . . . . . . . 31 116 9.2. Topology Discovery . . . . . . . . . . . . . . . . . . . 31 117 9.3. Characteristics of Multicast Channel . . . . . . . . . . 31 118 9.4. Limiting Query/Request Rates . . . . . . . . . . . . . . 31 119 9.5. Limiting Reply Rates . . . . . . . . . . . . . . . . . . 31 120 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 32 121 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 32 122 11.1. Normative References . . . . . . . . . . . . . . . . . . 32 123 11.2. Informative References . . . . . . . . . . . . . . . . . 33 124 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 33 126 1. Introduction 128 Given a multicast distribution tree, tracing from a multicast source 129 to a receiver is difficult, since we do not know which branch of the 130 multicast tree the receiver lies. This means that we have to flood 131 the whole tree to find the path from a source to a receiver. On the 132 other hand, walking up the tree from a receiver to a source is easy, 133 as most existing multicast routing protocols know the upstream router 134 for each source. Tracing from a receiver to a source can involve 135 only the routers on the direct path. 137 This document specifies the multicast traceroute facility named 138 Mtrace version 2 or Mtrace2 which allows the tracing of an IP 139 multicast routing path. Mtrace2 is usually initiated from a Mtrace2 140 client towards a specified source, or a Rendezvous Point (RP) if no 141 source address is specified. RP is a special router where the source 142 and receiver meet in PIM-SM [5]. Moreover, Mtrace2 provides 143 additional information such as the packet rates and losses, as well 144 as other diagnosis information. Especially, Mtrace2 can be used for 145 the following purposes: 147 o To trace the path that a packet would take from a source to a 148 receiver. 150 o To isolate packet loss problems (e.g., congestion). 152 o To isolate configuration problems (e.g., TTL threshold). 154 Figure 1 shows a typical case on how Mtrace2 is used. FHR represents 155 the first-hop router, LHR represents the last-hop router, and the 156 arrow lines represent the Mtrace2 messages that are sent from one 157 node to another. The numbers before the Mtrace2 messages represent 158 the sequence of the messages that would happen. Source, Receiver and 159 Mtrace2 client are typically a host on the Internet. 161 2. Request 2. Request 162 +----+ +----+ 163 | | | | 164 v | v | 165 +--------+ +-----+ +-----+ +----------+ 166 | Source |----| FHR |----- The Internet -----| LHR |----| Receiver | 167 +--------+ +-----+ | +-----+ +----------+ 168 \ | ^ 169 \ | / 170 \ | / 171 \ | / 172 3. Reply \ | / 1. Query 173 \ | / 174 \ | / 175 \ +---------+ / 176 v | Mtrace2 |/ 177 | client | 178 +---------+ 180 Figure 1 182 When an Mtrace2 client initiates a multicast trace anywhere on the 183 Internet, it sends an Mtrace2 Query packet to the LHR for a multicast 184 group and a source address. The LHR turns the Query packet into a 185 Request, appends a standard response block containing its interface 186 addresses and packet statistics to the Request packet, then forwards 187 the packet towards the source. The Request packet is either 188 unicasted to its upstream router towards the source, or multicasted 189 to the group if the upstream router's IP address is not known. In a 190 similar fashion, each router along the path to the source appends a 191 standard response block to the end of the Request packet before 192 forwarding it to its upstream router. When the FHR receives the 193 Request packet, it appends its own standard response block, turns the 194 Request packet into a Reply, and unicasts the Reply back to the 195 Mtrace2 client. 197 The Mtrace2 Reply may be returned before reaching the FHR if it 198 reaches the RP first, or a fatal error condition such as "no route" 199 is encountered along the path, or the hop count is exceeded. 201 The Mtrace2 client waits for the Mtrace2 Reply message and displays 202 the results. When not receiving an Mtrace2 Reply message due to 203 network congestion, a broken router (see Section 5.6), or a non- 204 responding router (see Section 5.7), the Mtrace2 client may resend 205 another Mtrace2 Query with a lower hop count (see Section 3.2.1), and 206 repeat the process until it receives an Mtrace2 Reply message. The 207 details are Mtrace2 client specific, and it is outside the scope of 208 this document. 210 Note that when a router's control plane and forwarding plane are out 211 of sync, the Mtrace2 Requests might be forwarded based on the control 212 states instead. In which case, the traced path might not represent 213 the real path the data packets would follow. 215 Mtrace2 supports both IPv4 and IPv6. Unlike the previous version of 216 Mtrace, which implements its query and response as IGMP messages [8], 217 all Mtrace2 messages are UDP-based. Although the packet formats of 218 IPv4 and IPv6 Mtrace2 are different because of the address families, 219 the syntax between them is similar. 221 2. Terminology 223 In this document, the key words "MUST", "MUST NOT", "REQUIRED", 224 "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", 225 and "OPTIONAL" are to be interpreted as described in RFC 2119 [1], 226 and indicate requirement levels for compliant Mtrace2 227 implementations. 229 2.1. Definitions 231 Since Mtrace2 Queries and Requests flow in the opposite direction to 232 the data flow, we refer to "upstream" and "downstream" with respect 233 to data, unless explicitly specified. 235 Incoming interface 236 The interface on which data is expected to arrive from the 237 specified source and group. 239 Outgoing interface 240 The interface to which data from the source or RP is expected to 241 transmit for the specified source and group. It is also the 242 interface on which the Mtrace2 Request will be received. 244 Upstream router 245 The router, connecting to the Incoming interface of the current 246 router, which is responsible for forwarding data for the specified 247 source and group to the current router. 249 First-hop router (FHR) 250 The router that is directly connected to the source the Mtrace2 251 Query specifies. 253 Last-hop router (LHR) 254 The router that is directly connected to the receivers. It is 255 also the router that receives the Mtrace2 Query from an Mtrace2 256 client. 258 Group state 259 It is the state a shared-tree protocol, such as PIM-SM [5], uses 260 to choose the upstream router towards the RP for the specified 261 group. In this state, source-specific state is not available for 262 the corresponding group address on the router. 264 Source-specific state 265 It is the state that is used to choose the path towards the source 266 for the specified source and group. 268 ALL-[protocol]-ROUTERS.MCAST.NET 269 It is a link-local multicast address for multicast routers to 270 communicate with their adjacent routers that are running the same 271 routing protocol. For instance, the address of ALL-PIM- 272 ROUTERS.MCAST.NET [5] is '224.0.0.13' for IPv4 and 'ff02::d' for 273 IPv6. 275 3. Packet Formats 277 This section describes the details of the packet formats for Mtrace2 278 messages. 280 All Mtrace2 messages are encoded in TLV format (see Section 3.1). If 281 an implementation receives an unknown TLV, it SHOULD ignored and 282 silently discarded the unknown TLV. If the length of a TLV exceeds 283 the length specified in the TLV, the TLV SHOULD be accepted; however, 284 any additional data after the TLV SHOULD be ignored. 286 All Mtrace2 messages are UDP packets. For IPv4, Mtrace2 Query and 287 Request messages MUST NOT be fragmented. For IPv6, the packet size 288 for the Mtrace2 messages MUST NOT exceed 1280 bytes, which is the 289 smallest MTU for an IPv6 interface [2]. The source port is uniquely 290 selected by the local host operating system. The destination port is 291 the IANA reserved Mtrace2 port number (see Section 8). All Mtrace2 292 messages MUST have a valid UDP checksum. 294 Additionally, Mtrace2 supports both IPv4 and IPv6, but not mixed. 295 For example, if an Mtrace2 Query or Request message arrives in as an 296 IPv4 packet, all addresses specified in the Mtrace2 messages MUST be 297 IPv4 as well. Same rule applies to IPv6 Mtrace2 messages. 299 3.1. Mtrace2 TLV format 301 0 1 2 3 302 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 303 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 304 | Type | Length | Value .... | 305 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 307 Type: 8 bits 309 Describes the format of the Value field. For all the available 310 types, please see Section 3.2 312 Length: 16 bits 314 Length of Type, Length, and Value fields in octets. Minimum 315 length required is 6 octets. The maximum TLV length is not 316 defined; however the entire Mtrace2 packet length should not 317 exceed the available MTU. 319 Value: variable length 321 The format is based on the Type value. The length of the value 322 field is Length field minus 3. All reserved fields in the Value 323 field MUST be transmitted as zeros and ignored on receipt. 325 3.2. Defined TLVs 327 The following TLV Types are defined: 329 Code Type 330 ==== ================================ 331 0x01 Mtrace2 Query 332 0x02 Mtrace2 Request 333 0x03 Mtrace2 Reply 334 0x04 Mtrace2 Standard Response Block 335 0x05 Mtrace2 Augmented Response Block 336 0x06 Mtrace2 Extended Query Block 338 Each Mtrace2 message MUST begin with either a Query, Request or Reply 339 TLV. The first TLV determines the type of each Mtrace2 message. 340 Following a Query TLV, there can be a sequence of optional Extended 341 Query Blocks. In the case of a Request or a Reply TLV, it is then 342 followed by a sequence of Standard Response Blocks, each from a 343 multicast router on the path towards the source or the RP. In the 344 case more information is needed, a Standard Response Block can be 345 followed by one or multiple Augmented Response Blocks. 347 We will describe each message type in details in the next few 348 sections. 350 3.2.1. Mtrace2 Query 352 An Mtrace2 Query is usually originated by an Mtrace2 client which 353 sends an Mtrace2 Query message to the LHR. When tracing towards the 354 source or the RP, the intermediate routers MUST NOT modify the Query 355 message except the Type field. 357 An Mtrace2 Query message is shown as follows: 359 0 1 2 3 360 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 361 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 362 | Type | Length | # Hops | 363 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 364 | | 365 | Multicast Address | 366 | | 367 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 368 | | 369 | Source Address | 370 | | 371 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 372 | | 373 | Mtrace2 Client Address | 374 | | 375 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 376 | Query ID | Client Port # | 377 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 379 Figure 2 381 # Hops: 8 bits 382 This field specifies the maximum number of hops that the Mtrace2 383 client wants to trace. If there are some error conditions in the 384 middle of the path that prevent an Mtrace2 Reply from being 385 received by the client, the client MAY issues another Mtrace2 386 Query with the lower number of hops until it receives a Reply. 388 Multicast Address: 32 bits or 128 bits 389 This field specifies an IPv4 or IPv6 address, which can be either: 391 m-1: a multicast group address to be traced; or, 393 m-2: all 1's in case of IPv4 or the unspecified address (::) in 394 case of IPv6 if no group-specific information is desired. 396 Source Address: 32 bits or 128 bits 397 This field specifies an IPv4 or IPv6 address, which can be either: 399 s-1: an unicast address of the source to be traced; or, 401 s-2: all 1's in case of IPv4 or the unspecified address (::) in 402 case of IPv6 if no source-specific information is desired. 403 For example, the client is tracing a (*,g) group state. 405 Note that it is invalid to have a source-group combination of 406 (s-2, m-2). If a router receives such combination in an Mtrace2 407 Query, it MUST silently discard the Query. 409 Mtrace2 Client Address: 32 bits or 128 bits 410 This field specifies the Mtrace2 client's IPv4 address or IPv6 411 global address. This address MUST be a valid unicast address, and 412 therefore, MUST NOT be all 1's or an unspecified address. The 413 Mtrace2 Reply will be sent to this address. 415 Query ID: 16 bits 416 This field is used as a unique identifier for this Mtrace2 Query 417 so that duplicate or delayed Reply messages may be detected. 419 Client Port #: 16 bits 420 This field specifies the destination UDP port number for receiving 421 the Mtrace2 Reply packet. 423 3.2.2. Mtrace2 Request 425 The format of an Mtrace2 Request message is similar to an Mtrace2 426 Query except the Type field is 0x02. 428 When a LHR receives an Mtrace2 Query message, it would turn the Query 429 into a Request by changing the Type field of the Query from 0x01 to 430 0x02. The LHR would then append an Mtrace2 Standard Response Block 431 (see Section 3.2.4) of its own to the Request message before sending 432 it upstream. The upstream routers would do the same without changing 433 the Type field until one of them is ready to send a Reply. 435 3.2.3. Mtrace2 Reply 437 The format of an Mtrace2 Reply message is similar to an Mtrace2 Query 438 except the Type field is 0x03. 440 When a FHR or a RP receives an Mtrace2 Request message which is 441 destined to itself, it would append an Mtrace2 Standard Response 442 Block (see Section 3.2.4) of its own to the Request message. Next, 443 it would turn the Request message into a Reply by changing the Type 444 field of the Request from 0x02 to 0x03. The Reply message would then 445 be unicasted to the Mtrace2 client specified in the Mtrace2 Client 446 Address field. 448 There are a number of cases an intermediate router might return a 449 Reply before a Request reaches the FHR or the RP. See Section 4.1.1, 450 Section 4.2.2, Section 4.3.3, and Section 4.5 for more details. 452 3.2.4. IPv4 Mtrace2 Standard Response Block 454 This section describes the message format of an IPv4 Mtrace2 Standard 455 Response Block. The Type field is 0x04. 457 0 1 2 3 458 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 459 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 460 | Type | Length | MBZ | 461 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 462 | Query Arrival Time | 463 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 464 | Incoming Interface Address | 465 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 466 | Outgoing Interface Address | 467 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 468 | Upstream Router Address | 469 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 470 | | 471 . Input packet count on incoming interface . 472 | | 473 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 474 | | 475 . Output packet count on outgoing interface . 476 | | 477 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 478 | | 479 . Total number of packets for this source-group pair . 480 | | 481 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 482 | Rtg Protocol | Multicast Rtg Protocol | 483 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 484 | Fwd TTL | MBZ |S| Src Mask |Forwarding Code| 485 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 487 MBZ: 8 bits 488 This field must be zeroed on transmission and ignored on 489 reception. 491 Query Arrival Time: 32 bits 492 The Query Arrival Time is a 32-bit NTP timestamp specifying the 493 arrival time of the Mtrace2 Query or Request packet at this 494 router. The 32-bit form of an NTP timestamp consists of the 495 middle 32 bits of the full 64-bit form; that is, the low 16 bits 496 of the integer part and the high 16 bits of the fractional part. 498 The following formula converts from a UNIX timeval to a 32-bit NTP 499 timestamp: 501 query_arrival_time 502 = (tv.tv_sec + 32384) << 16 + ((tv.tv_usec << 10) / 15625) 504 The constant 32384 is the number of seconds from Jan 1, 1900 to 505 Jan 1, 1970 truncated to 16 bits. ((tv.tv_usec << 10) / 15625) is 506 a reduction of ((tv.tv_usec / 100000000) << 16). 508 Note that Mtrace2 does not require all the routers on the path to 509 have synchronized clocks in order to measure one-way latency. 511 Additionally, Query Arrival Time is useful for measuring the 512 packet rate. For example, suppose that a client issues two 513 queries, and the corresponding requests R1 and R2 arrive at router 514 X at time T1 and T2, then the client would be able to compute the 515 packet rate on router X by using the packet count information 516 stored in the R1 and R2, and the time T1 and T2. 518 Incoming Interface Address: 32 bits 519 This field specifies the address of the interface on which packets 520 from the source or the RP are expected to arrive, or 0 if unknown 521 or unnumbered. 523 Outgoing Interface Address: 32 bits 524 This field specifies the address of the interface on which packets 525 from the source or the RP are expected to transmit towards the 526 receiver, or 0 if unknown or unnumbered. This is also the address 527 of the interface on which the Mtrace2 Query or Request arrives. 529 Upstream Router Address: 32 bits 530 This field specifies the address of the upstream router from which 531 this router expects packets from this source. This may be a 532 multicast group (e.g. ALL-[protocol]-ROUTERS.MCAST.NET) if the 533 upstream router is not known because of the workings of the 534 multicast routing protocol. However, it should be 0 if the 535 incoming interface address is unknown or unnumbered. 537 Input packet count on incoming interface: 64 bits 538 This field contains the number of multicast packets received for 539 all groups and sources on the incoming interface, or all 1's if no 540 count can be reported. This counter may have the same value as 541 ifHCInMulticastPkts from the IF-MIB [10] for this interface. 543 Output packet count on outgoing interface: 64 bit 544 This field contains the number of multicast packets that have been 545 transmitted or queued for transmission for all groups and sources 546 on the outgoing interface, or all 1's if no count can be reported. 547 This counter may have the same value as ifHCOutMulticastPkts from 548 the IF-MIB [10] for this interface. 550 Total number of packets for this source-group pair: 64 bits 551 This field counts the number of packets from the specified source 552 forwarded by the router to the specified group, or all 1's if no 553 count can be reported. If the S bit is set (see below), the count 554 is for the source network, as specified by the Src Mask field (see 555 below). If the S bit is set and the Src Mask field is 63, 556 indicating no source-specific state, the count is for all sources 557 sending to this group. This counter should have the same value as 558 ipMcastRoutePkts from the IPMROUTE-STD-MIB [11] for this 559 forwarding entry. 561 Rtg Protocol: 16 bits 562 This field describes the unicast routing protocol running between 563 this router and the upstream router, and it is used to determine 564 the RPF interface for the specified source or RP. This value 565 should have the same value as ipMcastRouteRtProtocol from the 566 IPMROUTE-STD-MIB [11] for this entry. If the router is not able 567 to obtain this value, all 0's must be specified. 569 Multicast Rtg Protocol: 16 bits 570 This field describes the multicast routing protocol in use between 571 the router and the upstream router. This value should have the 572 same value as ipMcastRouteProtocol from the IPMROUTE-STD-MIB [11] 573 for this entry. If the router cannot obtain this value, all 0's 574 must be specified. 576 Fwd TTL: 8 bits 577 This field contains the configured multicast TTL threshold, if 578 any, of the outgoing interface. 580 S: 1 bit 581 If this bit is set, it indicates that the packet count for the 582 source-group pair is for the source network, as determined by 583 masking the source address with the Src Mask field. 585 Src Mask: 7 bits 586 This field contains the number of 1's in the netmask the router 587 has for the source (i.e. a value of 24 means the netmask is 588 0xffffff00). If the router is forwarding solely on group state, 589 this field is set to 127 (0x7f). 591 Forwarding Code: 8 bits 592 This field contains a forwarding information/error code. 593 Section 4.1 and Section 4.2 will explain how and when the 594 Forwarding Code is filled. Defined values are as follows: 596 Value Name Description 597 ----- -------------- ---------------------------------------------- 598 0x00 NO_ERROR No error 599 0x01 WRONG_IF Mtrace2 Request arrived on an interface 600 to which this router would not forward for 601 the specified group towards the source or RP. 602 0x02 PRUNE_SENT This router has sent a prune upstream which 603 applies to the source and group in the 604 Mtrace2 Request. 605 0x03 PRUNE_RCVD This router has stopped forwarding for this 606 source and group in response to a request 607 from the downstream router. 608 0x04 SCOPED The group is subject to administrative 609 scoping at this router. 610 0x05 NO_ROUTE This router has no route for the source or 611 group and no way to determine a potential 612 route. 613 0x06 WRONG_LAST_HOP This router is not the proper LHR. 614 0x07 NOT_FORWARDING This router is not forwarding this source and 615 group out the outgoing interface for an 616 unspecified reason. 617 0x08 REACHED_RP Reached the Rendezvous Point. 618 0x09 RPF_IF Mtrace2 Request arrived on the expected 619 RPF interface for this source and group. 620 0x0A NO_MULTICAST Mtrace2 Request arrived on an interface 621 which is not enabled for multicast. 622 0x0B INFO_HIDDEN One or more hops have been hidden from this 623 trace. 624 0x0C REACHED_GW Mtrace2 Request arrived on a gateway (e.g., 625 a NAT or firewall) that hides the 626 information between this router and the 627 Mtrace2 client. 628 0x0D UNKNOWN_QUERY A non-transitive Extended Query Type was 629 received by a router which does not support 630 the type. 631 0x80 FATAL_ERROR A fatal error is one where the router may 632 know the upstream router but cannot forward 633 the message to it. 634 0x81 NO_SPACE There was not enough room to insert another 635 Standard Response Block in the packet. 636 0x83 ADMIN_PROHIB Mtrace2 is administratively prohibited. 638 3.2.5. IPv6 Mtrace2 Standard Response Block 640 This section describes the message format of an IPv6 Mtrace2 Standard 641 Response Block. The Type field is also 0x04. 643 0 1 2 3 644 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 645 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 646 | Type | Length | MBZ | 647 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 648 | Query Arrival Time | 649 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 650 | Incoming Interface ID | 651 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 652 | Outgoing Interface ID | 653 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 654 | | 655 * Local Address * 656 | | 657 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 658 | | 659 * Remote Address * 660 | | 661 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 662 | | 663 . Input packet count on incoming interface . 664 | | 665 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 666 | | 667 . Output packet count on outgoing interface . 668 | | 669 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 670 | | 671 . Total number of packets for this source-group pair . 672 | | 673 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 674 | Rtg Protocol | Multicast Rtg Protocol | 675 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 676 | MBZ 2 |S|Src Prefix Len |Forwarding Code| 677 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 679 MBZ: 8 bits 680 This field must be zeroed on transmission and ignored on 681 reception. 683 Query Arrival Time: 32 bits 684 Same definition as in IPv4. 686 Incoming Interface ID: 32 bits 687 This field specifies the interface ID on which packets from the 688 source or RP are expected to arrive, or 0 if unknown. This ID 689 should be the value taken from InterfaceIndex of the IF-MIB [10] 690 for this interface. 692 Outgoing Interface ID: 32 bits 693 This field specifies the interface ID to which packets from the 694 source or RP are expected to transmit, or 0 if unknown. This ID 695 should be the value taken from InterfaceIndex of the IF-MIB [10] 696 for this interface 698 Local Address: 128 bits 699 This field specifies a global IPv6 address that uniquely 700 identifies the router. An unique local unicast address [9] SHOULD 701 NOT be used unless the router is only assigned link-local and 702 unique local addresses. If the router is only assigned link-local 703 addresses, its link-local address can be specified in this field. 705 Remote Address: 128 bits 706 This field specifies the address of the upstream router, which, in 707 most cases, is a link-local unicast address for the upstream 708 router. 710 Although a link-local address does not have enough information to 711 identify a node, it is possible to detect the upstream router with 712 the assistance of Incoming Interface ID and the current router 713 address (i.e., Local Address). 715 Note that this may be a multicast group (e.g., ALL-[protocol]- 716 ROUTERS.MCAST.NET) if the upstream router is not known because of 717 the workings of a multicast routing protocol. However, it should 718 be the unspecified address (::) if the incoming interface address 719 is unknown. 721 Input packet count on incoming interface: 64 bits 722 Same definition as in IPv4. 724 Output packet count on outgoing interface: 64 bits 725 Same definition as in IPv4. 727 Total number of packets for this source-group pair: 64 bits 728 Same definition as in IPv4, except if the S bit is set (see 729 below), the count is for the source network, as specified by the 730 Src Prefix Len field. If the S bit is set and the Src Prefix Len 731 field is 255, indicating no source-specific state, the count is 732 for all sources sending to this group. This counter should have 733 the same value as ipMcastRoutePkts from the IPMROUTE-STD-MIB [11] 734 for this forwarding entry. 736 Rtg Protocol: 16 bits 737 Same definition as in IPv4. 739 Multicast Rtg Protocol: 16 bits 740 Same definition as in IPv4. 742 MBZ 2: 15 bits 743 This field must be zeroed on transmission and ignored on 744 reception. 746 S: 1 bit 747 Same definition as in IPv4, except the Src Prefix Len field is 748 used to mask the source address. 750 Src Prefix Len: 8 bits 751 This field contains the prefix length this router has for the 752 source. If the router is forwarding solely on group state, this 753 field is set to 255 (0xff). 755 Forwarding Code: 8 bits 756 Same definition as in IPv4. 758 3.2.6. Mtrace2 Augmented Response Block 760 In addition to the Standard Response Block, a multicast router on the 761 traced path can optionally add one or multiple Augmented Response 762 Blocks before sending the Request to its upstream router. 764 The Augmented Response Block is flexible for various purposes such as 765 providing diagnosis information (see Section 7) and protocol 766 verification. Its Type field is 0x05, and its format is as follows: 768 0 1 2 3 769 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 770 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 771 | Type | Length | MBZ | 772 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 773 | Augmented Response Type | Value .... | 774 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 776 MBZ: 8 bits 777 This field must be zeroed on transmission and ignored on 778 reception. 780 Augmented Response Type: 16 bits 781 This field specifies the type of various responses from a 782 multicast router that might need to communicate back to the 783 Mtrace2 client as well as the multicast routers on the traced 784 path. 786 The Augmented Response Type is defined as follows: 788 Code Type 789 ==== =============================================== 790 0x01 # of the returned Standard Response Blocks 792 When the NO_SPACE error occurs on a router, the router should send 793 the original Mtrace2 Request received from the downstream router 794 as a Reply back to the Mtrace2 client, and continue with a new 795 Mtrace2 Request. In the new Request, the router would add a 796 Standard Response Block followed by an Augmented Response Block 797 with 0x01 as the Augmented Response Type, and the number of the 798 returned Mtrace2 Standard Response Blocks as the Value. 800 Each upstream router would recognize the total number of hops the 801 Request has been traced so far by adding this number and the 802 number of the Standard Response Block in the current Request 803 message. 805 This document only defines one Augmented Response Type in the 806 Augmented Response Block. The description on how to provide 807 diagnosis information using the Augmented Response Block is out of 808 the scope of this document, and will be addressed in separate 809 documents. 811 Value: variable length 812 The format is based on the Augmented Response Type value. The 813 length of the value field is Length field minus 6. 815 3.2.7. Mtrace2 Extended Query Block 817 There may be a sequence of optional Extended Query Blocks that follow 818 an Mtrace2 Query to further specify any information needed for the 819 Query. For example, an Mtrace2 client might be interested in tracing 820 the path the specified source and group would take based on a certain 821 topology. In which case, the client can pass in the multi-topology 822 ID as the Value for an Extended Query Type (see below). The Extended 823 Query Type is extensible and the behavior of the new types will be 824 addressed by separate documents. 826 The Mtrace2 Extended Query Block's Type field is 0x06, and is 827 formatted as follows: 829 0 1 2 3 830 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 831 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 832 | Type | Length | MBZ |T| 833 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 834 | Extended Query Type | Value .... | 835 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 837 MBZ: 7 bits 838 This field must be zeroed on transmission and ignored on 839 reception. 841 T-bit (Transitive Attribute): 1 bit 842 If the TLV type is unrecognized by the receiving router, then this 843 TLV is either discarded or forwarded along with the Query, 844 depending on the value of this bit. If this bit is set, then the 845 router MUST forward this TLV. If this bit is clear, the router 846 MUST send an Mtrace2 Reply with an UNKNOWN_QUERY error. 848 Extended Query Type: 16 bits 849 This field specifies the type of the Extended Query Block. 851 Value: 16 bits 852 This field specifies the value of this Extended Query. 854 4. Router Behavior 856 This section describes the router behavior in the context of Mtrace2 857 in details. 859 4.1. Receiving Mtrace2 Query 861 An Mtrace2 Query message is an Mtrace2 message with no response 862 blocks filled in, and uses TLV type of 0x01. 864 4.1.1. Query Packet Verification 866 Upon receiving an Mtrace2 Query message, a router MUST examine 867 whether the Multicast Address and the Source Address are a valid 868 combination as specified in Section 3.2.1, and whether the Mtrace2 869 Client Address is a valid IP unicast address. If either one is 870 invalid, the Query MUST be silently ignored. 872 Mtrace2 supports non-local client to the LHR. It is up to the 873 implementation to filter out such queries. 875 In the case when it is a local client, the router must then examine 876 the Query to see if it is the proper LHR for the destination address 877 in the packet. It is the proper LHR if it has a multicast-capable 878 interface on the same subnet as the Mtrace2 Client Address and is the 879 router that would forward traffic from the given (S,G) or (*,G) onto 880 that subnet. 882 If the router determines that it is not the proper LHR, or it cannot 883 make that determination, it does one of two things depending on 884 whether the Query was received via multicast or unicast. If the 885 Query was received via multicast, then it MUST be silently discarded. 886 If it was received via unicast, the router turns the Query into a 887 Reply message by changing the TLV type to 0x03 and appending a 888 Standard Response Block with a Forwarding Code of WRONG_LAST_HOP. 889 The rest of the fields in the Standard Response Block MUST be zeroed. 890 The router then sends the Reply message to the Mtrace2 Client Address 891 on the Client Port # as specified in the Mtrace2 Query. 893 Duplicate Query messages as identified by the tuple (Mtrace2 Client 894 Address, Query ID) SHOULD be ignored. This MAY be implemented using 895 a cache of previously processed queries keyed by the Mtrace2 Client 896 Address and Query ID pair. The duration of the cached entries is 897 implementation specific. Duplicate Request messages MUST NOT be 898 ignored in this manner. 900 4.1.2. Query Normal Processing 902 When a router receives an Mtrace2 Query and it determines that it is 903 the proper LHR, it turns the Query to a Request by changing the TLV 904 type from 0x01 to 0x02, and performs the steps listed in Section 4.2. 906 4.2. Receiving Mtrace2 Request 908 An Mtrace2 Request is an Mtrace2 message that uses TLV type of 0x02. 909 With the exception of the LHR, whose Request was just converted from 910 a Query, each Request received by a router should have at least one 911 Standard Response Block filled in. 913 4.2.1. Request Packet Verification 915 If the Mtrace2 Request does not come from an adjacent router, or if 916 the Request is not addressed to this router, or if the Request is 917 addressed to a multicast group which is not a link-scoped group (i.e. 918 224/24 for IPv4, FFx2::/16 [3] for IPv6), it MUST be silently 919 ignored. GTSM [12] SHOULD be used by the router to determine whether 920 the router is adjacent or not. 922 If the sum of the number of the Standard Response Blocks in the 923 received Mtrace2 Request and the value of the Augmented Response Type 924 of 0x01, if any, is equal or more than the # Hops in the Mtrace2 925 Request, it MUST be silently ignored. 927 4.2.2. Request Normal Processing 929 When a router receives an Mtrace2 Request message, it performs the 930 following steps. Note that it is possible to have multiple 931 situations covered by the Forwarding Codes. The first one 932 encountered is the one that is reported, i.e. all "note Forwarding 933 Code N" should be interpreted as "if Forwarding Code is not already 934 set, set Forwarding Code to N". 936 1. Prepare a Standard Response Block to be appended to the packet 937 and fill in the Query Arrival Time, Outgoing Interface Address 938 (for IPv4) or Outgoing Interface ID (for IPv6), Output Packet 939 Count, and Fwd TTL (for IPv4). Note that the Outgoing Interface 940 is the one on which the Mtrace2 Request message arrives. 942 2. Attempt to determine the forwarding information for the 943 specified source and group, using the same mechanisms as would 944 be used when a packet is received from the source destined for 945 the group. A state need not be instantiated, it can be a 946 "phantom" state created only for the purpose of the trace, such 947 as "dry-run." 949 If using a shared-tree protocol and there is no source-specific 950 state, or if no source-specific information is desired (i.e., 951 all 1's for IPv4 or unspecified address (::) for IPv6), group 952 state should be used. If there is no group state or no group- 953 specific information is desired, potential source state (i.e., 954 the path that would be followed for a source-specific Join) 955 should be used. 957 3. If no forwarding information can be determined, the router notes 958 a Forwarding Code of NO_ROUTE, sets the remaining fields that 959 have not yet been filled in to zero, and then sends an Mtrace2 960 Reply back to the Mtrace2 client. 962 4. Fill in the Incoming Interface Address, Upstream Router Address, 963 Input Packet Count, Total Number of Packets, Routing Protocol, 964 S, and Src Mask (or Src Prefix Len for IPv6) using the 965 forwarding information determined by the step 2. 967 5. If Mtrace2 is administratively prohibited, note the Forwarding 968 Code of ADMIN_PROHIB. If Mtrace2 is administratively prohibited 969 and any of the fields as filled in the step 4 are considered 970 private information, zero out the applicable fields. 972 6. If the Outgoing interface is not enabled for multicast, note 973 Forwarding Code of NO_MULTICAST. If the Outgoing interface is 974 the interface from which the router would expect data to arrive 975 from the source, note forwarding code RPF_IF. If the Outgoing 976 interface is not one to which the router would forward data from 977 the source or RP to the group, a Forwarding code of WRONG_IF is 978 noted. In the above three cases, the router will return an 979 Mtrace2 Reply and terminate the trace. 981 7. If the group is subject to administrative scoping on either the 982 Outgoing or Incoming interfaces, a Forwarding Code of SCOPED is 983 noted. 985 8. If this router is the RP for the group, note a Forwarding Code 986 of REACHED_RP. The router will send an Mtrace2 Reply and 987 terminate the trace. 989 9. If this router has sent a prune upstream which applies to the 990 source and group in the Mtrace2 Request, it notes Forwarding 991 Code of PRUNE_SENT. If the router has stopped forwarding 992 downstream in response to a prune sent by the downstream router, 993 it notes Forwarding Code of PRUNE_RCVD. If the router should 994 normally forward traffic downstream for this source and group 995 but is not, it notes Forwarding Code of NOT_FORWARDING. 997 10. If this router is a gateway (e.g., a NAT or firewall) that hides 998 the information between this router and the Mtrace2 client, it 999 notes Forwarding Code of REACHED_GW. The router continues the 1000 processing as described in Section 4.5. 1002 11. If the total number of the Standard Response Blocks, including 1003 the newly prepared one, and the value of the Augmented Response 1004 Type of 0x01, if any, is less than the # Hops in the Request, 1005 the packet is then forwarded to the upstream router as described 1006 in Section 4.3; otherwise, the packet is sent as an Mtrace2 1007 Reply to the Mtrace2 client as described in Section 4.4. 1009 4.3. Forwarding Mtrace2 Request 1011 This section describes how an Mtrace2 Request should be forwarded. 1013 4.3.1. Destination Address 1015 If the upstream router for the Mtrace2 Request is known for this 1016 request, the Mtrace2 Request is sent to that router. If the Incoming 1017 interface is known but the upstream router is not, the Mtrace2 1018 Request is sent to an appropriate multicast address on the Incoming 1019 interface. The multicast address SHOULD depend on the multicast 1020 routing protocol in use, such as ALL-[protocol]-ROUTERS.MCAST.NET. 1021 It MUST be a link-scoped group (i.e. 224/24 for IPv4, FF02::/16 for 1022 IPv6), and MUST NOT be ALL-SYSTEMS.MCAST.NET (224.0.0.1) for IPv4 and 1023 All Nodes Address (FF02::1) for IPv6. It MAY also be ALL- 1024 ROUTERS.MCAST.NET (224.0.0.2) for IPv4 or All Routers Address 1025 (FF02::2) for IPv6 if the routing protocol in use does not define a 1026 more appropriate multicast address. 1028 4.3.2. Source Address 1030 An Mtrace2 Request should be sent with the address of the Incoming 1031 interface. However, if the Incoming interface is unnumbered, the 1032 router can use one of its numbered interface address as the source 1033 address. 1035 4.3.3. Appending Standard Response Block 1037 An Mtrace2 Request MUST be sent upstream towards the source or the RP 1038 after appending a Standard Response Block to the end of the received 1039 Mtrace2 Request. The Standard Response Block includes the multicast 1040 states and statistics information of the router described in 1041 Section 3.2.4. 1043 If appending the Standard Response Block would make the Mtrace2 1044 Request packet longer than the MTU of the Incoming Interface, or, in 1045 the case of IPv6, longer than 1280 bytes, the router MUST change the 1046 Forwarding Code in the last Standard Response Block of the received 1047 Mtrace2 Request into NO_SPACE. The router then turns the Request 1048 into a Reply, and sends the Reply as described in Section 4.4. 1050 The router will continue with a new Request by copying from the old 1051 Request excluding all the response blocks, followed by the previously 1052 prepared Standard Response Block, and an Augmented Response Block 1053 with Augmented Response Type of 0x01 and the number of the returned 1054 Standard Response Blocks as the value. The new Request is then 1055 forwarded upstream. 1057 4.4. Sending Mtrace2 Reply 1059 An Mtrace2 Reply MUST be returned to the client by a router if the 1060 total number of the traced routers is equal to the # Hops in the 1061 Request. The total number of the traced routers is the sum of the 1062 Standard Response Blocks in the Request (including the one just 1063 added) and the number of the returned blocks, if any. 1065 4.4.1. Destination Address 1067 An Mtrace2 Reply MUST be sent to the address specified in the Mtrace2 1068 Client Address field in the Mtrace2 Request. 1070 4.4.2. Source Address 1072 An Mtrace2 Reply SHOULD be sent with the address of the router's 1073 Outgoing interface. However, if the Outgoing interface address is 1074 unnumbered, the router can use one of its numbered interface address 1075 as the source address. 1077 4.4.3. Appending Standard Response Block 1079 An Mtrace2 Reply MUST be sent with the prepared Standard Response 1080 Block appended at the end of the received Mtrace2 Request except in 1081 the case of NO_SPACE forwarding code. 1083 4.5. Proxying Mtrace2 Query 1085 When a gateway (e.g., a NAT or firewall), which needs to block 1086 unicast packets to the Mtrace2 client, or hide information between 1087 the gateway and the Mtrace2 client, receives an Mtrace2 Query from an 1088 adjacent host or Mtrace2 Request from an adjacent router, it appends 1089 a Standard Response Block with REACHED_GW as the Forwarding Code, and 1090 turns the Query or Request as a Reply, and sends the Reply back to 1091 the client. 1093 At the same time, the gateway originates a new Mtrace2 Query message 1094 by copying the original Mtrace2 header (the Query or Request without 1095 any of the response blocks), and makes the changes as follows: 1097 o sets the RPF interface's address as the Mtrace2 Client Address; 1099 o uses its own port number as the Client Port #; and, 1101 o decreases # Hops by the number of the Standard Response Block that 1102 was just returned as a Reply. 1104 The new Mtrace2 Query message is then sent to the upstream router or 1105 to an appropriate multicast address on the RPF interface. 1107 When the gateway receives an Mtrace2 Reply whose Query ID matches the 1108 one in the original Mtrace2 header, it MUST relay the Mtrace2 Reply 1109 back to the Mtrace2 client by replacing the Reply's header with the 1110 original Mtrace2 header. If the gateway does not receive the 1111 corresponding Mtrace2 Reply within the [Mtrace Reply Timeout] period 1112 (see Section 5.8.4), then it silently discards the original Mtrace2 1113 Query or Request message, and terminates the trace. 1115 4.6. Hiding Information 1117 Information about a domain's topology and connectivity may be hidden 1118 from the Mtrace2 Requests. The Forwarding Code of INFO_HIDDEN may be 1119 used to note that. For example, the incoming interface address and 1120 packet count on the ingress router of a domain, and the outgoing 1121 interface address and packet count on the egress router of the domain 1122 can be specified as all 1's. Additionally, the source-group packet 1123 count (see Section 3.2.4 and Section 3.2.5) within the domain may be 1124 all 1's if it is hidden. 1126 5. Client Behavior 1128 This section describes the behavior of an Mtrace2 client in details. 1130 5.1. Sending Mtrace2 Query 1132 An Mtrace2 client initiates an Mtrace2 Query by sending the Query to 1133 the LHR of interest. 1135 5.1.1. Destination Address 1137 If an Mtrace2 client knows the proper LHR, it unicasts an Mtrace2 1138 Query packet to that router; otherwise, it MAY send the Mtrace2 Query 1139 packet to the ALL-ROUTERS.MCAST.NET (224.0.0.2) for IPv4 or All 1140 Routers Address (FF02::2) for IPv6. This will ensure that the packet 1141 is received by the LHR on the subnet. 1143 See also Section 5.4 on determining the LHR. 1145 5.1.2. Source Address 1147 An Mtrace2 Query MUST be sent with the client's interface address, 1148 which would be the Mtrace2 Client Address. 1150 5.2. Determining the Path 1152 An Mtrace2 client could send an initial Query messages with a large # 1153 Hops, in order to try to trace the full path. If this attempt fails, 1154 one strategy is to perform a linear search (as the traditional 1155 unicast traceroute program does); set the # Hops field to 1 and try 1156 to get a Reply, then 2, and so on. If no Reply is received at a 1157 certain hop, the hop count can continue past the non-responding hop, 1158 in the hopes that further hops may respond. These attempts should 1159 continue until the [Mtrace Reply Timeout] timeout has occurred. 1161 See also Section 5.6 on receiving the results of a trace. 1163 5.3. Collecting Statistics 1165 After a client has determined that it has traced the whole path or as 1166 much as it can expect to (see Section 5.8), it might collect 1167 statistics by waiting a short time and performing a second trace. If 1168 the path is the same in the two traces, statistics can be displayed 1169 as described in Section 7.3 and Section 7.4. 1171 5.4. Last Hop Router (LHR) 1173 The Mtrace2 client may not know which is the last-hop router, or that 1174 router may be behind a firewall that blocks unicast packets but 1175 passes multicast packets. In these cases, the Mtrace2 Request should 1176 be multicasted to ALL-ROUTERS.MCAST.NET (224.0.0.2) for IPv4 or All 1177 Routers Address (FF02::2) for IPv6. All routers except the correct 1178 last-hop router SHOULD ignore any Mtrace2 Request received via 1179 multicast. 1181 5.5. First Hop Router (FHR) 1183 The IANA assigned 224.0.1.32, MTRACE.MCAST.NET as the default 1184 multicast group for old IPv4 mtrace (v1) responses, in order to 1185 support mtrace clients that are not unicast reachable from the first- 1186 hop router. Mtrace2, however, does not require any IPv4/IPv6 1187 multicast addresses for the Mtrace2 Replies. Every Mtrace2 Reply is 1188 sent to the unicast address specified in the Mtrace2 Client Address 1189 field of the Mtrace2 Reply. 1191 5.6. Broken Intermediate Router 1193 A broken intermediate router might simply not understand Mtrace2 1194 packets, and drop them. The Mtrace2 client will get no Reply at all 1195 as a result. It should then perform a hop-by-hop search by setting 1196 the # Hops field until it gets an Mtrace2 Reply. The client may use 1197 linear or binary search; however, the latter is likely to be slower 1198 because a failure requires waiting for the [Mtrace Reply Timeout] 1199 period. 1201 5.7. Non-Supported Router 1203 When a non-supported router receives an Mtrace2 Query or Request 1204 message whose destination address is a multicast address, the router 1205 will silently discard the message. 1207 When the router receives an Mtrace2 Query which is destined to 1208 itself, the router would return an ICMP port unreachable to the 1209 Mtrace2 client. On the other hand, when the router receives an 1210 Mtrace2 Request which is destined to itself, the router would return 1211 an ICMP port unreachable to its adjacent router from which the 1212 Request receives. Therefore, the Mtrace2 client needs to terminate 1213 the trace when the [Mtrace Reply Timeout] timeout has occurred, and 1214 may then issue another Query with a lower number of # Hops. 1216 5.8. Mtrace2 Termination 1218 When performing an expanding hop-by-hop trace, it is necessary to 1219 determine when to stop expanding. 1221 5.8.1. Arriving at Source 1223 A trace can be determined to have arrived at the source if the 1224 Incoming Interface of the last router in the trace is non-zero, but 1225 the Upstream Router is zero. 1227 5.8.2. Fatal Error 1229 A trace has encountered a fatal error if the last Forwarding Error in 1230 the trace has the 0x80 bit set. 1232 5.8.3. No Upstream Router 1234 A trace can not continue if the last Upstream Router in the trace is 1235 set to 0. 1237 5.8.4. Reply Timeout 1239 This document defines the [Mtrace Reply Timeout] value, which is used 1240 to time out an Mtrace2 Reply as seen in Section 4.5, Section 5.2, and 1241 Section 5.7. The default [Mtrace Reply Timeout] value is 10 1242 (seconds), and can be manually changed on the Mtrace2 client and 1243 routers. 1245 5.9. Continuing after an Error 1247 When the NO_SPACE error occurs, as described in Section 4.2, a router 1248 will send back an Mtrace2 Reply to the Mtrace2 client, and continue 1249 with a new Request (see Section 4.3.3). In which case, the Mtrace2 1250 client may receive multiple Mtrace2 Replies from different routers 1251 along the path. When this happens, the client MUST treat them as a 1252 single Mtrace2 Reply message. 1254 If a trace times out, it is very likely that a router in the middle 1255 of the path does not support Mtrace2. That router's address will be 1256 in the Upstream Router field of the last Standard Response Block in 1257 the last received Reply. A client may be able to determine (via 1258 mrinfo or SNMP [9][11]) a list of neighbors of the non-responding 1259 router. If desired, each of those neighbors could be probed to 1260 determine the remainder of the path. Unfortunately, this heuristic 1261 may end up with multiple paths, since there is no way of knowing what 1262 the non-responding router's algorithm for choosing an upstream router 1263 is. However, if all paths but one flow back towards the non- 1264 responding router, it is possible to be sure that this is the correct 1265 path. 1267 6. Protocol-Specific Considerations 1269 This section describes the Mtrace2 behavior with the present of 1270 different multicast protocols. 1272 6.1. PIM-SM 1274 When an Mtrace2 reaches a PIM-SM RP, and the RP does not forward the 1275 trace on, it means that the RP has not performed a source-specific 1276 join so there is no more state to trace. However, the path that 1277 traffic would use if the RP did perform a source-specific join can be 1278 traced by setting the trace destination to the RP, the trace source 1279 to the traffic source, and the trace group to 0. This Mtrace2 Query 1280 may be unicasted to the RP. 1282 6.2. Bi-Directional PIM 1284 Bi-directional PIM [6] is a variant of PIM-SM that builds bi- 1285 directional shared trees connecting multicast sources and receivers. 1286 Along the bi-directional shared trees, multicast data is natively 1287 forwarded from the sources to the Rendezvous Point Link (RPL), and 1288 from which, to receivers without requiring source-specific state. In 1289 contrast to PIM-SM, Bi-directional PIM always has the state to trace. 1291 A Designated Forwarder (DF) for a given Rendezvous Point Address 1292 (RPA) is in charge of forwarding downstream traffic onto its link, 1293 and forwarding upstream traffic from its link towards the RPL that 1294 the RPA belongs to. Hence Mtrace2 Reply reports DF addresses or RPA 1295 along the path. 1297 6.3. PIM-DM 1299 Routers running PIM Dense Mode [13] do not know the path packets 1300 would take unless traffic is flowing. Without some extra protocol 1301 mechanism, this means that in an environment with multiple possible 1302 paths with branch points on shared media, Mtrace2 can only trace 1303 existing paths, not potential paths. When there are multiple 1304 possible paths but the branch points are not on shared media, the 1305 upstream router is known, but the LHR may not know that it is the 1306 appropriate last hop. 1308 When traffic is flowing, PIM Dense Mode routers know whether or not 1309 they are the LHR for the link (because they won or lost an Assert 1310 battle) and know who the upstream router is (because it won an Assert 1311 battle). Therefore, Mtrace2 is always able to follow the proper path 1312 when traffic is flowing. 1314 6.4. IGMP/MLD Proxy 1316 When an IGMP/MLD Proxy [7] receives an Mtrace2 Query packet on an 1317 incoming interface, it notes a WRONG_IF in the Forwarding Code of the 1318 last Standard Response Block (see Section 3.2.4), and sends the 1319 Mtrace2 Reply back to the Mtrace2 client. On the other hand, when an 1320 Mtrace2 Query packet reaches an outgoing interface of the IGMP/MLD 1321 proxy, it is forwarded onto its incoming interface towards the 1322 upstream router. 1324 7. Problem Diagnosis 1326 This section describes different scenarios Mtrace2 can be used to 1327 diagnose the multicast problems. 1329 7.1. Forwarding Inconsistencies 1331 The Forwarding Error code can tell if a group is unexpectedly pruned 1332 or administratively scoped. 1334 7.2. TTL or Hop Limit Problems 1336 By taking the maximum of hops from the source and forwarding TTL 1337 threshold over all hops, it is possible to discover the TTL or hop 1338 limit required for the source to reach the destination. 1340 7.3. Packet Loss 1342 By taking two traces, it is possible to find packet loss information 1343 by comparing the difference in input packet counts to the difference 1344 in output packet counts for the specified source-group address pair 1345 at the previous hop. On a point-to-point link, any difference in 1346 these numbers implies packet loss. Since the packet counts may be 1347 changing as the Mtrace2 Request is propagating, there may be small 1348 errors (off by 1 or 2 or more) in these statistics. However, these 1349 errors will not accumulate if multiple traces are taken to expand the 1350 measurement period. On a shared link, the count of input packets can 1351 be larger than the number of output packets at the previous hop, due 1352 to other routers or hosts on the link injecting packets. This 1353 appears as "negative loss" which may mask real packet loss. 1355 In addition to the counts of input and output packets for all 1356 multicast traffic on the interfaces, the Standard Response Block 1357 includes a count of the packets forwarded by a node for the specified 1358 source-group pair. Taking the difference in this count between two 1359 traces and then comparing those differences between two hops gives a 1360 measure of packet loss just for traffic from the specified source to 1361 the specified receiver via the specified group. This measure is not 1362 affected by shared links. 1364 On a point-to-point link that is a multicast tunnel, packet loss is 1365 usually due to congestion in unicast routers along the path of that 1366 tunnel. On native multicast links, loss is more likely in the output 1367 queue of one hop, perhaps due to priority dropping, or in the input 1368 queue at the next hop. The counters in the Standard Response Block 1369 do not allow these cases to be distinguished. Differences in packet 1370 counts between the incoming and outgoing interfaces on one node 1371 cannot generally be used to measure queue overflow in the node. 1373 7.4. Link Utilization 1375 Again, with two traces, you can divide the difference in the input or 1376 output packet counts at some hop by the difference in time stamps 1377 from the same hop to obtain the packet rate over the link. If the 1378 average packet size is known, then the link utilization can also be 1379 estimated to see whether packet loss may be due to the rate limit or 1380 the physical capacity on a particular link being exceeded. 1382 7.5. Time Delay 1384 If the routers have synchronized clocks, it is possible to estimate 1385 propagation and queuing delay from the differences between the 1386 timestamps at successive hops. However, this delay includes control 1387 processing overhead, so is not necessarily indicative of the delay 1388 that data traffic would experience. 1390 8. IANA Considerations 1392 The following new assignments can only be made via a Standards Action 1393 as specified in [4]. 1395 8.1. Forwarding Codes 1397 New Forwarding Codes must only be created by an RFC that modifies 1398 this document's Section 3.2.4 and Section 3.2.5, fully describing the 1399 conditions under which the new Forwarding Code is used. The IANA may 1400 act as a central repository so that there is a single place to look 1401 up Forwarding Codes and the document in which they are defined. 1403 8.2. UDP Destination Port 1405 The IANA should allocate UDP destination port for Mtrace2 upon 1406 publication of the first RFC. 1408 9. Security Considerations 1410 This section addresses some of the security considerations related to 1411 Mtrace2. 1413 9.1. Addresses in Mtrace2 Header 1415 An Mtrace2 header includes three addresses, source address, multicast 1416 address, and Mtrace2 client address. These addresses MUST be 1417 congruent with the definition defined in Section 3.2.1 and forwarding 1418 Mtrace2 messages having invalid addresses MUST be prohibited. For 1419 instance, if Mtrace2 Client Address specified in an Mtrace2 header is 1420 a multicast address, then a router that receives the Mtrace2 message 1421 MUST silently discard it. 1423 9.2. Topology Discovery 1425 Mtrace2 can be used to discover any actively-used topology. If your 1426 network topology is a secret, Mtrace2 may be restricted at the border 1427 of your domain, using the ADMIN_PROHIB forwarding code. 1429 9.3. Characteristics of Multicast Channel 1431 Mtrace2 can be used to discover what sources are sending to what 1432 groups and at what rates. If this information is a secret, Mtrace2 1433 may be restricted at the border of your domain, using the 1434 ADMIN_PROHIB forwarding code. 1436 9.4. Limiting Query/Request Rates 1438 A router may limit Mtrace2 Queries and Requests by ignoring some of 1439 the consecutive messages. The router MAY randomly ignore the 1440 received messages to minimize the processing overhead, i.e., to keep 1441 fairness in processing queries, or prevent traffic amplification. 1442 The rate limit is left to the router's implementation. 1444 9.5. Limiting Reply Rates 1446 The proxying and NO_SPACE behaviors may result in one Query returning 1447 multiple Reply messages. In order to prevent abuse, the routers in 1448 the traced MAY need to rate-limit the Replies. The rate limit 1449 function is left to the router's implementation. 1451 10. Acknowledgements 1453 This specification started largely as a transcription of Van 1454 Jacobson's slides from the 30th IETF, and the implementation in 1455 mrouted 3.3 by Ajit Thyagarajan. Van's original slides credit Steve 1456 Casner, Steve Deering, Dino Farinacci and Deb Agrawal. The original 1457 multicast traceroute client, mtrace (version 1), has been implemented 1458 by Ajit Thyagarajan, Steve Casner and Bill Fenner. The idea of the 1459 "S" bit to allow statistics for a source subnet is due to Tom 1460 Pusateri. 1462 For the Mtrace version 2 specification, the authors would like to 1463 give special thanks to Tatsuya Jinmei, Bill Fenner, and Steve Casner. 1464 Also, extensive comments were received from David L. Black, Ronald 1465 Bonica, Yiqun Cai, Liu Hui, Bharat Joshi, Robert W. Kebler, Heidi 1466 Ou, Pekka Savola, Shinsuke Suzuki, Dave Thaler, Achmad Husni Thamrin, 1467 and Cao Wei. 1469 11. References 1471 11.1. Normative References 1473 [1] Bradner, S., "Key words for use in RFCs to indicate 1474 requirement levels", RFC 2119, March 1997. 1476 [2] Deering, S. and R. Hinden, "Internet Protocol, Version 6 1477 (IPv6) Specification", RFC 2460, December 1998. 1479 [3] Hinden, R. and S. Deering, "IP Version 6 Addressing 1480 Architecture", RFC 4291, February 2006. 1482 [4] Narten, T. and H. Alvestrand, "Guidelines for Writing an 1483 IANA Considerations Section in RFCs", RFC 5226, May 2008. 1485 [5] Fenner, B., Handley, M., Holbrook, H., and I. Kouvelas, 1486 "Protocol Independent Multicast - Sparse Mode (PIM-SM): 1487 Protocol Specification (Revised)", RFC 4601, August 2006. 1489 [6] Handley, M., Kouvelas, I., Speakman, T., and L. Vicisano, 1490 "Bidirectional Protocol Independent Multicast (BIDIR- 1491 PIM)", RFC 5015, October 2007. 1493 [7] Fenner, B., He, H., Haberman, B., and H. Sandick, 1494 "Internet Group Management Protocol (IGMP) / Multicast 1495 Listener Discovery (MLD)-Based Multicast Forwarding 1496 ("IGMP/MLD Proxying")", RFC 4605, August 2006. 1498 11.2. Informative References 1500 [8] Cain, B., Deering, S., Kouvelas, I., Fenner, B., and A. 1501 Thyagarajan, "Internet Group Management Protocol, Version 1502 3", RFC 3376, October 2002. 1504 [9] Draves, R. and D. Thaler, "Default Router Preferences and 1505 More-Specific Routes", RFC 4191, November 2005. 1507 [10] McCloghrie, K. and F. Kastenholz, "The Interfaces Group 1508 MIB", RFC 2863, June 2000. 1510 [11] McWalter, D., Thaler, D., and A. Kessler, "IP Multicast 1511 MIB", RFC 5132, December 2007. 1513 [12] Gill, V., Heasley, J., Meyer, D., Savola, P., and C. 1514 Pignataro, "The Generalized TTL Security Mechanism 1515 (GTSM)", RFC 5082, October 2007. 1517 [13] Adams, A., Nicholas, J., and W. Siadak, "Protocol 1518 Independent Multicast - Dense Mode (PIM-DM): Protocol 1519 Specification (Revised)", RFC 3973, January 2005. 1521 Authors' Addresses 1523 Hitoshi Asaeda 1524 National Institute of Information and Communications Technology 1525 4-2-1 Nukui-Kitamachi 1526 Koganei, Tokyo 184-8795 1527 Japan 1529 Email: asaeda@nict.go.jp 1531 WeeSan Lee (editor)