idnits 2.17.1 draft-ietf-dhc-dhcpv6-yang-08.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 117 instances of weird spacing in the document. Is it really formatted ragged-right, rather than justified? ** There are 327 instances of too long lines in the document, the longest one being 96 characters in excess of 72. ** The abstract seems to contain references ([RFC6020]), 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 177 has weird spacing: '...ent-num uin...' == Line 185 has weird spacing: '...in-name str...' == Line 189 has weird spacing: '...rv-addr ine...' == Line 193 has weird spacing: '...rv-addr ine...' == Line 197 has weird spacing: '...t-entry str...' == (112 more instances...) -- The document date (March 9, 2019) is 1872 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: 'RFC6087' is defined on line 4780, but no explicit reference was found in the text ** Obsolete normative reference: RFC 3315 (Obsoleted by RFC 8415) ** Obsolete normative reference: RFC 3633 (Obsoleted by RFC 8415) ** Obsolete normative reference: RFC 6087 (Obsoleted by RFC 8407) ** Obsolete normative reference: RFC 7223 (Obsoleted by RFC 8343) -- Obsolete informational reference (is this intentional?): RFC 4242 (Obsoleted by RFC 8415) -- Obsolete informational reference (is this intentional?): RFC 7083 (Obsoleted by RFC 8415) Summary: 7 errors (**), 0 flaws (~~), 8 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 DHC Working Group Y. Cui 3 Internet-Draft L. Sun 4 Intended status: Standards Track Tsinghua University 5 Expires: September 10, 2019 I. Farrer 6 S. Zechlin 7 Deutsche Telekom AG 8 Z. He 9 Tsinghua University 10 March 9, 2019 12 YANG Data Model for DHCPv6 Configuration 13 draft-ietf-dhc-dhcpv6-yang-08 15 Abstract 17 This document describes a YANG data model [RFC6020] for the 18 configuration and management of DHCPv6 servers, relays, and clients. 20 Requirements Language 22 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 23 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 24 document are to be interpreted as described in [RFC2119]. 26 Status of This Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at https://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on September 10, 2019. 43 Copyright Notice 45 Copyright (c) 2019 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (https://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 Table of Contents 60 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 61 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 62 2. DHCPv6 Tree Diagram . . . . . . . . . . . . . . . . . . . . . 3 63 2.1. DHCPv6 Server Tree Diagrams . . . . . . . . . . . . . . . 3 64 2.2. DHCPv6 Relay Tree Diagrams . . . . . . . . . . . . . . . 16 65 2.3. DHCPv6 Client Tree Diagrams . . . . . . . . . . . . . . . 20 66 3. DHCPv6 YANG Model . . . . . . . . . . . . . . . . . . . . . . 27 67 3.1. DHCPv6 Server YANG Model . . . . . . . . . . . . . . . . 27 68 3.2. DHCPv6 Relay YANG Model . . . . . . . . . . . . . . . . . 47 69 3.3. DHCPv6 Client YANG Model . . . . . . . . . . . . . . . . 57 70 3.4. DHCPv6 Options YANG Model . . . . . . . . . . . . . . . . 65 71 3.5. DHCPv6 Types YANG Model . . . . . . . . . . . . . . . . . 94 72 4. Security Considerations (TBD) . . . . . . . . . . . . . . . . 99 73 5. IANA Considerations (TBD) . . . . . . . . . . . . . . . . . . 99 74 6. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 99 75 7. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 99 76 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 100 77 8.1. Normative References . . . . . . . . . . . . . . . . . . 100 78 8.2. Informative References . . . . . . . . . . . . . . . . . 100 79 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 102 81 1. Introduction 83 DHCPv6 [RFC3315] is widely used for supplying configuration and other 84 relevant parameters to clients in IPv6 networks. This document 85 defines a DHCPv6 YANG data model, containing sub-modules for the 86 configuration and management of DHCPv6 servers, relays and clients. 87 A single YANG model covering all of these elements provides an 88 operator with a common interface for the management of the entire 89 DHCPv6 deployment in their network. 91 Since the publication of the original DHCPv6 specification, there 92 have been a large number of additional documents that update the 93 protocol's operation, add new functions and define new options. The 94 YANG model described in this document incorporates all relevant 95 changes. A full list of the documents which have been considered in 96 the development of this model is included in Appendix A. 98 IF - Comment - Does anyone have this list? 100 It is worth noting that as DHCPv6 is itself a device configuration 101 protocol, it is not the intention of this document to replace the 102 configuration of DHCPv6 options and parameters using the DHCPv6 103 protocol with the configuration of DHCPv6 options using NETCONF/YANG. 104 The DHCPv6 client model is intended for the configuration of the 105 DHCPv6 client function and also for obtaining read-only state data 106 from the client which has been learned via the normal DHCPv6 message 107 flow. This gives an operator a better method for managing DHCPv6 108 clients and simplifies troubleshooting. 110 1.1. Terminology 112 The reader should be familiar with the terms defined in DHCPv6 113 [RFC3315] and other relevant documents. 115 The DHCPv6 tree diagrams provide a concise representation of a YANG 116 module to help the reader understand the module structure. 118 A simplified graphical representation of the data model is provided 119 in this document. For a description of the symbols in these 120 diagrams, please refer to [I-D.ietf-netmod-yang-tree-diagrams]. 122 2. DHCPv6 Tree Diagram 124 2.1. DHCPv6 Server Tree Diagrams 126 module: ietf-dhcpv6-server 127 +--rw server! 128 +--rw server-config 129 | +--rw serv-attributes 130 | | +--rw duid 131 | | | +--rw type-code? uint16 132 | | | +--rw (duid-type)? 133 | | | +--:(duid-llt) 134 | | | | +--rw duid-llt-hardware-type? uint16 135 | | | | +--rw duid-llt-time? yang:timeticks 136 | | | | +--rw duid-llt-link-layer-addr? yang:mac-address 137 | | | +--:(duid-en) 138 | | | | +--rw duid-en-enterprise-number? uint32 139 | | | | +--rw duid-en-identifier? string 140 | | | +--:(duid-ll) 141 | | | | +--rw duid-ll-hardware-type? uint16 142 | | | | +--rw duid-ll-link-layer-addr? yang:mac-address 143 | | | +--:(duid-uuid) 144 | | | | +--rw uuid? yang:uuid 145 | | | +--:(duid-unknown) 146 | | | +--rw data? binary 147 | | +--rw name? string 148 | | +--rw description? string 149 | | +--rw ipv6-address* inet:ipv6-address 150 | | +--rw interfaces-config* if:interface-ref 151 | | +--rw lease-storage 152 | | | +--rw (storage-type)? 153 | | | +--:(memfile) 154 | | | | +--rw memfile-name? string 155 | | | | +--rw memfile-lfc-interval? uint64 156 | | | +--:(mysql) 157 | | | | +--rw mysql-name? string 158 | | | | +--rw mysql-host? string 159 | | | | +--rw mysql-password? string 160 | | | | +--rw mysql-port? uint8 161 | | | | +--rw mysql-lfc-interval? uint64 162 | | | | +--rw mysql-connect-timeout? uint64 163 | | | +--:(postgresql) 164 | | | | +--rw postgresql-name? string 165 | | | | +--rw postgresql-host? string 166 | | | | +--rw postgresql-password? string 167 | | | | +--rw postgresql-port? uint8 168 | | | | +--rw postgresql-lfc-interval? uint64 169 | | | | +--rw postgresql-connect-timeout? uint64 170 | | | +--:(cassandra) 171 | | | +--rw cassandra-name? string 172 | | | +--rw cassandra-contact-points? string 173 | | | +--rw cassandra-password? string 174 | | | +--rw cassandra-lfc-interval? uint64 175 | | | +--rw cassandra-connect-timeout? uint64 176 | | +--rw vendor-info 177 | | +--rw ent-num uint32 178 | | +--rw data* string 179 | +--rw option-sets 180 | | +--rw option-set* [option-set-id] 181 | | +--rw option-set-id uint32 182 | | +--rw server-unicast-option! {server-unicast-op}? 183 | | | +--rw server-address? inet:ipv6-address 184 | | +--rw sip-server-domain-name-list-option! {sip-server-domain-name-list-op}? 185 | | | +--rw sip-serv-domain-name string 186 | | +--rw sip-server-address-list-option! {sip-server-address-list-op}? 187 | | | +--rw sip-server* [sip-serv-id] 188 | | | +--rw sip-serv-id uint8 189 | | | +--rw sip-serv-addr inet:ipv6-address 190 | | +--rw dns-servers-option! {dns-servers-op}? 191 | | | +--rw dns-server* [dns-serv-id] 192 | | | +--rw dns-serv-id uint8 193 | | | +--rw dns-serv-addr inet:ipv6-address 194 | | +--rw domain-searchlist-option! {domain-searchlist-op}? 195 | | | +--rw domain-searchlist* [domain-searchlist-id] 196 | | | +--rw domain-searchlist-id uint8 197 | | | +--rw domain-search-list-entry string 198 | | +--rw nis-config-option! {nis-config-op}? 199 | | | +--rw nis-server* [nis-serv-id] 200 | | | +--rw nis-serv-id uint8 201 | | | +--rw nis-serv-addr inet:ipv6-address 202 | | +--rw nis-plus-config-option! {nis-plus-config-op}? 203 | | | +--rw nis-plus-server* [nis-plus-serv-id] 204 | | | +--rw nis-plus-serv-id uint8 205 | | | +--rw nis-plus-serv-addr inet:ipv6-address 206 | | +--rw nis-domain-name-option! {nis-domain-name-op}? 207 | | | +--rw nis-domain-name? string 208 | | +--rw nis-plus-domain-name-option! {nis-plus-domain-name-op}? 209 | | | +--rw nis-plus-domain-name? string 210 | | +--rw sntp-server-option! {sntp-server-op}? 211 | | | +--rw sntp-server* [sntp-serv-id] 212 | | | +--rw sntp-serv-id uint8 213 | | | +--rw sntp-serv-addr inet:ipv6-address 214 | | +--rw info-refresh-time-option! {info-refresh-time-op}? 215 | | | +--rw info-refresh-time yang:timeticks 216 | | +--rw client-fqdn-option! {client-fqdn-op}? 217 | | | +--rw server-initiate-update boolean 218 | | | +--rw client-initiate-update boolean 219 | | | +--rw modify-name-from-cli boolean 220 | | +--rw posix-timezone-option! {posix-timezone-op}? 221 | | | +--rw tz-posix string 222 | | +--rw tzdb-timezone-option! {tzdb-timezone-op}? 223 | | | +--rw tz-database string 224 | | +--rw ntp-server-option! {ntp-server-op}? 225 | | | +--rw ntp-server* [ntp-serv-id] 226 | | | +--rw ntp-serv-id uint8 227 | | | +--rw (ntp-time-source-suboption)? 228 | | | +--:(server-address) 229 | | | | +--rw ntp-serv-addr-suboption* inet:ipv6-address 230 | | | +--:(server-multicast-address) 231 | | | | +--rw ntp-serv-mul-addr-suboption* inet:ipv6-address 232 | | | +--:(server-fqdn) 233 | | | +--rw ntp-serv-fqdn-suboption* string 234 | | +--rw boot-file-url-option! {boot-file-url-op}? 235 | | | +--rw boot-file* [boot-file-id] 236 | | | +--rw boot-file-id uint8 237 | | | +--rw suitable-arch-type* uint16 238 | | | +--rw suitable-net-if* uint32 239 | | | +--rw boot-file-url string 240 | | +--rw boot-file-param-option! {boot-file-param-op}? 241 | | | +--rw boot-file-params* [param-id] 242 | | | +--rw param-id uint8 243 | | | +--rw parameter string 244 | | +--rw aftr-name-option! {aftr-name-op}? 245 | | | +--rw tunnel-endpoint-name string 246 | | +--rw kbr-default-name-option! {kbr-default-name-op}? 247 | | | +--rw default-realm-name string 248 | | +--rw kbr-kdc-option! {kbr-kdc-op}? 249 | | | +--rw kdc-info* [kdc-id] 250 | | | +--rw kdc-id uint8 251 | | | +--rw priority uint16 252 | | | +--rw weight uint16 253 | | | +--rw transport-type uint8 254 | | | +--rw port-number uint16 255 | | | +--rw kdc-ipv6-addr inet:ipv6-address 256 | | | +--rw realm-name string 257 | | +--rw sol-max-rt-option! {sol-max-rt-op}? 258 | | | +--rw sol-max-rt-value yang:timeticks 259 | | +--rw inf-max-rt-option! {inf-max-rt-op}? 260 | | | +--rw inf-max-rt-value yang:timeticks 261 | | +--rw addr-selection-option! {addr-selection-op}? 262 | | | +--rw a-bit-set boolean 263 | | | +--rw p-bit-set boolean 264 | | | +--rw policy-table* [policy-id] 265 | | | +--rw policy-id uint8 266 | | | +--rw label uint8 267 | | | +--rw precedence uint8 268 | | | +--rw prefix-len uint8 269 | | | +--rw prefix inet:ipv6-prefix 270 | | +--rw pcp-server-option! {pcp-server-op}? 271 | | | +--rw pcp-server* [pcp-serv-id] 272 | | | +--rw pcp-serv-id uint8 273 | | | +--rw pcp-serv-addr inet:ipv6-address 274 | | +--rw s46-rule-option! {s46-rule-op}? 275 | | | +--rw s46-rule* [rule-id] 276 | | | +--rw rule-id uint8 277 | | | +--rw rule-type enumeration 278 | | | +--rw prefix4-len uint8 279 | | | +--rw ipv4-prefix inet:ipv4-prefix 280 | | | +--rw prefix6-len uint8 281 | | | +--rw ipv6-prefix inet:ipv6-prefix 282 | | | +--rw port-parameter 283 | | | +--rw offset uint8 284 | | | +--rw psid-len uint8 285 | | | +--rw psid uint16 286 | | +--rw s46-br-option! {s46-br-op}? 287 | | | +--rw br* [br-id] 288 | | | +--rw br-id uint8 289 | | | +--rw br-ipv6-addr inet:ipv6-address 290 | | +--rw s46-dmr-option! {s46-dmr-op}? 291 | | | +--rw dmr* [dmr-id] 292 | | | +--rw dmr-id uint8 293 | | | +--rw dmr-prefix-len uint8 294 | | | +--rw dmr-ipv6-prefix inet:ipv6-prefix 295 | | +--rw s46-v4-v6-binding-option! {s46-v4-v6-binding-op}? 296 | | | +--rw ce* [ce-id] 297 | | | +--rw ce-id uint8 298 | | | +--rw ipv4-addr inet:ipv4-address 299 | | | +--rw bind-prefix6-len uint8 300 | | | +--rw bind-ipv6-prefix inet:ipv6-prefix 301 | | | +--rw port-parameter 302 | | | +--rw offset uint8 303 | | | +--rw psid-len uint8 304 | | | +--rw psid uint16 305 | | +--rw operator-option-ipv6-address! {operator-op-ipv6-address}? 306 | | | +--rw operator-ipv6-addr* [operator-ipv6-addr-id] 307 | | | +--rw operator-ipv6-addr-id uint8 308 | | | +--rw operator-ipv6-addr inet:ipv6-address 309 | | +--rw operator-option-single-flag! {operator-op-single-flag}? 310 | | | +--rw flag* [flag-id] 311 | | | +--rw flag-id uint8 312 | | | +--rw flag-value boolean 313 | | +--rw operator-option-ipv6-prefix! {operator-op-ipv6-prefix}? 314 | | | +--rw operator-ipv6-prefix* [operator-ipv6-prefix-id] 315 | | | +--rw operator-ipv6-prefix-id uint8 316 | | | +--rw operator-ipv6-prefix6-len uint8 317 | | | +--rw operator-ipv6-prefix inet:ipv6-prefix 318 | | +--rw operator-option-int32! {operator-op-int32}? 319 | | | +--rw int32val* [int32val-id] 320 | | | +--rw int32val-id uint8 321 | | | +--rw int32val uint32 322 | | +--rw operator-option-int16! {operator-op-int16}? 323 | | | +--rw int16val* [int16val-id] 324 | | | +--rw int16val-id uint8 325 | | | +--rw int16val uint16 326 | | +--rw operator-option-int8! {operator-op-int8}? 327 | | | +--rw int8val* [int8val-id] 328 | | | +--rw int8val-id uint8 329 | | | +--rw int8val uint8 330 | | +--rw operator-option-uri! {operator-op-uri}? 331 | | | +--rw uri* [uri-id] 332 | | | +--rw uri-id uint8 333 | | | +--rw uri string 334 | | +--rw operator-option-textstring! {operator-op-textstring}? 335 | | | +--rw textstring* [textstring-id] 336 | | | +--rw textstring-id uint8 337 | | | +--rw textstring string 338 | | +--rw operator-option-var-data! {operator-op-var-data}? 339 | | | +--rw int32val* [var-data-id] 340 | | | +--rw var-data-id uint8 341 | | | +--rw var-data binary 342 | | +--rw operator-option-dns-wire! {operator-op-dns-wire}? 343 | | +--rw operator-option-dns-wire* [operator-option-dns-wire-id] 344 | | +--rw operator-option-dns-wire-id uint8 345 | | +--rw operator-option-dns-wire binary 346 | +--rw network-ranges 347 | | +--rw option-set-id? -> /server/server-config/option-sets/option-set/option-set-id 348 | | +--rw network-range* [network-range-id] 349 | | +--rw network-range-id uint32 350 | | +--rw network-description string 351 | | +--rw network-prefix inet:ipv6-prefix 352 | | +--rw option-set-id? -> /server/server-config/option-sets/option-set/option-set-id 353 | | +--rw address-pools 354 | | | +--rw address-pool* [pool-id] 355 | | | +--rw pool-id uint32 356 | | | +--rw pool-prefix? inet:ipv6-prefix 357 | | | +--rw start-address inet:ipv6-address-no-zone 358 | | | +--rw end-address inet:ipv6-address-no-zone 359 | | | +--rw valid-lifetime yang:timeticks 360 | | | +--rw renew-time yang:timeticks 361 | | | +--rw rebind-time yang:timeticks 362 | | | +--rw preferred-lifetime yang:timeticks 363 | | | +--rw rapid-commit boolean 364 | | | +--rw client-class? string 365 | | | +--rw max-address-count threshold 366 | | | +--rw option-set-id? -> /server/server-config/option-sets/option-set/option-set-id 367 | | +--rw pd-pools 368 | | | +--rw pd-pool* [pool-id] 369 | | | +--rw pool-id uint32 370 | | | +--rw prefix inet:ipv6-prefix 371 | | | +--rw delegated-length uint8 372 | | | +--rw valid-lifetime yang:timeticks 373 | | | +--rw renew-time yang:timeticks 374 | | | +--rw rebind-time yang:timeticks 375 | | | +--rw preferred-lifetime yang:timeticks 376 | | | +--rw rapid-commit boolean 377 | | | +--rw client-class? string 378 | | | +--rw max-pd-space-utilization threshold 379 | | | +--rw option-set-id? -> /server/server-config/option-sets/option-set/option-set-id 380 | | +--rw host-reservations 381 | | +--rw host-reservation* [cli-id] 382 | | +--rw cli-id uint32 383 | | +--rw (client-identifier)? 384 | | | +--:(duid) 385 | | | | +--rw type-code? uint16 386 | | | | +--rw (duid-type)? 387 | | | | +--:(duid-llt) 388 | | | | | +--rw duid-llt-hardware-type? uint16 389 | | | | | +--rw duid-llt-time? yang:timeticks 390 | | | | | +--rw duid-llt-link-layer-addr? yang:mac-address 391 | | | | +--:(duid-en) 392 | | | | | +--rw duid-en-enterprise-number? uint32 393 | | | | | +--rw duid-en-identifier? string 394 | | | | +--:(duid-ll) 395 | | | | | +--rw duid-ll-hardware-type? uint16 396 | | | | | +--rw duid-ll-link-layer-addr? yang:mac-address 397 | | | | +--:(duid-uuid) 398 | | | | | +--rw uuid? yang:uuid 399 | | | | +--:(duid-unknown) 400 | | | | +--rw data? binary 401 | | | +--:(hw-address) 402 | | | +--rw hardware-address? yang:mac-address 403 | | +--rw reserv-addr* inet:ipv6-address 404 | | +--rw prefix-reservation* [reserv-prefix-id] 405 | | | +--rw reserv-prefix-id uint32 406 | | | +--rw reserv-prefix inet:ipv6-prefix 407 | | | +--rw reserv-prefix-len uint8 408 | | +--rw hostname? string 409 | | +--rw option-set-id? -> /server/server-config/option-sets/option-set/option-set-id 410 | +--rw relay-opaque-params 411 | | +--rw relays* [relay-name] 412 | | +--rw relay-name string 413 | | +--rw interface-info* [if-name] 414 | | | +--rw if-name string 415 | | | +--rw interface-id string 416 | | +--rw subscribers* [subscriber] 417 | | | +--rw subscriber uint32 418 | | | +--rw subscriber-id string 419 | | +--rw remote-host* [ent-num] 420 | | +--rw ent-num uint32 421 | | +--rw remote-id string 422 | +--rw rsoo-enabled-options 423 | +--rw rsoo-enabled-option* [option-code] 424 | +--rw option-code uint16 425 | +--rw description string 426 +--ro server-state 427 +--ro network-ranges 428 | +--ro network-range* [network-range-id] 429 | +--ro network-range-id uint32 430 | +--ro address-pools 431 | | +--ro address-pool* [pool-id] 432 | | | +--ro pool-id uint32 433 | | | +--ro total-address-count uint64 434 | | | +--ro allocated-address-conut uint64 435 | | +--ro binding-info* [cli-id] 436 | | +--ro cli-id uint32 437 | | +--ro duid 438 | | | +--ro type-code? uint16 439 | | | +--ro (duid-type)? 440 | | | +--:(duid-llt) 441 | | | | +--ro duid-llt-hardware-type? uint16 442 | | | | +--ro duid-llt-time? yang:timeticks 443 | | | | +--ro duid-llt-link-layer-addr? yang:mac-address 444 | | | +--:(duid-en) 445 | | | | +--ro duid-en-enterprise-number? uint32 446 | | | | +--ro duid-en-identifier? string 447 | | | +--:(duid-ll) 448 | | | | +--ro duid-ll-hardware-type? uint16 449 | | | | +--ro duid-ll-link-layer-addr? yang:mac-address 450 | | | +--:(duid-uuid) 451 | | | | +--ro uuid? yang:uuid 452 | | | +--:(duid-unknown) 453 | | | +--ro data? binary 454 | | +--ro cli-ia* [iaid] 455 | | +--ro ia-type string 456 | | +--ro iaid uint32 457 | | +--ro cli-addr* inet:ipv6-address 458 | | +--ro pool-id uint32 459 | +--ro pd-pools 460 | | +--ro prefix-pool* [pool-id] 461 | | | +--ro pool-id uint32 462 | | | +--ro pd-space-utilization threshold 463 | | +--ro binding-info* [cli-id] 464 | | +--ro cli-id uint32 465 | | +--ro duid 466 | | | +--ro type-code? uint16 467 | | | +--ro (duid-type)? 468 | | | +--:(duid-llt) 469 | | | | +--ro duid-llt-hardware-type? uint16 470 | | | | +--ro duid-llt-time? yang:timeticks 471 | | | | +--ro duid-llt-link-layer-addr? yang:mac-address 472 | | | +--:(duid-en) 473 | | | | +--ro duid-en-enterprise-number? uint32 474 | | | | +--ro duid-en-identifier? string 475 | | | +--:(duid-ll) 476 | | | | +--ro duid-ll-hardware-type? uint16 477 | | | | +--ro duid-ll-link-layer-addr? yang:mac-address 478 | | | +--:(duid-uuid) 479 | | | | +--ro uuid? yang:uuid 480 | | | +--:(duid-unknown) 481 | | | +--ro data? binary 482 | | +--ro cli-iapd* [iaid] 483 | | +--ro iaid uint32 484 | | +--ro cli-prefix* inet:ipv6-prefix 485 | | +--ro cli-prefix-len* uint8 486 | | +--ro pool-id uint32 487 | +--ro host-reservations 488 | +--ro binding-info* [cli-id] 489 | +--ro cli-id uint32 490 | +--ro duid 491 | | +--ro type-code? uint16 492 | | +--ro (duid-type)? 493 | | +--:(duid-llt) 494 | | | +--ro duid-llt-hardware-type? uint16 495 | | | +--ro duid-llt-time? yang:timeticks 496 | | | +--ro duid-llt-link-layer-addr? yang:mac-address 497 | | +--:(duid-en) 498 | | | +--ro duid-en-enterprise-number? uint32 499 | | | +--ro duid-en-identifier? string 500 | | +--:(duid-ll) 501 | | | +--ro duid-ll-hardware-type? uint16 502 | | | +--ro duid-ll-link-layer-addr? yang:mac-address 503 | | +--:(duid-uuid) 504 | | | +--ro uuid? yang:uuid 505 | | +--:(duid-unknown) 506 | | +--ro data? binary 507 | +--ro cli-ia* [iaid] 508 | | +--ro ia-type string 509 | | +--ro iaid uint32 510 | | +--ro cli-addr* inet:ipv6-address 511 | +--ro cli-iapd* [iaid] 512 | +--ro iaid uint32 513 | +--ro cli-prefix* inet:ipv6-prefix 514 | +--ro cli-prefix-len* uint8 515 +--ro packet-stats 516 +--ro solicit-count uint32 517 +--ro request-count uint32 518 +--ro renew-count uint32 519 +--ro rebind-count uint32 520 +--ro decline-count uint32 521 +--ro release-count uint32 522 +--ro info-req-count uint32 523 +--ro advertise-count uint32 524 +--ro confirm-count uint32 525 +--ro reply-count uint32 526 +--ro reconfigure-count uint32 527 +--ro relay-forward-count uint32 528 +--ro relay-reply-count uint32 530 notifications: 531 +---n notifications 532 +--ro dhcpv6-server-event 533 +--ro address-pool-running-out 534 | +--ro total-address-count uint64 535 | +--ro max-address-count uint64 536 | +--ro allocated-address-conut uint64 537 | +--ro duid 538 | | +--ro type-code? uint16 539 | | +--ro (duid-type)? 540 | | +--:(duid-llt) 541 | | | +--ro duid-llt-hardware-type? uint16 542 | | | +--ro duid-llt-time? yang:timeticks 543 | | | +--ro duid-llt-link-layer-addr? yang:mac-address 544 | | +--:(duid-en) 545 | | | +--ro duid-en-enterprise-number? uint32 546 | | | +--ro duid-en-identifier? string 547 | | +--:(duid-ll) 548 | | | +--ro duid-ll-hardware-type? uint16 549 | | | +--ro duid-ll-link-layer-addr? yang:mac-address 550 | | +--:(duid-uuid) 551 | | | +--ro uuid? yang:uuid 552 | | +--:(duid-unknown) 553 | | +--ro data? binary 554 | +--ro serv-name? string 555 | +--ro pool-name string 556 +--ro pd-pool-running-out 557 | +--ro max-pd-space-utilization threshold 558 | +--ro pd-space-utilization threshold 559 | +--ro duid 560 | | +--ro type-code? uint16 561 | | +--ro (duid-type)? 562 | | +--:(duid-llt) 563 | | | +--ro duid-llt-hardware-type? uint16 564 | | | +--ro duid-llt-time? yang:timeticks 565 | | | +--ro duid-llt-link-layer-addr? yang:mac-address 566 | | +--:(duid-en) 567 | | | +--ro duid-en-enterprise-number? uint32 568 | | | +--ro duid-en-identifier? string 569 | | +--:(duid-ll) 570 | | | +--ro duid-ll-hardware-type? uint16 571 | | | +--ro duid-ll-link-layer-addr? yang:mac-address 572 | | +--:(duid-uuid) 573 | | | +--ro uuid? yang:uuid 574 | | +--:(duid-unknown) 575 | | +--ro data? binary 576 | +--ro serv-name? string 577 | +--ro pool-name string 578 +--ro invalid-client-detected 579 +--ro duid 580 | +--ro type-code? uint16 581 | +--ro (duid-type)? 582 | +--:(duid-llt) 583 | | +--ro duid-llt-hardware-type? uint16 584 | | +--ro duid-llt-time? yang:timeticks 585 | | +--ro duid-llt-link-layer-addr? yang:mac-address 586 | +--:(duid-en) 587 | | +--ro duid-en-enterprise-number? uint32 588 | | +--ro duid-en-identifier? string 589 | +--:(duid-ll) 590 | | +--ro duid-ll-hardware-type? uint16 591 | | +--ro duid-ll-link-layer-addr? yang:mac-address 592 | +--:(duid-uuid) 593 | | +--ro uuid? yang:uuid 594 | +--:(duid-unknown) 595 | +--ro data? binary 596 +--ro description? string 598 Figure 1: DHCPv6 Data Model Structure 600 Introduction of important nodes: 602 o server-config: This container contains the configuration data of a 603 server. 605 o serv-attributes: This container contains basic attributes of a 606 DHCPv6 server such as DUID, server name and so on. Some optional 607 functions that can be provided by the server is also included. 609 o duid: Each server and client has only one DUID (DHCP Unique 610 Identifier). The DUID here identifies a unique DHCPv6 server for 611 clients. DUID consists of a two-octet type field and an arbitrary 612 length (no more than 128 bytes) content field. Currently there 613 are four defined types of DUIDs in [RFC3315] and [RFC6355] - DUID- 614 LLT, DUID-EN, DUID-LL and DUID-UUID. DUID-Unknown represents 615 those unconventional DUIDs. 617 o lease-storage: The server can store lease data in different 618 repositories, whether in a CSV file for smaller deployments or in 619 a database for larger deployments. 621 o operator-option-ipv6-address, operator-option-single-flag, 622 operator-option-ipv6-prefix, operator-option-int32, operator- 623 option-int16, operator-option-int8, operator-option-uri, operator- 624 option-textstring, operator-option-var-data, operator-option-dns- 625 wire: are generic option formats described in [RFC7227]. 627 o interfaces-config: A leaf list to denote which one or more 628 interfaces the server should listen on. The default value is to 629 listen on all the interfaces. This node is also used to set a 630 unicast address for the server to listen with a specific 631 interface. For example, if the server is being configured to 632 listen on a unicast address assigned to a specific interface, the 633 format "eth1/2001:db8::1" can be used. 635 o option-sets: DHCPv6 employs various options to carry additional 636 information and parameters in DHCP messages. This container 637 defines all the possible options that need to be configured at the 638 server side. The relevant RFCs that define those options include: 639 [RFC3315], [RFC3319], [RFC3646], [RFC3898], [RFC4242], [RFC4704], 640 [RFC4833], [RFC5908], [RFC5970], [RFC4075], [RFC6334], [RFC6784], 641 [RFC7078], [RFC7083], [RFC7291], [RFC7598]. 643 o option-set: A server may allow different option sets to be 644 configured for different conditions (i.e. different networks, 645 clients and etc). This "option-set" list enables various sets of 646 options being defined and configured in a single server. 647 Different sets are distinguished by the key called "option-set- 648 id". All the possible options discussed above are defined in the 649 list and each option is corresponding to a container. Since all 650 the options in the list are optional, each container in this list 651 has a 'presence' statement to indicate whether this option 652 (container) will be included in the current option set or not. In 653 addition, each container also has a 'if-feature' statement to 654 indicate whether the server supports this option (container). 656 o network-ranges: This model supports a hierarchy to achieve dynamic 657 configuration. That is to say we could configure the server at 658 different levels through this model. The top level is a global 659 level which is defined as the container "network-ranges". The 660 following levels are defined as sub-containers under it. The 661 "network-ranges" contains the parameters (e.g. option-sets) that 662 would be allocated to all the clients served by this server. 664 o network-range: Under the "network-ranges" container, a "network- 665 range" list is defined to configure the server at a network level 666 which is also considered as the second level. Different network 667 are identified by the key "network-range-id". This is because a 668 server may have different configuration parameters (e.g. option 669 sets) for different networks. 671 o address-pools: Under the "network-range" list, a container 672 describes the DHCPv6 server's address pools for a specific network 673 is defined. This container supports the server to be configured 674 at a pool level. 676 o address-pool: A DHCPv6 server can be configured with several 677 address pools for a specific network. This list defines such 678 address pools which are distinguish by the key called "pool-id". 680 o rapid-commit: Setting the value to 'true' represents the address/ 681 prefix pool support the Solicit-Reply message exchange. 'false' 682 means the server will simply ignore the Rapid Commit option in 683 Solicit message. 685 o client-class: If this is instantiated, the address/pd pool will 686 only serve the clients belonging to this class. 688 o max-address-count: Maximum count of addresses that can be 689 allocated in this pool. This value may be less than count of 690 total addresses in this pool. 692 o prefix-pools: If a server supports prefix delegation function, 693 this container under the "network-range" list will be valid to 694 define the delegating router's prefix pools for a specific 695 network. This container also supports the server to be configured 696 at a pool level. 698 o prefix-pool: Similar to server's address pools, a delegating 699 router can also be configured with multiple prefix pools specified 700 by a list called "prefix-pool". 702 o max-pd-space-utilization: Maximum utilization of pd space in this 703 pool. 705 o host-reservations: This container allows the server to make 706 reservations at host level. 708 o host-reservation: This list allows the server to reserve 709 addresses, prefixes, hostname and options for different clients. 710 A server may reserve multiple addresses and prefixes for a single 711 client. 713 o relay-opaque-params: This container contains some opaque values in 714 Relay Agent options that need to be configured on the server side 715 only for value match. Such Relay Agent options include Interface- 716 Id option, Remote-Id option and Subscriber-Id option. 718 o rsoo-enabled-options: [RFC6422] requires that the server SHOULD 719 have an administrator-configurable list of RSOO-enabled options. 720 This container include a list called "rsoo-enabled-option" to 721 allow new RSOO-enabled options to be defined at the server side. 723 o server-state: This container includes the state data of a server. 725 o binding-info: A list records a static binding information for each 726 DHCPv6 client that has already been assigned IPv6 addresses/ 727 prefixes that are dynamically allocated and reserved in advance. 729 o packet-stats: A container presents the packet statistics related 730 to the DHCPv6 server. 732 Information about notifications: 734 o address/pd-pool-running-out: raised when the address/prefix pool 735 is going to run out. A threshold for utilization ratio of the 736 pool (max-address-count/max-pd-space utilization) has been defined 737 in the server feature so that it will notify the administrator 738 when the utilization ratio reaches the threshold, and such 739 threshold is a settable parameter. 741 o invalid-client-detected: raised when the server has found a client 742 which can be regarded as a potential attacker. Some description 743 could also be included. 745 2.2. DHCPv6 Relay Tree Diagrams 747 module: ietf-dhcpv6-relay 748 +--rw relay! 749 +--rw relay-config 750 | +--rw relay-attributes 751 | | +--rw name? string 752 | | +--rw description? string 753 | | +--rw dest-addrs* inet:ipv6-address 754 | | +--rw subscribers* [subscriber] 755 | | | +--rw subscriber uint8 756 | | | +--rw subscriber-id string 757 | | +--rw remote-host* [ent-num] 758 | | | +--rw ent-num uint32 759 | | | +--rw remote-id string 760 | | +--rw vendor-info 761 | | +--rw ent-num uint32 762 | | +--rw data* string 763 | +--rw rsoo-option-sets 764 | | +--rw option-set* [option-set-id] 765 | | +--rw option-set-id uint32 766 | | +--rw erp-local-domain-name-option! 767 {erp-local-domain-name-op}? 768 | | +--rw erp-for-client* [cli-id] 769 | | +--rw cli-id uint32 770 | | +--rw duid 771 | | | +--rw type-code? uint16 772 | | | +--rw (duid-type)? 773 | | | +--:(duid-llt) 774 | | | | +--rw duid-llt-hardware-type? uint16 775 | | | | +--rw duid-llt-time? yang:timeticks 776 | | | | +--rw duid-llt-link-layer-addr? 777 yang:mac-address 778 | | | +--:(duid-en) 779 | | | | +--rw duid-en-enterprise-number? uint32 780 | | | | +--rw duid-en-identifier? string 781 | | | +--:(duid-ll) 782 | | | | +--rw duid-ll-hardware-type? uint16 783 | | | | +--rw duid-ll-link-layer-addr? 784 yang:mac-address 785 | | | +--:(duid-uuid) 786 | | | | +--rw uuid? yang:uuid 787 | | | +--:(duid-unknown) 788 | | | +--rw data? binary 789 | | +--rw erp-name string 790 | +--rw relay-if* [if-name] 791 | +--rw if-name if:interface-ref 792 | +--rw interface-id? string 793 | +--rw ipv6-address? inet:ipv6-address 794 | +--rw rsoo-option-set-id? 795 -> /relay/relay-config/rsoo-option-sets/option-set/option-set-id 796 | +--rw next-entity* [dest-addr] 797 | +--rw dest-addr inet:ipv6-address 798 | +--rw available boolean 799 | +--rw multicast boolean 800 | +--rw server boolean 801 +--ro relay-state 802 +--ro relay-if* [if-name] 803 | +--ro if-name string 804 | +--ro pd-route* [pd-route-id] 805 | | +--ro pd-route-id uint8 806 | | +--ro requesting-router-id uint32 807 | | +--ro delegating-router-id uint32 808 | | +--ro next-router inet:ipv6-address 809 | | +--ro last-router inet:ipv6-address 810 | +--ro next-entity* [dest-addr] 811 | +--ro dest-addr inet:ipv6-address 812 | +--ro packet-stats 813 | +--ro solicit-rvd-count uint32 814 | +--ro request-rvd-count uint32 815 | +--ro renew-rvd-count uint32 816 | +--ro rebind-rvd-count uint32 817 | +--ro decline-rvd-count uint32 818 | +--ro release-rvd-count uint32 819 | +--ro info-req-rvd-count uint32 820 | +--ro relay-for-rvd-count uint32 821 | +--ro relay-rep-rvd-count uint32 822 | +--ro packet-to-cli-count uint32 823 | +--ro adver-sent-count uint32 824 | +--ro confirm-sent-count uint32 825 | +--ro reply-sent-count uint32 826 | +--ro reconfig-sent-count uint32 827 | +--ro relay-for-sent-count uint32 828 | +--ro relay-rep-sent-count uint32 829 +--ro relay-stats 830 +--ro cli-packet-rvd-count uint32 831 +--ro relay-for-rvd-count uint32 832 +--ro relay-rep-rvd-count uint32 833 +--ro packet-to-cli-count uint32 834 +--ro relay-for-sent-count uint32 835 +--ro relay-rep-sent-count uint32 836 +--ro discarded-packet-count uint32 838 notifications: 839 +---n notifications 840 +--ro dhcpv6-relay-event 841 +--ro topo-changed 842 +--ro relay-if-name string 843 +--ro first-hop boolean 844 +--ro last-entity-addr inet:ipv6-address 846 Introduction of important nodes: 848 o relay-config: This container contains the configuration data of 849 the relay. 851 o relay-attributes: A container describes some basic attributes of 852 the relay agent including some relay agent specific options data 853 that need to be configured previously. Such options include 854 Remote-Id option and Subscriber-Id option. 856 o dest-addrs: Each DHCPv6 relay agent may be configured with a list 857 of destination addresses. This node defines such a list of IPv6 858 addresses that may include unicast addresses, multicast addresses 859 or other addresses. 861 o rsoo-options-sets: DHCPv6 relay agent could provide some 862 information that would be useful to DHCPv6 client. Since relay 863 agent cannot provide options directly to the client, [RFC6422] 864 defines RSOO-enabled options to propose options for the server to 865 send to the client. This container models such RSOO-enabled 866 options. 868 o option-set: This list under the "rsoo-option-sets" container is 869 similar to the that defined in server module. It allows the relay 870 to implement several sets of RSOO-enabled options for different 871 interfaces. The list only include the EAP Re-authentication 872 Protocol (ERP) Local Domain Name DHCPv6 Option defined in 873 [RFC6440], since it is the only one RSOO-enabled options accepted 874 by IANA so far. 876 o relay-if: A relay agent may have several interfaces, we should 877 provide a way to configure and manage parameters on the interface- 878 level. A list that describes specific interfaces and their 879 corresponding parameters is employed to fulfill the configuration. 880 Here we use a string called "if-name" as the key of list. 882 o relay-state: This container contains the configuration data of the 883 relay. 885 o pd-route: A sub-container of "relay-if" which describes the route 886 for delegated prefixes into the provider edge router. 888 o next-entity: This node defines a list that is used to describe the 889 next hop entity of this relay agent. Different entities are 890 distinguished by their addresses. 892 o packet-stats: A container shows packet state information of a 893 specific data communication. 895 o relay-stats: The "relay-stats" container records and presents the 896 overall packet statistics of the relay agent. 898 Information about notifications: 900 o topo-changed: raised when the topology of the relay agent is 901 changed. 903 2.3. DHCPv6 Client Tree Diagrams 905 module: ietf-dhcpv6-client 906 +--rw client! 907 +--rw client-config 908 | +--rw duid 909 | | +--rw type-code? uint16 910 | | +--rw (duid-type)? 911 | | +--:(duid-llt) 912 | | | +--rw duid-llt-hardware-type? uint16 913 | | | +--rw duid-llt-time? yang:timeticks 914 | | | +--rw duid-llt-link-layer-addr? yang:mac-address 915 | | +--:(duid-en) 916 | | | +--rw duid-en-enterprise-number? uint32 917 | | | +--rw duid-en-identifier? string 918 | | +--:(duid-ll) 919 | | | +--rw duid-ll-hardware-type? uint16 920 | | | +--rw duid-ll-link-layer-addr? yang:mac-address 921 | | +--:(duid-uuid) 922 | | | +--rw uuid? yang:uuid 923 | | +--:(duid-unknown) 924 | | +--rw data? binary 925 | +--rw client-if* [if-name] 926 | +--rw if-name if:interface-ref 927 | +--rw cli-id uint32 928 | +--rw pd-function boolean 929 | +--rw rapid-commit boolean 930 | +--rw client-configured-options 931 | +--rw new-or-standard-cli-option* [option-code] 932 | | +--rw option-code uint16 933 | | +--rw option-name string 934 | | +--rw option-description string 935 | | +--rw option-reference? string 936 | | +--rw option-value string 937 | +--rw option-request-option! {option-request-op}? 938 | | +--rw oro-option* [option-code] 939 | | +--rw option-code uint16 940 | | +--rw description string 941 | +--rw user-class-option! {user-class-op}? 942 | | +--rw user-class* [user-class-id] 943 | | +--rw user-class-id uint8 944 | | +--rw user-class-data string 945 | +--rw vendor-class-option! {vendor-class-op}? 946 | | +--rw enterprise-number uint32 947 | | +--rw vendor-class* [vendor-class-id] 948 | | +--rw vendor-class-id uint8 949 | | +--rw vendor-class-data string 950 | +--rw client-fqdn-option! {client-fqdn-op}? 951 | | +--rw fqdn string 952 | | +--rw server-initiate-update boolean 953 | | +--rw client-initiate-update boolean 954 | +--rw client-arch-type-option! {client-arch-type-op}? 955 | | +--rw architecture-types* [type-id] 956 | | +--rw type-id uint16 957 | | +--rw most-preferred boolean 958 | +--rw client-network-interface-identifier-option! 959 {client-network-interface-identifier-op}? 960 | | +--rw type uint8 961 | | +--rw major uint8 962 | | +--rw minor uint8 963 | +--rw kbr-principal-name-option! {kbr-principal-name-op}? 964 | | +--rw principle-name* [principle-name-id] 965 | | +--rw principle-name-id uint8 966 | | +--rw name-type int32 967 | | +--rw name-string string 968 | +--rw kbr-realm-name-option! {kbr-realm-name-op}? 969 | | +--rw realm-name string 970 | +--rw client-link-layer-addr-option! 971 {client-link-layer-addr-op}? 972 | +--rw link-layer-type uint16 973 | +--rw link-layer-addr string 974 +--ro client-state 975 +--ro if-other-params 976 | +--ro server-unicast-option! {server-unicast-op}? 977 | | +--ro server-address? inet:ipv6-address 978 | +--ro sip-server-domain-name-list-option! 979 {sip-server-domain-name-list-op}? 980 | | +--ro sip-serv-domain-name string 981 | +--ro sip-server-address-list-option! 982 {sip-server-address-list-op}? 983 | | +--ro sip-server* [sip-serv-id] 984 | | +--ro sip-serv-id uint8 985 | | +--ro sip-serv-addr inet:ipv6-address 986 | +--ro dns-servers-option! {dns-servers-op}? 987 | | +--ro dns-server* [dns-serv-id] 988 | | +--ro dns-serv-id uint8 989 | | +--ro dns-serv-addr inet:ipv6-address 990 | +--ro domain-searchlist-option! {domain-searchlist-op}? 991 | | +--ro domain-searchlist* [domain-searchlist-id] 992 | | +--ro domain-searchlist-id uint8 993 | | +--ro domain-search-list-entry string 994 | +--ro nis-config-option! {nis-config-op}? 995 | | +--ro nis-server* [nis-serv-id] 996 | | +--ro nis-serv-id uint8 997 | | +--ro nis-serv-addr inet:ipv6-address 998 | +--ro nis-plus-config-option! {nis-plus-config-op}? 999 | | +--ro nis-plus-server* [nis-plus-serv-id] 1000 | | +--ro nis-plus-serv-id uint8 1001 | | +--ro nis-plus-serv-addr inet:ipv6-address 1002 | +--ro nis-domain-name-option! {nis-domain-name-op}? 1003 | | +--ro nis-domain-name? string 1004 | +--ro nis-plus-domain-name-option! {nis-plus-domain-name-op}? 1005 | | +--ro nis-plus-domain-name? string 1006 | +--ro sntp-server-option! {sntp-server-op}? 1007 | | +--ro sntp-server* [sntp-serv-id] 1008 | | +--ro sntp-serv-id uint8 1009 | | +--ro sntp-serv-addr inet:ipv6-address 1010 | +--ro info-refresh-time-option! {info-refresh-time-op}? 1011 | | +--ro info-refresh-time yang:timeticks 1012 | +--ro client-fqdn-option! {client-fqdn-op}? 1013 | | +--ro server-initiate-update boolean 1014 | | +--ro client-initiate-update boolean 1015 | | +--ro modify-name-from-cli boolean 1016 | +--ro posix-timezone-option! {posix-timezone-op}? 1017 | | +--ro tz-posix string 1018 | +--ro tzdb-timezone-option! {tzdb-timezone-op}? 1019 | | +--ro tz-database string 1020 | +--ro ntp-server-option! {ntp-server-op}? 1021 | | +--ro ntp-server* [ntp-serv-id] 1022 | | +--ro ntp-serv-id uint8 1023 | | +--ro (ntp-time-source-suboption)? 1024 | | +--:(server-address) 1025 | | | +--ro ntp-serv-addr-suboption* inet:ipv6-address 1026 | | +--:(server-multicast-address) 1027 | | | +--ro ntp-serv-mul-addr-suboption* 1028 inet:ipv6-address 1029 | | +--:(server-fqdn) 1030 | | +--ro ntp-serv-fqdn-suboption* string 1031 | +--ro boot-file-url-option! {boot-file-url-op}? 1032 | | +--ro boot-file* [boot-file-id] 1033 | | +--ro boot-file-id uint8 1034 | | +--ro suitable-arch-type* uint16 1035 | | +--ro suitable-net-if* uint32 1036 | | +--ro boot-file-url string 1037 | +--ro boot-file-param-option! {boot-file-param-op}? 1038 | | +--ro boot-file-params* [param-id] 1039 | | +--ro param-id uint8 1040 | | +--ro parameter string 1041 | +--ro aftr-name-option! {aftr-name-op}? 1042 | | +--ro tunnel-endpoint-name string 1043 | +--ro kbr-default-name-option! {kbr-default-name-op}? 1044 | | +--ro default-realm-name string 1045 | +--ro kbr-kdc-option! {kbr-kdc-op}? 1046 | | +--ro kdc-info* [kdc-id] 1047 | | +--ro kdc-id uint8 1048 | | +--ro priority uint16 1049 | | +--ro weight uint16 1050 | | +--ro transport-type uint8 1051 | | +--ro port-number uint16 1052 | | +--ro kdc-ipv6-addr inet:ipv6-address 1053 | | +--ro realm-name string 1054 | +--ro sol-max-rt-option! {sol-max-rt-op}? 1055 | | +--ro sol-max-rt-value yang:timeticks 1056 | +--ro inf-max-rt-option! {inf-max-rt-op}? 1057 | | +--ro inf-max-rt-value yang:timeticks 1058 | +--ro addr-selection-option! {addr-selection-op}? 1059 | | +--ro a-bit-set boolean 1060 | | +--ro p-bit-set boolean 1061 | | +--ro policy-table* [policy-id] 1062 | | +--ro policy-id uint8 1063 | | +--ro label uint8 1064 | | +--ro precedence uint8 1065 | | +--ro prefix-len uint8 1066 | | +--ro prefix inet:ipv6-prefix 1067 | +--ro pcp-server-option! {pcp-server-op}? 1068 | | +--ro pcp-server* [pcp-serv-id] 1069 | | +--ro pcp-serv-id uint8 1070 | | +--ro pcp-serv-addr inet:ipv6-address 1071 | +--ro s46-rule-option! {s46-rule-op}? 1072 | | +--ro s46-rule* [rule-id] 1073 | | +--ro rule-id uint8 1074 | | +--ro rule-type enumeration 1075 | | +--ro prefix4-len uint8 1076 | | +--ro ipv4-prefix inet:ipv4-prefix 1077 | | +--ro prefix6-len uint8 1078 | | +--ro ipv6-prefix inet:ipv6-prefix 1079 | | +--ro port-parameter 1080 | | +--ro offset uint8 1081 | | +--ro psid-len uint8 1082 | | +--ro psid uint16 1083 | +--ro s46-br-option! {s46-br-op}? 1084 | | +--ro br* [br-id] 1085 | | +--ro br-id uint8 1086 | | +--ro br-ipv6-addr inet:ipv6-address 1087 | +--ro s46-dmr-option! {s46-dmr-op}? 1088 | | +--ro dmr* [dmr-id] 1089 | | +--ro dmr-id uint8 1090 | | +--ro dmr-prefix-len uint8 1091 | | +--ro dmr-ipv6-prefix inet:ipv6-prefix 1092 | +--ro s46-v4-v6-binding-option! {s46-v4-v6-binding-op}? 1093 | +--ro ce* [ce-id] 1094 | +--ro ce-id uint8 1095 | +--ro ipv4-addr inet:ipv4-address 1096 | +--ro bind-prefix6-len uint8 1097 | +--ro bind-ipv6-prefix inet:ipv6-prefix 1098 | +--ro port-parameter 1099 | +--ro offset uint8 1100 | +--ro psid-len uint8 1101 | +--ro psid uint16 1102 +--ro packet-stats 1103 +--ro solicit-count uint32 1104 +--ro request-count uint32 1105 +--ro renew-count uint32 1106 +--ro rebind-count uint32 1107 +--ro decline-count uint32 1108 +--ro release-count uint32 1109 +--ro info-req-count uint32 1110 +--ro advertise-count uint32 1111 +--ro confirm-count uint32 1112 +--ro reply-count uint32 1113 +--ro reconfigure-count uint32 1115 notifications: 1116 +---n notifications 1117 +--ro dhcpv6-client-event 1118 +--ro ia-lease-event 1119 | +--ro event-type enumeration 1120 | +--ro duid 1121 | | +--ro type-code? uint16 1122 | | +--ro (duid-type)? 1123 | | +--:(duid-llt) 1124 | | | +--ro duid-llt-hardware-type? uint16 1125 | | | +--ro duid-llt-time? yang:timeticks 1126 | | | +--ro duid-llt-link-layer-addr? yang:mac-address 1127 | | +--:(duid-en) 1128 | | | +--ro duid-en-enterprise-number? uint32 1129 | | | +--ro duid-en-identifier? string 1130 | | +--:(duid-ll) 1131 | | | +--ro duid-ll-hardware-type? uint16 1132 | | | +--ro duid-ll-link-layer-addr? yang:mac-address 1133 | | +--:(duid-uuid) 1134 | | | +--ro uuid? yang:uuid 1135 | | +--:(duid-unknown) 1136 | | +--ro data? binary 1137 | +--ro iaid uint32 1138 | +--ro serv-name? string 1139 | +--ro description? string 1140 +--ro invalid-ia-detected 1141 | +--ro duid 1142 | | +--ro type-code? uint16 1143 | | +--ro (duid-type)? 1144 | | +--:(duid-llt) 1145 | | | +--ro duid-llt-hardware-type? uint16 1146 | | | +--ro duid-llt-time? yang:timeticks 1147 | | | +--ro duid-llt-link-layer-addr? yang:mac-address 1148 | | +--:(duid-en) 1149 | | | +--ro duid-en-enterprise-number? uint32 1150 | | | +--ro duid-en-identifier? string 1151 | | +--:(duid-ll) 1152 | | | +--ro duid-ll-hardware-type? uint16 1153 | | | +--ro duid-ll-link-layer-addr? yang:mac-address 1154 | | +--:(duid-uuid) 1155 | | | +--ro uuid? yang:uuid 1156 | | +--:(duid-unknown) 1157 | | +--ro data? binary 1158 | +--ro cli-duid uint32 1159 | +--ro iaid uint32 1160 | +--ro serv-name? string 1161 | +--ro description? string 1162 +--ro retransmission-failed 1163 | +--ro duid 1164 | | +--ro type-code? uint16 1165 | | +--ro (duid-type)? 1166 | | +--:(duid-llt) 1167 | | | +--ro duid-llt-hardware-type? uint16 1168 | | | +--ro duid-llt-time? yang:timeticks 1169 | | | +--ro duid-llt-link-layer-addr? yang:mac-address 1170 | | +--:(duid-en) 1171 | | | +--ro duid-en-enterprise-number? uint32 1172 | | | +--ro duid-en-identifier? string 1173 | | +--:(duid-ll) 1174 | | | +--ro duid-ll-hardware-type? uint16 1175 | | | +--ro duid-ll-link-layer-addr? yang:mac-address 1176 | | +--:(duid-uuid) 1177 | | | +--ro uuid? yang:uuid 1178 | | +--:(duid-unknown) 1179 | | +--ro data? binary 1180 | +--ro description enumeration 1181 +--ro failed-status-turn-up 1182 +--ro duid 1183 | +--ro type-code? uint16 1184 | +--ro (duid-type)? 1185 | +--:(duid-llt) 1186 | | +--ro duid-llt-hardware-type? uint16 1187 | | +--ro duid-llt-time? yang:timeticks 1188 | | +--ro duid-llt-link-layer-addr? yang:mac-address 1189 | +--:(duid-en) 1190 | | +--ro duid-en-enterprise-number? uint32 1191 | | +--ro duid-en-identifier? string 1192 | +--:(duid-ll) 1193 | | +--ro duid-ll-hardware-type? uint16 1194 | | +--ro duid-ll-link-layer-addr? yang:mac-address 1195 | +--:(duid-uuid) 1196 | | +--ro uuid? yang:uuid 1197 | +--:(duid-unknown) 1198 | +--ro data? binary 1199 +--ro status-code enumeration 1201 Introduction of important nodes: 1203 o client-config: This container includes the configuration data of 1204 the client. 1206 o duid: Each server and client has only one DUID (DHCP Unique 1207 Identifier). The DUID here will be carried in the Client ID 1208 option to identify a specific DHCPv6 client. This leaf are same 1209 as the "duid" leaf in "dhcpv6-server" feature. 1211 o client-if: A client may have several interfaces, it is more 1212 reasonable to configure and manage parameters on the interface- 1213 level. The list defines a specific client interface and its data. 1214 Different interfaces are distinguished by the "ifName" key which 1215 is a configurable string value. 1217 o pd-function: Whether the client can act as a requesting router to 1218 request prefixes using prefix delegation ([RFC3633]). 1220 o rapid-commit: 'true' indicates a client can initiate a Solicit- 1221 Reply message exchange by adding a Rapid Commit option in Solicit 1222 message. 'false' means the client is not allowed to add a Rapid 1223 Commit option to request addresses in a two-message exchange 1224 pattern. 1226 o client-configured-options: Similar to the server, the client also 1227 need to configure some options to fulfill some desired functions. 1228 This container include all the potential options that need to be 1229 configured at the client side. The relevant RFCs that define 1230 those options include: [RFC3315], [RFC4704], [RFC5970], [RFC6784], 1231 [RFC6939]. 1233 o option-request-option: This container provide a way to configure 1234 the list of options that the client will request in its ORO 1235 option. 1237 o client-state: This container includes the state data of the 1238 client. 1240 o if-other-params: A client can obtain extra configuration data 1241 other than address and prefix information through DHCPv6 options. 1242 This container describes such data the client was configured 1243 through DHCPv6. The potential configuration data may include DNS 1244 server parameters, SIP server parameters and etc. 1246 o packet-stats: A container records all the packet status 1247 information of a specific interface. 1249 Information about notifications: 1251 o ia-lease-event: raised when the client was allocated a new IA from 1252 the server or it renew/rebind/release its current IA. 1254 o invalid-ia-detected: raised when the identity association of the 1255 client can be proved to be invalid. Possible condition includes 1256 duplicated address, illegal address, etc. 1258 o retransmission-failed: raised when the retransmission mechanism 1259 defined in [RFC3315] is failed. 1261 o failed-status-turn-up: raised when the client receives a message 1262 includes an unsuccessful Status Code option. 1264 3. DHCPv6 YANG Model 1266 3.1. DHCPv6 Server YANG Model 1268 This module imports typedefs from [RFC6991], [RFC7223]. 1270 file "ietf-dhcpv6-server.yang" 1271 module ietf-dhcpv6-server { 1272 yang-version 1.1; 1273 namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-server"; 1274 prefix "dhcpv6-server"; 1276 import ietf-inet-types { 1277 prefix inet; 1278 } 1279 import ietf-yang-types { 1280 prefix yang; 1281 } 1282 import ietf-dhcpv6-options { 1283 prefix dhcpv6-options; 1284 } 1285 import ietf-dhcpv6-types { 1286 prefix dhcpv6-types; 1287 } 1288 import ietf-interfaces { 1289 prefix if; 1290 } 1292 organization "DHC WG"; 1293 contact 1294 "cuiyong@tsinghua.edu.cn 1295 lh.sunlinh@gmail.com 1296 ian.farrer@telekom.de 1297 sladjana.zechlin@telekom.de 1298 hezihao9512@gmail.com"; 1300 description "This model defines a YANG data model that can be 1301 used to configure and manage a DHCPv6 server."; 1303 revision 2018-09-04 { 1304 description ""; 1305 reference "I-D: draft-ietf-dhc-dhcpv6-yang"; 1306 } 1308 revision 2018-03-04 { 1309 description "Resolved most issues on the DHC official 1310 github"; 1311 reference "I-D: draft-ietf-dhc-dhcpv6-yang"; 1312 } 1314 revision 2017-12-22 { 1315 description "Resolve most issues on Ian's github."; 1316 reference "I-D: draft-ietf-dhc-dhcpv6-yang"; 1317 } 1319 revision 2017-11-24 { 1320 description "First version of the separated server specific 1321 YANG model."; 1322 reference "I-D: draft-ietf-dhc-dhcpv6-yang"; 1323 } 1325 /* 1326 * Typedef 1327 */ 1328 typedef threshold { 1329 type union { 1330 type uint16 { 1331 range 0..100; 1332 } 1333 type enumeration { 1334 enum "disabled" { 1335 description "No threshold"; 1337 } 1338 } 1339 } 1340 description "Threshold value in percent"; 1341 } 1343 /* 1344 * Data Nodes 1345 */ 1346 container server { 1347 presence "Enables the server"; 1348 description "DHCPv6 server portion"; 1350 /* 1351 * Configuration data 1352 */ 1353 container server-config { 1354 description "This container contains the configuration data 1355 of a server."; 1356 container serv-attributes { 1357 description 1358 "This container contains basic attributes of a DHCPv6 server 1359 such as IPv6 address, server name and so on. Some optional 1360 functions that can be provided by the server is also included."; 1361 container duid { 1362 description "Sets the DUID of server"; 1363 uses dhcpv6-types:duid; 1364 } 1365 leaf name { 1366 type string; 1367 description "server's name"; 1368 } 1369 leaf description { 1370 type string; 1371 description "description of the server."; 1372 } 1373 leaf-list ipv6-address { 1374 type inet:ipv6-address; 1375 description "server's IPv6 address."; 1376 } 1377 leaf-list interfaces-config { 1378 // Note - this should probably be references to 1379 // entries in the ietf-interfaces model 1380 type if:interface-ref; 1381 description "A leaf list to denote which one or more interfaces 1382 the server should listen on. The default value is to listen 1383 on all the interfaces. This node is also used to set a unicast 1384 address for the server to listen with a specific interface. 1386 For example, if people want the server to listen on a unicast 1387 address with a specific interface, he can use the format like 1388 'eth1/2001:db8::1'."; 1389 } 1390 container lease-storage { 1391 description "Indicates how the server stores the lease"; 1392 choice storage-type { 1393 description "the type of lease storage"; 1394 // leaf persist { 1395 // type boolean; 1396 // mandatory true; 1397 // description "controls whether the new leases and updates to existing leases are 1398 // written to the file"; 1399 // } 1400 case memfile { 1401 description "the server stores lease information in a CSV file"; 1403 leaf memfile-name { 1404 type string; 1405 description "specifies an absolute location of the lease file in which new leases 1406 and lease updates will be recorded"; 1407 } 1409 leaf memfile-lfc-interval { 1410 type uint64; 1411 description "specifies the interval in seconds, at which the server will perform a 1412 lease file cleanup (LFC)"; 1413 } 1415 } 1416 case mysql { 1417 leaf mysql-name { 1418 type string; 1419 description "type of the database"; 1420 } 1421 leaf mysql-host { 1422 type string; 1423 description "If the database is located 1424 on a different system to the DHCPv6 server, the database host name must also be specified."; 1425 } 1426 leaf mysql-password { 1427 type string; 1428 description "the credentials of the account under which the server will access the database"; 1429 } 1430 leaf mysql-port { 1431 type uint8; 1432 description "If the database is located on a different system, the port number may be specified"; 1433 } 1434 leaf mysql-lfc-interval { 1435 type uint64; 1436 description "specifies the interval in seconds, at which the server will perform a 1437 lease file cleanup (LFC)"; 1438 } 1439 leaf mysql-connect-timeout { 1440 type uint64; 1441 description "If the database is located on a different system, a longer interval needs to be specified"; 1442 } 1444 } 1445 case postgresql { 1446 leaf postgresql-name { 1447 type string; 1448 description "type of the database"; 1449 } 1450 leaf postgresql-host { 1451 type string; 1452 description "If the database is located 1453 on a different system to the DHCPv6 server, the database host name must also be specified."; 1454 } 1455 leaf postgresql-password { 1456 type string; 1457 description "the credentials of the account under which the server will access the database"; 1458 } 1459 leaf postgresql-port { 1460 type uint8; 1461 description "If the database is located on a different system, the port number may be specified"; 1462 } 1463 leaf postgresql-lfc-interval { 1464 type uint64; 1465 description "specifies the interval in seconds, at which the server will perform a 1466 lease file cleanup (LFC)"; 1467 } 1468 leaf postgresql-connect-timeout { 1469 type uint64; 1470 description "If the database is located on a different system, a longer interval needs to be specified"; 1471 } 1472 } 1473 case cassandra { 1474 leaf cassandra-name { 1475 type string; 1476 description "type of the database"; 1477 } 1478 leaf cassandra-contact-points { 1479 type string; 1480 description "Cassandra takes a list of comma separated IP addresses to contact the cluster"; 1481 } 1482 leaf cassandra-password { 1483 type string; 1484 description "the credentials of the account under which the server will access the database"; 1485 } 1486 leaf cassandra-lfc-interval { 1487 type uint64; 1488 description "specifies the interval in seconds, at which the server will perform a 1489 lease file cleanup (LFC)"; 1490 } 1491 leaf cassandra-connect-timeout { 1492 type uint64; 1493 description "If the database is located on a different system, a longer interval needs to be specified"; 1494 } 1495 } 1496 } 1497 } 1498 uses dhcpv6-types:vendor-infor; 1499 } 1501 container option-sets { 1502 description "DHCPv6 employs various options to carry additional 1503 information and parameters in DHCP messages. This container defines 1504 all the possible options that need to be configured at the server 1505 side. "; 1506 list option-set { 1507 key option-set-id; 1508 description "A server may allow different option sets to be 1509 configured for different conditions (i.e. different networks, 1510 clients and etc). This 'option-set' list enables various sets of 1511 options being defined and configured in a single server. Different 1512 sets are distinguished by the key called 'option-set-id'. All the 1513 possible options discussed above are defined in the list and each 1514 option is corresponding to a container. Since all the options in 1515 the list are optional, each container in this list has a 'presence' 1516 statement to indicate whether this option (container) will be 1517 included in the current option set or not. In addition, each container 1518 also has a 'if-feature' statement to indicate whether the server 1519 supports this option (container)."; 1520 leaf option-set-id { 1521 type uint32; 1522 description "option set id"; 1523 } 1524 uses dhcpv6-options:server-option-definitions; 1525 uses dhcpv6-options:custom-option-definitions; 1526 } 1527 } 1529 container network-ranges { 1531 description "This model supports a hierarchy 1532 to achieve dynamic configuration. That is to say we could configure the 1533 server at different levels through this model. The top level is a global 1534 level which is defined as the container 'network-ranges'. The following 1535 levels are defined as sub-containers under it. The 'network-ranges' 1536 contains the parameters (e.g. option-sets) that would be allocated to 1537 all the clients served by this server."; 1539 leaf option-set-id { 1540 type leafref { 1541 path "/server/server-config/option-sets/option-set/option-set-id"; 1542 } 1543 description 1544 "The ID field of relevant global option-set to be provisioned to 1545 clients."; 1546 } 1547 list network-range { 1548 key network-range-id; 1549 description 1550 "Under the 'network-ranges' container, a 'network-range' list 1551 is defined to configure the server at a network level which is also 1552 considered as the second level. Different network are identified by the 1553 key 'network-range-id'. This is because a server may have different 1554 configuration parameters (e.g. option sets) for different networks."; 1555 leaf network-range-id { 1556 type uint32; 1557 mandatory true; 1558 description "equivalent to subnet id"; 1559 } 1560 leaf network-description { 1561 type string; 1562 mandatory true; 1563 description "description of the subnet"; 1564 } 1565 leaf network-prefix { 1566 type inet:ipv6-prefix; 1567 mandatory true; 1568 description "subnet prefix"; 1569 } 1570 leaf option-set-id { 1571 type leafref { 1572 path "/server/server-config/option-sets/option-set/option-set-id"; 1573 } 1574 description "The ID field of relevant option-set to be provisioned to 1575 clients of this network-range."; 1576 } 1578 container address-pools { 1580 description 1581 "A container that describes the DHCPv6 server's 1582 address pools."; 1583 list address-pool { 1584 key pool-id; 1585 description "A DHCPv6 server can be configured with 1586 several address pools. This list defines such address pools 1587 which are distinguished by the key called 'pool-id' inside 1588 a network range."; 1589 leaf pool-id { 1590 type uint32; 1591 mandatory true; 1592 description "pool id"; 1593 } 1594 leaf pool-prefix { 1595 type inet:ipv6-prefix; 1596 description "Pool prefix. SHOULD be set when the 1597 'start-address..end-address' range is a prefix."; 1598 } 1599 leaf start-address { 1600 type inet:ipv6-address-no-zone; 1601 mandatory true; 1602 description "start address"; 1603 } 1604 leaf end-address { 1605 type inet:ipv6-address-no-zone; 1606 mandatory true; 1607 description "end address"; 1608 } 1609 leaf valid-lifetime { 1610 type yang:timeticks; 1611 mandatory true; 1612 description "valid lifetime for IA"; 1613 } 1614 leaf renew-time { 1615 type yang:timeticks; 1616 mandatory true; 1617 description "renew time"; 1618 } 1619 leaf rebind-time { 1620 type yang:timeticks; 1621 mandatory true; 1622 description "rebind time"; 1623 } 1624 leaf preferred-lifetime { 1625 type yang:timeticks; 1626 mandatory true; 1627 description "preferred lifetime for IA"; 1629 } 1630 leaf rapid-commit { 1631 type boolean; 1632 mandatory true; 1633 description "A boolean value specifies whether the pool 1634 supports client-server exchanges involving two messages."; 1635 } 1636 leaf client-class { 1637 type string; 1638 description 1639 "If this leaf is specified, this pool will only serve 1640 the clients belonging to this class."; 1641 } 1642 leaf max-address-count { 1643 type threshold; 1644 mandatory true; 1645 description "maximum count of addresses that can 1646 be allocated in this pool. This value may be 1647 less than count of total addresses."; 1648 } 1649 leaf option-set-id { 1650 type leafref { 1651 path "/server/server-config/option-sets/option-set/option-set-id"; 1652 } 1653 description "The ID field of relevant option-set to be 1654 provisioned to clients of this address-pool."; 1655 } 1656 } 1657 } 1659 container pd-pools { 1660 description "If a server supports prefix delegation function, this 1661 container will be used to define the delegating router's prefix 1662 pools."; 1663 list pd-pool { 1664 key pool-id; 1665 description "Similar to server's address pools, a delegating 1666 router can also be configured with multiple prefix pools 1667 specified by a list called 'prefix-pool'."; 1668 leaf pool-id { 1669 type uint32; 1670 mandatory true; 1671 description "pool id"; 1672 } 1673 leaf prefix { 1674 type inet:ipv6-prefix; 1675 mandatory true; 1676 description "ipv6 prefix"; 1678 } 1679 leaf delegated-length { 1680 type uint8; 1681 mandatory true; 1682 description "default delegated prefix length"; 1683 } 1684 leaf valid-lifetime { 1685 type yang:timeticks; 1686 mandatory true; 1687 description "valid lifetime for IA"; 1688 } 1689 leaf renew-time { 1690 type yang:timeticks; 1691 mandatory true; 1692 description "renew time"; 1693 } 1694 leaf rebind-time { 1695 type yang:timeticks; 1696 mandatory true; 1697 description "rebind time"; 1698 } 1699 leaf preferred-lifetime { 1700 type yang:timeticks; 1701 mandatory true; 1702 description "preferred lifetime for IA"; 1703 } 1704 leaf rapid-commit { 1705 type boolean; 1706 mandatory true; 1707 description "A boolean value specifies whether the server 1708 support client-server exchanges involving two messages defined."; 1709 } 1710 leaf client-class { 1711 type string; 1712 description "client class"; 1713 } 1714 leaf max-pd-space-utilization { 1715 type threshold; 1716 mandatory true; 1717 description "Maximum utilization of pd space in this pool"; 1718 } 1719 leaf option-set-id { 1720 type leafref { 1721 path "/server/server-config/option-sets/option-set/option-set-id"; 1722 } 1723 description "The ID field of relevant option-set to be 1724 provisioned to clients of this prefix-pool."; 1725 } 1727 } 1728 } 1730 container host-reservations { 1731 description 1732 "This container allows the server to make reservations at host level."; 1733 list host-reservation { 1734 key cli-id; 1735 description "This list allows the server to reserve addresses, 1736 prefixes, hostname and options for different clients."; 1737 leaf cli-id { 1738 type uint32; 1739 mandatory true; 1740 description "client id"; 1741 } 1743 choice client-identifier { 1744 description "When making reservations, the server needs to choose a 1745 identifier to identify the client. Currently 'DUID' and 'hardware 1746 address' are supported."; 1747 case duid { 1748 description "DUID"; 1749 uses dhcpv6-types:duid; 1750 } 1751 case hw-address { 1752 description "hardware address"; 1753 leaf hardware-address { 1754 type yang:mac-address; 1755 description "MAC address of client"; 1756 } 1757 } 1758 } 1760 leaf-list reserv-addr { 1761 type inet:ipv6-address; 1762 description "reserved addr"; 1763 } 1765 list prefix-reservation { 1766 key reserv-prefix-id; 1767 description "reserved prefix reservation"; 1768 leaf reserv-prefix-id { 1769 type uint32; 1770 mandatory true; 1771 description "reserved prefix id"; 1772 } 1773 leaf reserv-prefix { 1774 type inet:ipv6-prefix; 1775 mandatory true; 1776 description "reserved prefix"; 1777 } 1778 leaf reserv-prefix-len { 1779 type uint8; 1780 mandatory true; 1781 description "reserved prefix length"; 1782 } 1783 } 1785 leaf hostname { 1786 type string; 1787 description "reserved hostname"; 1788 } 1790 leaf option-set-id { 1791 type leafref { 1792 path "/server/server-config/option-sets/option-set/option-set-id"; 1793 } 1794 description "The ID field of relevant option-set to be provisioned 1795 in the host reservation."; 1796 } 1797 } 1798 } 1800 } 1801 } 1803 container relay-opaque-params { 1804 description "This container contains some opaque values in Relay Agent 1805 options that need to be configured on the server side only for value 1806 match. Such Relay Agent options include Interface-Id option, 1807 Remote-Id option and Subscriber-Id option."; 1808 list relays { 1809 key relay-name; 1810 description "relay agents"; 1811 leaf relay-name { 1812 type string; 1813 mandatory true; 1814 description "relay agent name"; 1815 } 1816 list interface-info { 1817 key if-name; 1818 description "interface info"; 1819 leaf if-name { 1820 type string; 1821 mandatory true; 1822 description "interface name"; 1824 } 1825 leaf interface-id { 1826 type string; 1827 mandatory true; 1828 description "interface id"; 1829 } 1830 } 1831 list subscribers { 1832 key subscriber; 1833 description "subscribers"; 1834 leaf subscriber { 1835 type uint32; 1836 mandatory true; 1837 description "subscriber"; 1838 } 1839 leaf subscriber-id { 1840 type string; 1841 mandatory true; 1842 description "subscriber id"; 1843 } 1844 } 1845 list remote-host { 1846 key ent-num; 1847 description "remote host"; 1848 leaf ent-num { 1849 type uint32; 1850 mandatory true; 1851 description "enterprise number"; 1852 } 1853 leaf remote-id { 1854 type string; 1855 mandatory true; 1856 description "remote id"; 1857 } 1858 } 1859 } 1860 } 1862 container rsoo-enabled-options { 1863 description "rsoo enabled options"; 1864 list rsoo-enabled-option { 1865 key option-code; 1866 description "rsoo enabled option"; 1867 leaf option-code { 1868 type uint16; 1869 mandatory true; 1870 description "option code"; 1871 } 1872 leaf description { 1873 type string; 1874 mandatory true; 1875 description "description of the option"; 1876 } 1877 } 1878 } 1880 } 1882 /* 1883 * State data 1884 */ 1885 container server-state { 1886 config "false"; 1887 description "states of server"; 1888 container network-ranges { 1889 description "This model supports a hierarchy to achieve dynamic configuration. 1890 That is to say we could configure the server at different levels through 1891 this model. The top level is a global level which is defined as the container 1892 'network-ranges'. The following levels are defined as sub-containers under it. 1893 The 'network-ranges' contains the parameters (e.g. option-sets) that would be 1894 allocated to all the clients served by this server."; 1895 list network-range { 1896 key network-range-id; 1897 description "The ID field of relevant option-set to be provisioned 1898 to clients of this network-range."; 1899 leaf network-range-id { 1900 type uint32; 1901 mandatory true; 1902 description "equivalent to subnet id"; 1903 } 1904 container address-pools { 1905 description "A container that describes the DHCPv6 server's address pools"; 1906 list address-pool { 1907 key pool-id; 1908 description "A DHCPv6 server can be configured with 1909 several address pools. This list defines such address pools 1910 which are distinguished by the key called 'pool-id'."; 1911 leaf pool-id { 1912 type uint32; 1913 mandatory true; 1914 description "pool id"; 1915 } 1916 leaf total-address-count { 1917 type uint64; 1918 mandatory true; 1919 description "count of total addresses in the pool"; 1921 } 1922 leaf allocated-address-conut { 1923 type uint64; 1924 mandatory true; 1925 description "count of allocated addresses in the pool"; 1926 } 1927 } 1928 list binding-info { 1929 key cli-id; 1930 description "A list that records a binding information for each DHCPv6 1931 client that has already been allocated IPv6 addresses."; 1932 leaf cli-id { 1933 type uint32; 1934 mandatory true; 1935 description "client id"; 1936 } 1937 container duid { 1938 description "Read the DUID"; 1939 uses dhcpv6-types:duid; 1940 } 1941 list cli-ia { 1942 key iaid; 1943 description "client IA"; 1944 leaf ia-type { 1945 type string; 1946 mandatory true; 1947 description "IA type"; 1948 } 1949 leaf iaid { 1950 type uint32; 1951 mandatory true; 1952 description "IAID"; 1953 } 1954 leaf-list cli-addr { 1955 type inet:ipv6-address; 1956 description "client addr"; 1957 } 1958 leaf pool-id { 1959 type uint32; 1960 mandatory true; 1961 description "pool id"; 1962 } 1963 } 1964 } 1965 } 1966 container pd-pools { 1967 description "If a server supports prefix delegation function, 1968 this container will be used to define the delegating 1969 router's prefix pools."; 1970 list prefix-pool { 1971 key pool-id; 1972 description "Similar to server's address pools, a delegating 1973 router can also be configured with multiple prefix pools 1974 specified by a list called 'prefix-pool'."; 1975 leaf pool-id { 1976 type uint32; 1977 mandatory true; 1978 description "pool id"; 1979 } 1980 leaf pd-space-utilization { 1981 type threshold; 1982 mandatory true; 1983 description "current PD space utilization"; 1984 } 1985 } 1986 list binding-info { 1987 key cli-id; 1988 description "A list records a binding information for each DHCPv6 1989 client that has already been allocated IPv6 prefixes."; 1990 leaf cli-id { 1991 type uint32; 1992 mandatory true; 1993 description "client id"; 1994 } 1995 container duid { 1996 description "Reads the DUID"; 1997 uses dhcpv6-types:duid; 1998 } 1999 list cli-iapd { 2000 key iaid; 2001 description "client IAPD"; 2002 leaf iaid { 2003 type uint32; 2004 mandatory true; 2005 description "IAID"; 2006 } 2007 leaf-list cli-prefix { 2008 type inet:ipv6-prefix; 2009 description "client ipv6 prefix"; 2010 } 2011 leaf-list cli-prefix-len { 2012 type uint8; 2013 description "client prefix length"; 2014 } 2015 leaf pool-id { 2016 type uint32; 2017 mandatory true; 2018 description "pool id"; 2019 } 2020 } 2021 } 2022 } 2024 container host-reservations { 2025 description "This container provides host reservations in the host level."; 2026 list binding-info { 2027 key cli-id; 2028 description 2029 "A list records a binding information for each DHCPv6 2030 client that has already been allocated IPv6 addresses or prefixes 2031 by host reservations."; 2032 leaf cli-id { 2033 type uint32; 2034 mandatory true; 2035 description "client id"; 2036 } 2037 container duid { 2038 description "Reads the DUID"; 2039 uses dhcpv6-types:duid; 2040 } 2041 list cli-ia { 2042 key iaid; 2043 description "client IA"; 2044 leaf ia-type { 2045 type string; 2046 mandatory true; 2047 description "IA type, IA_NA or IA_TA"; 2048 } 2049 leaf iaid { 2050 type uint32; 2051 mandatory true; 2052 description "IAID"; 2053 } 2054 leaf-list cli-addr { 2055 type inet:ipv6-address; 2056 description "client addr"; 2057 } 2058 } 2060 list cli-iapd { 2061 key iaid; 2062 description "client IAPD"; 2063 leaf iaid { 2064 type uint32; 2065 mandatory true; 2066 description "IAID"; 2067 } 2068 leaf-list cli-prefix { 2069 type inet:ipv6-prefix; 2070 description "client ipv6 prefix"; 2071 } 2072 leaf-list cli-prefix-len { 2073 type uint8; 2074 description "client prefix length"; 2075 } 2076 } 2077 } 2078 } 2080 } 2081 } 2083 container packet-stats { 2084 description "A container presents the packet statistics related to 2085 the DHCPv6 server."; 2086 leaf solicit-count { 2087 type uint32; 2088 mandatory true; 2089 description "solicit counter"; 2090 } 2091 leaf request-count { 2092 type uint32; 2093 mandatory true; 2094 description "request counter"; 2095 } 2096 leaf renew-count { 2097 type uint32; 2098 mandatory true; 2099 description "renew counter"; 2100 } 2101 leaf rebind-count { 2102 type uint32; 2103 mandatory true; 2104 description "rebind counter"; 2105 } 2106 leaf decline-count { 2107 type uint32; 2108 mandatory true; 2109 description "decline count"; 2110 } 2111 leaf release-count { 2112 type uint32; 2113 mandatory true; 2114 description "release counter"; 2115 } 2116 leaf info-req-count { 2117 type uint32; 2118 mandatory true; 2119 description "information request counter"; 2120 } 2121 leaf advertise-count { 2122 type uint32; 2123 mandatory true; 2124 description "advertise counter"; 2125 } 2126 leaf confirm-count { 2127 type uint32; 2128 mandatory true; 2129 description "confirm counter"; 2130 } 2131 leaf reply-count { 2132 type uint32; 2133 mandatory true; 2134 description "reply counter"; 2135 } 2136 leaf reconfigure-count { 2137 type uint32; 2138 mandatory true; 2139 description "reconfigure counter"; 2140 } 2141 leaf relay-forward-count { 2142 type uint32; 2143 mandatory true; 2144 description "relay forward counter"; 2145 } 2146 leaf relay-reply-count { 2147 type uint32; 2148 mandatory true; 2149 description "relay reply counter"; 2150 } 2151 } 2152 } 2153 } 2155 /* 2156 * Notifications 2157 */ 2159 notification notifications { 2160 description "dhcpv6 server notification module"; 2162 container dhcpv6-server-event { 2163 description "dhcpv6 server event"; 2164 container address-pool-running-out { 2165 description "raised when the address pool is going to 2166 run out. A threshold for utilization ratio of the pool has 2167 been defined in the server feature so that it will notify the 2168 administrator when the utilization ratio reaches the 2169 threshold, and such threshold is a settable parameter"; 2170 leaf total-address-count { 2171 type uint64; 2172 mandatory true; 2173 description "count of total addresses in the pool"; 2174 } 2175 leaf max-address-count { 2176 type uint64; 2177 mandatory true; 2178 description "maximum count of addresses that can be allocated 2179 in the pool. This value may be less than count of total 2180 addresses"; 2181 } 2182 leaf allocated-address-conut { 2183 type uint64; 2184 mandatory true; 2185 description "count of allocated addresses in the pool"; 2186 } 2187 container duid { 2188 description "server duid"; 2189 uses dhcpv6-types:duid; 2190 } 2191 leaf serv-name { 2192 type string; 2193 description "server name"; 2194 } 2195 leaf pool-name { 2196 type string; 2197 mandatory true; 2198 description "pool name"; 2199 } 2200 } 2201 container pd-pool-running-out { 2202 description "raised when the address/prefix pool is going to 2203 run out. A threshold for utilization ratio of the pool has 2204 been defined in the server feature so that it will notify the 2205 administrator when the utilization ratio reaches the 2206 threshold, and such threshold is a settable parameter"; 2207 leaf max-pd-space-utilization { 2208 type threshold; 2209 mandatory true; 2210 description "maximum pd space utilization"; 2211 } 2212 leaf pd-space-utilization { 2213 type threshold; 2214 mandatory true; 2215 description "current pd space utilization"; 2216 } 2217 container duid { 2218 description "Sets the DUID"; 2219 uses dhcpv6-types:duid; 2220 } 2221 leaf serv-name { 2222 type string; 2223 description "server name"; 2224 } 2225 leaf pool-name { 2226 type string; 2227 mandatory true; 2228 description "pool name"; 2229 } 2230 } 2231 container invalid-client-detected { 2232 description "raised when the server has found a client which 2233 can be regarded as a potential attacker. Some description 2234 could also be included."; 2235 container duid { 2236 description "Sets the DUID"; 2237 uses dhcpv6-types:duid; 2238 } 2239 leaf description { 2240 type string; 2241 description "description of the event"; 2242 } 2243 } 2244 } 2245 } 2246 } 2247 2249 3.2. DHCPv6 Relay YANG Model 2251 This module imports typedefs from [RFC6991], [RFC7223]. 2253 file "ietf-dhcpv6-relay.yang" 2254 module ietf-dhcpv6-relay { 2255 yang-version 1.1; 2256 namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-relay"; 2257 prefix "dhcpv6-relay"; 2258 import ietf-inet-types { 2259 prefix inet; 2260 } 2261 import ietf-dhcpv6-options { 2262 prefix dhcpv6-options; 2263 } 2264 import ietf-dhcpv6-types { 2265 prefix dhcpv6-types; 2266 } 2267 import ietf-interfaces { 2268 prefix if; 2269 } 2271 organization 2272 "IETF DHC (Dynamic Host Configuration) Working group"; 2274 contact 2275 "cuiyong@tsinghua.edu.cn 2276 lh.sunlinh@gmail.com 2277 ian.farrer@telekom.de 2278 sladjana.zechlin@telekom.de 2279 hezihao9512@gmail.com"; 2281 description 2282 "This model defines a YANG data model that can be 2283 used to configure and manage a DHCPv6 relay."; 2285 revision 2018-09-04 { 2286 description ""; 2287 reference "I-D: draft-ietf-dhc-dhcpv6-yang"; 2288 } 2290 revision 2018-03-04 { 2291 description "Resolved most issues on the DHC official 2292 github"; 2293 reference "I-D: draft-ietf-dhc-dhcpv6-yang"; 2294 } 2296 revision 2017-12-22 { 2297 description 2298 "Resolve most issues on Ian's github."; 2299 reference 2300 "I-D: draft-ietf-dhc-dhcpv6-yang"; 2301 } 2303 revision 2017-11-24 { 2304 description 2305 "First version of the separated relay specific 2306 YANG model."; 2307 reference 2308 "I-D: draft-ietf-dhc-dhcpv6-yang"; 2309 } 2311 /* 2312 * Data Nodes 2313 */ 2315 container relay { 2316 presence 2317 "Enables the relay"; 2318 description 2319 "DHCPv6 relay portion"; 2321 container relay-config { 2322 description 2323 "This container contains the configuration data 2324 of the relay."; 2325 container relay-attributes { 2326 description 2327 "A container describes some basic attributes of the relay 2328 agent including some relay agent specific options data that 2329 need to be configured previously. 2330 Such options include Remote-Id option and Subscriber-Id 2331 option."; 2332 leaf name { 2333 type string; 2334 description 2335 "Relay agent name"; 2336 } 2337 leaf description { 2338 type string; 2339 description 2340 "Textual description of the relay agent"; 2341 } 2342 leaf-list dest-addrs { 2343 type inet:ipv6-address; 2344 description 2345 "Each DHCPv6 relay agent may be configured with a list 2346 of destination addresses. 2347 This node defines such a list of IPv6 addresses that 2348 may include unicast addresses, multicast addresses or 2349 other addresses."; 2350 } 2351 list subscribers { 2352 key subscriber; 2353 description 2354 "Subscribers"; 2355 leaf subscriber { 2356 type uint8; 2357 mandatory true; 2358 description 2359 "Subscriber"; 2360 } 2361 leaf subscriber-id { 2362 type string; 2363 mandatory true; 2364 description 2365 "Subscriber id"; 2366 } 2367 } 2368 list remote-host { 2369 key ent-num; 2370 description 2371 "Remote host"; 2372 leaf ent-num { 2373 type uint32; 2374 mandatory true; 2375 description 2376 "Enterprise number"; 2377 } 2378 leaf remote-id { 2379 type string; 2380 mandatory true; 2381 description 2382 "Remote id"; 2383 } 2384 } 2385 uses dhcpv6-types:vendor-infor; 2386 } 2388 container rsoo-option-sets { 2389 description 2390 "DHCPv6 relay agent could provide some information that would 2391 be useful to DHCPv6 client. 2392 Since relay agent cannot provide options directly to the 2393 client, RSOO-enabled options are defined to propose options 2394 for the server to send to the client. 2395 This container models such RSOO-enabled options."; 2396 reference 2397 "RFC6422"; 2398 list option-set { 2399 key option-set-id; 2400 description 2401 "This list under the 'rsoo-option-sets' container is similar 2402 to the that defined in server module. 2403 It allows the relay to implement several sets of RSOO-enabled 2404 options for different interfaces. 2405 The list only includes the EAP Re-authentication Protocol 2406 (ERP) Local Domain Name DHCPv6 Option defined in RFC6440, 2407 since it is the only one RSOO-enabled options accepted by 2408 IANA so far."; 2409 leaf option-set-id { 2410 type uint32; 2411 description "Option sed id"; 2412 } 2413 uses dhcpv6-options:relay-supplied-option-definitions; 2414 } 2415 } 2417 list relay-if { 2418 // if - This should reference an entry in ietf-interfaces 2419 key if-name; 2420 description 2421 "A relay agent may have several interfaces, we should provide 2422 a way to configure and manage parameters on the interface-level. 2423 A list that describes specific interfaces and their corresponding 2424 parameters is employed to fulfill the configuration. Here we use 2425 a string called 'if-name' as the key of list."; 2426 leaf if-name { 2427 type if:interface-ref; 2428 mandatory true; 2429 description 2430 "Interface name"; 2431 } 2432 leaf interface-id { 2433 type string; 2434 description 2435 "Interface id"; 2436 } 2438 /* 2439 leaf enable { 2440 type boolean; 2441 mandatory true; 2442 description "whether this interface is enabled"; 2443 } 2444 */ 2446 leaf ipv6-address { 2447 type inet:ipv6-address; 2448 description 2449 "IPv6 address for this interface"; 2451 } 2453 leaf rsoo-option-set-id { 2454 type leafref { 2455 path "/relay/relay-config/rsoo-option-sets/option-set/option-set-id"; 2456 } 2457 description "Configured Relay Supplied Option set"; 2458 } 2460 list next-entity { 2461 key dest-addr; 2462 description 2463 "This node defines a list that is used to describe the 2464 next hop entity of this relay distinguished by their 2465 addresses."; 2466 leaf dest-addr { 2467 type inet:ipv6-address; 2468 mandatory true; 2469 description 2470 "Destination addr"; 2471 } 2472 leaf available { 2473 type boolean; 2474 mandatory true; 2475 description 2476 "Whether the next entity is available or not"; 2477 } 2478 leaf multicast { 2479 type boolean; 2480 mandatory true; 2481 description 2482 "Whether the address is multicast or not"; 2483 } 2484 leaf server { 2485 type boolean; 2486 mandatory true; 2487 description 2488 "Whether the next entity is a server"; 2489 } 2490 } 2491 } 2492 } 2494 container relay-state { 2495 config "false"; 2496 description 2497 "State data of relay"; 2499 list relay-if { 2500 key if-name; 2501 description 2502 "A relay agent may have several interfaces, we should provide 2503 a way to configure and manage parameters on the interface-level. 2504 A list that describes specific interfaces and their corresponding 2505 parameters is employed to fulfill the configuration. Here we use 2506 a string called 'if-name' as the key of list."; 2507 leaf if-name{ 2508 type string; 2509 mandatory true; 2510 description 2511 "Interface name"; 2512 } 2513 list pd-route { 2514 // if - need to look at if/how we model these. If they are 2515 // going to be modeled, then they should be ro state 2516 // entries (we're not trying to configure routes here) 2517 key pd-route-id; 2518 description "pd route"; 2519 leaf pd-route-id { 2520 type uint8; 2521 mandatory true; 2522 description 2523 "PD route id"; 2524 } 2525 leaf requesting-router-id { 2526 type uint32; 2527 mandatory true; 2528 description 2529 "Requesting router id"; 2530 } 2531 leaf delegating-router-id { 2532 type uint32; 2533 mandatory true; 2534 description 2535 "Delegating router id"; 2536 } 2537 leaf next-router { 2538 type inet:ipv6-address; 2539 mandatory true; 2540 description 2541 "Next router"; 2542 } 2543 leaf last-router { 2544 type inet:ipv6-address; 2545 mandatory true; 2546 description 2547 "Previous router"; 2548 } 2549 } 2550 list next-entity { 2551 key dest-addr; 2552 description "This node defines a list that is used to 2553 describe the next hop entity of this relay agent. 2554 Different entities are distinguished by their 2555 addresses."; 2556 leaf dest-addr { 2557 type inet:ipv6-address; 2558 mandatory true; 2559 description "destination addr"; 2560 } 2561 container packet-stats { 2562 description "packet statistics"; 2563 leaf solicit-rvd-count { 2564 type uint32; 2565 mandatory true; 2566 description "solicit received counter"; 2567 } 2568 leaf request-rvd-count { 2569 type uint32; 2570 mandatory true; 2571 description "request received counter"; 2572 } 2573 leaf renew-rvd-count { 2574 type uint32; 2575 mandatory true; 2576 description "renew received counter"; 2577 } 2578 leaf rebind-rvd-count { 2579 type uint32; 2580 mandatory true; 2581 description "rebind received counter"; 2582 } 2583 leaf decline-rvd-count { 2584 type uint32; 2585 mandatory true; 2586 description "decline received counter"; 2587 } 2588 leaf release-rvd-count { 2589 type uint32; 2590 mandatory true; 2591 description "release received counter"; 2592 } 2593 leaf info-req-rvd-count { 2594 type uint32; 2595 mandatory true; 2596 description "information request counter"; 2597 } 2598 leaf relay-for-rvd-count { 2599 type uint32; 2600 mandatory true; 2601 description "relay forward received counter"; 2602 } 2603 leaf relay-rep-rvd-count { 2604 type uint32; 2605 mandatory true; 2606 description "relay reply received counter"; 2607 } 2608 leaf packet-to-cli-count { 2609 type uint32; 2610 mandatory true; 2611 description "packet to client counter"; 2612 } 2613 leaf adver-sent-count { 2614 type uint32; 2615 mandatory true; 2616 description "advertisement sent counter"; 2617 } 2618 leaf confirm-sent-count { 2619 type uint32; 2620 mandatory true; 2621 description "confirm sent counter"; 2622 } 2623 leaf reply-sent-count { 2624 type uint32; 2625 mandatory true; 2626 description "reply sent counter"; 2627 } 2628 leaf reconfig-sent-count { 2629 type uint32; 2630 mandatory true; 2631 description "reconfigure sent counter"; 2632 } 2633 leaf relay-for-sent-count { 2634 type uint32; 2635 mandatory true; 2636 description "relay forward sent counter"; 2637 } 2638 leaf relay-rep-sent-count { 2639 type uint32; 2640 mandatory true; 2641 description "relay reply sent counter"; 2642 } 2644 } 2645 } 2646 } 2647 container relay-stats { 2648 config "false"; 2649 description 2650 "Relay statistics"; 2651 leaf cli-packet-rvd-count { 2652 type uint32; 2653 mandatory true; 2654 description 2655 "Client packet received counter"; 2656 } 2657 leaf relay-for-rvd-count { 2658 type uint32; 2659 mandatory true; 2660 description 2661 "Relay forward received counter"; 2662 } 2663 leaf relay-rep-rvd-count { 2664 type uint32; 2665 mandatory true; 2666 description 2667 "Relay reply received counter"; 2668 } 2669 leaf packet-to-cli-count { 2670 type uint32; 2671 mandatory true; 2672 description 2673 "Packet to client counter"; 2674 } 2675 leaf relay-for-sent-count { 2676 type uint32; 2677 mandatory true; 2678 description 2679 "Relay forward sent counter"; 2680 } 2681 leaf relay-rep-sent-count { 2682 type uint32; 2683 mandatory true; 2684 description 2685 "Relay reply sent counter"; 2686 } 2687 leaf discarded-packet-count { 2688 type uint32; 2689 mandatory true; 2690 description 2691 "Discarded packet counter"; 2693 } 2694 } 2695 } 2696 } 2698 /* 2699 * Notifications 2700 */ 2702 notification notifications { 2703 description "DHCPv6 relay notification module"; 2704 container dhcpv6-relay-event { 2705 description 2706 "DHCPv6 relay event"; 2707 container topo-changed { 2708 description 2709 "Raised when the topology of the relay agent is changed."; 2710 leaf relay-if-name { 2711 type string; 2712 mandatory true; 2713 description 2714 "Relay interface name"; 2715 } 2716 leaf first-hop { 2717 type boolean; 2718 mandatory true; 2719 description 2720 "First hop"; 2721 } 2722 leaf last-entity-addr { 2723 type inet:ipv6-address; 2724 mandatory true; 2725 description 2726 "Last entity address"; 2727 } 2728 } 2729 } 2730 } 2731 } 2732 2734 3.3. DHCPv6 Client YANG Model 2736 This module imports typedefs from [RFC6991], [RFC7223]. 2738 file "ietf-dhcpv6-client.yang" 2739 module ietf-dhcpv6-client { 2740 yang-version 1.1; 2741 namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-client"; 2742 prefix "dhcpv6-client"; 2744 import ietf-dhcpv6-options { 2745 prefix dhcpv6-options; 2746 } 2747 import ietf-dhcpv6-types { 2748 prefix dhcpv6-types; 2749 } 2750 import ietf-interfaces { 2751 prefix if; 2752 } 2754 organization "DHC WG"; 2755 contact 2756 "cuiyong@tsinghua.edu.cn 2757 wangh13@mails.tsinghua.edu.cn 2758 lh.sunlinh@gmail.com 2759 ian.farrer@telekom.de 2760 sladjana.zechlin@telekom.de 2761 hezihao9512@gmail.com "; 2763 description "This model defines a YANG data model that can be 2764 used to configure and manage a DHCPv6 client."; 2766 revision 2018-09-04 { 2767 description ""; 2768 reference "I-D: draft-ietf-dhc-dhcpv6-yang"; 2769 } 2771 revision 2018-03-04 { 2772 description "Resolved most issues on the DHC official 2773 github"; 2774 reference "I-D: draft-ietf-dhc-dhcpv6-yang"; 2775 } 2777 revision 2017-12-22 { 2778 description "Resolve most issues on Ian's github."; 2779 reference "I-D: draft-ietf-dhc-dhcpv6-yang"; 2780 } 2782 revision 2017-11-24 { 2783 description "First version of the separated client specific 2784 YANG model."; 2785 reference "I-D: draft-ietf-dhc-dhcpv6-yang"; 2786 } 2788 /* 2789 * Data Nodes 2790 */ 2792 container client { 2793 presence "Enables the client"; 2794 description "dhcpv6 client portion"; 2796 container client-config { 2797 description "configuration tree of client"; 2798 container duid { 2799 description "Sets the DUID"; 2800 uses dhcpv6-types:duid; 2801 } 2802 list client-if { 2803 key if-name; 2804 description "A client may have several interfaces, it is more reasonable to 2805 configure and manage parameters on the interface-level. The list defines 2806 specific client interfaces and their data. Different interfaces are 2807 distinguished by the key which is a configurable string value."; 2808 leaf if-name { 2809 type if:interface-ref; 2810 mandatory true; 2811 description "interface name"; 2812 } 2814 leaf cli-id { 2815 type uint32; 2816 mandatory true; 2817 description "client id"; 2818 } 2820 /* 2821 leaf description { 2822 type string; 2823 description "description of the client interface"; 2824 } 2825 */ 2827 leaf pd-function { 2828 type boolean; 2829 mandatory true; 2830 description "Whether the client can act as a requesting router 2831 to request prefixes using prefix delegation ([RFC3633])."; 2832 } 2833 leaf rapid-commit { 2834 type boolean; 2835 mandatory true; 2836 description "'true' indicates a client can initiate a Solicit-Reply message 2837 exchange by adding a Rapid Commit option in Solicit message. 'false' means 2838 the client is not allowed to add a Rapid Commit option to request 2839 addresses in a two-message exchange pattern."; 2840 } 2842 /* 2843 container mo-tab { 2844 description "The management tab label indicates the operation mode of the 2845 DHCPv6 client. 2846 'm'=1 and 'o'=1 indicate the client will use DHCPv6 to obtain all the configuration 2847 data. 2848 'm'=1 and 'o'=0 are a meaningless combination. 2849 'm'=0 and 'o'=1 indicate the client will use stateless DHCPv6 to obtain configuration 2850 data apart from addresses/prefixes data. 2851 'm'=0 and 'o'=0 represent the client will not use DHCPv6 but use SLAAC to 2852 achieve configuration."; 2854 // if - not sure about the intended use here as it seems 2855 // to be redefining what will be received in the PIO. Is 2856 // the intention to be whether they PIO options will be 2857 // obeyed as received or overridden? 2858 leaf m-tab { 2859 type boolean; 2860 mandatory true; 2861 description "m tab"; 2862 } 2863 leaf o-tab { 2864 type boolean; 2865 mandatory true; 2866 description "o tab"; 2867 } 2868 } 2869 */ 2871 container client-configured-options { 2872 description "client configured options"; 2873 uses dhcpv6-options:client-option-definitions; 2874 } 2875 } 2876 } 2878 container client-state { 2879 config "false"; 2880 description "state tree of client"; 2881 container if-other-params { 2882 description "A client can obtain extra configuration 2883 data other than address and prefix information through 2884 DHCPv6. This container describes such data the client 2885 was configured. The potential configuration data may 2886 include DNS server addresses, SIP server domain names, etc."; 2887 uses dhcpv6-options:server-option-definitions; 2888 } 2889 container packet-stats { 2890 config "false"; 2891 description "A container records 2892 all the packet status information 2893 of a specific interface."; 2894 leaf solicit-count { 2895 type uint32; 2896 mandatory true; 2897 description "solicit counter"; 2898 } 2899 leaf request-count { 2900 type uint32; 2901 mandatory true; 2902 description "request counter"; 2903 } 2904 leaf renew-count { 2905 type uint32; 2906 mandatory true; 2907 description "renew counter"; 2908 } 2909 leaf rebind-count { 2910 type uint32; 2911 mandatory true; 2912 description "rebind counter"; 2913 } 2914 leaf decline-count { 2915 type uint32; 2916 mandatory true; 2917 description "decline counter"; 2918 } 2919 leaf release-count { 2920 type uint32; 2921 mandatory true; 2922 description "release counter"; 2923 } 2924 leaf info-req-count { 2925 type uint32; 2926 mandatory true; 2927 description "information request counter"; 2928 } 2929 leaf advertise-count { 2930 type uint32; 2931 mandatory true; 2932 description "advertise counter"; 2934 } 2935 leaf confirm-count { 2936 type uint32; 2937 mandatory true; 2938 description "confirm counter"; 2939 } 2940 leaf reply-count { 2941 type uint32; 2942 mandatory true; 2943 description "reply counter"; 2944 } 2945 leaf reconfigure-count { 2946 type uint32; 2947 mandatory true; 2948 description "reconfigure counter"; 2949 } 2950 } 2951 } 2953 } 2955 /* 2956 * Notifications 2957 */ 2959 notification notifications { 2960 description "dhcpv6 client notification module"; 2961 container dhcpv6-client-event { 2962 description "dhcpv6 client event"; 2964 container ia-lease-event { 2965 description "raised when the client was allocated 2966 a new IA from the server or it renew/rebind/release 2967 its current IA"; 2968 leaf event-type { 2969 type enumeration { 2970 enum "allocation" { 2971 description "allocate"; 2972 } 2973 enum "rebind" { 2974 description "rebind"; 2975 } 2976 enum "renew" { 2977 description "renew"; 2978 } 2979 enum "release" { 2980 description "release"; 2981 } 2983 } 2984 mandatory true; 2985 description "event type"; 2986 } 2987 container duid { 2988 description "Sets the DUID"; 2989 uses dhcpv6-types:duid; 2990 } 2991 leaf iaid { 2992 type uint32; 2993 mandatory true; 2994 description "IAID"; 2995 } 2996 leaf serv-name { 2997 type string; 2998 description "server name"; 2999 } 3000 leaf description { 3001 type string; 3002 description "description of event"; 3003 } 3004 } 3006 container invalid-ia-detected { 3007 description "raised when the identity association of the 3008 client can be proved to be invalid. Possible condition 3009 includes duplicated address, illegal address, etc."; 3010 container duid { 3011 description "Sets the DUID"; 3012 uses dhcpv6-types:duid; 3013 } 3014 leaf cli-duid { 3015 type uint32; 3016 mandatory true; 3017 description "duid of client"; 3018 } 3019 leaf iaid { 3020 type uint32; 3021 mandatory true; 3022 description "IAID"; 3023 } 3024 leaf serv-name { 3025 type string; 3026 description "server name"; 3027 } 3028 leaf description { 3029 type string; 3030 description "description of the event"; 3032 } 3033 } 3035 container retransmission-failed { 3036 description "raised when the retransmission mechanism defined 3037 in [RFC3315] is failed."; 3038 container duid { 3039 description "Sets the DUID"; 3040 uses dhcpv6-types:duid; 3041 } 3042 leaf description { 3043 type enumeration { 3044 enum "MRC failed" { 3045 description "MRC failed"; 3046 } 3047 enum "MRD failed" { 3048 description "MRD failed"; 3049 } 3050 } 3051 mandatory true; 3052 description "description of failure"; 3053 } 3054 } 3056 container failed-status-turn-up { 3057 description "raised when the client receives a message includes 3058 an unsuccessful Status Code option."; 3059 container duid { 3060 description "Sets the DUID"; 3061 uses dhcpv6-types:duid; 3062 } 3063 leaf status-code { 3064 type enumeration { 3065 enum "1" { 3066 description "UnspecFail"; 3067 } 3068 enum "2" { 3069 description "NoAddrAvail"; 3070 } 3071 enum "3" { 3072 description "NoBinding"; 3073 } 3074 enum "4" { 3075 description "NotOnLink"; 3076 } 3077 enum "5" { 3078 description "UseMulticast"; 3079 } 3081 } 3082 mandatory true; 3083 description "employed status code"; 3084 } 3085 } 3087 } 3088 } 3089 } 3090 3092 3.4. DHCPv6 Options YANG Model 3094 This module imports typedefs from [RFC6991], [RFC7223]. 3096 file "ietf-dhcpv6-options.yang" 3097 module ietf-dhcpv6-options { 3098 yang-version 1.1; 3099 namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-options"; 3100 prefix "dhcpv6-options"; 3102 import ietf-inet-types { 3103 prefix inet; 3104 } 3105 import ietf-yang-types { 3106 prefix yang; 3107 } 3108 import ietf-dhcpv6-types { 3109 prefix dhcpv6-types; 3110 } 3112 organization "DHC WG"; 3113 contact 3114 "cuiyong@tsinghua.edu.cn 3115 wangh13@mails.tsinghua.edu.cn 3116 lh.sunlinh@gmail.com 3117 ian.farrer@telekom.de 3118 sladjana.zechlin@telekom.de 3119 hezihao9512@gmail.com"; 3121 description "This model defines a YANG data model that can be 3122 used to configure DHCPv6 options."; 3124 revision 2018-09-04 { 3125 description ""; 3126 reference "I-D: draft-ietf-dhc-dhcpv6-yang"; 3127 } 3128 revision 2018-03-04 { 3129 description "Resolved most issues on the DHC official 3130 github"; 3131 reference "I-D: draft-ietf-dhc-dhcpv6-yang"; 3132 } 3134 revision 2017-12-22 { 3135 description "Resolve most issues on Ian's github."; 3136 reference "I-D: draft-ietf-dhc-dhcpv6-yang"; 3137 } 3139 revision 2017-11-24 { 3140 description "First version of the separated DHCPv6 options 3141 YANG model."; 3142 reference "I-D:draft-ietf-dhc-dhcpv6-yang"; 3143 } 3145 /* 3146 * Features 3147 */ 3149 // features for server options 3150 feature server-unicast-op { 3151 description "Support for Server Unicast option"; 3152 } 3153 feature sip-server-domain-name-list-op { 3154 description "Support for SIP Server Domain Name List option"; 3155 } 3156 feature sip-server-address-list-op { 3157 description "Support for SIP Server Address List option"; 3158 } 3159 feature dns-servers-op { 3160 description "Support for DNS Servers Option"; 3161 } 3162 feature domain-searchlist-op { 3163 description "Support for Domain Search List Option"; 3164 } 3165 feature nis-config-op { 3166 description "Support for Network Information Service (NIS) 3167 Servers option"; 3168 } 3169 feature nis-plus-config-op { 3170 description "Support for Network Information Service V2 (NIS+) 3171 Servers option"; 3172 } 3173 feature nis-domain-name-op { 3174 description "Support for Network Information Service (NIS) 3175 Domain Name option"; 3177 } 3178 feature nis-plus-domain-name-op { 3179 description "Support for Network Information Service V2 (NIS+) 3180 Server option"; 3181 } 3182 feature sntp-server-op { 3183 description "Support for Simple Network Protocol Configuration 3184 (SNTP) Servers option"; 3185 } 3186 feature info-refresh-time-op { 3187 description "Support for Information Refresh Time option"; 3188 } 3189 feature client-fqdn-op { 3190 description "Support for Client FQDN option"; 3191 } 3192 feature posix-timezone-op { 3193 description "Support for New POIX Timezone option"; 3194 } 3195 feature tzdb-timezone-op { 3196 description "Support for New TZDB Timezone option"; 3197 } 3198 feature ntp-server-op { 3199 description "Support for Network Time Protocol (NTP) 3200 Server option"; 3201 } 3202 feature boot-file-url-op { 3203 description "Support for Boot File URL option"; 3204 } 3205 feature boot-file-param-op { 3206 description "Support for Boot File Parameters option"; 3207 } 3208 feature aftr-name-op { 3209 description "Support for Address Family Transition 3210 Router (AFTR) option"; 3211 } 3212 feature kbr-default-name-op { 3213 description "Support for Kerberos Default Name 3214 Option"; 3215 } 3216 feature kbr-kdc-op { 3217 description "Support for Kerberos KDC option"; 3218 } 3219 feature sol-max-rt-op { 3220 description "Support for SOL_MAX_RT option"; 3221 } 3222 feature inf-max-rt-op { 3223 description "Support for INF_MAX_RT option"; 3224 } 3225 feature addr-selection-op { 3226 description "Support for Address Selection option"; 3227 } 3228 feature pcp-server-op { 3229 description "Support for Port Control Protocol (PCP) 3230 option"; 3231 } 3232 feature s46-rule-op { 3233 description "Support for S46 Rule option"; 3234 } 3235 feature s46-br-op { 3236 description "Support for S46 Border Relay (BR) option"; 3237 } 3238 feature s46-dmr-op { 3239 description "Support for S46 Default Mapping Rule 3240 (DMR) option"; 3241 } 3242 feature s46-v4-v6-binding-op { 3243 description "Support for S46 IPv4/IPv6 Address 3244 Bind option"; 3245 } 3247 // features for relay-supplied options 3248 feature erp-local-domain-name-op { 3249 description "Support for ERP Local Domain Name option"; 3250 } 3252 // features for client options 3253 feature option-request-op { 3254 description "Support for Option Request option"; 3255 } 3256 feature rapid-commit-op { 3257 description "Support for Rapid Commit option"; 3258 } 3259 feature user-class-op { 3260 description "Support for User Class option"; 3261 } 3262 feature vendor-class-op { 3263 description "Support for Vendor Class option"; 3264 } 3265 feature client-arch-type-op { 3266 description "Support for Client System Architecture 3267 Type option"; 3268 } 3269 feature client-network-interface-identifier-op { 3270 description "Support for Client Network Interface 3271 Identifier option"; 3272 } 3273 feature kbr-principal-name-op { 3274 description "Support for Kerberos Principal 3275 Name option"; 3276 } 3277 feature kbr-realm-name-op { 3278 description "Support Kerberos Realm Name option"; 3279 } 3280 feature client-link-layer-addr-op { 3281 description "Support for Client Link-Layer Address 3282 Option"; 3283 } 3285 // features for custom options 3286 feature operator-op-ipv6-address { 3287 description "Support for Option with IPv6 Addresses"; 3288 } 3289 feature operator-op-single-flag { 3290 description "Support for Option with Single Flag"; 3291 } 3292 feature operator-op-ipv6-prefix { 3293 description "Support for Option with IPv6 Prefix"; 3294 } 3295 feature operator-op-int32 { 3296 description "Support for Option with 32-bit 3297 Integer Value"; 3298 } 3299 feature operator-op-int16 { 3300 description "Support for Option with 16-bit Integer Value"; 3301 } 3302 feature operator-op-int8 { 3303 description "Support for Option with 8-bit Integer Value"; 3304 } 3305 feature operator-op-uri { 3306 description "Support for Option with URI"; 3307 } 3308 feature operator-op-textstring { 3309 description "Support for Option with Text String"; 3310 } 3311 feature operator-op-var-data { 3312 description "Support for Option with Variable-Length Data"; 3313 } 3314 feature operator-op-dns-wire { 3315 description "Support for Option with DNS Wire 3316 Format Domain Name List"; 3317 } 3319 /* 3320 * Groupings 3321 */ 3323 grouping server-option-definitions { 3324 description "Contains definitions for options configured on the 3325 DHCPv6 server which will be supplied to clients."; 3327 container server-unicast-option { 3328 if-feature server-unicast-op; 3329 presence "Enable this option"; 3330 description "OPTION_UNICAST (12) Server Unicast Option"; 3331 reference "RFC3315: Dynamic Host Configuration Protocol for 3332 IPv6 (DHCPv6)"; 3333 leaf server-address { 3334 type inet:ipv6-address; 3335 description "server ipv6 address"; 3336 } 3337 } 3339 container sip-server-domain-name-list-option { 3340 if-feature sip-server-domain-name-list-op; 3341 presence "Enable this option"; 3342 description "OPTION_SIP_SERVER_D (21) SIP Servers Domain Name List"; 3343 reference "RFC3319: Dynamic Host Configuration Protocol 3344 (DHCPv6) Options for Session Initiation Protocol (SIP) Servers"; 3345 leaf sip-serv-domain-name { 3346 type string; 3347 mandatory true; 3348 description "sip server domain name"; 3349 } 3350 } 3352 container sip-server-address-list-option { 3353 if-feature sip-server-address-list-op; 3354 presence "Enable this option"; 3355 description "OPTION_SIP_SERVER_A (22) SIP Servers IPv6 Address List"; 3356 reference "RFC3319: Dynamic Host Configuration Protocol (DHCPv6) 3357 Options for Session Initiation Protocol (SIP) Servers"; 3358 list sip-server { 3359 key sip-serv-id; 3360 description "sip server info"; 3361 leaf sip-serv-id { 3362 type uint8; 3363 mandatory true; 3364 description "sip server id"; 3365 } 3366 leaf sip-serv-addr { 3367 type inet:ipv6-address; 3368 mandatory true; 3369 description "sip server addr"; 3370 } 3371 } 3372 } 3374 container dns-servers-option { 3375 if-feature dns-servers-op; 3376 presence "Enable this option"; 3377 description "OPTION_DNS_SERVERS (23) DNS recursive Name Server option"; 3378 reference "RFC3646: DNS Configuration options for Dynamic Host Configuration 3379 Protocol for IPv6 (DHCPv6)"; 3380 list dns-server { 3381 key dns-serv-id; 3382 description "dns server info"; 3383 leaf dns-serv-id { 3384 type uint8; 3385 mandatory true; 3386 description "DNS server list entry ID."; 3387 } 3388 leaf dns-serv-addr { 3389 type inet:ipv6-address; 3390 mandatory true; 3391 description "DNS server address."; 3392 } 3393 } 3394 } 3396 container domain-searchlist-option { 3397 if-feature domain-searchlist-op; 3398 presence "Enable this option"; 3399 description "OPTION_DOMAIN_LIST (24) Domain Search List Option"; 3400 reference "RFC3646: DNS Configuration options for Dynamic 3401 Host Configuration Protocol for IPv6 (DHCPv6)"; 3402 list domain-searchlist { 3403 key domain-searchlist-id; 3404 description "dns server info"; 3405 leaf domain-searchlist-id { 3406 type uint8; 3407 mandatory true; 3408 description "Domain seachlist entry ID."; 3409 } 3410 leaf domain-search-list-entry { 3411 type string; 3412 mandatory true; 3413 description "Domain search list entry."; 3414 } 3415 } 3416 } 3417 container nis-config-option { 3418 if-feature nis-config-op; 3419 presence "Enable this option"; 3420 description "OPTION_NIS_SERVERS (27) Network Information Service (NIS) 3421 Servers Option."; 3422 reference "RFC3898: Network Information Service (NIS) Configuration 3423 Options for Dynamic Host Configuration Protocol for IPv6 (DHCPv6)"; 3424 list nis-server { 3425 key nis-serv-id; 3426 description "nis server info"; 3427 leaf nis-serv-id { 3428 type uint8; 3429 mandatory true; 3430 description "nis server id"; 3431 } 3432 leaf nis-serv-addr { 3433 type inet:ipv6-address; 3434 mandatory true; 3435 description "nis server addr"; 3436 } 3437 } 3438 } 3440 container nis-plus-config-option { 3441 if-feature nis-plus-config-op; 3442 presence "Enable this option"; 3443 description "OPTION_NISP_SERVERS (28): Network Information Service V2 3444 (NIS+) Servers Option."; 3445 reference "RFC3989: Network Information Service (NIS) Configuration 3446 Options for Dynamic Host Configuration Protocol for IPv6 (DHCPv6)"; 3447 list nis-plus-server { 3448 key nis-plus-serv-id; 3449 description "NIS+ server information."; 3450 leaf nis-plus-serv-id { 3451 type uint8; 3452 mandatory true; 3453 description "nisp server id"; 3454 } 3455 leaf nis-plus-serv-addr { 3456 type inet:ipv6-address; 3457 mandatory true; 3458 description "nisp server addr"; 3459 } 3460 } 3461 } 3463 container nis-domain-name-option { 3464 if-feature nis-domain-name-op; 3465 presence "Enable this option"; 3466 description "OPTION_NIS_DOMAIN_NAME (29) Network Information 3467 Service (NIS) Domain Name Option"; 3468 reference "RFC3989: Network Information Service (NIS) 3469 Configuration Options for Dynamic Host Configuration Protocol 3470 for IPv6 (DHCPv6)"; 3471 leaf nis-domain-name { 3472 type string; 3473 description "The Network Information Service (NIS) Domain Name 3474 option is used by the server to convey client's NIS Domain Name 3475 info to the client."; 3476 } 3477 } 3479 container nis-plus-domain-name-option { 3480 if-feature nis-plus-domain-name-op; 3481 presence "Enable this option"; 3482 description "OPTION_NISP_DOMAIN_NAME (30) Network Information 3483 Service V2 (NIS+) Domain Name Option"; 3484 reference "RFC3989: Network Information Service (NIS) 3485 Configuration Options for Dynamic Host Configuration Protocol 3486 for IPv6 (DHCPv6)"; 3487 leaf nis-plus-domain-name { 3488 type string; 3489 description "The Network Information Service V2 (NIS+) Domain Name 3490 option is used by the server to convey client's NIS+ Domain Name 3491 info to the client."; 3492 } 3493 } 3495 container sntp-server-option { 3496 if-feature sntp-server-op; 3497 presence "Enable this option"; 3498 description "OPTION_SNTP_SERVERS (31) Simple Network Time Protocol 3499 (SNTP) Servers Option"; 3500 reference "RFC4075: Simple Network Time Protocol (SNTP) Configuration 3501 Option for DHCPv6"; 3502 list sntp-server { 3503 key sntp-serv-id; 3504 description "sntp server info"; 3505 leaf sntp-serv-id { 3506 type uint8; 3507 mandatory true; 3508 description "sntp server id"; 3509 } 3510 leaf sntp-serv-addr { 3511 type inet:ipv6-address; 3512 mandatory true; 3513 description "sntp server addr"; 3514 } 3515 } 3516 } 3518 container info-refresh-time-option { 3519 if-feature info-refresh-time-op; 3520 presence "Enable this option"; 3521 description "OPTION_INFORMATION_REFRESH_TIME (32) Information Refresh 3522 Time option."; 3523 reference "RFC4242: Information Refresh Time Option for Dynamic Host 3524 Configuration Protocol for IPv6 (DHCPv6"; 3525 leaf info-refresh-time { 3526 type yang:timeticks; 3527 mandatory true; 3528 description "The refresh time."; 3529 } 3530 } 3532 container client-fqdn-option { 3533 if-feature client-fqdn-op; 3534 presence "Enable this option"; 3535 description "OPTION_CLIENT_FQDN (39) DHCPv6 Client FQDN Option"; 3536 reference "RFC4704: The Dynamic Host Configuration Protocol for IPv6 3537 (DHCPv6) Client Fully Qualified Domain Name (FQDN) Option"; 3538 leaf server-initiate-update { 3539 type boolean; 3540 mandatory true; 3541 description "server initiate"; 3542 } 3543 leaf client-initiate-update { 3544 type boolean; 3545 mandatory true; 3546 description "client initiate"; 3547 } 3548 leaf modify-name-from-cli { 3549 type boolean; 3550 mandatory true; 3551 description "modify by client"; 3552 } 3553 } 3555 container posix-timezone-option { 3556 if-feature posix-timezone-op; 3557 presence "Enable this option"; 3558 description "OPTION_NEW_POSIX_TIMEZONE (41) Posix Timezone option"; 3559 reference "RFC4833: Timezone Options for DHCP"; 3560 leaf tz-posix { 3561 type string; 3562 mandatory true; 3563 description "TZ Posix IEEE 1003.1 String"; 3564 } 3565 } 3567 container tzdb-timezone-option { 3568 if-feature tzdb-timezone-op; 3569 presence "Enable this option"; 3570 description "OPTION_NEW_TZDB_TIMEZONE (42) Timezone Database option"; 3571 reference "RFC4822: Timezone Options for DHCP"; 3572 leaf tz-database { 3573 type string; 3574 mandatory true; 3575 description "Reference to the TZ Database"; 3576 } 3577 } 3579 container ntp-server-option { 3580 //This option looks like it needs work to correctly model the 3581 //option as defined in the RFC. 3583 // Zihao - Re-modeled so it only contains one time source suboption 3585 if-feature ntp-server-op; 3586 presence "Enable this option"; 3587 description "OPTION_NTP_SERVER (56) NTP Server Option for DHCPv6"; 3588 reference "RFC5908: Network Time Protocol (NTP) Server Option for 3589 DHCPv6"; 3590 list ntp-server { 3591 key ntp-serv-id; 3592 description "ntp server info"; 3593 leaf ntp-serv-id { 3594 type uint8; 3595 mandatory true; 3596 description "NTP server id"; 3597 } 3598 choice ntp-time-source-suboption { 3599 description "Select a NTP time source suboption."; 3600 case server-address { 3601 leaf-list ntp-serv-addr-suboption { 3602 type inet:ipv6-address; 3603 description "NTP server addr"; 3604 } 3605 } 3606 case server-multicast-address { 3607 leaf-list ntp-serv-mul-addr-suboption { 3609 type inet:ipv6-address; 3610 description "NTP server multicast addr"; 3611 } 3612 } 3613 case server-fqdn { 3614 leaf-list ntp-serv-fqdn-suboption { 3615 type string; 3616 description "NTP server fqdn"; 3617 } 3618 } 3619 } 3620 } 3621 } 3623 container boot-file-url-option { 3624 if-feature boot-file-url-op; 3625 presence "Enable this option"; 3626 description "OPT_BOOTFILE_URL (59) Boot File URL Option"; 3627 reference "RFC5970: DHCPv6 Options for Network Boot"; 3628 list boot-file { 3629 key boot-file-id; 3630 description "boot file info"; 3631 leaf boot-file-id { 3632 type uint8; 3633 mandatory true; 3634 description "boot file id"; 3635 } 3636 leaf-list suitable-arch-type { 3637 type uint16; 3638 description "architecture type"; 3639 } 3640 leaf-list suitable-net-if { 3641 type uint32; 3642 description "network interface"; 3643 } 3644 leaf boot-file-url { 3645 type string; 3646 mandatory true; 3647 description "url for boot file"; 3648 } 3649 } 3650 } 3652 container boot-file-param-option { 3653 if-feature boot-file-param-op; 3654 presence "Enable this option"; 3655 description "OPT_BOOTFILE_PARAM (60) Boot File Parameters Option"; 3656 reference "RFC5970: DHCPv6 Options for Network Boot"; 3658 list boot-file-params { 3659 key param-id; 3660 description "boot file parameters"; 3661 leaf param-id { 3662 type uint8; 3663 mandatory true; 3664 description "parameter id"; 3665 } 3666 leaf parameter { 3667 type string; 3668 mandatory true; 3669 description "parameter value"; 3670 } 3671 } 3672 } 3674 container aftr-name-option { 3675 if-feature aftr-name-op; 3676 presence "Enable this option"; 3677 description "OPTION_AFTR_NAME (64) AFTR-Name DHCPv6 Option"; 3678 reference "RFC6334: Dynamic Host Configuration Protocol for IPv6 3679 (DHCPv6) Option for Dual-Stack Lite"; 3680 leaf tunnel-endpoint-name { 3681 type string; 3682 mandatory true; 3683 description "aftr name"; 3684 } 3685 } 3687 container kbr-default-name-option { 3688 if-feature kbr-default-name-op; 3689 presence "Enable this option"; 3690 description "OPTION_KRB_DEFAULT_REALM_NAME (77) Kerberos Default Realm Name Option"; 3691 reference "RFC6784: Kerberos Options for DHCPv6"; 3692 leaf default-realm-name { 3693 type string; 3694 mandatory true; 3695 description "default realm name"; 3696 } 3697 } 3699 container kbr-kdc-option { 3700 if-feature kbr-kdc-op; 3701 presence "Enable this option"; 3702 description "OPTION_KRB_KDC (78) Kerberos KDB Option"; 3703 reference "RFC6784: Kerberos Options for DHCPv6"; 3704 list kdc-info { 3705 key kdc-id; 3706 description "kdc info"; 3707 leaf kdc-id { 3708 type uint8; 3709 mandatory true; 3710 description "kdc id"; 3711 } 3712 leaf priority { 3713 type uint16; 3714 mandatory true; 3715 description "priority"; 3716 } 3717 leaf weight { 3718 type uint16; 3719 mandatory true; 3720 description "weight"; 3721 } 3722 leaf transport-type { 3723 type uint8; 3724 mandatory true; 3725 description "transport type"; 3726 } 3727 leaf port-number { 3728 type uint16; 3729 mandatory true; 3730 description "port number"; 3731 } 3732 leaf kdc-ipv6-addr { 3733 type inet:ipv6-address; 3734 mandatory true; 3735 description "kdc ipv6 addr"; 3736 } 3737 leaf realm-name { 3738 type string; 3739 mandatory true; 3740 description "realm name"; 3741 } 3742 } 3743 } 3745 container sol-max-rt-option { 3746 if-feature sol-max-rt-op; 3747 presence "Enable this option"; 3748 description "OPTION_SOL_MAX_RT (82) sol max rt option"; 3749 reference "RFC7083: Modification to Default Values of 3750 SOL_MAX_RT and INF_MAX_RT"; 3751 leaf sol-max-rt-value { 3752 type yang:timeticks; 3753 mandatory true; 3754 description "sol max rt value"; 3755 } 3756 } 3758 container inf-max-rt-option { 3759 if-feature inf-max-rt-op; 3760 presence "Enable this option"; 3761 description "OPTION_INF_MAX_RT (83) inf max rt option"; 3762 reference "RFC7083: Modification to Default Values of 3763 SOL_MAX_RT and INF_MAX_RT"; 3764 leaf inf-max-rt-value { 3765 type yang:timeticks; 3766 mandatory true; 3767 description "inf max rt value"; 3768 } 3769 } 3771 container addr-selection-option { 3772 if-feature addr-selection-op; 3773 presence "Enable this option"; 3774 description "OPTION_ADDRSEL (84) and OPTION_ADDRSEL_TABLE (85)"; 3775 reference "RFC7078: Distributing Address Selection Policy Using 3776 DHCPv6"; 3777 // if - Needs checking to see if this matches the RFC - there 3778 // are two options here. 3779 // Zihao - I think this matches RFC7078 3780 leaf a-bit-set { 3781 type boolean; 3782 mandatory true; 3783 description "a bit"; 3784 } 3785 leaf p-bit-set { 3786 type boolean; 3787 mandatory true; 3788 description "p bit"; 3789 } 3790 list policy-table { 3791 key policy-id; 3792 description "policy table"; 3793 leaf policy-id { 3794 type uint8; 3795 mandatory true; 3796 description "policy id"; 3797 } 3798 leaf label { 3799 type uint8; 3800 mandatory true; 3801 description "label"; 3803 } 3804 leaf precedence { 3805 type uint8; 3806 mandatory true; 3807 description "precedence"; 3808 } 3809 leaf prefix-len { 3810 type uint8; 3811 mandatory true; 3812 description "prefix length"; 3813 } 3814 leaf prefix { 3815 type inet:ipv6-prefix; 3816 mandatory true; 3817 description "prefix"; 3818 } 3819 } 3820 } 3822 container pcp-server-option { 3823 if-feature pcp-server-op; 3824 presence "Enable this option"; 3825 description "OPTION_V6_PCP_SERVER (86) pcp server option"; 3826 reference "RFC7291: DHCP Options for the Port Control 3827 Protocol (PCP)"; 3828 list pcp-server { 3829 key pcp-serv-id; 3830 description "pcp server info"; 3831 leaf pcp-serv-id { 3832 type uint8; 3833 mandatory true; 3834 description "pcp server id"; 3835 } 3836 leaf pcp-serv-addr { 3837 type inet:ipv6-address; 3838 mandatory true; 3839 description "pcp server addr"; 3840 } 3841 } 3842 } 3844 container s46-rule-option { 3845 if-feature s46-rule-op; 3846 presence "Enable this option"; 3847 description "OPTION_S46_RULE (89) S46 rule option"; 3848 reference "RFC7598: DHCPv6 Options for Configuration of 3849 Softwire Address and Port-Mapped Clients"; 3850 list s46-rule { 3851 key rule-id; 3852 description "s46 rule"; 3853 leaf rule-id { 3854 type uint8; 3855 mandatory true; 3856 description "rule id"; 3857 } 3858 leaf rule-type { 3859 type enumeration { 3860 enum "BMR" { 3861 description "BMR"; 3862 } 3863 enum "FMR" { 3864 description "FMR"; 3865 } 3866 } 3867 mandatory true; 3868 description "rule type"; 3869 } 3870 leaf prefix4-len { 3871 type uint8; 3872 mandatory true; 3873 description "ipv4 prefix length"; 3874 } 3875 leaf ipv4-prefix { 3876 type inet:ipv4-prefix; 3877 mandatory true; 3878 description "ipv4 prefix"; 3879 } 3880 leaf prefix6-len { 3881 type uint8; 3882 mandatory true; 3883 description "ipv6 prefix length"; 3884 } 3885 leaf ipv6-prefix { 3886 type inet:ipv6-prefix; 3887 mandatory true; 3888 description "ipv6 prefix"; 3889 } 3890 uses dhcpv6-types:portset-param; 3891 } 3892 } 3894 container s46-br-option { 3895 if-feature s46-br-op; 3896 presence "Enable this option"; 3897 description "OPTION_S46_BR (90) S46 BR Option"; 3898 reference "RFC7598: DHCPv6 Options for Configuration of 3899 Softwire Address and Port-Mapped Clients"; 3900 list br { 3901 key br-id; 3902 description "br info"; 3903 leaf br-id { 3904 type uint8; 3905 mandatory true; 3906 description "br id"; 3907 } 3908 leaf br-ipv6-addr { 3909 type inet:ipv6-address; 3910 mandatory true; 3911 description "br ipv6 addr"; 3912 } 3913 } 3914 } 3916 container s46-dmr-option { 3917 if-feature s46-dmr-op; 3918 presence "Enable this option"; 3919 description "OPTION_S46_DMR (91) S46 DMR Option"; 3920 reference "RFC7598: DHCPv6 Options for Configuration of 3921 Softwire Address and Port-Mapped Clients"; 3922 list dmr { 3923 key dmr-id; 3924 description "dmr info"; 3925 leaf dmr-id { 3926 type uint8; 3927 mandatory true; 3928 description "dmr id"; 3929 } 3930 leaf dmr-prefix-len { 3931 type uint8; 3932 mandatory true; 3933 description "dmr prefix length"; 3934 } 3935 leaf dmr-ipv6-prefix { 3936 type inet:ipv6-prefix; 3937 mandatory true; 3938 description "dmr ipv6 prefix"; 3939 } 3940 } 3941 } 3943 container s46-v4-v6-binding-option { 3944 if-feature s46-v4-v6-binding-op; 3945 presence "Enable this option"; 3946 description "OPTION_S46_V4V6BIND (92) S46 IPv4/IPv6 Address 3947 Binding option"; 3948 reference "RFC7598: DHCPv6 Options for Configuration of 3949 Softwire Address and Port-Mapped Clients"; 3950 list ce { 3951 key ce-id; 3952 description "ce info"; 3953 leaf ce-id { 3954 type uint8; 3955 mandatory true; 3956 description "ce id"; 3957 } 3958 leaf ipv4-addr { 3959 type inet:ipv4-address; 3960 mandatory true; 3961 description "ce ipv4 addr"; 3962 } 3963 leaf bind-prefix6-len { 3964 type uint8; 3965 mandatory true; 3966 description "bind ipv6 prefix 3967 length"; 3968 } 3969 leaf bind-ipv6-prefix { 3970 type inet:ipv6-address; 3971 mandatory true; 3972 description "bind ipv6 prefix"; 3973 } 3974 uses dhcpv6-types:portset-param; 3975 } 3976 } 3978 } 3979 //if - NB - The list of options needs to be updated. 3981 grouping relay-supplied-option-definitions { 3982 // if - The structure here needs to be checked and probably reworked. 3983 description "OPTION_RSOO (66) Relay-Supplied Options option"; 3984 reference "RFC6422: Relay-Supplied DHCP Options"; 3985 container erp-local-domain-name-option { 3986 if-feature erp-local-domain-name-op; 3987 presence "Enable this option"; 3988 description "OPTION_ERP_LOCAL_DOMAIN_NAME (65) DHCPv6 ERP Local 3989 Domain Name Option"; 3990 reference "RFC6440: The EAP Re-authentication Protocol (ERP) 3991 Local Domain Name DHCPv6 Option"; 3992 list erp-for-client { 3993 key cli-id; 3994 description "erp for client"; 3995 leaf cli-id { 3996 type uint32; 3997 mandatory true; 3998 description "client id"; 3999 } 4000 container duid { 4001 description "Sets the DUID"; 4002 // uses duid; 4003 // if - Maybe DUID definition needs to be moved to this module. 4004 uses dhcpv6-types:duid; 4005 } 4006 leaf erp-name { 4007 type string; 4008 mandatory true; 4009 description "erp name"; 4010 } 4011 } 4012 } 4013 } 4015 grouping client-option-definitions { 4016 description "Contains definitions for options configured on the 4017 DHCPv6 client which will be sent to the server."; 4019 list new-or-standard-cli-option { 4020 key option-code; 4021 description "new or standard client option"; 4022 leaf option-code { 4023 type uint16; 4024 mandatory true; 4025 description "option code"; 4026 } 4027 leaf option-name { 4028 type string; 4029 mandatory true; 4030 description "option name"; 4031 } 4032 leaf option-description { 4033 type string; 4034 mandatory true; 4035 description "description of client 4036 option"; 4037 } 4038 leaf option-reference { 4039 type string; 4040 description "the reference of option"; 4041 } 4042 leaf option-value { 4043 type string; 4044 mandatory true; 4045 description "the option value"; 4046 } 4047 } 4049 container option-request-option { 4050 if-feature option-request-op; 4051 presence "Enable this option"; 4052 description "OPTION_ORO (6) Option Request Option"; 4053 reference "RFC3315: Dynamic Host Configuration Protocol for 4054 IPv6 (DHCPv6)"; 4055 list oro-option { 4056 key option-code; 4057 description "oro option"; 4058 leaf option-code { 4059 type uint16; 4060 mandatory true; 4061 description "option code"; 4062 } 4063 leaf description { 4064 type string; 4065 mandatory true; 4066 description "description of oro 4067 options"; 4068 } 4069 } 4070 } 4072 container user-class-option { 4073 if-feature user-class-op; 4074 presence "Enable this option"; 4075 description "OPTION_USER_CLASS (15) User Class Option"; 4076 reference "RFC3315: Dynamic Host Configuration Protocol 4077 for IPv6 (DHCPv6)"; 4078 list user-class { 4079 key user-class-id; 4080 description "user class"; 4081 leaf user-class-id { 4082 type uint8; 4083 mandatory true; 4084 description "user class id"; 4085 } 4086 leaf user-class-data { 4087 type string; 4088 mandatory true; 4089 description "The information contained in the data area 4090 of this option is contained in one or more opaque 4091 fields that represent the user class or classes of 4092 which the client is a member. "; 4093 } 4094 } 4095 } 4097 container vendor-class-option { 4098 if-feature vendor-class-op; 4099 presence "Enable this option"; 4100 description "OPTION_VENDOR_CLASS (16) Vendor Class Option"; 4101 reference "RFC3315: Dynamic Host Configuration Protocol 4102 for IPv6 (DHCPv6)"; 4103 leaf enterprise-number { 4104 type uint32; 4105 mandatory true; 4106 description "enterprise number"; 4107 } 4108 list vendor-class { 4109 key vendor-class-id; 4110 description "vendor class"; 4111 leaf vendor-class-id { 4112 type uint8; 4113 mandatory true; 4114 description "vendor class id"; 4115 } 4116 leaf vendor-class-data { 4117 type string; 4118 mandatory true; 4119 description "The vendor-class-data is composed of a series of 4120 separate items, each of which describes some characteristic 4121 of the client's hardware configuration. Examples of 4122 vendor-class-data instances might include the version of the 4123 operating system the client is running or the amount of memory 4124 installed on the client."; 4125 } 4126 } 4127 } 4129 container client-fqdn-option { 4130 if-feature client-fqdn-op; 4131 presence "Enable this option"; 4132 description "OPTION_CLIENT_FQDN (39) The Dynamic Host 4133 Configuration Protocol for IPv6 (DHCPv6) Client Fully 4134 Qualified Domain Name (FQDN) Option"; 4135 reference "RFC4704: The Dynamic Host Configuration Protocol 4136 for IPv6 (DHCPv6) Client Fully Qualified Domain Name (FQDN) 4137 Option"; 4139 leaf fqdn { 4140 type string; 4141 mandatory true; 4142 description "fqdn"; 4143 } 4144 leaf server-initiate-update { 4145 type boolean; 4146 mandatory true; 4147 description "whether server initiate"; 4148 } 4149 leaf client-initiate-update { 4150 type boolean; 4151 mandatory true; 4152 description "whether client initiate"; 4153 } 4154 } 4156 container client-arch-type-option { 4157 if-feature client-arch-type-op; 4158 presence "Enable this option"; 4159 description "OPTION_CLIENT_ARCH_TYPE (61) Client System 4160 Architecture Type Option"; 4161 reference "RFC5970: DHCPv6 Options for Network Boot"; 4162 list architecture-types { 4163 key type-id; 4164 description "architecture types"; 4165 leaf type-id { 4166 type uint16; 4167 mandatory true; 4168 description "type id"; 4169 } 4170 leaf most-preferred { 4171 type boolean; 4172 mandatory true; 4173 description "most preferred flag"; 4174 } 4175 } 4176 } 4178 container client-network-interface-identifier-option { 4179 if-feature client-network-interface-identifier-op; 4180 presence "Enable this option"; 4181 description "OPTION_NII (62) Client Network Interface 4182 Identifier Option"; 4183 reference "RFC5970: DHCPv6 Options for Network Boot"; 4184 leaf type { 4185 type uint8; 4186 mandatory true; 4187 description "type"; 4188 } 4189 leaf major { 4190 type uint8; 4191 mandatory true; 4192 description "major"; 4193 } 4194 leaf minor { 4195 type uint8; 4196 mandatory true; 4197 description "minor"; 4198 } 4199 } 4201 container kbr-principal-name-option { 4202 if-feature kbr-principal-name-op; 4203 presence "Enable this option"; 4204 description "OPTION_KRB_PRINCIPAL_NAME (75) Kerberos 4205 Principal Name Option"; 4206 reference "RFC6784: Kerberos Options for DHCPv6"; 4207 list principle-name { 4208 key principle-name-id; 4209 description "principle name"; 4210 leaf principle-name-id { 4211 type uint8; 4212 mandatory true; 4213 description "principle name id"; 4214 } 4215 leaf name-type { 4216 type int32; 4217 mandatory true; 4218 description "This field specifies the type of name that follows."; 4219 } 4220 leaf name-string { 4221 type string; 4222 mandatory true; 4223 description "This field encodes a sequence of components that form 4224 a name, each component encoded as a KerberoString"; 4225 } 4226 } 4227 } 4229 container kbr-realm-name-option { 4230 if-feature kbr-realm-name-op; 4231 presence "Enable this option"; 4232 description "OPTION_KRB_REALM_NAME (76) Kerberos Realm Name Option"; 4233 reference "RFC6784: Kerberos Options for DHCPv6"; 4234 leaf realm-name { 4235 type string; 4236 mandatory true; 4237 description "realm name"; 4238 } 4239 } 4241 container client-link-layer-addr-option { 4242 if-feature client-link-layer-addr-op; 4243 presence "Enable this option"; 4244 description "OPTION_CLIENT_LINKLAYER_ADDR (79) DHCPv6 Client 4245 Link-Layer Address Option"; 4246 reference "RFC6939: Client Link-Layer Address Option in 4247 DHCPv6"; 4248 leaf link-layer-type { 4249 type uint16; 4250 mandatory true; 4251 description "Client link-layer address type. The link-layer 4252 type MUST be a valid hardware type assigned by the IANA, 4253 as described in [RFC0826]"; 4254 } 4255 leaf link-layer-addr { 4256 type string; 4257 mandatory true; 4258 description "Client link-layer address"; 4259 } 4260 } 4262 } 4264 grouping custom-option-definitions { 4265 description "operator customized options"; 4267 container operator-option-ipv6-address { 4268 if-feature operator-op-ipv6-address; 4269 presence "Enable this option"; 4270 description "operator ipv6 address option"; 4271 reference "RFC7227: Guidelines for Creating New DHCPv6 Options"; 4272 list operator-ipv6-addr { 4273 key operator-ipv6-addr-id; 4274 description "operator ipv6 address info"; 4275 leaf operator-ipv6-addr-id { 4276 type uint8; 4277 mandatory true; 4278 description "operator ipv6 address id"; 4279 } 4280 leaf operator-ipv6-addr { 4281 type inet:ipv6-address; 4282 mandatory true; 4283 description "operator ipv6 address id"; 4284 } 4285 } 4286 } 4288 container operator-option-single-flag { 4289 if-feature operator-op-single-flag; 4290 presence "Enable this option"; 4291 description "operator single flag"; 4292 reference "RFC7227: Guidelines for Creating New DHCPv6 4293 Options"; 4294 list flag { 4295 key flag-id; 4296 description "operator single flag info"; 4297 leaf flag-id { 4298 type uint8; 4299 mandatory true; 4300 description "operator single flag id"; 4301 } 4302 leaf flag-value{ 4303 type boolean; 4304 mandatory true; 4305 description "operator single flag value"; 4306 } 4307 } 4308 } 4310 container operator-option-ipv6-prefix { 4311 if-feature operator-op-ipv6-prefix; 4312 presence "Enable this option"; 4313 description "operator ipv6 prefix option"; 4314 reference "RFC7227: Guidelines for Creating New DHCPv6 4315 Options"; 4316 list operator-ipv6-prefix { 4317 key operator-ipv6-prefix-id; 4318 description "operator ipv6 prefix info"; 4319 leaf operator-ipv6-prefix-id { 4320 type uint8; 4321 mandatory true; 4322 description "operator ipv6 prefix id"; 4323 } 4324 leaf operator-ipv6-prefix6-len { 4325 type uint8; 4326 mandatory true; 4327 description "operator ipv6 prefix length"; 4328 } 4329 leaf operator-ipv6-prefix { 4330 type inet:ipv6-prefix; 4331 mandatory true; 4332 description "operator ipv6 prefix"; 4333 } 4334 } 4335 } 4337 container operator-option-int32 { 4338 if-feature operator-op-int32; 4339 presence "Enable this option"; 4340 description "operator integer 32 option"; 4341 reference "RFC7227: Guidelines for Creating New DHCPv6 4342 Options"; 4343 list int32val { 4344 key int32val-id; 4345 description "operator integer 32 info"; 4346 leaf int32val-id { 4347 type uint8; 4348 mandatory true; 4349 description "operator integer 32 id"; 4350 } 4351 leaf int32val { 4352 type uint32; 4353 mandatory true; 4354 description "operator integer 32 value"; 4355 } 4356 } 4357 } 4359 container operator-option-int16 { 4360 if-feature operator-op-int16; 4361 presence "Enable this option"; 4362 description "operator integer 16 option"; 4363 reference "RFC7227: Guidelines for Creating New DHCPv6 4364 Options"; 4365 list int16val { 4366 key int16val-id; 4367 description "operator integer 16 info"; 4368 leaf int16val-id { 4369 type uint8; 4370 mandatory true; 4371 description "operator integer 16 id"; 4372 } 4373 leaf int16val { 4374 type uint16; 4375 mandatory true; 4376 description "operator integer 16 value"; 4377 } 4379 } 4380 } 4382 container operator-option-int8 { 4383 if-feature operator-op-int8; 4384 presence "Enable this option"; 4385 description "operator integer 8 option"; 4386 reference "RFC7227: Guidelines for Creating New DHCPv6 4387 Options"; 4388 list int8val { 4389 key int8val-id; 4390 description "operator integer 8 info"; 4391 leaf int8val-id { 4392 type uint8; 4393 mandatory true; 4394 description "operator integer 8 id"; 4395 } 4396 leaf int8val { 4397 type uint8; 4398 mandatory true; 4399 description "operator integer 8 value"; 4400 } 4401 } 4402 } 4404 container operator-option-uri { 4405 if-feature operator-op-uri; 4406 presence "Enable this option"; 4407 description "operator uri option"; 4408 reference "RFC7227: Guidelines for Creating New DHCPv6 Options"; 4409 list uri{ 4410 key uri-id; 4411 description "operator uri info"; 4412 leaf uri-id { 4413 type uint8; 4414 mandatory true; 4415 description "operator uri id"; 4416 } 4417 leaf uri { 4418 type string; 4419 mandatory true; 4420 description "operator uri value"; 4421 } 4422 } 4423 } 4425 container operator-option-textstring { 4426 if-feature operator-op-textstring; 4427 presence "Enable this option"; 4428 description "operator itext string option"; 4429 reference "RFC7227: Guidelines for Creating New DHCPv6 Options"; 4430 list textstring{ 4431 key textstring-id; 4432 description "operator text string info"; 4433 leaf textstring-id { 4434 type uint8; 4435 mandatory true; 4436 description "operator text string id"; 4437 } 4438 leaf textstring { 4439 type string; 4440 mandatory true; 4441 description "operator text string value"; 4442 } 4443 } 4444 } 4446 container operator-option-var-data { 4447 if-feature operator-op-var-data; 4448 presence "Enable this option"; 4449 description "operator variable length data option"; 4450 reference "RFC7227: Guidelines for Creating New DHCPv6 Options"; 4451 list int32val { 4452 key var-data-id; 4453 description "operator invariable length data info"; 4454 leaf var-data-id { 4455 type uint8; 4456 mandatory true; 4457 description "operator variable length id"; 4458 } 4459 leaf var-data { 4460 type binary; 4461 mandatory true; 4462 description "operator variable length value"; 4463 } 4464 } 4465 } 4467 container operator-option-dns-wire { 4468 if-feature operator-op-dns-wire; 4469 presence "Enable this option"; 4470 description "operator dns wire format domain name list option"; 4471 reference "RFC7227: Guidelines for Creating New DHCPv6 4472 Options"; 4473 list operator-option-dns-wire { 4474 key operator-option-dns-wire-id; 4475 description "operator dns wire format info"; 4476 leaf operator-option-dns-wire-id { 4477 type uint8; 4478 mandatory true; 4479 description "operator dns wire format id"; 4480 } 4481 leaf operator-option-dns-wire{ 4482 type binary; 4483 mandatory true; 4484 description "operator dns wire format value"; 4485 } 4486 } 4487 } 4489 } 4490 } 4492 4494 3.5. DHCPv6 Types YANG Model 4496 This module imports typedefs from [RFC6991]. 4498 file "ietf-dhcpv6-types.yang" 4499 module ietf-dhcpv6-types { 4500 yang-version 1.1; 4501 namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-types"; 4502 prefix "dhcpv6-types"; 4504 import ietf-inet-types { 4505 prefix inet; 4506 } 4507 import ietf-yang-types { 4508 prefix yang; 4509 } 4511 organization "DHC WG"; 4512 contact 4513 "cuiyong@tsinghua.edu.cn 4514 lh.sunlinh@gmail.com 4515 ian.farrer@telekom.de 4516 sladjana.zechlin@telekom.de 4517 hezihao9512@gmail.com"; 4519 description "This model defines a YANG data model that can be 4520 used to define some commonly used DHCPv6 types"; 4522 revision 2018-09-04 { 4523 description ""; 4524 reference "I-D: draft-ietf-dhc-dhcpv6-yang"; 4525 } 4527 revision 2018-01-30 { 4528 description "Initial revision"; 4529 reference "I-D: draft-ietf-dhc-dhcpv6-yang"; 4530 } 4532 /* 4533 * Grouping 4534 */ 4535 grouping vendor-infor { 4536 description "Vendor information."; 4537 container vendor-info { 4538 description ""; 4539 leaf ent-num { 4540 type uint32; 4541 mandatory true; 4542 description "enterprise number"; 4543 } 4544 leaf-list data { 4545 type string; 4546 description "specific vendor info"; 4547 } 4548 } 4549 } 4551 grouping duid { 4552 description 4553 "Each server and client has only one DUID (DHCP Unique Identifier). 4554 The DUID here identifies a unique DHCPv6 server for clients. DUID 4555 consists of a two-octet type field and an arbitrary length (no more 4556 than 128 bytes) content field. Currently there are four defined types 4557 of DUIDs in RFC3315 and RFC6355 - DUID-LLT, DUID-EN, DUID-LL and 4558 DUID-UUID. DUID-Unknown represents those unconventional DUIDs."; 4559 reference "RFC3315: Section 9 and RFC6355: Section 4"; 4560 leaf type-code { 4561 type uint16; 4562 default 65535; 4563 description "Type code of this DUID"; 4564 } 4565 choice duid-type { 4566 default duid-unknown; 4567 description "Selects the format for the DUID."; 4568 case duid-llt { 4569 description "DUID Based on Link-layer Address Plus Time 4570 (Type 1 - DUID-LLT)"; 4572 reference "RFC3315 Section 9.2"; 4573 leaf duid-llt-hardware-type { 4574 type uint16; 4575 description "Hardware type as assigned by IANA (RFC826)."; 4576 } 4577 leaf duid-llt-time { 4578 type yang:timeticks; 4579 description "The time value is the time that the DUID is 4580 generated represented in seconds since midnight (UTC), 4581 January 1, 2000, modulo 2^32."; 4582 } 4583 leaf duid-llt-link-layer-addr { 4584 type yang:mac-address; 4585 description "Link-layer address as described in RFC2464"; 4586 } 4587 } 4588 case duid-en { 4589 description "DUID Assigned by Vendor Based on Enterprise Number 4590 (Type 2 - DUID-EN)"; 4591 reference "RFC3315 Section 9.3"; 4592 leaf duid-en-enterprise-number { 4593 type uint32; 4594 description "Vendor's registered Private Enterprise Number as 4595 maintained by IANA"; 4596 } 4597 leaf duid-en-identifier { 4598 type string; 4599 description "Identifier, unique to the device that is 4600 using it"; 4601 } 4602 } 4603 case duid-ll { 4604 description "DUID Based on Link-layer Address (Type 3 - DUID-LL)"; 4605 reference "RFC3315 Section 9.4"; 4606 leaf duid-ll-hardware-type { 4607 type uint16; 4608 description "Hardware type as assigned by IANA (RFC826)."; 4609 } 4610 leaf duid-ll-link-layer-addr { 4611 type yang:mac-address; 4612 description "Link-layer address as described in RFC2464"; 4613 } 4614 } 4615 case duid-uuid { 4616 description "DUID Based on Universally Unique Identifier 4617 (Type 4 - DUID-UUID)"; 4618 reference "RFC6335 Definition of the UUID-Based Unique Identifier"; 4619 leaf uuid { 4620 type yang:uuid; 4621 description "A Universally Unique IDentifier in the string 4622 representation defined in RFC 4122. The canonical 4623 representation uses lowercase characters"; 4624 } 4625 } 4626 case duid-unknown { 4627 description "DUID based on free raw bytes"; 4628 leaf data { 4629 type binary; 4630 description "The bits to be used as the identifier"; 4631 } 4632 } 4633 } 4634 } 4636 grouping portset-param { 4637 description "portset parameters"; 4638 container port-parameter { 4639 description "port parameter"; 4640 leaf offset { 4641 type uint8; 4642 mandatory true; 4643 description "offset in a port set"; 4644 } 4645 leaf psid-len { 4646 type uint8; 4647 mandatory true; 4648 description "length of a psid"; 4649 } 4650 leaf psid { 4651 type uint16; 4652 mandatory true; 4653 description "psid value"; 4654 } 4655 } 4656 } 4658 grouping iaid { 4659 description "IA is a construct through which a server and a 4660 client can identify, group, and manage a set of related IPv6 4661 addresses. The key of the list is a 4-byte number IAID defined 4662 in [RFC3315]."; 4663 list identity-association { 4664 config "false"; 4665 description "IA"; 4666 leaf iaid { 4667 type uint32; 4668 mandatory true; 4669 description "IAID"; 4670 } 4671 leaf ia-type { 4672 type string; 4673 mandatory true; 4674 description "IA type"; 4675 } 4676 leaf-list ipv6-addr { 4677 type inet:ipv6-address; 4678 description "ipv6 address"; 4679 } 4680 leaf-list ipv6-prefix { 4681 type inet:ipv6-prefix; 4682 description "ipv6 prefix"; 4683 } 4684 leaf-list prefix-length { 4685 type uint8; 4686 description "ipv6 prefix length"; 4687 } 4688 leaf t1-time { 4689 type yang:timeticks; 4690 mandatory true; 4691 description "t1 time"; 4692 } 4693 leaf t2-time { 4694 type yang:timeticks; 4695 mandatory true; 4696 description "t2 time"; 4697 } 4698 leaf preferred-lifetime { 4699 type yang:timeticks; 4700 mandatory true; 4701 description "preferred lifetime"; 4702 } 4703 leaf valid-lifetime { 4704 type yang:timeticks; 4705 mandatory true; 4706 description "valid lifetime"; 4707 } 4708 } 4709 } 4710 } 4711 4712 4. Security Considerations (TBD) 4714 TBD 4716 5. IANA Considerations (TBD) 4718 This document registers the following YANG modules in the "YANG 4719 Module Names" registry [RFC6020]. 4721 name: ietf-dhcpv6 4722 namespace: urn:ietf:params:xml:ns:yang:ietf-dhcpv6 4723 prefix: dhcpv6 4724 reference: TBD 4726 6. Acknowledgments 4728 The authors would like to thank Qi Sun, Lishan Li, Sladjana Zoric, 4729 Tomek Mrugalski, Marcin Siodelski, Bernie Volz and Bing Liu for their 4730 valuable comments and contributions to this work. 4732 7. Contributors 4734 The following individuals contributed to this effort: 4735 Hao Wang 4736 Tsinghua University 4737 Beijing 100084 4738 P.R.China 4739 Phone: +86-10-6278-5822 4740 Email: wangh13@mails.tsinghua.edu.cn 4742 Ted Lemon 4743 Nomium, Inc 4744 950 Charter St. 4745 Redwood City, CA 94043 4746 USA 4747 Email: Ted.Lemon@nomium.com 4749 Bernie Volz 4750 Cisco Systems, Inc. 4751 1414 Massachusetts Ave 4752 Boxborough, MA 01719 4753 USA 4754 Email: volz@cisco.com 4756 8. References 4758 8.1. Normative References 4760 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 4761 Requirement Levels", BCP 14, RFC 2119, 4762 DOI 10.17487/RFC2119, March 1997, 4763 . 4765 [RFC3315] Droms, R., Ed., Bound, J., Volz, B., Lemon, T., Perkins, 4766 C., and M. Carney, "Dynamic Host Configuration Protocol 4767 for IPv6 (DHCPv6)", RFC 3315, DOI 10.17487/RFC3315, July 4768 2003, . 4770 [RFC3633] Troan, O. and R. Droms, "IPv6 Prefix Options for Dynamic 4771 Host Configuration Protocol (DHCP) version 6", RFC 3633, 4772 DOI 10.17487/RFC3633, December 2003, 4773 . 4775 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 4776 the Network Configuration Protocol (NETCONF)", RFC 6020, 4777 DOI 10.17487/RFC6020, October 2010, 4778 . 4780 [RFC6087] Bierman, A., "Guidelines for Authors and Reviewers of YANG 4781 Data Model Documents", RFC 6087, DOI 10.17487/RFC6087, 4782 January 2011, . 4784 [RFC6355] Narten, T. and J. Johnson, "Definition of the UUID-Based 4785 DHCPv6 Unique Identifier (DUID-UUID)", RFC 6355, 4786 DOI 10.17487/RFC6355, August 2011, 4787 . 4789 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 4790 RFC 6991, DOI 10.17487/RFC6991, July 2013, 4791 . 4793 [RFC7223] Bjorklund, M., "A YANG Data Model for Interface 4794 Management", RFC 7223, DOI 10.17487/RFC7223, May 2014, 4795 . 4797 8.2. Informative References 4799 [I-D.ietf-netmod-yang-tree-diagrams] 4800 Bjorklund, M. and L. Berger, "YANG Tree Diagrams", draft- 4801 ietf-netmod-yang-tree-diagrams-06 (work in progress), 4802 February 2018. 4804 [RFC3319] Schulzrinne, H. and B. Volz, "Dynamic Host Configuration 4805 Protocol (DHCPv6) Options for Session Initiation Protocol 4806 (SIP) Servers", RFC 3319, DOI 10.17487/RFC3319, July 2003, 4807 . 4809 [RFC3646] Droms, R., Ed., "DNS Configuration options for Dynamic 4810 Host Configuration Protocol for IPv6 (DHCPv6)", RFC 3646, 4811 DOI 10.17487/RFC3646, December 2003, 4812 . 4814 [RFC3898] Kalusivalingam, V., "Network Information Service (NIS) 4815 Configuration Options for Dynamic Host Configuration 4816 Protocol for IPv6 (DHCPv6)", RFC 3898, 4817 DOI 10.17487/RFC3898, October 2004, 4818 . 4820 [RFC4075] Kalusivalingam, V., "Simple Network Time Protocol (SNTP) 4821 Configuration Option for DHCPv6", RFC 4075, 4822 DOI 10.17487/RFC4075, May 2005, 4823 . 4825 [RFC4242] Venaas, S., Chown, T., and B. Volz, "Information Refresh 4826 Time Option for Dynamic Host Configuration Protocol for 4827 IPv6 (DHCPv6)", RFC 4242, DOI 10.17487/RFC4242, November 4828 2005, . 4830 [RFC4704] Volz, B., "The Dynamic Host Configuration Protocol for 4831 IPv6 (DHCPv6) Client Fully Qualified Domain Name (FQDN) 4832 Option", RFC 4704, DOI 10.17487/RFC4704, October 2006, 4833 . 4835 [RFC4833] Lear, E. and P. Eggert, "Timezone Options for DHCP", 4836 RFC 4833, DOI 10.17487/RFC4833, April 2007, 4837 . 4839 [RFC5908] Gayraud, R. and B. Lourdelet, "Network Time Protocol (NTP) 4840 Server Option for DHCPv6", RFC 5908, DOI 10.17487/RFC5908, 4841 June 2010, . 4843 [RFC5970] Huth, T., Freimann, J., Zimmer, V., and D. Thaler, "DHCPv6 4844 Options for Network Boot", RFC 5970, DOI 10.17487/RFC5970, 4845 September 2010, . 4847 [RFC6334] Hankins, D. and T. Mrugalski, "Dynamic Host Configuration 4848 Protocol for IPv6 (DHCPv6) Option for Dual-Stack Lite", 4849 RFC 6334, DOI 10.17487/RFC6334, August 2011, 4850 . 4852 [RFC6422] Lemon, T. and Q. Wu, "Relay-Supplied DHCP Options", 4853 RFC 6422, DOI 10.17487/RFC6422, December 2011, 4854 . 4856 [RFC6440] Zorn, G., Wu, Q., and Y. Wang, "The EAP Re-authentication 4857 Protocol (ERP) Local Domain Name DHCPv6 Option", RFC 6440, 4858 DOI 10.17487/RFC6440, December 2011, 4859 . 4861 [RFC6784] Sakane, S. and M. Ishiyama, "Kerberos Options for DHCPv6", 4862 RFC 6784, DOI 10.17487/RFC6784, November 2012, 4863 . 4865 [RFC6939] Halwasia, G., Bhandari, S., and W. Dec, "Client Link-Layer 4866 Address Option in DHCPv6", RFC 6939, DOI 10.17487/RFC6939, 4867 May 2013, . 4869 [RFC7078] Matsumoto, A., Fujisaki, T., and T. Chown, "Distributing 4870 Address Selection Policy Using DHCPv6", RFC 7078, 4871 DOI 10.17487/RFC7078, January 2014, 4872 . 4874 [RFC7083] Droms, R., "Modification to Default Values of SOL_MAX_RT 4875 and INF_MAX_RT", RFC 7083, DOI 10.17487/RFC7083, November 4876 2013, . 4878 [RFC7227] Hankins, D., Mrugalski, T., Siodelski, M., Jiang, S., and 4879 S. Krishnan, "Guidelines for Creating New DHCPv6 Options", 4880 BCP 187, RFC 7227, DOI 10.17487/RFC7227, May 2014, 4881 . 4883 [RFC7291] Boucadair, M., Penno, R., and D. Wing, "DHCP Options for 4884 the Port Control Protocol (PCP)", RFC 7291, 4885 DOI 10.17487/RFC7291, July 2014, 4886 . 4888 [RFC7598] Mrugalski, T., Troan, O., Farrer, I., Perreault, S., Dec, 4889 W., Bao, C., Yeh, L., and X. Deng, "DHCPv6 Options for 4890 Configuration of Softwire Address and Port-Mapped 4891 Clients", RFC 7598, DOI 10.17487/RFC7598, July 2015, 4892 . 4894 Authors' Addresses 4895 Yong Cui 4896 Tsinghua University 4897 Beijing 100084 4898 P.R.China 4900 Phone: +86-10-6260-3059 4901 Email: cuiyong@tsinghua.edu.cn 4903 Linhui Sun 4904 Tsinghua University 4905 Beijing 100084 4906 P.R.China 4908 Phone: +86-10-6278-5822 4909 Email: lh.sunlinh@gmail.com 4911 Ian Farrer 4912 Deutsche Telekom AG 4913 CTO-ATI, Landgrabenweg 151 4914 Bonn, NRW 53227 4915 Germany 4917 Email: ian.farrer@telekom.de 4919 Sladjana Zechlin 4920 Deutsche Telekom AG 4921 CTO-IPT, Landgrabenweg 151 4922 Bonn, NRW 53227 4923 Germany 4925 Email: sladjana.zechlin@telekom.de 4927 Zihao He 4928 Tsinghua University 4929 Beijing 100084 4930 P.R.China 4932 Phone: +86-10-6278-5822 4933 Email: hezihao9512@gmail.com