idnits 2.17.1 draft-ietf-mboned-mtrace-v2-24.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 3 instances 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 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 (June 19, 2018) is 2110 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) No issues found here. Summary: 0 errors (**), 0 flaws (~~), 3 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 K. Meyer 5 Expires: December 21, 2018 6 W. Lee, Ed. 7 June 19, 2018 9 Mtrace Version 2: Traceroute Facility for IP Multicast 10 draft-ietf-mboned-mtrace-v2-24 12 Abstract 14 This document describes the IP multicast traceroute facility, named 15 Mtrace version 2 (Mtrace2). Unlike unicast traceroute, Mtrace2 16 requires special implementations on the part of routers. This 17 specification describes the required functionality in multicast 18 routers, as well as how an Mtrace2 client invokes a query and 19 receives a reply. 21 Status of This Memo 23 This Internet-Draft is submitted in full conformance with the 24 provisions of BCP 78 and BCP 79. 26 Internet-Drafts are working documents of the Internet Engineering 27 Task Force (IETF). Note that other groups may also distribute 28 working documents as Internet-Drafts. The list of current Internet- 29 Drafts is at https://datatracker.ietf.org/drafts/current/. 31 Internet-Drafts are draft documents valid for a maximum of six months 32 and may be updated, replaced, or obsoleted by other documents at any 33 time. It is inappropriate to use Internet-Drafts as reference 34 material or to cite them other than as "work in progress." 36 This Internet-Draft will expire on December 21, 2018. 38 Copyright Notice 40 Copyright (c) 2018 IETF Trust and the persons identified as the 41 document authors. All rights reserved. 43 This document is subject to BCP 78 and the IETF Trust's Legal 44 Provisions Relating to IETF Documents 45 (https://trustee.ietf.org/license-info) in effect on the date of 46 publication of this document. Please review these documents 47 carefully, as they describe your rights and restrictions with respect 48 to this document. Code Components extracted from this document must 49 include Simplified BSD License text as described in Section 4.e of 50 the Trust Legal Provisions and are provided without warranty as 51 described in the Simplified BSD License. 53 This document may contain material from IETF Documents or IETF 54 Contributions published or made publicly available before November 55 10, 2008. The person(s) controlling the copyright in some of this 56 material may not have granted the IETF Trust the right to allow 57 modifications of such material outside the IETF Standards Process. 58 Without obtaining an adequate license from the person(s) controlling 59 the copyright in such materials, this document may not be modified 60 outside the IETF Standards Process, and derivative works of it may 61 not be created outside the IETF Standards Process, except to format 62 it for publication as an RFC or to translate it into languages other 63 than English. 65 Table of Contents 67 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 68 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 6 69 2.1. Definitions . . . . . . . . . . . . . . . . . . . . . . . 6 70 3. Packet Formats . . . . . . . . . . . . . . . . . . . . . . . 7 71 3.1. Mtrace2 TLV format . . . . . . . . . . . . . . . . . . . 8 72 3.2. Defined TLVs . . . . . . . . . . . . . . . . . . . . . . 8 73 3.2.1. Mtrace2 Query . . . . . . . . . . . . . . . . . . . . 9 74 3.2.2. Mtrace2 Request . . . . . . . . . . . . . . . . . . . 11 75 3.2.3. Mtrace2 Reply . . . . . . . . . . . . . . . . . . . . 11 76 3.2.4. IPv4 Mtrace2 Standard Response Block . . . . . . . . 12 77 3.2.5. IPv6 Mtrace2 Standard Response Block . . . . . . . . 16 78 3.2.6. Mtrace2 Augmented Response Block . . . . . . . . . . 19 79 3.2.7. Mtrace2 Extended Query Block . . . . . . . . . . . . 20 80 4. Router Behavior . . . . . . . . . . . . . . . . . . . . . . . 21 81 4.1. Receiving Mtrace2 Query . . . . . . . . . . . . . . . . . 21 82 4.1.1. Query Packet Verification . . . . . . . . . . . . . . 21 83 4.1.2. Query Normal Processing . . . . . . . . . . . . . . . 22 84 4.2. Receiving Mtrace2 Request . . . . . . . . . . . . . . . . 22 85 4.2.1. Request Packet Verification . . . . . . . . . . . . . 22 86 4.2.2. Request Normal Processing . . . . . . . . . . . . . . 23 87 4.3. Forwarding Mtrace2 Request . . . . . . . . . . . . . . . 24 88 4.3.1. Destination Address . . . . . . . . . . . . . . . . . 25 89 4.3.2. Source Address . . . . . . . . . . . . . . . . . . . 25 90 4.3.3. Appending Standard Response Block . . . . . . . . . . 25 91 4.4. Sending Mtrace2 Reply . . . . . . . . . . . . . . . . . . 26 92 4.4.1. Destination Address . . . . . . . . . . . . . . . . . 26 93 4.4.2. Source Address . . . . . . . . . . . . . . . . . . . 26 94 4.4.3. Appending Standard Response Block . . . . . . . . . . 26 95 4.5. Proxying Mtrace2 Query . . . . . . . . . . . . . . . . . 26 96 4.6. Hiding Information . . . . . . . . . . . . . . . . . . . 27 98 5. Client Behavior . . . . . . . . . . . . . . . . . . . . . . . 27 99 5.1. Sending Mtrace2 Query . . . . . . . . . . . . . . . . . . 27 100 5.1.1. Destination Address . . . . . . . . . . . . . . . . . 28 101 5.1.2. Source Address . . . . . . . . . . . . . . . . . . . 28 102 5.2. Determining the Path . . . . . . . . . . . . . . . . . . 28 103 5.3. Collecting Statistics . . . . . . . . . . . . . . . . . . 28 104 5.4. Last Hop Router (LHR) . . . . . . . . . . . . . . . . . . 28 105 5.5. First Hop Router (FHR) . . . . . . . . . . . . . . . . . 29 106 5.6. Broken Intermediate Router . . . . . . . . . . . . . . . 29 107 5.7. Non-Supported Router . . . . . . . . . . . . . . . . . . 29 108 5.8. Mtrace2 Termination . . . . . . . . . . . . . . . . . . . 29 109 5.8.1. Arriving at Source . . . . . . . . . . . . . . . . . 29 110 5.8.2. Fatal Error . . . . . . . . . . . . . . . . . . . . . 30 111 5.8.3. No Upstream Router . . . . . . . . . . . . . . . . . 30 112 5.8.4. Reply Timeout . . . . . . . . . . . . . . . . . . . . 30 113 5.9. Continuing after an Error . . . . . . . . . . . . . . . . 30 114 6. Protocol-Specific Considerations . . . . . . . . . . . . . . 31 115 6.1. PIM-SM . . . . . . . . . . . . . . . . . . . . . . . . . 31 116 6.2. Bi-Directional PIM . . . . . . . . . . . . . . . . . . . 31 117 6.3. PIM-DM . . . . . . . . . . . . . . . . . . . . . . . . . 31 118 6.4. IGMP/MLD Proxy . . . . . . . . . . . . . . . . . . . . . 32 119 7. Problem Diagnosis . . . . . . . . . . . . . . . . . . . . . . 32 120 7.1. Forwarding Inconsistencies . . . . . . . . . . . . . . . 32 121 7.2. TTL or Hop Limit Problems . . . . . . . . . . . . . . . . 32 122 7.3. Packet Loss . . . . . . . . . . . . . . . . . . . . . . . 32 123 7.4. Link Utilization . . . . . . . . . . . . . . . . . . . . 33 124 7.5. Time Delay . . . . . . . . . . . . . . . . . . . . . . . 33 125 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 33 126 8.1. "Mtrace2 Forwarding Codes" Registry . . . . . . . . . . . 33 127 8.2. "Mtrace2 TLV Types" Registry . . . . . . . . . . . . . . 34 128 8.3. UDP Destination Port . . . . . . . . . . . . . . . . . . 34 129 9. Security Considerations . . . . . . . . . . . . . . . . . . . 34 130 9.1. Addresses in Mtrace2 Header . . . . . . . . . . . . . . . 34 131 9.2. Filtering of Clients and Peers . . . . . . . . . . . . . 34 132 9.3. Topology Discovery . . . . . . . . . . . . . . . . . . . 35 133 9.4. Characteristics of Multicast Channel . . . . . . . . . . 35 134 9.5. Limiting Query/Request Rates . . . . . . . . . . . . . . 35 135 9.6. Limiting Reply Rates . . . . . . . . . . . . . . . . . . 35 136 9.7. Specific Security Concerns . . . . . . . . . . . . . . . 36 137 9.7.1. Request and Response Bombardment . . . . . . . . . . 36 138 9.7.2. Amplification Attack . . . . . . . . . . . . . . . . 36 139 9.7.3. Leaking of Confidential Topology Details . . . . . . 36 140 9.7.4. Delivery of False Information (Forged Reply Messages) 36 141 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 37 142 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 37 143 11.1. Normative References . . . . . . . . . . . . . . . . . . 37 144 11.2. Informative References . . . . . . . . . . . . . . . . . 38 145 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 39 147 1. Introduction 149 Given a multicast distribution tree, tracing hop-by-hop downstream 150 from a multicast source to a given multicast receiver is difficult 151 because there is no efficient and deterministic way to determine the 152 branch of the multicast routing tree on which that receiver lies. On 153 the other hand, walking up the tree from a receiver to a source is 154 easy, as most existing multicast routing protocols know the upstream 155 router for each source. Tracing from a receiver to a source can 156 involve only the routers on the direct path. 158 This document specifies the multicast traceroute facility named 159 Mtrace version 2 or Mtrace2 which allows the tracing of an IP 160 multicast routing path. Mtrace2 is usually initiated from an Mtrace2 161 client by sending an Mtrace2 Query to a Last Hop Router (LHR) or to a 162 Rendezvous Point (RP). The RP is a special router where sources and 163 receivers meet in Protocol Independent Multicast - Sparse Mode (PIM- 164 SM) [5]. From the LHR/RP receiving the query, the tracing is 165 directed towards a specified source if a source address is specified 166 and source specific state exists on the receiving router. If no 167 source address is specified or if no source specific state exists on 168 a receiving LHR, the tracing is directed toward the RP for the 169 specified group address. Moreover, Mtrace2 provides additional 170 information such as the packet rates and losses, as well as other 171 diagnostic information. Mtrace2 is primarily intended for the 172 following purposes: 174 o To trace the path that a packet would take from a source to a 175 receiver. 177 o To isolate packet loss problems (e.g., congestion). 179 o To isolate configuration problems (e.g., Time to live (TTL) 180 threshold). 182 Figure 1 shows a typical case on how Mtrace2 is used. First-hop 183 router (FHR) represents the first-hop router, LHR represents the 184 last-hop router (LHR), and the arrow lines represent the Mtrace2 185 messages that are sent from one node to another. The numbers before 186 the Mtrace2 messages represent the sequence of the messages that 187 would happen. Source, Receiver and Mtrace2 client are typically 188 hosts. 190 2. Request 2. Request 191 +----+ +----+ 192 | | | | 193 v | v | 194 +--------+ +-----+ +-----+ +----------+ 195 | Source |----| FHR |----- The Internet -----| LHR |----| Receiver | 196 +--------+ +-----+ | +-----+ +----------+ 197 \ | ^ 198 \ | / 199 \ | / 200 \ | / 201 3. Reply \ | / 1. Query 202 \ | / 203 \ | / 204 \ +---------+ / 205 v | Mtrace2 |/ 206 | client | 207 +---------+ 209 Figure 1 211 When an Mtrace2 client initiates a multicast trace, it sends an 212 Mtrace2 Query packet to an LHR or RP for a multicast group and, 213 optionally, a source address. The LHR/RP turns the Query packet into 214 a Request. The Request message type enables each of the upstream 215 routers processing the message to apply different packet and message 216 validation rules than those required for handling of a Query message. 217 The LHR/RP then appends a standard response block containing its 218 interface addresses and packet statistics to the Request packet, then 219 forwards the packet towards the source/RP. The Request packet is 220 either unicasted to its upstream router towards the source/RP, or 221 multicasted to the group if the upstream router's IP address is not 222 known. In a similar fashion, each router along the path to the 223 source/RP appends a standard response block to the end of the Request 224 packet before forwarding it to its upstream router. When the FHR 225 receives the Request packet, it appends its own standard response 226 block, turns the Request packet into a Reply, and unicasts the Reply 227 back to the Mtrace2 client. 229 The Mtrace2 Reply may be returned before reaching the FHR under some 230 circumstances. This can happen if a Request packet is received at an 231 RP or gateway, or when any of several types of error or exception 232 conditions occur which prevent sending of a request to the next 233 upstream router. 235 The Mtrace2 client waits for the Mtrace2 Reply message and displays 236 the results. When not receiving an Mtrace2 Reply message due to 237 network congestion, a broken router (see Section 5.6), or a non- 238 responding router (see Section 5.7), the Mtrace2 client may resend 239 another Mtrace2 Query with a lower hop count (see Section 3.2.1), and 240 repeat the process until it receives an Mtrace2 Reply message. The 241 details are Mtrace2 client specific and outside the scope of this 242 document. 244 Note that when a router's control plane and forwarding plane are out 245 of sync, the Mtrace2 Requests might be forwarded based on the control 246 states instead. In this case, the traced path might not represent 247 the real path the data packets would follow. 249 Mtrace2 supports both IPv4 and IPv6. Unlike the previous version of 250 Mtrace, which implements its query and response as Internet Group 251 Management Protocol (IGMP) messages [8], all Mtrace2 messages are 252 UDP-based. Although the packet formats of IPv4 and IPv6 Mtrace2 are 253 different because of the address families, the syntax between them is 254 similar. 256 This document describes the base specification of Mtrace2 that can 257 serve as a basis for future proposals such as Mtrace2 for Automatic 258 Multicast Tunneling (AMT) [9] and Mtrace2 for Multicast in MPLS/BGP 259 IP VPNs (MVPN) [10]. They are therefore out of the scope of this 260 document. 262 2. Terminology 264 In this document, the key words "MUST", "MUST NOT", "REQUIRED", 265 "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", 266 and "OPTIONAL" are to be interpreted as described in RFC 2119 [1], 267 and indicate requirement levels for compliant Mtrace2 268 implementations. 270 2.1. Definitions 272 Since Mtrace2 Queries and Requests flow in the opposite direction to 273 the data flow, we refer to "upstream" and "downstream" with respect 274 to data, unless explicitly specified. 276 Incoming interface 277 The interface on which data is expected to arrive from the 278 specified source and group. 280 Outgoing interface 281 This is one of the interfaces to which data from the source or RP 282 is expected to be transmitted for the specified source and group. 283 It is also the interface on which the Mtrace2 Request was 284 received. 286 Upstream router 287 The router, connecting to the Incoming interface of the current 288 router, which is responsible for forwarding data for the specified 289 source and group to the current router. 291 First-hop router (FHR) 292 The router that is directly connected to the source the Mtrace2 293 Query specifies. 295 Last-hop router (LHR) 296 A router that is directly connected to a receiver. It is also the 297 router that receives the Mtrace2 Query from an Mtrace2 client. 299 Group state 300 The state a shared-tree protocol, such as PIM-SM [5], uses to 301 choose the upstream router towards the RP for the specified group. 302 In this state, source-specific state is not available for the 303 corresponding group address on the router. 305 Source-specific state 306 The state that is used to choose the path towards the source for 307 the specified source and group. 309 ALL-[protocol]-ROUTERS group 310 Link-local multicast address for multicast routers to communicate 311 with their adjacent routers that are running the same routing 312 protocol. For instance, the IPv4 'ALL-PIM-ROUTERS' group is 313 '224.0.0.13', and the IPv6 'ALL-PIM-ROUTERS' group is 'ff02::d' 314 [5]. 316 3. Packet Formats 318 This section describes the details of the packet formats for Mtrace2 319 messages. 321 All Mtrace2 messages are encoded in the Type/Length/Value (TLV) 322 format (see Section 3.1). The first TLV of a message is a message 323 header TLV specifying the type of message and additional context 324 information required for processing of the message and for parsing of 325 subsequent TLVs in the message. Subsequent TLVs in a message, 326 referred to as Blocks, are appended after the header TLV to provide 327 additional information associated with the message. If an 328 implementation receives an unknown TLV type for any TLV in a message, 329 it SHOULD ignore and silently discard the entire packet. If the 330 length of a TLV exceeds the available space in the containing packet, 331 the implementation MUST ignore and silently discard the TLV and any 332 remaining portion of the containing packet. 334 All Mtrace2 messages are UDP packets. For IPv4, Mtrace2 335 Query/Request/Reply messages MUST NOT be fragmented. Therefore, 336 Mtrace2 clients and LHRs/RPs MUST set the IP header do-not-fragment 337 (DF) bit for all Mtrace2 messages. For IPv6, the packet size for the 338 Mtrace2 messages MUST NOT exceed 1280 bytes, which is the smallest 339 Maximum Transmission Unit (MTU) for an IPv6 interface [2]. The 340 source port is uniquely selected by the local host operating system. 341 The destination port is the IANA reserved Mtrace2 port number (see 342 Section 8). All Mtrace2 messages MUST have a valid UDP checksum. 344 Additionally, Mtrace2 supports both IPv4 and IPv6, but not mixed. 345 For example, if an Mtrace2 Query or Request message arrives in as an 346 IPv4 packet, all addresses specified in the Mtrace2 messages MUST be 347 IPv4 as well. Same rule applies to IPv6 Mtrace2 messages. 349 3.1. Mtrace2 TLV format 351 0 1 2 3 352 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 353 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 354 | Type | Length | Value .... | 355 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 357 Type: 8 bits 359 Describes the format of the Value field. For all the available 360 types, please see Section 3.2 362 Length: 16 bits 364 Length of Type, Length, and Value fields in octets. Minimum 365 length required is 4 octets. The length MUST be a multiple of 4 366 octets. The maximum TLV length is not defined; however the entire 367 Mtrace2 packet length MUST NOT exceed the available MTU. 369 Value: variable length 371 The format is based on the Type value. The length of the value 372 field is Length field minus 3. All reserved fields in the Value 373 field MUST be transmitted as zeros and ignored on receipt. 375 3.2. Defined TLVs 377 The following TLV Types are defined: 379 Code Type 380 ==== ================================ 381 0x01 Mtrace2 Query 382 0x02 Mtrace2 Request 383 0x03 Mtrace2 Reply 384 0x04 Mtrace2 Standard Response Block 385 0x05 Mtrace2 Augmented Response Block 386 0x06 Mtrace2 Extended Query Block 388 Each Mtrace2 message MUST begin with either a Query, Request or Reply 389 TLV. The first TLV determines the type of each Mtrace2 message. 390 Following a Query TLV, there can be a sequence of optional Extended 391 Query Blocks. In the case of a Request or a Reply TLV, it is then 392 followed by a sequence of Standard Response Blocks, each from a 393 multicast router on the path towards the source or the RP. In the 394 case more information is needed, a Standard Response Block can be 395 followed by one or multiple Augmented Response Blocks. 397 We will describe each message type in detail in the next few 398 sections. 400 3.2.1. Mtrace2 Query 402 An Mtrace2 Query is originated by an Mtrace2 client which sends an 403 Mtrace2 Query message to the LHR. The LHR modifies only the Type 404 field of the Query TLV (to turn it into a "Request") before appending 405 a Standard Response Block and forwarding it upstream. The LHR and 406 intermediate routers handling the Mtrace2 message when tracing 407 upstream MUST NOT modify any other fields within the Query/Request 408 TLV. Additionally, intermediate routers handling the message after 409 the LHR has converted the Query into a Request MUST NOT modify the 410 type field of the Request TLV. If the actual number of hops is not 411 known, an Mtrace2 client could send an initial Query message with a 412 large # Hops (e.g., 0xff), in order to try to trace the full path. 414 An Mtrace2 Query message is shown as follows: 416 0 1 2 3 417 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 418 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 419 | Type | Length | # Hops | 420 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 421 | | 422 | Multicast Address | 423 | | 424 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 425 | | 426 | Source Address | 427 | | 428 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 429 | | 430 | Mtrace2 Client Address | 431 | | 432 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 433 | Query ID | Client Port # | 434 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 436 Figure 2 438 Length: 16 bits 439 The length field MUST be either 20 (i.e., 8 plus 3 * 4 (IPv4 440 addresses)) or 56 (i.e., 8 + 3 * 16 (IPv6 addresses)); if the 441 length is 20, then IPv4 addresses MUST be assumed and if the 442 length is 56, then IPv6 addresses MUST be assumed. 444 # Hops: 8 bits 445 This field specifies the maximum number of hops that the Mtrace2 446 client wants to trace. If there are some error conditions in the 447 middle of the path that prevent an Mtrace2 Reply from being 448 received by the client, the client MAY issue another Mtrace2 Query 449 with a lower number of hops until it receives a Reply. 451 Multicast Address: 32 bits or 128 bits 452 This field specifies an IPv4 or IPv6 address, which can be either: 454 m-1: a multicast group address to be traced; or, 456 m-2: all 1's in case of IPv4 or the unspecified address (::) in 457 case of IPv6 if no group-specific information is desired. 459 Source Address: 32 bits or 128 bits 460 This field specifies an IPv4 or IPv6 address, which can be either: 462 s-1: a unicast address of the source to be traced; or, 463 s-2: all 1's in case of IPv4 or the unspecified address (::) in 464 case of IPv6 if no source-specific information is desired. 465 For example, the client is tracing a (*,g) group state. 467 Note that it is invalid to have a source-group combination of 468 (s-2, m-2). If a router receives such combination in an Mtrace2 469 Query, it MUST silently discard the Query. 471 Mtrace2 Client Address: 32 bits or 128 bits 472 This field specifies the Mtrace2 client's IPv4 address or IPv6 473 global address. This address MUST be a valid unicast address, and 474 therefore, MUST NOT be all 1's or an unspecified address. The 475 Mtrace2 Reply will be sent to this address. 477 Query ID: 16 bits 478 This field is used as a unique identifier for this Mtrace2 Query 479 so that duplicate or delayed Reply messages may be detected. 481 Client Port #: 16 bits 482 This field specifies the destination UDP port number for receiving 483 the Mtrace2 Reply packet. 485 3.2.2. Mtrace2 Request 487 The Mtrace2 Request TLV is exactly the same as an Mtrace2 Query 488 except for identifying the Type field of 0x02. 490 When a LHR receives an Mtrace2 Query message, it turns the Query into 491 a Request by changing the Type field of the Query from 0x01 to 0x02. 492 The LHR then appends an Mtrace2 Standard Response Block (see 493 Section 3.2.4) of its own to the Request message before sending it 494 upstream. The upstream routers do the same without changing the Type 495 field until one of them is ready to send a Reply. 497 3.2.3. Mtrace2 Reply 499 The Mtrace2 Reply TLV is exactly the same as an Mtrace2 Query except 500 for identifying the Type field of 0x03. 502 When a FHR or an RP receives an Mtrace2 Request message which is 503 destined to itself, it appends an Mtrace2 Standard Response Block 504 (see Section 3.2.4) of its own to the Request message. Next, it 505 turns the Request message into a Reply by changing the Type field of 506 the Request from 0x02 to 0x03 and by changing the UDP destination 507 port to the port number specified in the Client Port number field in 508 the Request. It then unicasts the Reply message to the Mtrace2 509 client specified in the Mtrace2 Client Address field. 511 There are a number of cases in which an intermediate router might 512 return a Reply before a Request reaches the FHR or the RP. See 513 Section 4.1.1, Section 4.2.2, Section 4.3.3, and Section 4.5 for more 514 details. 516 3.2.4. IPv4 Mtrace2 Standard Response Block 518 This section describes the message format of an IPv4 Mtrace2 Standard 519 Response Block. The Type field is 0x04. 521 0 1 2 3 522 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 523 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 524 | Type | Length | MBZ | 525 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 526 | Query Arrival Time | 527 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 528 | Incoming Interface Address | 529 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 530 | Outgoing Interface Address | 531 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 532 | Upstream Router Address | 533 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 534 | | 535 . Input packet count on incoming interface . 536 | | 537 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 538 | | 539 . Output packet count on outgoing interface . 540 | | 541 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 542 | | 543 . Total number of packets for this source-group pair . 544 | | 545 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 546 | Rtg Protocol | Multicast Rtg Protocol | 547 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 548 | Fwd TTL | MBZ |S| Src Mask |Forwarding Code| 549 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 551 MBZ: 8 bits 552 This field MUST be zeroed on transmission and ignored on 553 reception. 555 Query Arrival Time: 32 bits 556 The Query Arrival Time is a 32-bit Network Time Protocol (NTP) 557 timestamp specifying the arrival time of the Mtrace2 Query or 558 Request packet at this router. The 32-bit form of an NTP 559 timestamp consists of the middle 32 bits of the full 64-bit form; 560 that is, the low 16 bits of the integer part and the high 16 bits 561 of the fractional part. 563 The following formula converts from a timespec (fractional part in 564 nanoseconds) to a 32-bit NTP timestamp: 566 query_arrival_time 567 = ((tv.tv_sec + 32384) << 16) + ((tv.tv_nsec << 7) / 1953125) 569 The constant 32384 is the number of seconds from Jan 1, 1900 to 570 Jan 1, 1970 truncated to 16 bits. ((tv.tv_nsec << 7) / 1953125) 571 is a reduction of ((tv.tv_nsec / 1000000000) << 16). 573 Note that synchronized clocks are required on the traced routers 574 to estimate propagation and queueing delays between successive 575 hops. Nevertheless, even without this synchronization, an 576 application can still estimate an upper bound on cumulative one 577 way latency by measuring the time between sending a Query and 578 receiving a Reply. 580 Additionally, Query Arrival Time is useful for measuring the 581 packet rate. For example, suppose that a client issues two 582 queries, and the corresponding requests R1 and R2 arrive at router 583 X at time T1 and T2, then the client would be able to compute the 584 packet rate on router X by using the packet count information 585 stored in the R1 and R2, and the time T1 and T2. 587 Incoming Interface Address: 32 bits 588 This field specifies the address of the interface on which packets 589 from the source or the RP are expected to arrive, or 0 if unknown 590 or unnumbered. 592 Outgoing Interface Address: 32 bits 593 This field specifies the address of the interface on which packets 594 from the source or the RP are expected to transmit towards the 595 receiver, or 0 if unknown or unnumbered. This is also the address 596 of the interface on which the Mtrace2 Query or Request arrives. 598 Upstream Router Address: 32 bits 599 This field specifies the address of the upstream router from which 600 this router expects packets from this source. This MAY be a 601 multicast group (e.g., ALL-[protocol]-ROUTERS group) if the 602 upstream router is not known because of the workings of the 603 multicast routing protocol. However, it MUST be 0 if the incoming 604 interface address is unknown or unnumbered. 606 Input packet count on incoming interface: 64 bits 607 This field contains the number of multicast packets received for 608 all groups and sources on the incoming interface, or all 1's if no 609 count can be reported. This counter may have the same value as 610 ifHCInMulticastPkts from the Interfaces Group MIB (IF-MIB) [12] 611 for this interface. 613 Output packet count on outgoing interface: 64 bit 614 This field contains the number of multicast packets that have been 615 transmitted or queued for transmission for all groups and sources 616 on the outgoing interface, or all 1's if no count can be reported. 617 This counter may have the same value as ifHCOutMulticastPkts from 618 the IF-MIB [12] for this interface. 620 Total number of packets for this source-group pair: 64 bits 621 This field counts the number of packets from the specified source 622 forwarded by the router to the specified group, or all 1's if no 623 count can be reported. If the S bit is set (see below), the count 624 is for the source network, as specified by the Src Mask field (see 625 below). If the S bit is set and the Src Mask field is 127, 626 indicating no source-specific state, the count is for all sources 627 sending to this group. This counter should have the same value as 628 ipMcastRoutePkts from the IP Multicast MIB [13] for this 629 forwarding entry. 631 Rtg Protocol: 16 bits 632 This field describes the unicast routing protocol running between 633 this router and the upstream router, and it is used to determine 634 the RPF interface for the specified source or RP. This value 635 should have the same value as ipMcastRouteRtProtocol from the IP 636 Multicast MIB [13] for this entry. If the router is not able to 637 obtain this value, all 0's must be specified. 639 Multicast Rtg Protocol: 16 bits 640 This field describes the multicast routing protocol in use between 641 the router and the upstream router. This value should have the 642 same value as ipMcastRouteProtocol from the IP Multicast MIB [13] 643 for this entry. If the router cannot obtain this value, all 0's 644 must be specified. 646 Fwd TTL: 8 bits 647 This field contains the configured multicast TTL threshold, if 648 any, of the outgoing interface. 650 S: 1 bit 651 If this bit is set, it indicates that the packet count for the 652 source-group pair is for the source network, as determined by 653 masking the source address with the Src Mask field. 655 Src Mask: 7 bits 656 This field contains the number of 1's in the netmask the router 657 has for the source (i.e. a value of 24 means the netmask is 658 0xffffff00). If the router is forwarding solely on group state, 659 this field is set to 127 (0x7f). 661 Forwarding Code: 8 bits 662 This field contains a forwarding information/error code. Values 663 with the high order bit set (0x80-0xff) are intended for use with 664 conditions that are transitory or automatically recovered. Other 665 forwarding code values indicate a need to fix a problem in the 666 Query or a need to redirect the Query. Section 4.1 and 667 Section 4.2 explain how and when the Forwarding Code is filled. 668 Defined values are as follows: 670 Value Name Description 671 ----- -------------- ---------------------------------------------- 672 0x00 NO_ERROR No error 673 0x01 WRONG_IF Mtrace2 Request arrived on an interface 674 to which this router would not forward for 675 the specified group towards the source or RP. 676 0x02 PRUNE_SENT This router has sent a prune upstream which 677 applies to the source and group in the 678 Mtrace2 Request. 679 0x03 PRUNE_RCVD This router has stopped forwarding for this 680 source and group in response to a request 681 from the downstream router. 682 0x04 SCOPED The group is subject to administrative 683 scoping at this router. 684 0x05 NO_ROUTE This router has no route for the source or 685 group and no way to determine a potential 686 route. 687 0x06 WRONG_LAST_HOP This router is not the proper LHR. 688 0x07 NOT_FORWARDING This router is not forwarding this source and 689 group out the outgoing interface for an 690 unspecified reason. 691 0x08 REACHED_RP Reached the Rendezvous Point. 692 0x09 RPF_IF Mtrace2 Request arrived on the expected 693 RPF interface for this source and group. 694 0x0A NO_MULTICAST Mtrace2 Request arrived on an interface 695 which is not enabled for multicast. 696 0x0B INFO_HIDDEN One or more hops have been hidden from this 697 trace. 698 0x0C REACHED_GW Mtrace2 Request arrived on a gateway (e.g., 699 a NAT or firewall) that hides the 700 information between this router and the 701 Mtrace2 client. 702 0x0D UNKNOWN_QUERY A non-transitive Extended Query Type was 703 received by a router which does not support 704 the type. 705 0x80 FATAL_ERROR A fatal error is one where the router may 706 know the upstream router but cannot forward 707 the message to it. 708 0x81 NO_SPACE There was not enough room to insert another 709 Standard Response Block in the packet. 710 0x83 ADMIN_PROHIB Mtrace2 is administratively prohibited. 712 3.2.5. IPv6 Mtrace2 Standard Response Block 714 This section describes the message format of an IPv6 Mtrace2 Standard 715 Response Block. The Type field is also 0x04. 717 0 1 2 3 718 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 719 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 720 | Type | Length | MBZ | 721 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 722 | Query Arrival Time | 723 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 724 | Incoming Interface ID | 725 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 726 | Outgoing Interface ID | 727 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 728 | | 729 * Local Address * 730 | | 731 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 732 | | 733 * Remote Address * 734 | | 735 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 736 | | 737 . Input packet count on incoming interface . 738 | | 739 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 740 | | 741 . Output packet count on outgoing interface . 742 | | 743 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 744 | | 745 . Total number of packets for this source-group pair . 746 | | 747 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 748 | Rtg Protocol | Multicast Rtg Protocol | 749 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 750 | MBZ 2 |S|Src Prefix Len |Forwarding Code| 751 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 753 MBZ: 8 bits 754 This field MUST be zeroed on transmission and ignored on 755 reception. 757 Query Arrival Time: 32 bits 758 Same definition as in IPv4. 760 Incoming Interface ID: 32 bits 761 This field specifies the interface ID on which packets from the 762 source or RP are expected to arrive, or 0 if unknown. This ID 763 should be the value taken from InterfaceIndex of the IF-MIB [12] 764 for this interface. 766 Outgoing Interface ID: 32 bits 767 This field specifies the interface ID to which packets from the 768 source or RP are expected to transmit, or 0 if unknown. This ID 769 should be the value taken from InterfaceIndex of the IF-MIB [12] 770 for this interface 772 Local Address: 128 bits 773 This field specifies a global IPv6 address that uniquely 774 identifies the router. A unique local unicast address [11] SHOULD 775 NOT be used unless the router is only assigned link-local and 776 unique local addresses. If the router is only assigned link-local 777 addresses, its link-local address can be specified in this field. 779 Remote Address: 128 bits 780 This field specifies the address of the upstream router, which, in 781 most cases, is a link-local unicast address for the upstream 782 router. 784 Although a link-local address does not have enough information to 785 identify a node, it is possible to detect the upstream router with 786 the assistance of Incoming Interface ID and the current router 787 address (i.e., Local Address). 789 Note that this may be a multicast group (e.g., ALL-[protocol]- 790 ROUTERS group) if the upstream router is not known because of the 791 workings of a multicast routing protocol. However, it should be 792 the unspecified address (::) if the incoming interface address is 793 unknown. 795 Input packet count on incoming interface: 64 bits 796 Same definition as in IPv4. 798 Output packet count on outgoing interface: 64 bits 799 Same definition as in IPv4. 801 Total number of packets for this source-group pair: 64 bits 802 Same definition as in IPv4, except if the S bit is set (see 803 below), the count is for the source network, as specified by the 804 Src Prefix Len field. If the S bit is set and the Src Prefix Len 805 field is 255, indicating no source-specific state, the count is 806 for all sources sending to this group. This counter should have 807 the same value as ipMcastRoutePkts from the IP Multicast MIB [13] 808 for this forwarding entry. 810 Rtg Protocol: 16 bits 811 Same definition as in IPv4. 813 Multicast Rtg Protocol: 16 bits 814 Same definition as in IPv4. 816 MBZ 2: 15 bits 817 This field MUST be zeroed on transmission and ignored on 818 reception. 820 S: 1 bit 821 Same definition as in IPv4, except the Src Prefix Len field is 822 used to mask the source address. 824 Src Prefix Len: 8 bits 825 This field contains the prefix length this router has for the 826 source. If the router is forwarding solely on group state, this 827 field is set to 255 (0xff). 829 Forwarding Code: 8 bits 830 Same definition as in IPv4. 832 3.2.6. Mtrace2 Augmented Response Block 834 In addition to the Standard Response Block, a multicast router on the 835 traced path can optionally add one or multiple Augmented Response 836 Blocks before sending the Request to its upstream router. 838 The Augmented Response Block is flexible for various purposes such as 839 providing diagnosis information (see Section 7) and protocol 840 verification. Its Type field is 0x05, and its format is as follows: 842 0 1 2 3 843 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 844 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 845 | Type | Length | MBZ | 846 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 847 | Augmented Response Type | Value .... | 848 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 850 MBZ: 8 bits 851 This field MUST be zeroed on transmission and ignored on 852 reception. 854 Augmented Response Type: 16 bits 855 This field specifies the type of various responses from a 856 multicast router that might need to communicate back to the 857 Mtrace2 client as well as the multicast routers on the traced 858 path. 860 The Augmented Response Type is defined as follows: 862 Code Type 863 ====== ============================================== 864 0x0001 # of the returned Standard Response Blocks 866 When the NO_SPACE error occurs on a router, the router should send 867 the original Mtrace2 Request received from the downstream router 868 as a Reply back to the Mtrace2 client and continue with a new 869 Mtrace2 Request. In the new Request, the router adds a Standard 870 Response Block followed by an Augmented Response Block with 0x01 871 as the Augmented Response Type, and the number of the returned 872 Mtrace2 Standard Response Blocks as the Value. 874 Each upstream router recognizes the total number of hops the 875 Request has been traced so far by adding this number and the 876 number of the Standard Response Block in the current Request 877 message. 879 This document only defines one Augmented Response Type in the 880 Augmented Response Block. The description on how to provide 881 diagnosis information using the Augmented Response Block is out of 882 the scope of this document, and will be addressed in separate 883 documents. 885 Value: variable length 886 The format is based on the Augmented Response Type value. The 887 length of the value field is Length field minus 6. 889 3.2.7. Mtrace2 Extended Query Block 891 There may be a sequence of optional Extended Query Blocks that follow 892 an Mtrace2 Query to further specify any information needed for the 893 Query. For example, an Mtrace2 client might be interested in tracing 894 the path the specified source and group would take based on a certain 895 topology. In this case, the client can pass in the multi-topology ID 896 as the Value for an Extended Query Type (see below). The Extended 897 Query Type is extensible and the behavior of the new types will be 898 addressed by separate documents. 900 The Mtrace2 Extended Query Block's Type field is 0x06, and is 901 formatted as follows: 903 0 1 2 3 904 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 905 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 906 | Type | Length | MBZ |T| 907 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 908 | Extended Query Type | Value .... | 909 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 911 MBZ: 7 bits 912 This field MUST be zeroed on transmission and ignored on 913 reception. 915 T-bit (Transitive Attribute): 1 bit 916 If the TLV type is unrecognized by the receiving router, then this 917 TLV is either discarded or forwarded along with the Query, 918 depending on the value of this bit. If this bit is set, then the 919 router MUST forward this TLV. If this bit is clear, the router 920 MUST send an Mtrace2 Reply with an UNKNOWN_QUERY error. 922 Extended Query Type: 16 bits 923 This field specifies the type of the Extended Query Block. 925 Value: 16 bits 926 This field specifies the value of this Extended Query. 928 4. Router Behavior 930 This section describes the router behavior in the context of Mtrace2 931 in detail. 933 4.1. Receiving Mtrace2 Query 935 An Mtrace2 Query message is an Mtrace2 message with no response 936 blocks filled in, and uses TLV type of 0x01. 938 4.1.1. Query Packet Verification 940 Upon receiving an Mtrace2 Query message, a router MUST examine 941 whether the Multicast Address and the Source Address are a valid 942 combination as specified in Section 3.2.1, and whether the Mtrace2 943 Client Address is a valid IP unicast address. If either one is 944 invalid, the Query MUST be silently ignored. 946 Mtrace2 supports a non-local client to the LHR/RP. A router SHOULD, 947 however, support a mechanism to filter out queries from clients 948 beyond a specified administrative boundary. The potential approaches 949 are described in Section 9.2. 951 In the case where a local LHR client is required, the router must 952 then examine the Query to see if it is the proper LHR/RP for the 953 destination address in the packet. It is the proper local LHR if it 954 has a multicast-capable interface on the same subnet as the Mtrace2 955 Client Address and is the router that would forward traffic from the 956 given (S,G) or (*,G) onto that subnet. It is the proper RP if the 957 multicast group address specified in the query is 0 and if the IP 958 header destination address is a valid RP address on this router. 960 If the router determines that it is not the proper LHR/RP, or it 961 cannot make that determination, it does one of two things depending 962 on whether the Query was received via multicast or unicast. If the 963 Query was received via multicast, then it MUST be silently discarded. 964 If it was received via unicast, the router turns the Query into a 965 Reply message by changing the TLV type to 0x03 and appending a 966 Standard Response Block with a Forwarding Code of WRONG_LAST_HOP. 967 The rest of the fields in the Standard Response Block MUST be zeroed. 968 The router then sends the Reply message to the Mtrace2 Client Address 969 on the Client Port # as specified in the Mtrace2 Query. 971 Duplicate Query messages as identified by the tuple (Mtrace2 Client 972 Address, Query ID) SHOULD be ignored. This MAY be implemented using 973 a cache of previously processed queries keyed by the Mtrace2 Client 974 Address and Query ID pair. The duration of the cached entries is 975 implementation specific. Duplicate Request messages MUST NOT be 976 ignored in this manner. 978 4.1.2. Query Normal Processing 980 When a router receives an Mtrace2 Query and it determines that it is 981 the proper LHR/RP, it turns the Query to a Request by changing the 982 TLV type from 0x01 to 0x02, and performs the steps listed in 983 Section 4.2. 985 4.2. Receiving Mtrace2 Request 987 An Mtrace2 Request is an Mtrace2 message that uses TLV type of 0x02. 988 With the exception of the LHR, whose Request was just converted from 989 a Query, each Request received by a router should have at least one 990 Standard Response Block filled in. 992 4.2.1. Request Packet Verification 994 If the Mtrace2 Request does not come from an adjacent router, or if 995 the Request is not addressed to this router, or if the Request is 996 addressed to a multicast group which is not a link-scoped group 997 (i.e., 224.0.0.0/24 for IPv4, FFx2::/16 [3] for IPv6), it MUST be 998 silently ignored. The Generalized TTL Security Mechanism (GTSM) [14] 999 SHOULD be used by the router to determine whether the router is 1000 adjacent or not. 1002 If the sum of the number of the Standard Response Blocks in the 1003 received Mtrace2 Request and the value of the Augmented Response Type 1004 of 0x01, if any, is equal or more than the # Hops in the Mtrace2 1005 Request, it MUST be silently ignored. 1007 4.2.2. Request Normal Processing 1009 When a router receives an Mtrace2 Request message, it performs the 1010 following steps. Note that it is possible to have multiple 1011 situations covered by the Forwarding Codes. The first one 1012 encountered is the one that is reported, i.e. all "note Forwarding 1013 Code N" should be interpreted as "if Forwarding Code is not already 1014 set, set Forwarding Code to N". Note that in the steps described 1015 below the "Outgoing Interface" is the one on which the Mtrace2 1016 Request message arrives. 1018 1. Prepare a Standard Response Block to be appended to the packet, 1019 setting all fields to an initial default value of zero. 1021 2. If Mtrace2 is administratively prohibited, note the Forwarding 1022 Code of ADMIN_PROHIB and skip to step 4. 1024 3. In the Standard Response Block, fill in the Query Arrival Time, 1025 Outgoing Interface Address (for IPv4) or Outgoing Interface ID 1026 (for IPv6), Output Packet Count, and Fwd TTL (for IPv4). 1028 4. Attempt to determine the forwarding information for the 1029 specified source and group, using the same mechanisms as would 1030 be used when a packet is received from the source destined for 1031 the group. A state need not be instantiated, it can be a 1032 "phantom" state created only for the purpose of the trace, such 1033 as "dry-run." 1035 If using a shared-tree protocol and there is no source-specific 1036 state, or if no source-specific information is desired (i.e., 1037 all 1's for IPv4 or unspecified address (::) for IPv6), group 1038 state should be used. If there is no group state or no group- 1039 specific information is desired, potential source state (i.e., 1040 the path that would be followed for a source-specific Join) 1041 should be used. 1043 5. If no forwarding information can be determined, the router notes 1044 a Forwarding Code of NO_ROUTE, sets the remaining fields that 1045 have not yet been filled in to zero, and then sends an Mtrace2 1046 Reply back to the Mtrace2 client. 1048 6. If a Forwarding Code of ADMIN_PROHIB has been set, skip to step 1049 7. Otherwise, fill in the Incoming Interface Address (or 1050 Incoming Interface ID and Local Address for IPv6), Upstream 1051 Router Address (or Remote Address for IPv6), Input Packet Count, 1052 Total Number of Packets, Routing Protocol, S, and Src Mask (or 1053 Src Prefix Len for IPv6) using the forwarding information 1054 determined in step 4. 1056 7. If the Outgoing interface is not enabled for multicast, note 1057 Forwarding Code of NO_MULTICAST. If the Outgoing interface is 1058 the interface from which the router would expect data to arrive 1059 from the source, note forwarding code RPF_IF. If the Outgoing 1060 interface is not one to which the router would forward data from 1061 the source or RP to the group, a Forwarding code of WRONG_IF is 1062 noted. In the above three cases, the router will return an 1063 Mtrace2 Reply and terminate the trace. 1065 8. If the group is subject to administrative scoping on either the 1066 Outgoing or Incoming interfaces, a Forwarding Code of SCOPED is 1067 noted. 1069 9. If this router is the RP for the group for a non-source-specific 1070 query, note a Forwarding Code of REACHED_RP. The router will 1071 send an Mtrace2 Reply and terminate the trace. 1073 10. If this router is directly connected to the specified source or 1074 source network on the Incoming interface, it sets the Upstream 1075 Router Address (for IPv4) or the Remote Address (for IPv6) of 1076 the response block to zero. The router will send an Mtrace2 1077 Reply and terminate the trace. 1079 11. If this router has sent a prune upstream which applies to the 1080 source and group in the Mtrace2 Request, it notes a Forwarding 1081 Code of PRUNE_SENT. If the router has stopped forwarding 1082 downstream in response to a prune sent by the downstream router, 1083 it notes a Forwarding Code of PRUNE_RCVD. If the router should 1084 normally forward traffic downstream for this source and group 1085 but is not, it notes a Forwarding Code of NOT_FORWARDING. 1087 12. If this router is a gateway (e.g., a NAT or firewall) that hides 1088 the information between this router and the Mtrace2 client, it 1089 notes a Forwarding Code of REACHED_GW. The router continues the 1090 processing as described in Section 4.5. 1092 13. If the total number of the Standard Response Blocks, including 1093 the newly prepared one, and the value of the Augmented Response 1094 Type of 0x01, if any, is less than the # Hops in the Request, 1095 the packet is then forwarded to the upstream router as described 1096 in Section 4.3; otherwise, the packet is sent as an Mtrace2 1097 Reply to the Mtrace2 client as described in Section 4.4. 1099 4.3. Forwarding Mtrace2 Request 1101 This section describes how an Mtrace2 Request should be forwarded. 1103 4.3.1. Destination Address 1105 If the upstream router for the Mtrace2 Request is known for this 1106 request, the Mtrace2 Request is sent to that router. If the Incoming 1107 interface is known but the upstream router is not, the Mtrace2 1108 Request is sent to an appropriate multicast address on the Incoming 1109 interface. The multicast address SHOULD depend on the multicast 1110 routing protocol in use, such as ALL-[protocol]-ROUTERS group. It 1111 MUST be a link-scoped group (i.e., 224.0.0.0/24 for IPv4, FF02::/16 1112 for IPv6), and MUST NOT be the all-systems multicast group 1113 (224.0.0.1) for IPv4 and All Nodes Address (FF02::1) for IPv6. It 1114 MAY also be the all-routers multicast group (224.0.0.2) for IPv4 or 1115 All Routers Address (FF02::2) for IPv6 if the routing protocol in use 1116 does not define a more appropriate multicast address. 1118 4.3.2. Source Address 1120 An Mtrace2 Request should be sent with the address of the Incoming 1121 interface. However, if the Incoming interface is unnumbered, the 1122 router can use one of its numbered interface addresses as the source 1123 address. 1125 4.3.3. Appending Standard Response Block 1127 An Mtrace2 Request MUST be sent upstream towards the source or the RP 1128 after appending a Standard Response Block to the end of the received 1129 Mtrace2 Request. The Standard Response Block includes the multicast 1130 states and statistics information of the router described in 1131 Section 3.2.4. 1133 If appending the Standard Response Block would make the Mtrace2 1134 Request packet longer than the MTU of the Incoming Interface, or, in 1135 the case of IPv6, longer than 1280 bytes, the router MUST change the 1136 Forwarding Code in the last Standard Response Block of the received 1137 Mtrace2 Request into NO_SPACE. The router then turns the Request 1138 into a Reply and sends the Reply as described in Section 4.4. 1140 The router will continue with a new Request by copying from the old 1141 Request excluding all the response blocks, followed by the previously 1142 prepared Standard Response Block, and an Augmented Response Block 1143 with Augmented Response Type of 0x01 and the number of the returned 1144 Standard Response Blocks as the value. The new Request is then 1145 forwarded upstream. 1147 4.4. Sending Mtrace2 Reply 1149 An Mtrace2 Reply MUST be returned to the client by a router if any of 1150 the following conditions occur: 1152 1. The total number of the traced routers are equal to the # of hops 1153 in the request (including the one just added) plus the number of 1154 the returned blocks, if any. 1156 2. Appending the Standard Response Block would make the Mtrace2 1157 Request packet longer than the MTU of the Incoming interface. 1158 (In case of IPv6 not more than 1280 bytes; see Section 4.3.3 for 1159 additional details on handling of this case.) 1161 3. The request has reached the RP for a non source specific query or 1162 has reached the first hop router for a source specific query (see 1163 Section 4.2.2, items 9 and 10 for additional details). 1165 4.4.1. Destination Address 1167 An Mtrace2 Reply MUST be sent to the address specified in the Mtrace2 1168 Client Address field in the Mtrace2 Request. 1170 4.4.2. Source Address 1172 An Mtrace2 Reply SHOULD be sent with the address of the router's 1173 Outgoing interface. However, if the Outgoing interface address is 1174 unnumbered, the router can use one of its numbered interface 1175 addresses as the source address. 1177 4.4.3. Appending Standard Response Block 1179 An Mtrace2 Reply MUST be sent with the prepared Standard Response 1180 Block appended at the end of the received Mtrace2 Request except in 1181 the case of NO_SPACE forwarding code. 1183 4.5. Proxying Mtrace2 Query 1185 When a gateway (e.g., a NAT or firewall), which needs to block 1186 unicast packets to the Mtrace2 client, or hide information between 1187 the gateway and the Mtrace2 client, receives an Mtrace2 Query from an 1188 adjacent host or Mtrace2 Request from an adjacent router, it appends 1189 a Standard Response Block with REACHED_GW as the Forwarding Code. It 1190 turns the Query or Request into a Reply, and sends the Reply back to 1191 the client. 1193 At the same time, the gateway originates a new Mtrace2 Query message 1194 by copying the original Mtrace2 header (the Query or Request without 1195 any of the response blocks), and makes the changes as follows: 1197 o sets the RPF interface's address as the Mtrace2 Client Address; 1199 o uses its own port number as the Client Port #; and, 1201 o decreases # Hops by ((number of the Standard Response Blocks that 1202 were just returned in a Reply) - 1). The "-1" in this expression 1203 accounts for the additional Standard Response Block appended by 1204 the gateway router. 1206 The new Mtrace2 Query message is then sent to the upstream router or 1207 to an appropriate multicast address on the RPF interface. 1209 When the gateway receives an Mtrace2 Reply whose Query ID matches the 1210 one in the original Mtrace2 header, it MUST relay the Mtrace2 Reply 1211 back to the Mtrace2 client by replacing the Reply's header with the 1212 original Mtrace2 header. If the gateway does not receive the 1213 corresponding Mtrace2 Reply within the [Mtrace Reply Timeout] period 1214 (see Section 5.8.4), then it silently discards the original Mtrace2 1215 Query or Request message, and terminates the trace. 1217 4.6. Hiding Information 1219 Information about a domain's topology and connectivity may be hidden 1220 from the Mtrace2 Requests. The Forwarding Code of INFO_HIDDEN may be 1221 used to note that. For example, the incoming interface address and 1222 packet count on the ingress router of a domain, and the outgoing 1223 interface address and packet count on the egress router of the domain 1224 can be specified as all 1's. Additionally, the source-group packet 1225 count (see Section 3.2.4 and Section 3.2.5) within the domain may be 1226 all 1's if it is hidden. 1228 5. Client Behavior 1230 This section describes the behavior of an Mtrace2 client in detail. 1232 5.1. Sending Mtrace2 Query 1234 An Mtrace2 client initiates an Mtrace2 Query by sending the Query to 1235 the LHR of interest. 1237 5.1.1. Destination Address 1239 If an Mtrace2 client knows the proper LHR, it unicasts an Mtrace2 1240 Query packet to that router; otherwise, it MAY send the Mtrace2 Query 1241 packet to the all-routers multicast group (224.0.0.2) for IPv4 or All 1242 Routers Address (FF02::2) for IPv6. This will ensure that the packet 1243 is received by the LHR on the subnet. 1245 See also Section 5.4 on determining the LHR. 1247 5.1.2. Source Address 1249 An Mtrace2 Query MUST be sent with the client's interface address, 1250 which is the Mtrace2 Client Address. 1252 5.2. Determining the Path 1254 An Mtrace2 client could send an initial Query messages with a large # 1255 Hops, in order to try to trace the full path. If this attempt fails, 1256 one strategy is to perform a linear search (as the traditional 1257 unicast traceroute program does); set the # Hops field to 1 and try 1258 to get a Reply, then 2, and so on. If no Reply is received at a 1259 certain hop, this hop is identified as the probable cause of 1260 forwarding failures on the path. Nevertheless, the sender may 1261 attempt to continue tracing past the non-responding hop by further 1262 increasing the hop count in the hopes that further hops may respond. 1263 Each of these attempts MUST NOT be initiated before the previous 1264 attempt has terminated either because of successful reception of a 1265 Reply or because the [Mtrace Reply Timeout] timeout has occurred. 1267 See also Section 5.6 on receiving the results of a trace. 1269 5.3. Collecting Statistics 1271 After a client has determined that it has traced the whole path or as 1272 much as it can expect to (see Section 5.8), it might collect 1273 statistics by waiting a short time and performing a second trace. If 1274 the path is the same in the two traces, statistics can be displayed 1275 as described in Section 7.3 and Section 7.4. 1277 5.4. Last Hop Router (LHR) 1279 The Mtrace2 client may not know which is the last-hop router, or that 1280 router may be behind a firewall that blocks unicast packets but 1281 passes multicast packets. In these cases, the Mtrace2 Request should 1282 be multicasted to the all-routers multicast group (224.0.0.2) for 1283 IPv4 or All Routers Address (FF02::2) for IPv6. All routers except 1284 the correct last-hop router SHOULD ignore any Mtrace2 Request 1285 received via multicast. 1287 5.5. First Hop Router (FHR) 1289 The IANA assigned 224.0.1.32 as the default multicast group for old 1290 IPv4 mtrace (v1) responses, in order to support mtrace clients that 1291 are not unicast reachable from the first-hop router. Mtrace2, 1292 however, does not require any IPv4/IPv6 multicast addresses for the 1293 Mtrace2 Replies. Every Mtrace2 Reply is sent to the unicast address 1294 specified in the Mtrace2 Client Address field of the Mtrace2 Reply. 1296 5.6. Broken Intermediate Router 1298 A broken intermediate router might simply not understand Mtrace2 1299 packets, and drop them. The Mtrace2 client will get no Reply at all 1300 as a result. It should then perform a hop-by-hop search by setting 1301 the # Hops field until it gets an Mtrace2 Reply. The client may use 1302 linear or binary search; however, the latter is likely to be slower 1303 because a failure requires waiting for the [Mtrace Reply Timeout] 1304 period. 1306 5.7. Non-Supported Router 1308 When a non-supported router receives an Mtrace2 Query or Request 1309 message whose destination address is a multicast address, the router 1310 will silently discard the message. 1312 When the router receives an Mtrace2 Query which is destined to 1313 itself, the router returns an Internet Control Message Protocol 1314 (ICMP) port unreachable to the Mtrace2 client. On the other hand, 1315 when the router receives an Mtrace2 Request which is destined to 1316 itself, the router returns an ICMP port unreachable to its adjacent 1317 router from which the Request receives. Therefore, the Mtrace2 1318 client needs to terminate the trace when the [Mtrace Reply Timeout] 1319 timeout has occurred, and may then issue another Query with a lower 1320 number of # Hops. 1322 5.8. Mtrace2 Termination 1324 When performing an expanding hop-by-hop trace, it is necessary to 1325 determine when to stop expanding. 1327 5.8.1. Arriving at Source 1329 A trace can be determined to have arrived at the source if the 1330 Incoming Interface of the last router in the trace is non-zero, but 1331 the Upstream Router is zero. 1333 5.8.2. Fatal Error 1335 A trace has encountered a fatal error if the last Forwarding Error in 1336 the trace has the 0x80 bit set. 1338 5.8.3. No Upstream Router 1340 A trace cannot continue if the last Upstream Router in the trace is 1341 set to 0. 1343 5.8.4. Reply Timeout 1345 This document defines the [Mtrace Reply Timeout] value, which is used 1346 to time out an Mtrace2 Reply as seen in Section 4.5, Section 5.2, and 1347 Section 5.7. The default [Mtrace Reply Timeout] value is 10 1348 (seconds), and can be manually changed on the Mtrace2 client and 1349 routers. 1351 5.9. Continuing after an Error 1353 When the NO_SPACE error occurs, as described in Section 4.2, a router 1354 will send back an Mtrace2 Reply to the Mtrace2 client, and continue 1355 with a new Request (see Section 4.3.3). In this case, the Mtrace2 1356 client may receive multiple Mtrace2 Replies from different routers 1357 along the path. When this happens, the client MUST treat them as a 1358 single Mtrace2 Reply message by collating the augmented response 1359 blocks of subsequent Replies sharing the same query ID, sequencing 1360 each cluster of augmented response blocks based on the order in which 1361 they are received. 1363 If a trace times out, it is very likely that a router in the middle 1364 of the path does not support Mtrace2. That router's address will be 1365 in the Upstream Router field of the last Standard Response Block in 1366 the last received Reply. A client may be able to determine (via 1367 mrinfo or the Simple Network Management Protocol (SNMP) [11][13]) a 1368 list of neighbors of the non-responding router. The neighbors 1369 obtained in this way could then be probed (via the multicast MIB 1370 [13]) to determine which one is the upstream neighbor (i.e., Reverse 1371 Path Forwarding (RPF) neighbor) of the non-responding router. This 1372 algorithm can identify the upstream neighbor because, even though 1373 there may be multiple neighbors, the non-responding router should 1374 only have sent a "join" to the one neighbor corresponding to its 1375 selected RPF path. Because of this, only the RPF neighbor should 1376 contain the non-responding router as a multicast next hop in its MIB 1377 output list for the affected multicast route. 1379 6. Protocol-Specific Considerations 1381 This section describes the Mtrace2 behavior with the presence of 1382 different multicast protocols. 1384 6.1. PIM-SM 1386 When an Mtrace2 reaches a PIM-SM RP, and the RP does not forward the 1387 trace on, it means that the RP has not performed a source-specific 1388 join so there is no more state to trace. However, the path that 1389 traffic would use if the RP did perform a source-specific join can be 1390 traced by setting the trace destination to the RP, the trace source 1391 to the traffic source, and the trace group to 0. This Mtrace2 Query 1392 may be unicasted to the RP, and the RP takes the same actions as an 1393 LHR. 1395 6.2. Bi-Directional PIM 1397 Bi-directional PIM [6] is a variant of PIM-SM that builds bi- 1398 directional shared trees connecting multicast sources and receivers. 1399 Along the bi-directional shared trees, multicast data is natively 1400 forwarded from the sources to the Rendezvous Point Link (RPL), and 1401 from which, to receivers without requiring source-specific state. In 1402 contrast to PIM-SM, Bi-directional PIM always has the state to trace. 1404 A Designated Forwarder (DF) for a given Rendezvous Point Address 1405 (RPA) is in charge of forwarding downstream traffic onto its link, 1406 and forwarding upstream traffic from its link towards the RPL that 1407 the RPA belongs to. Hence Mtrace2 Reply reports DF addresses or RPA 1408 along the path. 1410 6.3. PIM-DM 1412 Routers running PIM Dense Mode [15] do not know the path packets 1413 would take unless traffic is flowing. Without some extra protocol 1414 mechanism, this means that in an environment with multiple possible 1415 paths with branch points on shared media, Mtrace2 can only trace 1416 existing paths, not potential paths. When there are multiple 1417 possible paths but the branch points are not on shared media, the 1418 upstream router is known, but the LHR may not know that it is the 1419 appropriate last hop. 1421 When traffic is flowing, PIM Dense Mode routers know whether or not 1422 they are the LHR for the link (because they won or lost an Assert 1423 battle) and know who the upstream router is (because it won an Assert 1424 battle). Therefore, Mtrace2 is always able to follow the proper path 1425 when traffic is flowing. 1427 6.4. IGMP/MLD Proxy 1429 When an IGMP or Multicast Listener Discovery (MLD) Proxy [7] receives 1430 an Mtrace2 Query packet on an incoming interface, it notes a WRONG_IF 1431 in the Forwarding Code of the last Standard Response Block (see 1432 Section 3.2.4), and sends the Mtrace2 Reply back to the Mtrace2 1433 client. On the other hand, when an Mtrace2 Query packet reaches an 1434 outgoing interface of the IGMP/MLD proxy, it is forwarded onto its 1435 incoming interface towards the upstream router. 1437 7. Problem Diagnosis 1439 This section describes different scenarios Mtrace2 can be used to 1440 diagnose the multicast problems. 1442 7.1. Forwarding Inconsistencies 1444 The Forwarding Error code can tell if a group is unexpectedly pruned 1445 or administratively scoped. 1447 7.2. TTL or Hop Limit Problems 1449 By taking the maximum of hops from the source and forwarding TTL 1450 threshold over all hops, it is possible to discover the TTL or hop 1451 limit required for the source to reach the destination. 1453 7.3. Packet Loss 1455 By taking multiple traces, it is possible to find packet loss 1456 information by tracking the difference between the output packet 1457 count for the specified source-group address pair at a given upstream 1458 router and the input packet count on the next hop downstream router. 1459 On a point-to-point link, any steadily increasing difference in these 1460 counts implies packet loss. Although the packet counts will differ 1461 due to Mtrace2 Request propagation delay, the difference should 1462 remain essentially constant (except for jitter caused by differences 1463 in propagation time among the trace iterations). However, this 1464 difference will display a steady increase if packet loss is 1465 occurring. On a shared link, the count of input packets can be 1466 larger than the number of output packets at the previous hop, due to 1467 other routers or hosts on the link injecting packets. This appears 1468 as "negative loss" which may mask real packet loss. 1470 In addition to the counts of input and output packets for all 1471 multicast traffic on the interfaces, the Standard Response Block 1472 includes a count of the packets forwarded by a node for the specified 1473 source-group pair. Taking the difference in this count between two 1474 traces and then comparing those differences between two hops gives a 1475 measure of packet loss just for traffic from the specified source to 1476 the specified receiver via the specified group. This measure is not 1477 affected by shared links. 1479 On a point-to-point link that is a multicast tunnel, packet loss is 1480 usually due to congestion in unicast routers along the path of that 1481 tunnel. On native multicast links, loss is more likely in the output 1482 queue of one hop, perhaps due to priority dropping, or in the input 1483 queue at the next hop. The counters in the Standard Response Block 1484 do not allow these cases to be distinguished. Differences in packet 1485 counts between the incoming and outgoing interfaces on one node 1486 cannot generally be used to measure queue overflow in the node. 1488 7.4. Link Utilization 1490 Again, with two traces, you can divide the difference in the input or 1491 output packet counts at some hop by the difference in time stamps 1492 from the same hop to obtain the packet rate over the link. If the 1493 average packet size is known, then the link utilization can also be 1494 estimated to see whether packet loss may be due to the rate limit or 1495 the physical capacity on a particular link being exceeded. 1497 7.5. Time Delay 1499 If the routers have synchronized clocks, it is possible to estimate 1500 propagation and queuing delay from the differences between the 1501 timestamps at successive hops. However, this delay includes control 1502 processing overhead, so is not necessarily indicative of the delay 1503 that data traffic would experience. 1505 8. IANA Considerations 1507 The following new registries are to be created and maintained under 1508 the "Specification Required" registry policy as specified in [4]. 1510 8.1. "Mtrace2 Forwarding Codes" Registry 1512 This is an integer in the range 0-255. Assignment of a Forwarding 1513 Code requires specification of a value and a name for the Forwarding 1514 Code. Initial values for the forwarding codes are given in the table 1515 at the end of Section 3.2.4. Additional values (specific to IPv6) 1516 may also be specified at the end of Section 3.2.5. Any additions to 1517 this registry are required to fully describe the conditions under 1518 which the new Forwarding Code is used. 1520 8.2. "Mtrace2 TLV Types" Registry 1522 Assignment of a TLV Type requires specification of an integer value 1523 "Code" in the range 0-255 and a name ("Type"). Initial values for 1524 the TLV Types are given in the table at the beginning of Section 3.2. 1526 8.3. UDP Destination Port 1528 IANA has assigned UDP user port 33435 (mtrace) for use by this 1529 protocol as the Mtrace2 UDP destination port. 1531 9. Security Considerations 1533 This section addresses some of the security considerations related to 1534 Mtrace2. 1536 9.1. Addresses in Mtrace2 Header 1538 An Mtrace2 header includes three addresses, source address, multicast 1539 address, and Mtrace2 client address. These addresses MUST be 1540 congruent with the definition defined in Section 3.2.1 and forwarding 1541 Mtrace2 messages having invalid addresses MUST be prohibited. For 1542 instance, if Mtrace2 Client Address specified in an Mtrace2 header is 1543 a multicast address, then a router that receives the Mtrace2 message 1544 MUST silently discard it. 1546 9.2. Filtering of Clients and Peers 1548 A router MUST support an access control list (ACL) mechanism to 1549 filter out Queries from clients and Requests from peer router 1550 addresses that are unauthorized or that are beyond a specified 1551 administrative boundary. This filtering could, for example, be 1552 specified via a list of allowed/disallowed client and peer addresses 1553 or subnets for the Mtrace2 protocol port. If a Query or Request is 1554 received from an unauthorized address or one beyond the specified 1555 administrative boundary, the Query/Request MUST NOT be processed. 1556 The router MAY, however, perform rate limited logging of such events. 1558 The required use of ACLs on the participating routers minimizes the 1559 possible methods for introduction of spoofed Query/Request packets 1560 that would otherwise enable DoS amplification attacks targeting an 1561 authorized "query" host. The ACLs provide this protection by 1562 allowing Query messages from an authorized host address to be 1563 received only by the router(s) connected to that host, and only on 1564 the interface to which that host is attached. For protection against 1565 spoofed Request messages, the ACLs allow requests only from a 1566 directly connected peer and allow these messages to be received only 1567 on the interface to which that peer is attached. 1569 Note that the following vulnerabilities cannot be covered by the ACL 1570 methods described here. These methods can, nevertheless, prevent 1571 attacks launched from outside the boundaries of a given network as 1572 well as from any hosts within the network that are not on the same 1573 LAN as an intended authorized query client. 1575 o A server/router "B" other than the server/router "A" that actually 1576 "owns" a given IP address could, if it is connected to the same 1577 LAN, send an Mtrace2 Query or Request with the source address set 1578 to the address for server/router "A". This is not a significant 1579 threat, however, if only trusted servers and routers are connected 1580 to that LAN. 1582 o A malicious application running on a trusted server or router 1583 could send packets that might cause an amplification problem. It 1584 is beyond the scope of this document to protect against a DoS 1585 attack launched from the same host that is the target of the 1586 attack or from another "on path" host, but this is not a likely 1587 threat scenario. In addition, routers on the path MAY rate-limit 1588 the packets as specified in Section 9.5 and Section 9.6. 1590 9.3. Topology Discovery 1592 Mtrace2 can be used to discover any actively-used topology. If your 1593 network topology is a secret, Mtrace2 may be restricted at the border 1594 of your domain, using the ADMIN_PROHIB forwarding code. 1596 9.4. Characteristics of Multicast Channel 1598 Mtrace2 can be used to discover what sources are sending to what 1599 groups and at what rates. If this information is a secret, Mtrace2 1600 may be restricted at the border of your domain, using the 1601 ADMIN_PROHIB forwarding code. 1603 9.5. Limiting Query/Request Rates 1605 A router may limit Mtrace2 Queries and Requests by ignoring some of 1606 the consecutive messages. The router MAY randomly ignore the 1607 received messages to minimize the processing overhead, i.e., to keep 1608 fairness in processing queries, or prevent traffic amplification. 1609 The rate limit is left to the router's implementation. 1611 9.6. Limiting Reply Rates 1613 The proxying and NO_SPACE behaviors may result in one Query returning 1614 multiple Reply messages. In order to prevent abuse, the routers in 1615 the traced path MAY need to rate-limit the Replies. The rate limit 1616 function is left to the router's implementation. 1618 9.7. Specific Security Concerns 1620 9.7.1. Request and Response Bombardment 1622 A malicious sender could generate invalid and undesirable Mtrace2 1623 traffic to hosts and/or routers on a network by eliciting responses 1624 to spoofed or multicast client addresses. This could be done via 1625 forged or multicast client/source addresses in Mtrace2 Query or 1626 Request messages. The recommended protections against this type of 1627 attack are described in Section 9.1, Section 9.2, Section 9.5, and 1628 Section 9.6. 1630 9.7.2. Amplification Attack 1632 Because an Mtrace2 Query results in Mtrace2 Request and Mtrace2 Reply 1633 messages that are larger than the original message, the potential 1634 exists for an amplification attack from a malicious sender. This 1635 threat is minimized by restricting the set of addresses from which 1636 Mtrace2 messages can be received on a given router as specified in 1637 Section 9.2. 1639 9.7.3. Leaking of Confidential Topology Details 1641 Mtrace2 Queries are a potential mechanism for obtaining confidential 1642 topology information for a targeted network. Section 9.2 and 1643 Section 9.4 describe required and optional methods for ensuring that 1644 information delivered with Mtrace2 messages is not disseminated to 1645 unauthorized hosts. 1647 9.7.4. Delivery of False Information (Forged Reply Messages) 1649 Forged Reply messages could potentially provide a host with invalid 1650 or incorrect topology information. They could also provide invalid 1651 or incorrect information regarding multicast traffic statistics, 1652 multicast stream propagation delay between hops, multicast and 1653 unicast protocols in use between hops and other information used for 1654 analyzing multicast traffic patterns and for troubleshooting 1655 multicast traffic problems. This threat is mitigated by the 1656 following factors: 1658 o The required filtering of permissible source addresses specified 1659 in Section 9.2 eliminates the origination of forged Replies from 1660 addresses that have not been authorized to send Mtrace2 messages 1661 to routers on a given network. This mechanism can block forged 1662 Reply messages sent from any "off path" source. 1664 o To forge a Reply, the sender would need to somehow know (or guess) 1665 the associated two byte Query ID for an extant Query and the 1666 dynamically allocated source port number. Because "off path" 1667 sources can be blocked by ACLs, the scope of this threat is 1668 limited to "on path" attackers. 1670 o The use of encryption between the source of a Query and the 1671 endpoint of the trace would provide a method to protect the values 1672 of the Query ID and the dynamically allocated client (source) port 1673 (see Section 3.2.1). These are the values needed to create a 1674 forged Reply message that would pass validity checks at the 1675 querying client. This type of cryptographic protection is not 1676 practical, however, because the primary reason for executing an 1677 Mtrace2 is that the destination endpoint (and path to that 1678 endpoint) are not known by the querying client. While it is not 1679 practical to provide cryptographic protection between a client and 1680 the Mtrace2 endpoints (destinations), it may be possible to 1681 prevent forged responses from "off path" nodes attached to any 1682 Mtrace2 transit LAN by devising a scheme to encrypt the critical 1683 portions of an Mtrace2 message between each valid sender/receiver 1684 pair at each hop to be used for multicast/mtrace transit. This 1685 type of node/application authentication and authorization is, 1686 however, out of the scope of this document. 1688 10. Acknowledgements 1690 This specification started largely as a transcription of Van 1691 Jacobson's slides from the 30th IETF, and the implementation in 1692 mrouted 3.3 by Ajit Thyagarajan. Van's original slides credit Steve 1693 Casner, Steve Deering, Dino Farinacci and Deb Agrawal. The original 1694 multicast traceroute client, mtrace (version 1), has been implemented 1695 by Ajit Thyagarajan, Steve Casner and Bill Fenner. The idea of the 1696 "S" bit to allow statistics for a source subnet is due to Tom 1697 Pusateri. 1699 For the Mtrace version 2 specification, the authors would like to 1700 give special thanks to Tatsuya Jinmei, Bill Fenner, and Steve Casner. 1701 Also, extensive comments were received from David L. Black, Ronald 1702 Bonica, Yiqun Cai, Liu Hui, Bharat Joshi, Robert Kebler, John 1703 Kristoff, Mankamana Mishra, Heidi Ou, Eric Rescorla, Pekka Savola, 1704 Shinsuke Suzuki, Dave Thaler, Achmad Husni Thamrin, Stig Venaas, Cao 1705 Wei, and the Mboned working group members. 1707 11. References 1709 11.1. Normative References 1711 [1] Bradner, S., "Key words for use in RFCs to indicate 1712 requirement levels", RFC 2119, March 1997. 1714 [2] Deering, S. and R. Hinden, "Internet Protocol, Version 6 1715 (IPv6) Specification", RFC 8200, July 2017. 1717 [3] Hinden, R. and S. Deering, "IP Version 6 Addressing 1718 Architecture", RFC 4291, February 2006. 1720 [4] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 1721 Writing an IANA Considerations Section in RFCs", RFC 8126, 1722 June 2017. 1724 [5] Fenner, B., Handley, M., Holbrook, H., Kouvelas, I., 1725 Parekh, R., Zhang, Z., and L. Zheng, "Protocol Independent 1726 Multicast - Sparse Mode (PIM-SM): Protocol Specification 1727 (Revised)", RFC 7761, March 2016. 1729 [6] Handley, M., Kouvelas, I., Speakman, T., and L. Vicisano, 1730 "Bidirectional Protocol Independent Multicast (BIDIR- 1731 PIM)", RFC 5015, October 2007. 1733 [7] Fenner, B., He, H., Haberman, B., and H. Sandick, 1734 "Internet Group Management Protocol (IGMP) / Multicast 1735 Listener Discovery (MLD)-Based Multicast Forwarding 1736 ("IGMP/MLD Proxying")", RFC 4605, August 2006. 1738 11.2. Informative References 1740 [8] Cain, B., Deering, S., Kouvelas, I., Fenner, B., and A. 1741 Thyagarajan, "Internet Group Management Protocol, Version 1742 3", RFC 3376, October 2002. 1744 [9] Bumgardner, G., "Automatic Multicast Tunneling", RFC 7450, 1745 February 2015. 1747 [10] Rosen, E. and R. Aggarwal, "Multicast in MPLS/BGP IP 1748 VPNs", RFC 6513, February 2012. 1750 [11] Draves, R. and D. Thaler, "Default Router Preferences and 1751 More-Specific Routes", RFC 4191, November 2005. 1753 [12] McCloghrie, K. and F. Kastenholz, "The Interfaces Group 1754 MIB", RFC 2863, June 2000. 1756 [13] McWalter, D., Thaler, D., and A. Kessler, "IP Multicast 1757 MIB", RFC 5132, December 2007. 1759 [14] Gill, V., Heasley, J., Meyer, D., Savola, P., and C. 1760 Pignataro, "The Generalized TTL Security Mechanism 1761 (GTSM)", RFC 5082, October 2007. 1763 [15] Adams, A., Nicholas, J., and W. Siadak, "Protocol 1764 Independent Multicast - Dense Mode (PIM-DM): Protocol 1765 Specification (Revised)", RFC 3973, January 2005. 1767 Authors' Addresses 1769 Hitoshi Asaeda 1770 National Institute of Information and Communications Technology 1771 4-2-1 Nukui-Kitamachi 1772 Koganei, Tokyo 184-8795 1773 Japan 1775 Email: asaeda@nict.go.jp 1777 Kerry Meyer 1779 Email: kerry.meyer@me.com 1781 WeeSan Lee (editor) 1783 Email: weesan@weesan.com