idnits 2.17.1 draft-ietf-dots-data-channel-19.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 22 instances of too long lines in the document, the longest one being 8 characters in excess of 72. ** The abstract seems to contain references ([I-D.ietf-netmod-acl-model], [I-D.ietf-dots-signal-channel]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 459 has weird spacing: '...er-port ine...' == Line 460 has weird spacing: '...er-port ine...' == Line 542 has weird spacing: '...warding ide...' == Line 837 has weird spacing: '... icmp typ...' -- The document date (September 3, 2018) is 2059 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '1' on line 2082 -- Looks like a reference, but probably isn't: '6' on line 2082 -- Looks like a reference, but probably isn't: '17' on line 2082 -- Looks like a reference, but probably isn't: '58' on line 2082 == Outdated reference: A later version (-41) exists of draft-ietf-dots-signal-channel-24 == Outdated reference: A later version (-21) exists of draft-ietf-netmod-acl-model-19 ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 7230 (Obsoleted by RFC 9110, RFC 9112) ** Obsolete normative reference: RFC 7525 (Obsoleted by RFC 9325) == Outdated reference: A later version (-18) exists of draft-ietf-dots-architecture-06 == Outdated reference: A later version (-22) exists of draft-ietf-dots-requirements-15 -- Obsolete informational reference (is this intentional?): RFC 4960 (Obsoleted by RFC 9260) -- Obsolete informational reference (is this intentional?): RFC 5389 (Obsoleted by RFC 8489) Summary: 5 errors (**), 0 flaws (~~), 9 warnings (==), 7 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 DOTS M. Boucadair, Ed. 3 Internet-Draft Orange 4 Intended status: Standards Track T. Reddy, Ed. 5 Expires: March 7, 2019 McAfee 6 K. Nishizuka 7 NTT Communications 8 L. Xia 9 Huawei 10 P. Patil 11 Cisco 12 A. Mortensen 13 Arbor Networks, Inc. 14 N. Teague 15 Verisign, Inc. 16 September 3, 2018 18 Distributed Denial-of-Service Open Threat Signaling (DOTS) Data Channel 19 Specification 20 draft-ietf-dots-data-channel-19 22 Abstract 24 The document specifies a Distributed Denial-of-Service Open Threat 25 Signaling (DOTS) data channel used for bulk exchange of data that 26 cannot easily or appropriately communicated through the DOTS signal 27 channel under attack conditions. 29 This is a companion document to the DOTS signal channel 30 specification. 32 Editorial Note (To be removed by RFC Editor) 34 Please update these statements within the document with the RFC 35 number to be assigned to this document: 37 o "This version of this YANG module is part of RFC XXXX;" 39 o "RFC XXXX: Distributed Denial-of-Service Open Threat Signaling 40 (DOTS) Data Channel Specification"; 42 o reference: RFC XXXX 44 Please update these statements with the RFC number to be assigned to 45 the following documents: 47 o "RFC YYYY: Distributed Denial-of-Service Open Threat Signaling 48 (DOTS) Signal Channel Specification" (used to be 49 [I-D.ietf-dots-signal-channel]) 51 o "RFC ZZZZ: Network Access Control List (ACL) YANG Data Model" 52 (used to be [I-D.ietf-netmod-acl-model]) 54 Please update the "revision" date of the YANG module. 56 Status of This Memo 58 This Internet-Draft is submitted in full conformance with the 59 provisions of BCP 78 and BCP 79. 61 Internet-Drafts are working documents of the Internet Engineering 62 Task Force (IETF). Note that other groups may also distribute 63 working documents as Internet-Drafts. The list of current Internet- 64 Drafts is at https://datatracker.ietf.org/drafts/current/. 66 Internet-Drafts are draft documents valid for a maximum of six months 67 and may be updated, replaced, or obsoleted by other documents at any 68 time. It is inappropriate to use Internet-Drafts as reference 69 material or to cite them other than as "work in progress." 71 This Internet-Draft will expire on March 7, 2019. 73 Copyright Notice 75 Copyright (c) 2018 IETF Trust and the persons identified as the 76 document authors. All rights reserved. 78 This document is subject to BCP 78 and the IETF Trust's Legal 79 Provisions Relating to IETF Documents 80 (https://trustee.ietf.org/license-info) in effect on the date of 81 publication of this document. Please review these documents 82 carefully, as they describe your rights and restrictions with respect 83 to this document. Code Components extracted from this document must 84 include Simplified BSD License text as described in Section 4.e of 85 the Trust Legal Provisions and are provided without warranty as 86 described in the Simplified BSD License. 88 Table of Contents 90 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 91 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 92 3. DOTS Data Channel . . . . . . . . . . . . . . . . . . . . . . 6 93 3.1. Design Overview . . . . . . . . . . . . . . . . . . . . . 6 94 3.2. DOTS Server(s) Discovery . . . . . . . . . . . . . . . . 8 95 3.3. NAT Considerations . . . . . . . . . . . . . . . . . . . 8 96 3.4. DOTS Gateways . . . . . . . . . . . . . . . . . . . . . . 8 97 3.5. Detect and Prevent Infinite Loops . . . . . . . . . . . . 9 98 3.6. Stale Entries . . . . . . . . . . . . . . . . . . . . . . 10 99 4. DOTS Data Channel YANG Module . . . . . . . . . . . . . . . . 10 100 4.1. Tree Structure . . . . . . . . . . . . . . . . . . . . . 10 101 4.2. Filtering Fields . . . . . . . . . . . . . . . . . . . . 14 102 4.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 21 103 5. Managing DOTS Clients . . . . . . . . . . . . . . . . . . . . 36 104 5.1. Registering DOTS Clients . . . . . . . . . . . . . . . . 36 105 5.2. Uregistering DOTS Clients . . . . . . . . . . . . . . . . 39 106 6. Managing DOTS Aliases . . . . . . . . . . . . . . . . . . . . 39 107 6.1. Create Aliases . . . . . . . . . . . . . . . . . . . . . 39 108 6.2. Retrieve Installed Aliases . . . . . . . . . . . . . . . 43 109 6.3. Delete Aliases . . . . . . . . . . . . . . . . . . . . . 45 110 7. Managing DOTS Filtering Rules . . . . . . . . . . . . . . . . 45 111 7.1. Retrieve DOTS Filtering Capabilities . . . . . . . . . . 45 112 7.2. Install Filtering Rules . . . . . . . . . . . . . . . . . 47 113 7.3. Retrieve Installed Filtering Rules . . . . . . . . . . . 50 114 7.4. Remove Filtering Rules . . . . . . . . . . . . . . . . . 56 115 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 57 116 9. Security Considerations . . . . . . . . . . . . . . . . . . . 57 117 10. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 59 118 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 59 119 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 59 120 12.1. Normative References . . . . . . . . . . . . . . . . . . 59 121 12.2. Informative References . . . . . . . . . . . . . . . . . 61 122 Appendix A. Sample Examples: Filtering Fragments . . . . . . . . 62 123 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 65 125 1. Introduction 127 A distributed denial-of-service (DDoS) attack is an attempt to make 128 machines or network resources unavailable to their intended users. 129 In most cases, sufficient scale can be achieved by compromising 130 enough end-hosts and using those infected hosts to perpetrate and 131 amplify the attack. The victim of such attack can be an application 132 server, a router, a firewall, an entire network, etc. 134 As discussed in [I-D.ietf-dots-requirements], the lack of a common 135 method to coordinate a real-time response among involved actors and 136 network domains inhibits the speed and effectiveness of DDoS attack 137 mitigation. From that standpoint, DDoS Open Threat Signaling (DOTS) 138 defines an architecture that allows a DOTS client to send requests to 139 a DOTS server for DDoS attack mitigation 140 [I-D.ietf-dots-architecture]. The DOTS approach is thus meant to 141 minimize the impact of DDoS attacks, thereby contributing to the 142 enforcement of more efficient defensive if not proactive security 143 strategies. To that aim, DOTS defines two channels: the signal and 144 the data channels (Figure 1). 146 +---------------+ +---------------+ 147 | | <------- Signal Channel ------> | | 148 | DOTS Client | | DOTS Server | 149 | | <======= Data Channel ======> | | 150 +---------------+ +---------------+ 152 Figure 1: DOTS Channels 154 The DOTS signal channel is used to carry information about a device 155 or a network (or a part thereof) that is under a DDoS attack. Such 156 information is sent by a DOTS client to an upstream DOTS server so 157 that appropriate mitigation actions are undertaken on traffic deemed 158 suspicious. The DOTS signal channel is further elaborated in 159 [I-D.ietf-dots-signal-channel]. 161 As for the DOTS data channel, it is used for infrequent bulk data 162 exchange between DOTS agents to significantly improve the 163 coordination of all the parties involved in the response to the 164 attack. Section 2 of [I-D.ietf-dots-architecture] mentions that the 165 DOTS data channel is used to perform the following tasks: 167 o Creating aliases for resources for which mitigation may be 168 requested. 170 A DOTS client may submit to its DOTS server a collection of 171 prefixes which it would like to refer to by an alias when 172 requesting mitigation. The DOTS server can respond to this 173 request with either a success or failure response (see Section 2 174 in [I-D.ietf-dots-architecture]). 176 Refer to Section 6 for more details. 178 o Filter management, which enables a DOTS client to request the 179 installation or withdrawal of traffic filters, dropping or rate- 180 limiting unwanted traffic, and permitting white-listed traffic. A 181 DOTS client is entitled to instruct filtering rules only on IP 182 resources that belong to its domain. 184 Sample use cases for populating black- or white-list filtering 185 rules are detailed hereafter: 187 * If a network resource (DOTS client) detects a potential DDoS 188 attack from a set of IP addresses, the DOTS client informs its 189 servicing DOTS gateway of all suspect IP addresses that need to 190 be blocked or black-listed for further investigation. The DOTS 191 client could also specify a list of protocols and port numbers 192 in the black-list rule. 194 The DOTS gateway then propagates the black-listed IP addresses 195 to a DOTS server which will undertake appropriate actions so 196 that traffic originated by these IP addresses to the target 197 network (specified by the DOTS client) is blocked. 199 * A network, that has partner sites from which only legitimate 200 traffic arrives, may want to ensure that the traffic from these 201 sites is not subjected to DDoS attack mitigation. The DOTS 202 client uses the DOTS data channel to convey the white-listed IP 203 prefixes of the partner sites to its DOTS server. 205 The DOTS server uses this information to white-list flows 206 originated by such IP prefixes and which reach the network. 208 Refer to Section 7 for more details. 210 2. Terminology 212 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 213 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 214 document are to be interpreted as described in [RFC2119]. 216 The reader should be familiar with the terms defined in 217 [I-D.ietf-dots-requirements]. 219 The terminology for describing YANG data modules is defined in 220 [RFC7950]. The meaning of the symbols in tree diagrams is defined in 221 [RFC8340]. 223 This document generalizes the notion of Access Control List (ACL) so 224 that it is not device-specific [I-D.ietf-netmod-acl-model]. As such, 225 this document defines an ACL as an ordered set of rules that is used 226 to filter traffic. Each rule is represented by an Access Control 227 Entry (ACE). ACLs communicated via the DOTS data channel are not 228 bound to a device interface. 230 For the sake of simplicity, all of the examples in this document use 231 "/restconf" as the discovered RESTCONF API root path. Many protocol 232 header lines and message-body text within examples throughout the 233 document are split into multiple lines for display purposes only. 234 When a line ends with backslash ('\') as the last character, the line 235 is wrapped for display purposes. It is to be considered to be joined 236 to the next line by deleting the backslash, the following line break, 237 and the leading whitespace of the next line. 239 3. DOTS Data Channel 241 3.1. Design Overview 243 Unlike the DOTS signal channel, which must remain operational even 244 when confronted with signal degradation due to packets loss, the DOTS 245 data channel is not expected to be fully operational at all times, 246 especially when a DDoS attack is underway. The requirements for a 247 DOTS data channel protocol are documented in 248 [I-D.ietf-dots-requirements]. 250 This specification does not require an order of DOTS signal and data 251 channel creations nor mandates a time interval between them. These 252 considerations are implementation- and deployment-specific. 254 As the primary function of the data channel is data exchange, a 255 reliable transport mode is required in order for DOTS agents to 256 detect data delivery success or failure. This document uses RESTCONF 257 [RFC8040] over TLS [RFC5246] over TCP as the DOTS data channel 258 protocol. The abstract layering of DOTS data channel is shown in 259 Figure 2. 261 +-------------------+ 262 | DOTS Data Channel | 263 +-------------------+ 264 | RESTCONF | 265 +-------------------+ 266 | TLS | 267 +-------------------+ 268 | TCP | 269 +-------------------+ 270 | IP | 271 +-------------------+ 273 Figure 2: Abstract Layering of DOTS Data Channel 275 The HTTP POST, PUT, PATCH, and DELETE methods are used to edit data 276 resources represented by DOTS data channel YANG data modules. These 277 basic edit operations allow the DOTS data channel running 278 configuration to be altered by a DOTS client. 280 DOTS data channel configuration information as well as state 281 information can be retrieved with the GET method. An HTTP status- 282 line header field is returned for each request to report success or 283 failure for RESTCONF operations (Section 5.4 of [RFC8040]). The 284 "error-tag" provides more information about encountered errors 285 (Section 7 of [RFC8040]). 287 DOTS clients perform the root resource discovery procedure discussed 288 in Section 3.1 of [RFC8040] to determine the root of the RESTCONF 289 API. After discovering the RESTCONF API root, a DOTS client uses 290 this value as the initial part of the path in the request URI, in any 291 subsequent request to the DOTS server. The DOTS server may support 292 the retrieval of the YANG modules it supports (Section 3.7 in 293 [RFC8040]). For example, a DOTS client may use RESTCONF to retrieve 294 the vendor-specific YANG modules supported by its DOTS server. 296 JavaScript Object Notation (JSON) [RFC8259] payload is used to 297 propagate the DOTS data channel specific payload messages that carry 298 request parameters and response information, such as errors. This 299 specification uses the encoding rules defined in [RFC7951] for 300 representing DOTS data channel configuration data using YANG 301 (Section 4) as JSON text. 303 A DOTS client registers itself to its DOTS server(s) in order to set 304 up DOTS data channel-related configuration data and receive state 305 data (i.e., non-configuration data) from the DOTS server(s) 306 (Section 5). Mutual authentication and coupling of signal and data 307 channels are specified in [I-D.ietf-dots-signal-channel]. 309 A single DOTS data channel between DOTS agents can be used to 310 exchange multiple requests and multiple responses. To reduce DOTS 311 client and DOTS server workload, DOTS clients SHOULD re-use the same 312 TLS session. While the communication to the DOTS server is 313 quiescent, the DOTS client MAY probe the server to ensure it has 314 maintained cryptographic state. Such probes can also keep alive 315 firewall and/or NAT bindings. A TLS heartbeat [RFC6520] verifies 316 that the DOTS server still has TLS state by returning a TLS message. 318 A DOTS server may detect conflicting filtering requests from distinct 319 DOTS clients which belong to the same domain. For example, a DOTS 320 client could request to blacklist a prefix by specifying the source 321 prefix, while another DOTS client could request to whitelist that 322 same source prefix, but both having the same destination prefix. It 323 is out of scope of this specification to recommend the behavior to 324 follow for handling conflicting requests (e.g., reject all, reject 325 the new request, notify an administrator for validation). DOTS 326 servers SHOULD support a configuration parameter to indicate the 327 behavior to follow when a conflict is detected. Section 7.2 328 specifies the behavior when no instruction is supplied to a DOTS 329 server. 331 How filtering rules instantiated on a DOTS server are translated into 332 network configurations actions is out of scope. 334 3.2. DOTS Server(s) Discovery 336 This document assumes that DOTS clients are provisioned with the 337 reachability information of their DOTS server(s) using a variety of 338 means (e.g., local configuration, or dynamic means such as DHCP). 339 The specification of such means are out of scope of this document. 341 Likewise, it is out of scope of this document to specify the behavior 342 to be followed by a DOTS client to send DOTS requests when multiple 343 DOTS servers are provisioned (e.g., contact all DOTS servers, select 344 one DOTS server among the list). 346 3.3. NAT Considerations 348 In deployments where one or more translators (e.g., NAT44, NAT64, 349 NPTv6) are enabled between the client's network and the DOTS server, 350 DOTS data channel messages forwarded to a DOTS server MUST NOT 351 include internal IP addresses/prefixes and/or port numbers; external 352 addresses/prefixes and/or port numbers as assigned by the translator 353 MUST be used instead. This document does not make any recommendation 354 about possible translator discovery mechanisms. The following are 355 some (non-exhaustive) deployment examples that may be considered: 357 o Port Control Protocol (PCP) [RFC6887] or Session Traversal 358 Utilities for NAT (STUN) [RFC5389] may be used to retrieve the 359 external addresses/prefixes and/or port numbers. Information 360 retrieved by means of PCP or STUN will be used to feed the DOTS 361 data channel messages that will be sent to a DOTS server. 363 o A DOTS gateway may be co-located with the translator. The DOTS 364 gateway will need to update the DOTS messages, based upon the 365 local translator's binding table. 367 3.4. DOTS Gateways 369 When a server-domain DOTS gateway is involved in DOTS data channel 370 exchanges, the same considerations for manipulating the 'cdid' 371 (client domain identifier) parameter specified in 372 [I-D.ietf-dots-signal-channel] MUST be followed by DOTS agents. As a 373 reminder, 'cdid' is meant to assist the DOTS server to enforce some 374 policies (e.g., limit the number of filtering rules per DOTS client 375 or per DOTS client domain). A loop detect mechanism for DOTS 376 gateways is specified in Section 3.5. 378 If a DOTS gateway is involved, the DOTS gateway verifies that the 379 DOTS client is authorized to undertake a data channel action (e.g., 380 instantiate filtering rules). If the DOTS client is authorized, it 381 propagates the rules to the upstream DOTS server. Likewise, the DOTS 382 server verifies that the DOTS gateway is authorized to relay data 383 channel actions. For example, to create or purge filters, a DOTS 384 client sends its request to its DOTS gateway. The DOTS gateway 385 validates the rules in the request and proxies the requests 386 containing the filtering rules to its DOTS server. When the DOTS 387 gateway receives the associated response from the DOTS server, it 388 propagates the response back to the DOTS client. 390 3.5. Detect and Prevent Infinite Loops 392 In order to detect and prevent infinite loops, DOTS gateways MUST 393 support the procedure defined in Section 5.7.1 of [RFC7230]. In 394 particular, each intermediate DOTS gateway MUST check that none of 395 its own information (e.g., server names, literal IP addresses) is 396 present in the "Via" header of a DOTS message it receives: 398 o If it detects that its own information is present in the "Via" 399 header, the DOTS gateway MUST NOT forward the DOTS message. 400 Messages that cannot be forwarded because of a loop SHOULD be 401 logged with a "508 Loop Detected" status-line returned sent back 402 to the DOTS peer. The structure of the reported error is depicted 403 in Figure 3. 405 error-tag: loop-detected 406 error-type: transport, application 407 error-severity: error 408 error-info: : A copy of the Via header when 409 the loop was detected. 410 Description: An infinite loop has been detected when forwarding 411 a requests via a proxy. 413 Figure 3: Loop Detected Error 415 It is RECOMMENDED that DOTS clients and gateways support means to 416 alert administrators about loop errors so that appropriate actions 417 are undertaken. 419 o Otherwise, the DOTS agent MUST update or insert the "Via" header 420 by appending its own information. 422 Unless configured otherwise, DOTS gateways at the boundaries of a 423 DOTS client domain SHOULD remove the previous "Via" header 424 information after checking for a loop before forwarding. This 425 behavior is required for topology hiding purposes but also to 426 minimize potential conflicts that may arise if overlapping 427 information is used in distinct DOTS domains (e.g., private IPv4 428 addresses, non globally unique aliases). 430 3.6. Stale Entries 432 In order to avoid stale entries, a lifetime is associated with alias 433 and filtering entries created by DOTS clients. Also, DOTS servers 434 may track the inactivity timeout of DOTS clients to detect stale 435 entries. 437 4. DOTS Data Channel YANG Module 439 4.1. Tree Structure 441 The DOTS data channel YANG module (ietf-dots-data-channel) allows a 442 DOTS client to manage aliases for resources for which mitigation may 443 be requested. Such aliases may be used in subsequent DOTS signal 444 channel exchanges to refer more efficiently to the resources under 445 attack. 447 The tree structure for the DOTS alias is depicted in Figure 4. 449 module: ietf-dots-data-channel 450 +--rw dots-data 451 +--rw dots-client* [cuid] 452 | +--rw cuid string 453 | +--rw cdid? string 454 | +--rw aliases 455 | | +--rw alias* [name] 456 | | +--rw name string 457 | | +--rw target-prefix* inet:ip-prefix 458 | | +--rw target-port-range* [lower-port upper-port] 459 | | | +--rw lower-port inet:port-number 460 | | | +--rw upper-port inet:port-number 461 | | +--rw target-protocol* uint8 462 | | +--rw target-fqdn* inet:domain-name 463 | | +--rw target-uri* inet:uri 464 | | +--ro pending-lifetime? int32 465 | +--rw acls 466 | ... 467 +--ro capabilities 468 ... 470 Figure 4: DOTS Alias Subtree 472 Also, the 'ietf-dots-data-channel' module allows DOTS clients to 473 manage filtering rules. Examples of filtering management in a DOTS 474 context include, but not limited to: 476 o Black-list management, which enables a DOTS client to inform a 477 DOTS server about sources from which traffic should be discarded. 479 o White-list management, which enables a DOTS client to inform a 480 DOTS server about sources from which traffic should always be 481 accepted. 483 o Filter management, which enables a DOTS client to request the 484 installation or withdrawal of traffic filters, dropping or rate- 485 limiting unwanted traffic and permitting white-listed traffic. 487 The tree structure for the DOTS filtering entries is depicted in 488 Figure 5. 490 Early versions of this document investigated to what extent 491 augmenting 'ietf-access-control-list' meet DOTS requirements, but 492 that design approach was abandoned because it does not support 493 meeting many of DOTS requirements, e.g., 495 o Retrieve a filtering entry (or all entries) created by a DOTS 496 client. 498 o Delete a filtering entry that was instantiated by a DOTS client. 500 DOTS filtering entries (i.e., Access Control List (ACL)) mimic the 501 structure specified in [I-D.ietf-netmod-acl-model]. Concretely, DOTS 502 agents are assumed to manipulate an ordered list of ACLs; each ACL 503 contains a separately ordered list of Access Control Entries (ACEs). 504 Each ACE has a group of match and a group of action criteria. 506 Once all the ACE entries have been iterated though with no match, 507 then all the following ACL's ACE entries are iterated through until 508 the first match at which point the specified action is applied. If 509 there is no match, then there is no action to be taken against the 510 packet. 512 module: ietf-dots-data-channel 513 +--rw dots-data 514 +--rw dots-client* [cuid] 515 | +--rw cuid string 516 | +--rw cdid? string 517 | +--rw aliases 518 | | ... 519 | +--rw acls 520 | +--rw acl* [name] 521 | +--rw name string 522 | +--rw type? ietf-acl:acl-type 523 | +--rw activation-type? enumeration 524 | +--ro pending-lifetime? int32 525 | +--rw aces 526 | +--rw ace* [name] 527 | +--rw name string 528 | +--rw matches 529 | | +--rw (l3)? 530 | | | +--:(ipv4) 531 | | | | ... 532 | | | +--:(ipv6) 533 | | | ... 534 | | +--rw (l4)? 535 | | +--:(tcp) 536 | | | ... 537 | | +--:(udp) 538 | | | ... 539 | | +--:(icmp) 540 | | ... 541 | +--rw actions 542 | | +--rw forwarding identityref 543 | | +--rw rate-limit? decimal64 544 | +--ro statistics 545 | +--ro matched-packets? yang:counter64 546 | +--ro matched-octets? yang:counter64 547 +--ro capabilities 548 ... 550 Figure 5: DOTS ACLs Subtree 552 Filtering rules instructed by a DOTS client assumes a default 553 direction: the destination is the DOTS client domain. 555 DOTS forwarding actions can be 'accept' (i.e., accept matching 556 traffic) or 'drop' (i.e., drop matching traffic without sending any 557 ICMP error message). Accepted traffic can be subject to rate 558 limiting 'rate-limit'. Note that 'reject' action (i.e., drop 559 matching traffic and send an ICMP error message to the source) is not 560 supported in 'ietf-dots-data-channel' because it is not appropriate 561 in the context of DDoS mitigation. Generating ICMP messages to 562 notify drops when mitigating a DDoS attack will exacerbate the DDoS 563 attack. Furthermore, these ICMP messages will be used by an attacker 564 as an explicit signal that the traffic is being blocked. 566 4.2. Filtering Fields 568 The 'ietf-dots-data-channel' module reuses the packet fields module 569 'ietf-packet-fields' [I-D.ietf-netmod-acl-model] which defines 570 matching on fields in the packet including IPv4, IPv6, and transport 571 layer fields. 573 This specification defines a new IPv4/IPv6 matching field called 574 'fragment' to efficiently handle fragment-related filtering rules. 575 Indeed, [I-D.ietf-netmod-acl-model] does not support such capability 576 for IPv6 but offers a partial support for IPv4 by means of 'flags'. 577 Nevertheless, the use of 'flags' is problematic since it does not 578 allow to define a bitmask. For example, setting other bits not 579 covered by the 'flags' filtering clause in a packet will allow that 580 packet to get through (because it won't match the ACE). Sample 581 examples to illustrate how 'fragment' can be used are provided in 582 Appendix A. 584 Figure 6 shows the IPv4 match subtree. 586 module: ietf-dots-data-channel 587 +--rw dots-data 588 +--rw dots-client* [cuid] 589 | ... 590 | +--rw acls 591 | +--rw acl* [name] 592 | ... 593 | +--rw aces 594 | +--rw ace* [name] 595 | +--rw name string 596 | +--rw matches 597 | | +--rw (l3)? 598 | | | +--:(ipv4) 599 | | | | +--rw ipv4 600 | | | | +--rw dscp? inet:dscp 601 | | | | +--rw ecn? uint8 602 | | | | +--rw length? uint16 603 | | | | +--rw ttl? uint8 604 | | | | +--rw protocol? uint8 605 | | | | +--rw ihl? uint8 606 | | | | +--rw flags? bits 607 | | | | +--rw offset? uint16 608 | | | | +--rw identification? uint16 609 | | | | +--rw (destination-network)? 610 | | | | | +--:(destination-ipv4-network) 611 | | | | | +--rw destination-ipv4-network? 612 | | | | | inet:ipv4-prefix 613 | | | | +--rw (source-network)? 614 | | | | | +--:(source-ipv4-network) 615 | | | | | +--rw source-ipv4-network? 616 | | | | | inet:ipv4-prefix 617 | | | | +--rw fragment 618 | | | | +--rw operator? operator 619 | | | | +--rw type fragment-type 620 | | | +--:(ipv6) 621 | | | ... 622 | | +--rw (l4)? 623 | | ... 624 | +--rw actions 625 | | ... 626 | +--ro statistics 627 | ... 628 +--ro capabilities 629 ... 631 Figure 6: DOTS ACLs Subtree (IPv4 Match) 633 Figure 7 shows the IPv6 match subtree. 635 module: ietf-dots-data-channel 636 +--rw dots-data 637 +--rw dots-client* [cuid] 638 | ... 639 | +--rw acls 640 | +--rw acl* [name] 641 | ... 642 | +--rw aces 643 | +--rw ace* [name] 644 | +--rw name string 645 | +--rw matches 646 | | +--rw (l3)? 647 | | | +--:(ipv4) 648 | | | | ... 649 | | | +--:(ipv6) 650 | | | +--rw ipv6 651 | | | +--rw dscp? inet:dscp 652 | | | +--rw ecn? uint8 653 | | | +--rw length? uint16 654 | | | +--rw ttl? uint8 655 | | | +--rw protocol? uint8 656 | | | +--rw (destination-network)? 657 | | | | +--:(destination-ipv6-network) 658 | | | | +--rw destination-ipv6-network? 659 | | | | inet:ipv6-prefix 660 | | | +--rw (source-network)? 661 | | | | +--:(source-ipv6-network) 662 | | | | +--rw source-ipv6-network? 663 | | | | inet:ipv6-prefix 664 | | | +--rw flow-label? 665 | | | | inet:ipv6-flow-label 666 | | | +--rw fragment 667 | | | +--rw operator? operator 668 | | | +--rw type fragment-type 669 | | +--rw (l4)? 670 | | ... 671 | +--rw actions 672 | | ... 673 | +--ro statistics 674 | ... 675 +--ro capabilities 676 ... 678 Figure 7: DOTS ACLs Subtree (IPv6 Match) 680 Figure 8 shows the TCP match subtree. In addition to the fields 681 defined in [I-D.ietf-netmod-acl-model], this specification defines a 682 new TCP matching field, called 'flags-bitmask', to efficiently handle 683 TCP flags filtering rules. 685 module: ietf-dots-data-channel 686 +--rw dots-data 687 +--rw dots-client* [cuid] 688 | ... 689 | +--rw acls 690 | +--rw acl* [name] 691 | ... 692 | +--rw aces 693 | +--rw ace* [name] 694 | +--rw name string 695 | +--rw matches 696 | | +--rw (l3)? 697 | | | ... 698 | | +--rw (l4)? 699 | | +--:(tcp) 700 | | | +--rw tcp 701 | | | +--rw sequence-number? uint32 702 | | | +--rw acknowledgement-number? uint32 703 | | | +--rw data-offset? uint8 704 | | | +--rw reserved? uint8 705 | | | +--rw flags? bits 706 | | | +--rw window-size? uint16 707 | | | +--rw urgent-pointer? uint16 708 | | | +--rw options? uint32 709 | | | +--rw flags-bitmask 710 | | | | +--rw operator? operator 711 | | | | +--rw bitmask uint16 712 | | | +--rw (source-port)? 713 | | | | +--:(source-port-range-or-operator) 714 | | | | +--rw source-port-range-or-operator 715 | | | | +--rw (port-range-or-operator)? 716 | | | | +--:(range) 717 | | | | | +--rw lower-port 718 | | | | | | inet:port-number 719 | | | | | +--rw upper-port 720 | | | | | inet:port-number 721 | | | | +--:(operator) 722 | | | | +--rw operator? 723 | | | | | operator 724 | | | | +--rw port 725 | | | | inet:port-number 726 | | | +--rw (destination-port)? 727 | | | +--:(destination-port-range-or-operator) 728 | | | +--rw destination-port-range-or-operator 729 | | | +--rw (port-range-or-operator)? 730 | | | +--:(range) 731 | | | | +--rw lower-port 732 | | | | | inet:port-number 733 | | | | +--rw upper-port 734 | | | | inet:port-number 735 | | | +--:(operator) 736 | | | +--rw operator? 737 | | | | operator 738 | | | +--rw port 739 | | | inet:port-number 740 | | +--:(udp) 741 | | | ... 742 | | +--:(icmp) 743 | | ... 744 | +--rw actions 745 | | ... 746 | +--ro statistics 747 | ... 748 +--ro capabilities 749 ... 751 Figure 8: DOTS ACLs Subtree (TCP Match) 753 Figure 9 shows the UDP and ICMP match subtree. 755 module: ietf-dots-data-channel 756 +--rw dots-data 757 +--rw dots-client* [cuid] 758 | ... 759 | +--rw acls 760 | +--rw acl* [name] 761 | ... 762 | +--rw aces 763 | +--rw ace* [name] 764 | +--rw name string 765 | +--rw matches 766 | | +--rw (l3)? 767 | | | ... 768 | | +--rw (l4)? 769 | | +--:(tcp) 770 | | | ... 771 | | +--:(udp) 772 | | | +--rw udp 773 | | | +--rw length? uint16 774 | | | +--rw (source-port)? 775 | | | | +--:(source-port-range-or-operator) 776 | | | | +--rw source-port-range-or-operator 777 | | | | +--rw (port-range-or-operator)? 778 | | | | +--:(range) 779 | | | | | +--rw lower-port 780 | | | | | | inet:port-number 781 | | | | | +--rw upper-port 782 | | | | | inet:port-number 783 | | | | +--:(operator) 784 | | | | +--rw operator? 785 | | | | | operator 786 | | | | +--rw port 787 | | | | inet:port-number 788 | | | +--rw (destination-port)? 789 | | | +--:(destination-port-range-or-operator) 790 | | | +--rw destination-port-range-or-operator 791 | | | +--rw (port-range-or-operator)? 792 | | | +--:(range) 793 | | | | +--rw lower-port 794 | | | | | inet:port-number 795 | | | | +--rw upper-port 796 | | | | inet:port-number 797 | | | +--:(operator) 798 | | | +--rw operator? 799 | | | | operator 800 | | | +--rw port 801 | | | inet:port-number 802 | | +--:(icmp) 803 | | +--rw icmp 804 | | +--rw type? uint8 805 | | +--rw code? uint8 806 | | +--rw rest-of-header? uint32 807 | +--rw actions 808 | | ... 809 | +--ro statistics 810 | ... 811 +--ro capabilities 812 ... 814 Figure 9: DOTS ACLs Subtree (UDP and ICMP Match) 816 DOTS implementations MUST support the following matching criteria: 818 match based on the IP header (IPv4 and IPv6), match based on the 819 transport header (TCP, UDP, and ICMP), and any combination 820 thereof. The same matching fields are used for both ICMP and 821 ICMPv6. 823 The following match fields MUST be supported by DOTS implementations 824 (Table 1): 826 ACL Mandatory Fields 827 Match 828 ------- ------------------------------------------------------------- 829 ipv4 length, protocol, destination-ipv4-network, source- 830 ipv4-network, and fragment 831 ipv6 length, protocol, destination-ipv6-network, source- 832 ipv6-network, and fragment 833 tcp flags-bitmask, source-port-range-or-operator, and 834 destination-port-range-or-operator 835 udp length, source-port-range-or-operator, and destination-port- 836 range-or-operator 837 icmp type and code 839 Table 1: Mandatory DOTS Channel Match Fields 841 Implementations MAY support other filtering match fields and actions. 842 The 'ietf-dots-data-channel' allows an implementation to expose its 843 filtering capabilities. The tree structure of the 'capabilities' is 844 shown in Figure 10. 846 module: ietf-dots-data-channel 847 +--rw dots-data 848 ... 849 +--ro capabilities 850 +--ro address-family* enumeration 851 +--ro forwarding-actions* identityref 852 +--ro rate-limit? boolean 853 +--ro transport-protocols* uint8 854 +--ro ipv4 855 | +--ro dscp? boolean 856 | +--ro ecn? boolean 857 | +--ro length? boolean 858 | +--ro ttl? boolean 859 | +--ro protocol? boolean 860 | +--ro ihl? boolean 861 | +--ro flags? boolean 862 | +--ro offset? boolean 863 | +--ro identification? boolean 864 | +--ro source-prefix? boolean 865 | +--ro destination-prefix? boolean 866 | +--ro fragment? boolean 867 +--ro ipv6 868 | +--ro dscp? boolean 869 | +--ro ecn? boolean 870 | +--ro flow-label? boolean 871 | +--ro length? boolean 872 | +--ro protocol? boolean 873 | +--ro hoplimit? boolean 874 | +--ro source-prefix? boolean 875 | +--ro destination-prefix? boolean 876 | +--ro fragment? boolean 877 +--ro tcp 878 | +--ro sequence-number? boolean 879 | +--ro acknowledgement-number? boolean 880 | +--ro data-offset? boolean 881 | +--ro reserved? boolean 882 | +--ro flags? boolean 883 | +--ro flags-bitmask? boolean 884 | +--ro window-size? boolean 885 | +--ro urgent-pointer? boolean 886 | +--ro options? boolean 887 | +--ro source-port? boolean 888 | +--ro destination-port? boolean 889 | +--ro port-range? boolean 890 +--ro udp 891 | +--ro length? boolean 892 | +--ro source-port? boolean 893 | +--ro destination-port? boolean 894 | +--ro port-range? boolean 895 +--ro icmp 896 +--ro type? boolean 897 +--ro code? boolean 898 +--ro rest-of-header? boolean 900 Figure 10: Filtering Capabilities Sub-Tree 902 4.3. YANG Module 904 file "ietf-dots-data-channel@2018-07-25.yang" 906 module ietf-dots-data-channel { 907 yang-version 1.1; 908 namespace "urn:ietf:params:xml:ns:yang:ietf-dots-data-channel"; 909 prefix data-channel; 911 import ietf-access-control-list { 912 prefix ietf-acl; 913 } 914 import ietf-packet-fields { 915 prefix packet-fields; 916 } 917 import ietf-dots-signal-channel { 918 prefix dots-signal; 919 } 921 organization 922 "IETF DDoS Open Threat Signaling (DOTS) Working Group"; 923 contact 924 "WG Web: 925 WG List: 927 Editor: Mohamed Boucadair 928 930 Editor: Konda, Tirumaleswar Reddy 931 933 Author: Jon Shallow 934 936 Author: Kaname Nishizuka 937 939 Author: Liang Xia 940 942 Author: Prashanth Patil 943 945 Author: Andrew Mortensen 946 948 Author: Nik Teague 949 "; 950 description 951 "This module contains YANG definition for configuring 952 aliases for resources and filtering rules using DOTS 953 data channel. 955 Copyright (c) 2018 IETF Trust and the persons identified as 956 authors of the code. All rights reserved. 958 Redistribution and use in source and binary forms, with or 959 without modification, is permitted pursuant to, and subject 960 to the license terms contained in, the Simplified BSD License 961 set forth in Section 4.c of the IETF Trust's Legal Provisions 962 Relating to IETF Documents 963 (http://trustee.ietf.org/license-info). 965 This version of this YANG module is part of RFC XXXX; see 966 the RFC itself for full legal notices."; 968 revision 2018-07-25 { 969 description 970 "Initial revision."; 971 reference 972 "RFC XXXX: Distributed Denial-of-Service Open Threat 973 Signaling (DOTS) Data Channel Specification"; 974 } 976 typedef operator { 977 type bits { 978 bit not { 979 position 0; 980 description 981 "If set, logical negation of operation."; 982 } 983 bit match { 984 position 1; 985 description 986 "Match bit. If set, this is a bitwise match operation 987 defined as '(data & value) == value'; if unset, (data & 988 value) evaluates to TRUE if any of the bits in the value 989 mask are set in the data."; 990 } 991 } 992 description 993 "How to apply the defined bitmask."; 994 } 996 grouping tcp-flags { 997 leaf operator { 998 type operator; 999 default match; 1000 description 1001 "How to interpret the TCP flags."; 1002 } 1003 leaf bitmask { 1004 type uint16; 1005 mandatory true; 1006 description 1007 "Bitmask values can be encoded as a 1- or 2-byte bitmask. 1008 When a single byte is specified, it matches byte 13 1009 of the TCP header, which contains bits 8 though 15 1010 of the 4th 32-bit word. When a 2-byte encoding is used, 1011 it matches bytes 12 and 13 of the TCP header with 1012 the data offset field having a 'don't care' value."; 1013 } 1014 description 1015 "Operations on TCP flags."; 1016 } 1017 typedef fragment-type { 1018 type bits { 1019 bit df { 1020 position 0; 1021 description 1022 "Don't fragment bit for IPv4. 1023 This bit must be set to 0 for IPv6."; 1024 } 1025 bit isf { 1026 position 1; 1027 description 1028 "Is a fragment."; 1029 } 1030 bit ff { 1031 position 2; 1032 description 1033 "First fragment."; 1034 } 1035 bit lf { 1036 position 3; 1037 description 1038 "Last fragment."; 1039 } 1040 } 1041 description 1042 "Different fragment types to match against."; 1043 } 1045 grouping fragment-fields { 1046 leaf operator { 1047 type operator; 1048 default match; 1049 description 1050 "How to interpret the fragment type."; 1051 } 1052 leaf type { 1053 type fragment-type; 1054 mandatory true; 1055 description 1056 "What fragment type to look for."; 1057 } 1058 description 1059 "Operations on fragment types."; 1060 } 1062 grouping aliases { 1063 description 1064 "Top level container for aliases"; 1066 list alias { 1067 key "name"; 1068 description 1069 "List of aliases"; 1070 leaf name { 1071 type string; 1072 description 1073 "The name of the alias"; 1074 } 1075 uses dots-signal:target; 1076 leaf pending-lifetime { 1077 type int32; 1078 units "minutes"; 1079 config false; 1080 description 1081 "Indicates the pending validity lifetime of the alias 1082 entry."; 1083 } 1084 } 1085 } 1087 grouping ports { 1088 choice source-port { 1089 container source-port-range-or-operator { 1090 uses packet-fields:port-range-or-operator; 1091 description 1092 "Source port definition."; 1093 } 1094 description 1095 "Choice of specifying the source port or referring to 1096 a group of source ports."; 1097 } 1098 choice destination-port { 1099 container destination-port-range-or-operator { 1100 uses packet-fields:port-range-or-operator; 1101 description 1102 "Destination port definition."; 1103 } 1104 description 1105 "Choice of specifying a destination port or referring 1106 to a group of destination ports."; 1107 } 1108 description 1109 "Choice of specifying a source or destination ports."; 1110 } 1112 grouping access-lists { 1113 description 1114 "Specifies the ordered set of Access Control Lists."; 1115 list acl { 1116 key "name"; 1117 ordered-by user; 1118 description 1119 "An Access Control List (ACL) is an ordered list of 1120 Access Control Entries (ACE). Each Access Control Entry 1121 has a list of match criteria and a list of actions."; 1122 leaf name { 1123 type string { 1124 length "1..64"; 1125 } 1126 description 1127 "The name of the access list."; 1128 reference 1129 "RFC ZZZZ: Network Access Control List (ACL) 1130 YANG Data Model"; 1131 } 1132 leaf type { 1133 type ietf-acl:acl-type; 1134 description 1135 "Type of access control list. Indicates the primary intended 1136 type of match criteria (e.g., IPv4, IPv6) used in the list 1137 instance."; 1138 reference 1139 "RFC ZZZZ: Network Access Control List (ACL) 1140 YANG Data Model"; 1141 } 1142 leaf activation-type { 1143 type enumeration { 1144 enum "activate-when-mitigating" { 1145 value 1; 1146 description 1147 "The ACL is installed only when a mitigation is active. 1148 The ACL is specific to this DOTS client."; 1149 } 1150 enum "immediate" { 1151 value 2; 1152 description 1153 "The ACL is immediately activated."; 1154 } 1155 } 1156 description 1157 "Indicates whether an ACL is to be installed immediately 1158 or when a mitigation is active."; 1159 } 1160 leaf pending-lifetime { 1161 type int32; 1162 units "minutes"; 1163 config false; 1164 description 1165 "Indicates the pending validity lifetime of the alias 1166 entry."; 1167 } 1168 container aces { 1169 description 1170 "The Access Control Entries container contains 1171 a list of ACEs."; 1172 list ace { 1173 key "name"; 1174 ordered-by user; 1175 description 1176 "List of access list entries."; 1177 leaf name { 1178 type string { 1179 length "1..64"; 1180 } 1181 description 1182 "A unique name identifying this Access List 1183 Entry (ACE)."; 1184 reference 1185 "RFC ZZZZ: Network Access Control List (ACL) 1186 YANG Data Model"; 1187 } 1188 container matches { 1189 description 1190 "The rules in this set determine what fields will be 1191 matched upon before any action is taken on them. 1193 If no matches are defined in a particular container, 1194 then any packet will match that container. 1196 If no matches are specified at all in an ACE, then any 1197 packet will match the ACE."; 1198 reference 1199 "RFC ZZZZ: Network Access Control List (ACL) 1200 YANG Data Model"; 1202 choice l3 { 1203 container ipv4 { 1204 when "derived-from(../../../../type," + 1205 "'ietf-acl:ipv4-acl-type')"; 1206 uses packet-fields:acl-ip-header-fields; 1207 uses packet-fields:acl-ipv4-header-fields; 1208 container fragment { 1209 description 1210 "Indicates how to handle IPv4 fragments."; 1211 uses fragment-fields; 1212 } 1213 description 1214 "Rule set that matches IPv4 header."; 1215 } 1216 container ipv6 { 1217 when "derived-from(../../../../type," + 1218 "'ietf-acl:ipv6-acl-type')"; 1219 uses packet-fields:acl-ip-header-fields; 1220 uses packet-fields:acl-ipv6-header-fields; 1221 container fragment { 1222 description 1223 "Indicates how to handle IPv6 fragments."; 1224 uses fragment-fields; 1225 } 1226 description 1227 "Rule set that matches IPv6 header."; 1228 } 1229 description 1230 "Either IPv4 or IPv6."; 1231 } 1232 choice l4 { 1233 container tcp { 1234 uses packet-fields:acl-tcp-header-fields; 1235 container flags-bitmask { 1236 description 1237 "Indicates how to handle TCP flags."; 1238 uses tcp-flags; 1239 } 1240 uses ports; 1241 description 1242 "Rule set that matches TCP header."; 1243 } 1244 container udp { 1245 uses packet-fields:acl-udp-header-fields; 1246 uses ports; 1247 description 1248 "Rule set that matches UDP header."; 1249 } 1250 container icmp { 1251 uses packet-fields:acl-icmp-header-fields; 1252 description 1253 "Rule set that matches ICMP/ICMPv6 header."; 1254 } 1255 description 1256 "Can be TCP, UDP, or ICMP/ICMPv6"; 1257 } 1259 } 1260 container actions { 1261 description 1262 "Definitions of action for this ACE."; 1263 leaf forwarding { 1264 type identityref { 1265 base ietf-acl:forwarding-action; 1266 } 1267 mandatory true; 1268 description 1269 "Specifies the forwarding action per ACE."; 1270 reference 1271 "RFC ZZZZ: Network Access Control List (ACL) 1272 YANG Data Model"; 1273 } 1274 leaf rate-limit { 1275 when "../forwarding = 'ietf-acl:accept'" { 1276 description 1277 "rate-limit valid only when accept action is used"; 1278 } 1279 type decimal64 { 1280 fraction-digits 2; 1281 } 1282 description 1283 "rate-limit traffic"; 1284 } 1285 } 1286 container statistics { 1287 config false; 1288 description 1289 "Aggregate statistics."; 1290 uses ietf-acl:acl-counters; 1291 } 1292 } 1293 } 1294 } 1295 } 1297 container dots-data { 1298 description 1299 "Main container for DOTS data channel."; 1300 list dots-client { 1301 key "cuid"; 1302 description 1303 "List of DOTS clients."; 1304 leaf cuid { 1305 type string; 1306 description 1307 "A unique identifier that is randomly generated by 1308 a DOTS client to prevent request collisions."; 1309 reference 1310 "RFC YYYY: Distributed Denial-of-Service Open Threat 1311 Signaling (DOTS) Signal Channel Specification"; 1312 } 1313 leaf cdid { 1314 type string; 1315 description 1316 "A client domain identifier conveyed by a 1317 server-domain DOTS gateway to a remote DOTS server."; 1318 reference 1319 "RFC YYYY: Distributed Denial-of-Service Open Threat 1320 Signaling (DOTS) Signal Channel Specification"; 1321 } 1322 container aliases { 1323 description 1324 "Set of aliases that are bound to a DOTS client."; 1325 uses aliases; 1326 } 1327 container acls { 1328 description 1329 "Access lists that are bound to a DOTS client."; 1330 uses access-lists; 1331 } 1332 } 1333 container capabilities { 1334 config false; 1335 description 1336 "Match capabilities"; 1337 leaf-list address-family { 1338 type enumeration { 1339 enum "ipv4" { 1340 description 1341 "IPv4 is supported."; 1342 } 1343 enum "ipv6" { 1344 description 1345 "IPv6 is supported."; 1346 } 1347 } 1348 description 1349 "Indicates the IP address families supported by 1350 the DOTS server."; 1351 } 1352 leaf-list forwarding-actions { 1353 type identityref { 1354 base ietf-acl:forwarding-action; 1356 } 1357 description 1358 "Supported forwarding action(s)."; 1359 } 1360 leaf rate-limit { 1361 type boolean; 1362 description 1363 "Support of rate-limit action."; 1364 } 1365 leaf-list transport-protocols { 1366 type uint8; 1367 description 1368 "Upper-layer protocol associated with this mapping. 1370 Values are taken from the IANA protocol registry: 1371 https://www.iana.org/assignments/protocol-numbers/ 1372 protocol-numbers.xhtml 1374 For example, this field contains 6 (TCP) for a TCP 1375 mapping or 17 (UDP) for a UDP mapping."; 1376 } 1377 container ipv4 { 1378 description 1379 "Indicates IPv4 header fields that are supported to enforce 1380 ACLs."; 1381 leaf dscp { 1382 type boolean; 1383 description 1384 "Support of filtering based on DSCP."; 1385 } 1386 leaf ecn { 1387 type boolean; 1388 description 1389 "Support of filtering based on ECN."; 1390 } 1391 leaf length { 1392 type boolean; 1393 description 1394 "Support of filtering based on the Total Length."; 1395 } 1396 leaf ttl { 1397 type boolean; 1398 description 1399 "Support of filtering based on the TTL."; 1400 } 1401 leaf protocol { 1402 type boolean; 1403 description 1404 "Support of filtering based on protocol field."; 1405 } 1406 leaf ihl { 1407 type boolean; 1408 description 1409 "Support of filtering based on the Internet Header 1410 Length (IHL)."; 1411 } 1412 leaf flags { 1413 type boolean; 1414 description 1415 "Support of filtering based on the 'flags'"; 1416 } 1417 leaf offset { 1418 type boolean; 1419 description 1420 "Support of filtering based on the 'offset'."; 1421 } 1422 leaf identification { 1423 type boolean; 1424 description 1425 "Support of filtering based on the 'identification'."; 1426 } 1427 leaf source-prefix { 1428 type boolean; 1429 description 1430 "Support of filtering based on the source prefix."; 1431 } 1432 leaf destination-prefix { 1433 type boolean; 1434 description 1435 "Support of filtering based on the destination prefix."; 1436 } 1437 leaf fragment { 1438 type boolean; 1439 description 1440 "Indicates the capability of a DOTS server to 1441 enforce filters on IPv4 fragments. That is 'fragment' 1442 clause is supported."; 1443 } 1444 } 1445 container ipv6 { 1446 description 1447 "Indicates IPv6 header fields that are supported to enforce 1448 ACLs."; 1449 leaf dscp { 1450 type boolean; 1451 description 1452 "Support of filtering based on DSCP."; 1453 } 1454 leaf ecn { 1455 type boolean; 1456 description 1457 "Support of filtering based on ECN."; 1458 } 1459 leaf flow-label { 1460 type boolean; 1461 description 1462 "Support of filtering based on the Flow label."; 1463 } 1464 leaf length { 1465 type boolean; 1466 description 1467 "Support of filtering based on the Payload Length."; 1468 } 1469 leaf protocol { 1470 type boolean; 1471 description 1472 "Support of filtering based on the Next Header field."; 1473 } 1474 leaf hoplimit { 1475 type boolean; 1476 description 1477 "Support of filtering based on the Hop Limit."; 1478 } 1479 leaf source-prefix { 1480 type boolean; 1481 description 1482 "Support of filtering based on the source prefix."; 1483 } 1484 leaf destination-prefix { 1485 type boolean; 1486 description 1487 "Support of filtering based on the destination prefix."; 1488 } 1489 leaf fragment { 1490 type boolean; 1491 description 1492 "Indicates the capability of a DOTS server to 1493 enforce filters on IPv6 fragments."; 1494 } 1495 } 1496 container tcp { 1497 description 1498 "Set of TCP fields that are supported by the DOTS server 1499 to enfoce filters."; 1501 leaf sequence-number { 1502 type boolean; 1503 description 1504 "Support of filtering based on the TCP sequence number."; 1505 } 1506 leaf acknowledgement-number { 1507 type boolean; 1508 description 1509 "Support of filtering based on the TCP acknowledgement 1510 number."; 1511 } 1512 leaf data-offset { 1513 type boolean; 1514 description 1515 "Support of filtering based on the TCP data-offset."; 1516 } 1517 leaf reserved { 1518 type boolean; 1519 description 1520 "Support of filtering based on the TCP reserved field."; 1521 } 1522 leaf flags { 1523 type boolean; 1524 description 1525 "Support of filtering, as defined in RFC ZZZZ, based 1526 on the TCP flags."; 1527 } 1528 leaf flags-bitmask { 1529 type boolean; 1530 description 1531 "Support of filtering based on the TCP flags bitmask."; 1532 } 1533 leaf window-size { 1534 type boolean; 1535 description 1536 "Support of filtering based on the TCP window size."; 1537 } 1538 leaf urgent-pointer { 1539 type boolean; 1540 description 1541 "Support of filtering based on the TCP urgent pointer."; 1542 } 1543 leaf options { 1544 type boolean; 1545 description 1546 "Support of filtering based on the TCP options."; 1547 } 1548 leaf source-port { 1549 type boolean; 1550 description 1551 "Support of filtering based on the source port number."; 1552 } 1553 leaf destination-port { 1554 type boolean; 1555 description 1556 "Support of filtering based on the destination port 1557 number."; 1558 } 1559 leaf port-range { 1560 type boolean; 1561 description 1562 "Support of filtering based on a port range."; 1563 } 1564 } 1565 container udp { 1566 description 1567 "Set of UDP fields that are supported by the DOTS server 1568 to enforce filters."; 1569 leaf length { 1570 type boolean; 1571 description 1572 "Support of filtering based on the UDP length."; 1573 } 1574 leaf source-port { 1575 type boolean; 1576 description 1577 "Support of filtering based on the source port number."; 1578 } 1579 leaf destination-port { 1580 type boolean; 1581 description 1582 "Support of filtering based on the destination port 1583 number."; 1584 } 1585 leaf port-range { 1586 type boolean; 1587 description 1588 "Support of filtering based on a port range."; 1589 } 1590 } 1591 container icmp { 1592 description 1593 "Set of ICMP/ICMPv6 fields that are supported by the DOTS 1594 server to enforce filters."; 1595 leaf type { 1596 type boolean; 1597 description 1598 "Support of filtering based on the ICMP/ICMPv6 type."; 1599 } 1600 leaf code { 1601 type boolean; 1602 description 1603 "Support of filtering based on the ICMP/ICMPv6 code."; 1604 } 1605 leaf rest-of-header { 1606 type boolean; 1607 description 1608 "Support of filtering based on the ICMP four-bytes 1609 field."; 1610 } 1611 } 1612 } 1613 } 1614 } 1615 1617 5. Managing DOTS Clients 1619 5.1. Registering DOTS Clients 1621 In order to make use of DOTS data channel, a DOTS client MUST 1622 register to its DOTS server(s) by creating a DOTS client ('dots- 1623 client') resource. To that aim, DOTS clients SHOULD send a POST 1624 request (shown in Figure 11). 1626 POST /restconf/data/ietf-dots-data-channel:dots-data HTTP/1.1 1627 Host: {host}:{port} 1628 Content-Type: application/yang-data+json 1629 { 1630 "ietf-dots-data-channel:dots-client": [ 1631 { 1632 "cuid": "string" 1633 } 1634 ] 1635 } 1637 Figure 11: POST to Register 1639 The 'cuid' (client unique identifier) parameter is described below: 1641 cuid: A globally unique identifier that is meant to prevent 1642 collisions among DOTS clients. This attribute has the same 1643 meaning, syntax, and processing rules as the 'cuid' attribute 1644 defined in [I-D.ietf-dots-signal-channel]. 1646 DOTS clients MUST use the same 'cuid' for both signal and data 1647 channels. 1649 This is a mandatory attribute. 1651 In deployments where server-domain DOTS gateways are enabled, 1652 identity information about the origin source client domain SHOULD be 1653 supplied to the DOTS server. That information is meant to assist the 1654 DOTS server to enforce some policies. These policies can be enforced 1655 per-client, per-client domain, or both. Figure 12 shows an example 1656 of a request relayed by a server-domain DOTS gateway. 1658 POST /restconf/data/ietf-dots-data-channel:dots-data HTTP/1.1 1659 Host: {host}:{port} 1660 Content-Type: application/yang-data+json 1661 { 1662 "ietf-dots-data-channel:dots-client": [ 1663 { 1664 "cuid": "string", 1665 "cdid": "string" 1666 } 1667 ] 1668 } 1670 Figure 12: POST to Register (DOTS Gateway) 1672 A server-domain DOTS gateway SHOULD add the following attribute: 1674 cdid: This attribute has the same meaning, syntax, and processing 1675 rules as the 'cdid' attribute defined in 1676 [I-D.ietf-dots-signal-channel]. 1678 In deployments where server-domain DOTS gateways are enabled, 1679 'cdid' does not need to be inserted when relaying DOTS methods to 1680 manage aliases (Section 6) or filtering rules (Section 7). DOTS 1681 servers are responsible for maintaining the association between 1682 'cdid' and 'cuid' for policy enforcement purposes. 1684 This is an optional attribute. 1686 A request example to create a 'dots-client' resource is depicted in 1687 Figure 13. This request is relayed by a server-domain DOTS gateway 1688 as hinted by the presence of the 'cdid' attribute. 1690 POST /restconf/data/ietf-dots-data-channel:dots-data HTTP/1.1 1691 Host: {host}:{port} 1692 Content-Type: application/yang-data+json 1693 { 1694 "ietf-dots-data-channel:dots-client": [ 1695 { 1696 "cuid": "dz6pHjaADkaFTbjr0JGBpw", 1697 "cdid": "7eeaf349529eb55ed50113" 1698 } 1699 ] 1700 } 1702 Figure 13: POST to Register (DOTS gateway) 1704 DOTS servers MUST limit the number of 'dots-client' resources to be 1705 created by the same DOTS client to 1 per request. Requests with 1706 multiple 'dots-client' resources MUST be rejected by DOTS servers. 1707 To that aim, the DOTS server MUST rely on the same procedure to 1708 unambiguously identify a DOTS client as discussed in Section 4.4.1 of 1709 [I-D.ietf-dots-signal-channel]. 1711 The DOTS server indicates the result of processing the POST request 1712 using status-line codes. Status codes in the range "2xx" codes are 1713 success, "4xx" codes are some sort of invalid requests and "5xx" 1714 codes are returned if the DOTS server has erred or is incapable of 1715 accepting the creation of the 'dots-client' resource. In particular, 1717 o "201 Created" status-line is returned in the response, if the DOTS 1718 server has accepted the request. 1720 o "400 Bad Request" status-line is returned by the DOTS server, if 1721 the request does not include a 'cuid' parameter. The error-tag 1722 "missing-attribute" is used in this case. 1724 o "409 Conflict" status-line is returned to the requesting DOTS 1725 client, if the data resource already exists. The error-tag 1726 "resource-denied" is used in this case. 1728 Once a DOTS client registers itself to a DOTS server, it can 1729 create/delete/retrieve aliases (Section 6) and filtering rules 1730 (Section 7). 1732 A DOTS client MAY use the PUT request (Section 4.5 in [RFC8040]) to 1733 register a DOTS client within the DOTS server. An example is shown 1734 in Figure 14. 1736 PUT /restconf/data/ietf-dots-data-channel:dots-data\ 1737 /dots-client=dz6pHjaADkaFTbjr0JGBpw HTTP/1.1 1738 Host: {host}:{port} 1739 Content-Type: application/yang-data+json 1740 { 1741 "ietf-dots-data-channel:dots-client": [ 1742 { 1743 "cuid": "dz6pHjaADkaFTbjr0JGBpw" 1744 } 1745 ] 1746 } 1748 Figure 14: PUT to Register 1750 The DOTS gateway that inserted a 'cdid' in a PUT request, MUST strip 1751 the 'cdid' parameter in the corresponding response before forwarding 1752 the response to the DOTS client. 1754 5.2. Uregistering DOTS Clients 1756 A DOTS client de-registers from its DOTS server by deleting the 1757 'cuid' resource. Resources bound to this DOTS client will be deleted 1758 by the DOTS server. An example of de-register request is shown in 1759 Figure 15. 1761 DELETE /restconf/data/ietf-dots-data-channel:dots-data\ 1762 /dots-client=dz6pHjaADkaFTbjr0JGBpw HTTP/1.1 1763 Host: {host}:{port} 1765 Figure 15: De-register a DOTS Client 1767 6. Managing DOTS Aliases 1769 The following sub-sections define means for a DOTS client to create 1770 aliases (Section 6.1), retrieve one or a list of aliases 1771 (Section 6.2), and delete an alias (Section 6.3). 1773 6.1. Create Aliases 1775 A POST or PUT request is used by a DOTS client to create aliases, for 1776 resources for which a mitigation may be requested. Such aliases may 1777 be used in subsequent DOTS signal channel exchanges to refer more 1778 efficiently to the resources under attack. 1780 DOTS clients within the same domain can create different aliases for 1781 the same resource. 1783 The structure of POST requests used to create aliases is shown in 1784 Figure 16. 1786 POST /restconf/data/ietf-dots-data-channel:dots-data\ 1787 /dots-client=dz6pHjaADkaFTbjr0JGBpw HTTP/1.1 1788 Host: {host}:{port} 1789 Content-Type: application/yang-data+json 1790 { 1791 "ietf-dots-data-channel:aliases": { 1792 "alias": [ 1793 { 1794 "name": "string", 1795 "target-prefix": [ 1796 "string" 1797 ], 1798 "target-port-range": [ 1799 { 1800 "lower-port": integer, 1801 "upper-port": integer 1802 } 1803 ], 1804 "target-protocol": [ 1805 integer 1806 ], 1807 "target-fqdn": [ 1808 "string" 1809 ], 1810 "target-uri": [ 1811 "string" 1812 ] 1813 } 1814 ] 1815 } 1816 } 1818 Figure 16: POST to Create Aliases 1820 The parameters are described below: 1822 name: Name of the alias. 1824 This is a mandatory attribute. 1826 target-prefix: Prefixes are separated by commas. Prefixes are 1827 represented using Classless Inter-domain Routing (CIDR) notation 1828 [RFC4632]. As a reminder, the prefix length must be less than or 1829 equal to 32 (resp. 128) for IPv4 (resp. IPv6). 1831 The prefix list MUST NOT include broadcast, loopback, or multicast 1832 addresses. These addresses are considered as invalid values. In 1833 addition, the DOTS server MUST validate that these prefixes are 1834 within the scope of the DOTS client's domain. Other validation 1835 checks may be supported by DOTS servers. 1837 This is an optional attribute. 1839 target-port-range: A range of port numbers. 1841 The port range is defined by two bounds, a lower port number 1842 (lower-port) and an upper port number (upper-port). 1844 When only 'lower-port' is present, it represents a single port 1845 number. 1847 For TCP, UDP, Stream Control Transmission Protocol (SCTP) 1848 [RFC4960], or Datagram Congestion Control Protocol (DCCP) 1849 [RFC4340], the range of port numbers can be, for example, 1850 1024-65535. 1852 This is an optional attribute. 1854 target-protocol: A list of protocols. Values are taken from the 1855 IANA protocol registry [proto_numbers]. 1857 The value '0' has a special meaning for 'all protocols'. 1859 This is an optional attribute. 1861 target-fqdn: A list of Fully Qualified Domain Names (FQDNs). An 1862 FQDN is the full name of a resource, rather than just its 1863 hostname. For example, "venera" is a hostname, and 1864 "venera.isi.edu" is an FQDN [RFC1983]. 1866 How a name is passed to an underlying name resolution library is 1867 implementation- and deployment-specific. Nevertheless, once the 1868 name is resolved into one or multiple IP addresses, DOTS servers 1869 MUST apply the same validation checks as those for 'target- 1870 prefix'. 1872 This is an optional attribute. 1874 target-uri: A list of Uniform Resource Identifiers (URIs) 1875 [RFC3986]. 1877 The same validation checks used for 'target-fqdn' MUST be followed 1878 by DOTS servers to validate a target URI. 1880 This is an optional attribute. 1882 In POST or PUT requests, at least one of the 'target-prefix', 1883 'target-fqdn', or 'target-uri' attributes MUST be present. DOTS 1884 agents can safely ignore Vendor-Specific parameters they don't 1885 understand. 1887 Figure 17 shows a POST request to create an alias called "https1" for 1888 HTTPS servers with IP addresses 2001:db8:6401::1 and 2001:db8:6401::2 1889 listening on port number 443. 1891 POST /restconf/data/ietf-dots-data-channel:dots-data\ 1892 /dots-client=dz6pHjaADkaFTbjr0JGBpw HTTP/1.1 1893 Host: www.example.com 1894 Content-Type: application/yang-data+json 1895 { 1896 "ietf-dots-data-channel:aliases": { 1897 "alias": [ 1898 { 1899 "name": "https1", 1900 "target-protocol": [ 1901 6 1902 ], 1903 "target-prefix": [ 1904 "2001:db8:6401::1/128", 1905 "2001:db8:6401::2/128" 1906 ], 1907 "target-port-range": [ 1908 { 1909 "lower-port": 443 1910 } 1911 ] 1912 } 1913 ] 1914 } 1915 } 1917 Figure 17: Example of a POST to Create an Alias 1919 "201 Created" status-line MUST be returned in the response if the 1920 DOTS server has accepted the alias. 1922 "409 Conflict" status-line MUST be returned to the requesting DOTS 1923 client, if the request is conflicting with an existing alias name. 1924 The error-tag "resource-denied" is used in this case. 1926 If the request is missing a mandatory attribute or its contains an 1927 invalid or unknown parameter, "400 Bad Request" status-line MUST be 1928 returned by the DOTS server. The error-tag is set to "missing- 1929 attribute", "invalid-value", or "unknown-element" as a function of 1930 the encountered error. 1932 If the request is received via a server-domain DOTS gateway, but the 1933 DOTS server does not maintain a 'cdid' for this 'cuid' while a 'cdid' 1934 is expected to be supplied, the DOTS server MUST reply with "403 1935 Forbidden" status-line and the error-tag "access-denied". Upon 1936 receipt of this message, the DOTS client MUST register (Section 5). 1938 A DOTS client uses the PUT request to modify the aliases in the DOTS 1939 server. In particular, a DOTS client MUST update its alias entries 1940 upon change of the prefix indicated in the 'target-prefix'. 1942 A DOTS server MUST maintain an alias for at least 10080 minutes (1 1943 week). If no refresh request is seen from the DOTS client, the DOTS 1944 server removes expired entries. 1946 6.2. Retrieve Installed Aliases 1948 GET request is used to retrieve one or all installed aliases by a 1949 DOTS client from a DOTS server (Section 3.3.1 in [RFC8040]). If no 1950 'name' is included in the request, this is an indication that the 1951 request is about retrieving all aliases instantiated by the DOTS 1952 client. 1954 Figure 18 shows an example to retrieve all the aliases that were 1955 instantiated by the requesting DOTS client. The 'content' parameter 1956 and its permitted values are defined in Section 4.8.1 of [RFC8040]. 1958 GET /restconf/data/ietf-dots-data-channel:dots-data\ 1959 /dots-client=dz6pHjaADkaFTbjr0JGBpw\ 1960 /aliases?content=all HTTP/1.1 1961 Host: {host}:{port} 1962 Accept: application/yang-data+json 1964 Figure 18: GET to Retrieve All Installed Aliases 1966 Figure 19 shows an example of the response message body that includes 1967 all the aliases that are maintained by the DOTS server for the DOTS 1968 client identified by the 'cuid' parameter. 1970 { 1971 "ietf-dots-data-channel:aliases": { 1972 "alias": [ 1973 { 1974 "name": "Server1", 1975 "target-protocol": [ 1976 6 1977 ], 1978 "target-prefix": [ 1979 "2001:db8:6401::1/128", 1980 "2001:db8:6401::2/128" 1981 ], 1982 "target-port-range": [ 1983 { 1984 "lower-port": 443 1985 } 1986 ], 1987 "pending-lifetime": 3596 1988 }, 1989 { 1990 "name": "Server2", 1991 "target-protocol": [ 1992 6 1993 ], 1994 "target-prefix": [ 1995 "2001:db8:6401::10/128", 1996 "2001:db8:6401::20/128" 1997 ], 1998 "target-port-range": [ 1999 { 2000 "lower-port": 80 2001 } 2002 ], 2003 "pending-lifetime": 9869 2004 } 2005 ] 2006 } 2007 } 2009 Figure 19: An Example of Response Body 2011 Figure 20 shows an example of a GET request to retrieve the alias 2012 "Server2" that was instantiated by the DOTS client. 2014 GET /restconf/data/ietf-dots-data-channel:dots-data\ 2015 /dots-client=dz6pHjaADkaFTbjr0JGBpw\ 2016 /aliases/alias=Server2?content=all HTTP/1.1 2017 Host: {host}:{port} 2018 Accept: application/yang-data+json 2020 Figure 20: GET to Retrieve an Alias 2022 If an alias name ('name') is included in the request, but the DOTS 2023 server does not find that alias name for this DOTS client in its 2024 configuration data, it MUST respond with a "404 Not Found" status- 2025 line. 2027 6.3. Delete Aliases 2029 DELETE request is used to delete an alias maintained by a DOTS 2030 server. 2032 If the DOTS server does not find the alias name, conveyed in the 2033 DELETE request, in its configuration data for this DOTS client, it 2034 MUST respond with a "404 Not Found" status-line. 2036 The DOTS server successfully acknowledges a DOTS client's request to 2037 remove the alias using "204 No Content" status-line in the response. 2039 Figure 21 shows an example of a request to delete an alias. 2041 DELETE /restconf/data/ietf-dots-data-channel:dots-data\ 2042 /dots-client=dz6pHjaADkaFTbjr0JGBpw\ 2043 /aliases/alias=Server1 HTTP/1.1 2044 Host: {host}:{port} 2046 Figure 21: Delete an Alias 2048 7. Managing DOTS Filtering Rules 2050 The following sub-sections define means for a DOTS client to retrieve 2051 DOTS filtering capabilities (Section 7.1), create filtering rules 2052 (Section 7.2), retrieve active filtering rules (Section 7.3), and 2053 delete a filtering rule (Section 7.4). 2055 7.1. Retrieve DOTS Filtering Capabilities 2057 A DOTS client MAY send a GET request to retrieve the filtering 2058 capabilities supported by a DOTS server. Figure 22 shows an example 2059 of such request. 2061 GET /restconf/data/ietf-dots-data-channel:dots-data\ 2062 /capabilities HTTP/1.1 2063 Host: {host}:{port} 2064 Accept: application/yang-data+json 2066 Figure 22: GET to Retrieve the Capabilities of a DOTS Server 2068 A DOTS client which issued a GET request to retrieve the filtering 2069 capabilities supported by its DOTS server, SHOULD NOT request for 2070 filtering actions that are not supported by that DOTS server. 2072 Figure 23 shows an example of a response received from a DOTS server 2073 which only supports the mandatory filtering criteria listed in 2074 Section 4.1. 2076 Content-Type: application/yang-data+json 2077 { 2078 "ietf-dots-data-channel:capabilities": { 2079 "address-family": ["ipv4", "ipv6"], 2080 "forwarding-actions": ["drop", "accept"], 2081 "rate-limit": true, 2082 "transport-protocols": [1, 6, 17, 58], 2083 "ipv4": { 2084 "length": true, 2085 "protocol": true, 2086 "destination-prefix": true, 2087 "source-prefix": true, 2088 "fragment": true 2089 }, 2090 "ipv6": { 2091 "length": true, 2092 "protocol": true, 2093 "destination-prefix": true, 2094 "source-prefix": true, 2095 "fragment": true 2096 }, 2097 "tcp": { 2098 "flags-bitmask": true, 2099 "source-port": true, 2100 "destination-port": true, 2101 "port-range": true 2102 }, 2103 "udp": { 2104 "length": true, 2105 "source-port": true, 2106 "destination-port": true, 2107 "port-range": true 2108 }, 2109 "icmp": { 2110 "type": true, 2111 "code": true 2112 } 2113 } 2114 } 2116 Figure 23: Reply to a GET Response with Filtering Capabilities 2118 7.2. Install Filtering Rules 2120 A POST or PUT request is used by a DOTS client to communicate 2121 filtering rules to a DOTS server. 2123 Figure 24 shows a POST request example to block traffic from 2124 192.0.2.0/24 and destined to 198.51.100.0/24. Other examples are 2125 discussed in Appendix A. 2127 POST /restconf/data/ietf-dots-data-channel:dots-data\ 2128 /dots-client=dz6pHjaADkaFTbjr0JGBpw HTTP/1.1 2129 Host: {host}:{port} 2130 Content-Type: application/yang-data+json 2131 { 2132 "ietf-dots-data-channel:acls": { 2133 "acl": [ 2134 { 2135 "name": "sample-ipv4-acl", 2136 "type": "ipv4-acl-type", 2137 "activation-type": "activate-when-mitigating", 2138 "aces": { 2139 "ace": [ 2140 { 2141 "name": "rule1", 2142 "matches": { 2143 "ipv4": { 2144 "destination-ipv4-network": "198.51.100.0/24", 2145 "source-ipv4-network": "192.0.2.0/24" 2146 } 2147 }, 2148 "actions": { 2149 "forwarding": "drop" 2150 } 2151 } 2152 ] 2153 } 2154 } 2155 ] 2156 } 2157 } 2159 Figure 24: POST to Install Filtering Rules 2161 The meaning of these parameters is as follows: 2163 name: The name of the access list. 2165 This is a mandatory attribute. 2167 type: Indicates the primary intended type of match criteria (e.g., 2168 IPv4, IPv6). It is set to 'ipv4-acl-type' in this example. 2170 This is an optional attribute. 2172 activation-type: Indicates whether an ACL has to be installed 2173 immediately or during mitigation time. If this attribute is not 2174 provided, the DOTS server MUST use 'activate-when-mitigating' as 2175 default value. Filters that are activated only when a mitigation 2176 is in progress MUST be bound to the DOTS client which created the 2177 filtering rule. 2179 This is an optional attribute. 2181 matches: Define criteria used to identify a flow on which to apply 2182 the rule. It can be "l3" (IPv4, IPv6) or "l4" (TCP, UDP, ..). 2183 The detailed match parameters are specified in Section 4. 2185 In this example, an IPv4 matching criteria is used. 2187 This is an optional attribute. 2189 destination-ipv4-network: The destination IPv4 prefix. DOTS servers 2190 MUST validate that these prefixes are within the scope of the DOTS 2191 client's domain. Other validation checks may be supported by DOTS 2192 servers. If this attribute is not provided, the DOTS server 2193 enforces the ACL on any destination IP address that belong to the 2194 DOTS client's domain. 2196 This is a mandatory attribute in requests with an 'activation- 2197 type' set to 'immediate'. 2199 source-ipv4-network: The source IPv4 prefix. 2201 This is an optional attribute. 2203 actions: Actions in the forwarding ACL category can be "drop" or 2204 "accept". The "accept" action is used to white-list traffic. The 2205 "drop" action is used to black-list traffic. 2207 Accepted traffic may be subject to "rate-limit"; the allowed 2208 traffic rate is represented in bytes per second indicated in IEEE 2209 floating point format [IEEE.754.1985]. 2211 This is a mandatory attribute. 2213 The DOTS server indicates the result of processing the POST request 2214 using the status-line header. Concretely, "201 Created" status-line 2215 MUST be returned in the response if the DOTS server has accepted the 2216 filtering rules. If the request is missing a mandatory attribute or 2217 contains an invalid or unknown parameter (e.g., a match field not 2218 supported by the DOTS server), "400 Bad Request" status-line MUST be 2219 returned by the DOTS server in the response. The error-tag is set to 2220 "missing-attribute", "invalid-value", or "unknown-element" as a 2221 function of the encountered error. 2223 If the request is received via a server-domain DOTS gateway, but the 2224 DOTS server does not maintain a 'cdid' for this 'cuid' while a 'cdid' 2225 is expected to be supplied, the DOTS server MUST reply with "403 2226 Forbidden" status-line and the error-tag "access-denied". Upon 2227 receipt of this message, the DOTS client MUST register (Figure 11). 2229 If the request is conflicting with an existing filtering installed by 2230 another DOTS client of the domain, the DOTS server returns "409 2231 Conflict" status-line to the requesting DOTS client. The error-tag 2232 "resource-denied" is used in this case. 2234 The "insert" query parameter (Section 4.8.5 of [RFC8040]) MAY be used 2235 to specify how an access control entry is inserted within an ACL and 2236 how an ACL is inserted within an ACL set. 2238 The DOTS client uses the PUT request to modify its filtering rules 2239 maintained by the DOTS server. In particular, a DOTS client MUST 2240 update its filtering entries upon change of the destination-prefix. 2241 How such change is detected is out of scope. 2243 A DOTS server MUST maintain a filtering rule for at least 10080 2244 minutes (1 week). If no refresh request is seen from the DOTS 2245 client, the DOTS server removes expired entries. Typically, a 2246 refresh request is a PUT request which echoes the content of a 2247 response to a GET request with all of the read-only parameters 2248 stripped out (e.g. pending-lifetime). 2250 7.3. Retrieve Installed Filtering Rules 2252 The DOTS client periodically queries the DOTS server to check the 2253 counters for installed filtering rules. GET request is used to 2254 retrieve filtering rules from a DOTS server. In order to indicate 2255 which type of data is requested in a GET request, the DOTS client 2256 sets adequately the 'content' parameter. 2258 If the DOTS server does not find the access list name conveyed in the 2259 GET request in its configuration data for this DOTS client, it 2260 responds with a "404 Not Found" status-line. 2262 In order to illustrate the intended behavior, consider the example 2263 depicted in Figure 25. In reference to this example, the DOTS client 2264 requests the creation of an immediate ACL called "test-acl-ipv6-udp". 2266 PUT /restconf/data/ietf-dots-data-channel:dots-data\ 2267 /dots-client=paL8p4Zqo4SLv64TLPXrxA/acls\ 2268 /acl=test-acl-ipv6-udp HTTP/1.1 2269 Host: {host}:{port} 2270 Content-Type: application/yang-data+json 2271 { 2272 "ietf-dots-data-channel:acls": { 2273 "acl": [ 2274 { 2275 "name": "test-acl-ipv6-udp", 2276 "type": "ipv6-acl-type", 2277 "activation-type": "immediate", 2278 "aces": { 2279 "ace": [ 2280 { 2281 "name": "test-ace-ipv6-udp", 2282 "matches": { 2283 "ipv6": { 2284 "destination-ipv6-network": "2001:db8:6401::2/127", 2285 "source-ipv6-network": "2001:db8:1234::/96", 2286 "protocol": 17, 2287 "flow-label": 10000 2288 }, 2289 "udp": { 2290 "source-port": { 2291 "operator": "lte", 2292 "port": 80 2293 }, 2294 "destination-port": { 2295 "operator": "neq", 2296 "port": 1010 2297 } 2298 } 2299 }, 2300 "actions": { 2301 "forwarding": "accept" 2302 } 2303 } 2304 ] 2305 } 2306 } 2307 ] 2308 } 2309 } 2311 Figure 25: Example of a PUT Request to Create a Filtering 2313 The peer DOTS server follows the procedure specified in Section 7.2 2314 to process the request. We consider in the following that a positive 2315 response is sent back to the requesting DOTS client to confirm that 2316 the "test-acl-ipv6-udp" ACL is successfully installed by the DOTS 2317 server. 2319 The DOTS client can issue a GET request to retrieve all its filtering 2320 rules and the number of matches for the installed filtering rules as 2321 illustrated in Figure 26. 'content' parameter is set to 'all'. The 2322 message body of the response to this GET request is shown in 2323 Figure 27. 2325 GET /restconf/data/ietf-dots-data-channel:dots-data\ 2326 /dots-client=dz6pHjaADkaFTbjr0JGBpw\ 2327 /acls?content=all HTTP/1.1 2328 Host: {host}:{port} 2329 Accept: application/yang-data+json 2331 Figure 26: Retrieve the Configuration Data and State Data for the 2332 Filtering Rules: GET Request 2334 { 2335 "ietf-dots-data-channel:acls": { 2336 "acl": [ 2337 { 2338 "name": "test-acl-ipv6-udp", 2339 "type": "ipv6-acl-type", 2340 "activation-type": "immediate", 2341 "pending-lifetime":9080, 2342 "aces": { 2343 "ace": [ 2344 { 2345 "name": "test-ace-ipv6-udp", 2346 "matches": { 2347 "ipv6": { 2348 "destination-ipv6-network": "2001:db8:6401::2/127", 2349 "source-ipv6-network": "2001:db8:1234::/96", 2350 "protocol": 17, 2351 "flow-label": 10000 2352 }, 2353 "udp": { 2354 "source-port": { 2355 "operator": "lte", 2356 "port": 80 2357 }, 2358 "destination-port": { 2359 "operator": "neq", 2360 "port": 1010 2361 } 2362 } 2363 }, 2364 "actions": { 2365 "forwarding": "accept" 2366 } 2367 } 2368 ] 2369 } 2370 } 2371 ] 2372 } 2373 } 2375 Figure 27: Retrieve the Configuration Data and State Data for the 2376 Filtering Rules: Response 2378 Also, a DOTS client can issue a GET request to retrieve only 2379 configuration data related to an ACL as shown in Figure 28. It does 2380 so by setting 'content' parameter to 'config'. 2382 GET /restconf/data/ietf-dots-data-channel:dots-data\ 2383 /dots-client=paL8p4Zqo4SLv64TLPXrxA/acls\ 2384 /acl=test-acl-ipv6-udp?content=config HTTP/1.1 2385 Host: {host}:{port} 2386 Accept: application/yang-data+json 2388 Figure 28: Retrieve the Configuration Data for a Filtering Rule: GET 2389 Request 2391 A response to this GET request is shown in Figure 29. 2393 { 2394 "ietf-dots-data-channel:acls": { 2395 "acl": [ 2396 { 2397 "name": "test-acl-ipv6-udp", 2398 "type": "ipv6-acl-type", 2399 "activation-type": "immediate", 2400 "aces": { 2401 "ace": [ 2402 { 2403 "name": "test-ace-ipv6-udp", 2404 "matches": { 2405 "ipv6": { 2406 "destination-ipv6-network": "2001:db8:6401::2/127", 2407 "source-ipv6-network": "2001:db8:1234::/96", 2408 "protocol": 17, 2409 "flow-label": 10000 2410 }, 2411 "udp": { 2412 "source-port": { 2413 "operator": "lte", 2414 "port": 80 2415 }, 2416 "destination-port": { 2417 "operator": "neq", 2418 "port": 1010 2419 } 2420 } 2421 }, 2422 "actions": { 2423 "forwarding": "accept" 2424 } 2425 } 2426 ] 2427 } 2428 } 2429 ] 2430 } 2431 } 2433 Figure 29: Retrieve the Configuration Data for a Filtering Rule: 2434 Response 2436 A DOTS client can also issue a GET request with 'content' parameter 2437 to 'non-config' to exclusively retrieve non-configuration data bound 2438 to a given ACL as shown in Figure 28. A response to this GET request 2439 is shown in Figure 31. 2441 GET /restconf/data/ietf-dots-data-channel:dots-data\ 2442 /dots-client=paL8p4Zqo4SLv64TLPXrxA/acls\ 2443 /acl=test-acl-ipv6-udp?content=non-config HTTP/1.1 2444 Host: {host}:{port} 2445 Accept: application/yang-data+json 2447 Figure 30: Retrieve the Non-Configuration Data for a Filtering Rule: 2448 GET Request 2450 { 2451 "ietf-dots-data-channel:acls": { 2452 "acl": [ 2453 { 2454 "name": "test-acl-ipv6-udp", 2455 "pending-lifetime": 8000, 2456 "aces": { 2457 "ace": [ 2458 { 2459 "name": "test-ace-ipv6-udp" 2460 } 2461 ] 2462 } 2463 } 2464 ] 2465 } 2466 } 2468 Figure 31: Retrieve the Non-Configuration Data for a Filtering Rule: 2469 GET Request 2471 7.4. Remove Filtering Rules 2473 DELETE request is used by a DOTS client to delete filtering rules 2474 from a DOTS server. 2476 If the DOTS server does not find the access list name carried in the 2477 DELETE request in its configuration data for this DOTS client, it 2478 MUST respond with a "404 Not Found" status-line. The DOTS server 2479 successfully acknowledges a DOTS client's request to withdraw the 2480 filtering rules using "204 No Content" status-line, and removes the 2481 filtering rules accordingly. 2483 Figure 32 shows an example of a request to remove the IPv4 ACL 2484 "sample-ipv4-acl" created in Section 7.2. 2486 DELETE /restconf/data/ietf-dots-data-channel:dots-data\ 2487 /dots-client=dz6pHjaADkaFTbjr0JGBpw/acls\ 2488 /acl=sample-ipv4-acl HTTP/1.1 2489 Host: {host}:{port} 2491 Figure 32: Remove a Filtering Rule: DELETE Request 2493 Figure 33 shows an example of a response received from the server to 2494 confirm the deletion of "sample-ipv4-acl". 2496 HTTP/1.1 204 No Content 2497 Server: Apache 2498 Date: Fri, 27 Jul 2018 10:05:15 GMT 2499 Cache-Control: no-cache 2500 Content-Type: application/yang-data+json 2501 Content-Length: 0 2502 Connection: Keep-Alive 2504 Figure 33: Remove a Filtering Rule: Response 2506 8. IANA Considerations 2508 This document requests IANA to register the following URI in the 2509 "IETF XML Registry" [RFC3688]: 2511 URI: urn:ietf:params:xml:ns:yang:ietf-dots-data-channel 2512 Registrant Contact: The IESG. 2513 XML: N/A; the requested URI is an XML namespace. 2515 This document requests IANA to register the following YANG module in 2516 the "YANG Module Names" registry [RFC7950]. 2518 name: ietf-dots-data-channel 2519 namespace: urn:ietf:params:xml:ns:yang:ietf-dots-data-channel 2520 prefix: data-channel 2521 reference: RFC XXXX 2523 9. Security Considerations 2525 RESTCONF security considerations are discussed in [RFC8040]. In 2526 particular, DOTS agents MUST follow the security recommendations in 2527 Sections 2 and 12 of [RFC8040]. Also, DOTS agents MUST support the 2528 mutual authentication TLS profile discussed in Sections 7.1 and 8 of 2529 [I-D.ietf-dots-signal-channel]. YANG ACL-specific security 2530 considerations are discussed in [I-D.ietf-netmod-acl-model]. 2532 Authenticated encryption MUST be used for data confidentiality and 2533 message integrity. The interaction between the DOTS agents requires 2534 Transport Layer Security (TLS) with a cipher suite offering 2535 confidentiality protection and the guidance given in [RFC7525] MUST 2536 be followed to avoid attacks on TLS. 2538 The installation of black-list and white-list rules using RESTCONF 2539 over TLS reveal the attacker IP addresses and legitimate IP addresses 2540 only to the DOTS server trusted by the DOTS client. The secure 2541 communication channel between DOTS agents provides privacy and 2542 prevents a network eavesdropper from gaining access to the black- 2543 listed and white-listed IP addresses. 2545 An attacker may be able to inject RST packets, bogus application 2546 segments, etc., regardless of whether TLS authentication is used. 2547 Because the application data is TLS protected, this will not result 2548 in the application receiving bogus data, but it will constitute a DoS 2549 on the connection. This attack can be countered by using TCP-AO 2550 [RFC5925]. If TCP-AO is used, then any bogus packets injected by an 2551 attacker will be rejected by the TCP-AO integrity check and therefore 2552 will never reach the TLS layer. 2554 In order to prevent leaking internal information outside a client- 2555 domain, client-side DOTS gateways SHOULD NOT reveal the identity of 2556 internal DOTS clients (e.g., source IP address, client's hostname) 2557 unless explicitly configured to do so. 2559 DOTS servers MUST verify that requesting DOTS clients are entitled to 2560 enforce filtering rules on a given IP prefix. That is, only 2561 filtering rules on IP resources that belong to the DOTS client's 2562 domain MUST be authorized by a DOTS server. The exact mechanism for 2563 the DOTS servers to validate that the target prefixes are within the 2564 scope of the DOTS client's domain is deployment-specific. 2566 Rate-limiting DOTS requests, including those with new 'cuid' values, 2567 from the same DOTS client defends against DoS attacks that would 2568 result in varying the 'cuid' to exhaust DOTS server resources. Rate- 2569 limit policies SHOULD be enforced on DOTS gateways (if deployed) and 2570 DOTS servers. 2572 Applying resources quota per DOTS client and/or per DOTS client 2573 domain (e.g., limit the number of aliases and filters to be install 2574 by DOTS clients) prevents DOTS server resources to be aggressively 2575 used by some DOTS clients and ensures, therefore, DDoS mitigation 2576 usage fairness. Additionally, DOTS servers may limit the number of 2577 DOTS clients that can be enabled per domain. 2579 The presence of DOTS gateways may lead to infinite forwarding loops, 2580 which is undesirable. To prevent and detect such loops, a mechanism 2581 is defined in Section 3.5. 2583 All data nodes defined in the YANG module which can be created, 2584 modified, and deleted (i.e., config true, which is the default) are 2585 considered sensitive. Write operations applied to these data nodes 2586 without proper protection can negatively affect network operations. 2587 Appropriate security measures are recommended to prevent illegitimate 2588 users from invoking DOTS data channel primitives. Nevertheless, an 2589 attacker who can access a DOTS client is technically capable of 2590 launching various attacks, such as: 2592 o Set an arbitrarily low rate-limit, which may prevent legitimate 2593 traffic from being forwarded (rate-limit). 2595 o Set an arbitrarily high rate-limit, which may lead to the 2596 forwarding of illegitimate DDoS traffic (rate-limit). 2598 o Communicate invalid aliases to the server (alias), which will 2599 cause the failure of associating both data and signal channels. 2601 o Set invalid ACL entries, which may prevent legitimate traffic from 2602 being forwarded. Likewise, invalid ACL entries may lead to 2603 forward DDoS traffic. 2605 10. Contributors 2607 The following individuals have contributed to this document: 2609 o Dan Wing, Email: dwing-ietf@fuggles.com 2611 o Jon Shallow, NCC Group, Email: jon.shallow@nccgroup.trust 2613 11. Acknowledgements 2615 Thanks to Christian Jacquenet, Roland Dobbins, Roman Danyliw, Ehud 2616 Doron, Russ White, Gilbert Clark, Kathleen Moriarty and Nesredien 2617 Suleiman for the discussion and comments. 2619 12. References 2621 12.1. Normative References 2623 [I-D.ietf-dots-signal-channel] 2624 Reddy, T., Boucadair, M., Patil, P., Mortensen, A., and N. 2625 Teague, "Distributed Denial-of-Service Open Threat 2626 Signaling (DOTS) Signal Channel Specification", draft- 2627 ietf-dots-signal-channel-24 (work in progress), August 2628 2018. 2630 [I-D.ietf-netmod-acl-model] 2631 Jethanandani, M., Huang, L., Agarwal, S., and D. Blair, 2632 "Network Access Control List (ACL) YANG Data Model", 2633 draft-ietf-netmod-acl-model-19 (work in progress), April 2634 2018. 2636 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2637 Requirement Levels", BCP 14, RFC 2119, 2638 DOI 10.17487/RFC2119, March 1997, 2639 . 2641 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 2642 DOI 10.17487/RFC3688, January 2004, 2643 . 2645 [RFC4632] Fuller, V. and T. Li, "Classless Inter-domain Routing 2646 (CIDR): The Internet Address Assignment and Aggregation 2647 Plan", BCP 122, RFC 4632, DOI 10.17487/RFC4632, August 2648 2006, . 2650 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 2651 (TLS) Protocol Version 1.2", RFC 5246, 2652 DOI 10.17487/RFC5246, August 2008, 2653 . 2655 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 2656 Protocol (HTTP/1.1): Message Syntax and Routing", 2657 RFC 7230, DOI 10.17487/RFC7230, June 2014, 2658 . 2660 [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, 2661 "Recommendations for Secure Use of Transport Layer 2662 Security (TLS) and Datagram Transport Layer Security 2663 (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May 2664 2015, . 2666 [RFC7951] Lhotka, L., "JSON Encoding of Data Modeled with YANG", 2667 RFC 7951, DOI 10.17487/RFC7951, August 2016, 2668 . 2670 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 2671 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 2672 . 2674 12.2. Informative References 2676 [I-D.ietf-dots-architecture] 2677 Mortensen, A., Andreasen, F., Reddy, T., 2678 christopher_gray3@cable.comcast.com, c., Compton, R., and 2679 N. Teague, "Distributed-Denial-of-Service Open Threat 2680 Signaling (DOTS) Architecture", draft-ietf-dots- 2681 architecture-06 (work in progress), March 2018. 2683 [I-D.ietf-dots-requirements] 2684 Mortensen, A., Moskowitz, R., and T. Reddy, "Distributed 2685 Denial of Service (DDoS) Open Threat Signaling 2686 Requirements", draft-ietf-dots-requirements-15 (work in 2687 progress), August 2018. 2689 [IEEE.754.1985] 2690 Institute of Electrical and Electronics Engineers, 2691 "Standard for Binary Floating-Point Arithmetic", August 2692 1985. 2694 [proto_numbers] 2695 "IANA, "Protocol Numbers"", 2011, 2696 . 2698 [RFC1983] Malkin, G., Ed., "Internet Users' Glossary", FYI 18, 2699 RFC 1983, DOI 10.17487/RFC1983, August 1996, 2700 . 2702 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 2703 Resource Identifier (URI): Generic Syntax", STD 66, 2704 RFC 3986, DOI 10.17487/RFC3986, January 2005, 2705 . 2707 [RFC4340] Kohler, E., Handley, M., and S. Floyd, "Datagram 2708 Congestion Control Protocol (DCCP)", RFC 4340, 2709 DOI 10.17487/RFC4340, March 2006, 2710 . 2712 [RFC4960] Stewart, R., Ed., "Stream Control Transmission Protocol", 2713 RFC 4960, DOI 10.17487/RFC4960, September 2007, 2714 . 2716 [RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, 2717 "Session Traversal Utilities for NAT (STUN)", RFC 5389, 2718 DOI 10.17487/RFC5389, October 2008, 2719 . 2721 [RFC5925] Touch, J., Mankin, A., and R. Bonica, "The TCP 2722 Authentication Option", RFC 5925, DOI 10.17487/RFC5925, 2723 June 2010, . 2725 [RFC6520] Seggelmann, R., Tuexen, M., and M. Williams, "Transport 2726 Layer Security (TLS) and Datagram Transport Layer Security 2727 (DTLS) Heartbeat Extension", RFC 6520, 2728 DOI 10.17487/RFC6520, February 2012, 2729 . 2731 [RFC6887] Wing, D., Ed., Cheshire, S., Boucadair, M., Penno, R., and 2732 P. Selkirk, "Port Control Protocol (PCP)", RFC 6887, 2733 DOI 10.17487/RFC6887, April 2013, 2734 . 2736 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 2737 RFC 7950, DOI 10.17487/RFC7950, August 2016, 2738 . 2740 [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 2741 Interchange Format", STD 90, RFC 8259, 2742 DOI 10.17487/RFC8259, December 2017, 2743 . 2745 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", 2746 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, 2747 . 2749 Appendix A. Sample Examples: Filtering Fragments 2751 This specification strongly recommends the use of "fragment" for 2752 handling fragments. 2754 Figure 34 shows the content of the POST request to be issued by a 2755 DOTS client to its DOTS server to allow the traffic destined to 2756 198.51.100.0/24 and UDP port number 53, but to drop all fragmented 2757 packets. The following ACEs are defined (in this order): 2759 o "drop-all-fragments" ACE: discards all fragments. 2761 o "allow-dns-packets" ACE: accepts DNS packets destined to 2762 198.51.100.0/24. 2764 POST /restconf/data/ietf-dots-data-channel:dots-data\ 2765 /dots-client=dz6pHjaADkaFTbjr0JGBpw HTTP/1.1 2766 Host: {host}:{port} 2767 Content-Type: application/yang-data+json 2768 { 2769 "ietf-dots-data-channel:acls": { 2770 "acl": [ 2771 { 2772 "name": "dns-fragments", 2773 "type": "ipv4-acl-type", 2774 "aces": { 2775 "ace": [ 2776 { 2777 "name": "drop-all-fragments", 2778 "matches": { 2779 "ipv4": { 2780 "fragment": { 2781 "operator": "match", 2782 "type": "isf" 2783 } 2784 } 2785 }, 2786 "actions": { 2787 "forwarding": "drop" 2788 } 2789 } 2790 ] 2791 "ace": [ 2792 { 2793 "name": "allow-dns-packets", 2794 "matches": { 2795 "ipv4": { 2796 "destination-ipv4-network": "198.51.100.0/24" 2797 } 2798 "udp": { 2799 "destination-port": { 2800 "operator": "eq", 2801 "port": 53 2802 } 2803 }, 2804 "actions": { 2805 "forwarding": "accept" 2806 } 2807 } 2808 ] 2809 } 2810 } 2811 ] 2812 } 2813 } 2815 Figure 34: Filtering IPv4 Fragmented Packets (Recommended) 2817 Figure 35 shows a POST request example issued by a DOTS client to its 2818 DOTS server to allow the traffic destined to 2001:db8::/32 and UDP 2819 port number 53, but to drop all fragmented packets. The following 2820 ACEs are defined (in this order): 2822 o "drop-all-fragments" ACE: discards all fragments (including atomic 2823 fragments). That is, IPv6 packets which include a Fragment header 2824 (44) are dropped. 2826 o "allow-dns-packets" ACE: accepts DNS packets destined to 2827 2001:db8::/32. 2829 POST /restconf/data/ietf-dots-data-channel:dots-data\ 2830 /dots-client=dz6pHjaADkaFTbjr0JGBpw HTTP/1.1 2831 Host: {host}:{port} 2832 Content-Type: application/yang-data+json 2833 { 2834 "ietf-dots-data-channel:acls": { 2835 "acl": [ 2836 { 2837 "name": "dns-fragments", 2838 "type": "ipv6-acl-type", 2839 "aces": { 2840 "ace": [ 2841 { 2842 "name": "drop-all-fragments", 2843 "matches": { 2844 "ipv6": { 2845 "fragment": { 2846 "operator": "match", 2847 "type": "isf" 2848 } 2849 } 2850 }, 2851 "actions": { 2852 "forwarding": "drop" 2853 } 2854 } 2855 ] 2856 "ace": [ 2857 { 2858 "name": "allow-dns-packets", 2859 "matches": { 2860 "ipv6": { 2861 "destination-ipv6-network": "2001:db8::/32" 2862 } 2863 "udp": { 2864 "destination-port": { 2865 "operator": "eq", 2866 "port": 53 2867 } 2868 } 2869 }, 2870 "actions": { 2871 "forwarding": "accept" 2872 } 2873 } 2874 ] 2875 } 2876 } 2877 ] 2878 } 2879 } 2881 Figure 35: Filtering IPv6 Fragmented Packets 2883 Authors' Addresses 2885 Mohamed Boucadair (editor) 2886 Orange 2887 Rennes 35000 2888 France 2890 Email: mohamed.boucadair@orange.com 2892 Tirumaleswar Reddy (editor) 2893 McAfee, Inc. 2894 Embassy Golf Link Business Park 2895 Bangalore, Karnataka 560071 2896 India 2898 Email: kondtir@gmail.com 2900 Kaname Nishizuka 2901 NTT Communications 2902 GranPark 16F 3-4-1 Shibaura, Minato-ku 2903 Tokyo 108-8118 2904 Japan 2906 Email: kaname@nttv6.jp 2907 Liang Xia 2908 Huawei 2909 101 Software Avenue, Yuhuatai District 2910 Nanjing, Jiangsu 210012 2911 China 2913 Email: frank.xialiang@huawei.com 2915 Prashanth Patil 2916 Cisco Systems, Inc. 2918 Email: praspati@cisco.com 2920 Andrew Mortensen 2921 Arbor Networks, Inc. 2922 2727 S. State St 2923 Ann Arbor, MI 48104 2924 United States 2926 Email: amortensen@arbor.net 2928 Nik Teague 2929 Verisign, Inc. 2930 United States 2932 Email: nteague@verisign.com