ietf-dhcpv6-common

This YANG module defines common components used for the configuration and management of DHCPv6. The key words 'MUST', 'MUST NOT...

  • Version: 2022-06-20

    ietf-dhcpv6-common@2022-06-20


    
      module ietf-dhcpv6-common {
    
        yang-version 1.1;
    
        namespace
          "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-common";
    
        prefix dhc6;
    
        organization
          "IETF Dynamic Host Configuration (DHC) Working Group";
    
        contact
          "WG Web:   <https://datatracker.ietf.org/wg/dhc/>
    WG List:  <mailto:dhcwg@ietf.org>
    Author:   Yong Cui <yong@csnet1.cs.tsinghua.edu.cn>
    Author:   Linhui Sun <lh.sunlinh@gmail.com>
    Editor:   Ian Farrer <ian.farrer@telekom.de>
    Author:   Sladjana Zeichlin <sladjana.zechlin@telekom.de>
    Author:   Zihao He <hezihao9512@gmail.com>
    Author:   Michal Nowikowski <godfryd@isc.org>";
    
        description
          "This YANG module defines common components used for the
    configuration and management of DHCPv6.
    
    The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
    'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
    'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
    are to be interpreted as described in BCP 14 (RFC 2119)
    (RFC 8174) when, and only when, they appear in all
    capitals, as shown here.
    
    Copyright (c) 2022 IETF Trust and the persons identified as
    authors of the code.  All rights reserved.
    
    Redistribution and use in source and binary forms, with or
    without modification, is permitted pursuant to, and subject to
    the license terms contained in, the Revised BSD License set
    forth in Section 4.c of the IETF Trust's Legal Provisions
    Relating to IETF Documents
    (https://trustee.ietf.org/license-info).
    
    This version of this YANG module is part of RFC 9243
    (https://www.rfc-editor.org/info/rfc9243); see the RFC itself
    for full legal notices.";
    
        revision "2022-06-20" {
          description "Initial revision.";
          reference
            "RFC 9243: A YANG Data Model for DHCPv6 Configuration";
    
        }
    
    
        typedef threshold {
          type uint8 {
            range "1..100";
          }
          description
            "Threshold value in percent.";
        }
    
        typedef timer-seconds32 {
          type uint32;
          units "seconds";
          description
            "Timer value type in seconds (32-bit range).";
        }
    
        typedef duid-base {
          type string {
            pattern '([0-9a-fA-F]{2}){3,130}';
          }
          description
            "Each DHCP server and client has a DHCP Unique Identifier
    (DUID).  The DUID consists of a 2-octet type field
    and an arbitrary length (1-128 octets) content field.
    The duid-base type is used by other duid types with
    additional pattern constraints.
    
    Currently, there are four defined types of DUIDs
    in RFCs 8415 and 6355 -- DUID-LLT, DUID-EN, DUID-LL, and
    DUID-UUID.  DUID-unstructured represents DUIDs that do not
    follow any of the defined formats.
    
    Type 'string' is used to represent the hexadecimal DUID value
    so that pattern constraints can be applied.";
          reference
            "RFC 8415: Dynamic Host Configuration Protocol for
            IPv6 (DHCPv6), Section 11
             RFC 6355: Definition of the UUID-Based DHCPv6 Unique
            Identifier (DUID-UUID), Section 4";
    
        }
    
        typedef duid-llt {
          type duid-base {
            pattern '0001[0-9a-fA-F]{12,}';
          }
          description
            "DUID type 1, based on Link-Layer Address Plus Time
    (DUID-LLT).  Constructed with a 2-octet hardware type assigned
    by IANA,  4 octets containing the time the DUID is generated
    (represented in seconds since midnight (UTC), January 1, 2000,
    modulo 2^32), and a link-layer address. The address is encoded
    without separator characters.  For example:
    
    +------+------+----------+--------------+
    | 0001 | 0006 | 28490058 | 00005E005300 |
    +------+------+----------+--------------+
    
    This example includes the 2-octet DUID type of 1 (0x01); the
    hardware type is 0x06 (IEEE Hardware Types), and the creation
    time is 0x28490058 (constructed as described above).  Finally,
    the link-layer address is 0x5E005300 (EUI-48 address
    00-00-5E-00-53-00).";
          reference
            "RFC 8415: Dynamic Host Configuration Protocol for
            IPv6 (DHCPv6), Section 11.2
            IANA 'Hardware Types' registry
            <https://www.iana.org/assignments/arp-parameters>";
    
        }
    
        typedef duid-en {
          type duid-base {
            pattern '0002[0-9a-fA-F]{8,}';
          }
          description
            "DUID type 2, assigned by vendor based on Enterprise
    Number (DUID-EN).  This DUID consists of the 4-octet vendor's
    registered Private Enterprise Number, as maintained by IANA,
    followed by a unique identifier assigned by the vendor.  For
    example:
    
    +------+----------+------------------+
    | 0002 | 00007ED9 | 0CC084D303000912 |
    +------+----------+------------------+
    
    This example includes the 2-octet DUID type of 2 (0x02),
    4 octets for the Enterprise Number (0x7ED9), followed by
    8 octets of identifier data (0x0CC084D303000912).";
          reference
            "RFC 8415: Dynamic Host Configuration Protocol for
            IPv6 (DHCPv6), Section 11.3
            IANA 'Private Enterprise Numbers' registry
            <https://www.iana.org/assignments/enterprise-numbers>";
    
        }
    
        typedef duid-ll {
          type duid-base {
            pattern '0003([0-9a-fA-F]){4,}';
          }
          description
            "DUID type 3, based on Link-Layer Address (DUID-LL).
    Constructed with a 2-octet hardware type assigned
    by IANA and a link-layer address.  The address is encoded
    without separator characters.  For example:
    
    +------+------+--------------+
    | 0003 | 0006 | 00005E005300 |
    +------+------+--------------+
    
    This example includes the 2-octet DUID type of 3 (0x03); the
    hardware type is 0x06 (IEEE Hardware Types), and the
    link-layer address is 0x5E005300 (EUI-48 address
    00-00-5E-00-53-00).";
          reference
            "RFC 8415: Dynamic Host Configuration Protocol for
            IPv6 (DHCPv6), Section 11.4
            IANA 'Hardware Types' registry
            <https://www.iana.org/assignments/arp-parameters>";
    
        }
    
        typedef duid-uuid {
          type duid-base {
            pattern '0004[0-9a-fA-F]{32}';
          }
          description
            "DUID type 4, based on Universally Unique Identifier
    (DUID-UUID).  This type of DUID consists of 16 octets
    containing a 128-bit UUID.  For example:
    
    +------+----------------------------------+
    | 0004 | 9f03b182705747e38a1e422910078642 |
    +------+----------------------------------+
    
    This example includes the 2-octet DUID type of 4 (0x04) and
    the UUID 9f03b182-7057-47e3-8a1e-422910078642.";
          reference
            "RFC 8415: Dynamic Host Configuration Protocol for
            IPv6 (DHCPv6), Section 11.5
             RFC 6355: Definition of the UUID-Based DHCPv6 Unique
            Identifier (DUID-UUID)";
    
        }
    
        typedef duid-unstructured {
          type duid-base {
            pattern '(000[1-4].*)';
          }
          description
            "Used for DUIDs following any formats other than DUID
    types 1-4.  For example:
    
    +----------------------------------+
    | 7b6a164d325946539dc540fb539bc430 |
    +----------------------------------+
    
    Here, an arbitrary 16-octet value is used.  The only
    constraint placed on this is that the first 2 octets
    are not 0x01-0x04 to avoid collision with the other
    defined DUID types (duid-llt, duid-en, duid-ll,
    or duid-uuid).";
          reference
            "RFC 8415: Dynamic Host Configuration Protocol for
            IPv6 (DHCPv6), Section 11";
    
        }
    
        typedef duid {
          type union {
            type duid-llt;
            type duid-en;
            type duid-ll;
            type duid-uuid;
            type duid-unstructured;
          }
          description
            "Represents the DUID and is neutral to the DUID's construction
    format.";
          reference
            "RFC 8415: Dynamic Host Configuration Protocol for
            IPv6 (DHCPv6), Section 11";
    
        }
    
        grouping status {
          description
            "Holds information about the most recent status code that
    has been sent by the server or received by the client.";
          reference
            "RFC 8415: Dynamic Host Configuration Protocol
            for IPv6 (DHCPv6), Section 7.5.";
    
          container status {
            description
              "Status code information, relating to the success or failure
    of operations requested in messages.";
            leaf code {
              type uint16;
              description
                "The numeric code for the status encoded in this option.
    See the 'Status Codes' registry at
    <https://www.iana.org/assignments/dhcpv6-parameters>
    for the current list of status codes.";
            }
    
            leaf message {
              type string;
              description
                "A UTF-8-encoded text string suitable for display to an
    end user.  It MUST NOT be null terminated.";
            }
          }  // container status
        }  // grouping status
    
        grouping auth-option-group {
          description
            "OPTION_AUTH (11) Authentication Option.";
          reference
            "RFC 8415: Dynamic Host Configuration Protocol
            for IPv6 (DHCPv6), Section 21.11
             RFC 3118: Authentication for DHCP Messages
            IANA 'Dynamic Host Configuration Protocol (DHCP)
            Authentication Option Name Spaces' registry
            <https://www.iana.org/assignments/auth-namespaces>";
    
          container auth-option {
            description
              "OPTION_AUTH (11) Authentication Option.";
            leaf algorithm {
              type uint8;
              description
                "The algorithm used in the authentication protocol.";
            }
    
            leaf rdm {
              type uint8;
              description
                "The Replay Detection Method (RDM) used in this
    Authentication option.";
            }
    
            leaf replay-detection {
              type uint64;
              description
                "The replay detection information for the RDM.";
            }
    
            choice protocol {
              description
                "The authentication protocol used in the option.  Protocol
    Namespace Values 1 (delayed authentication) and 2 (Delayed
    Authentication (Obsolete)) are not applicable and so are
    not modeled.";
              leaf token-auth-information {
                type binary;
                description
                  "Protocol Namespace Value 0.  The authentication
    information, as specified by the protocol and
    algorithm used in this Authentication option.";
              }
    
              case rkap {
                description
                  "Protocol Namespace Value 3.  The Reconfigure Key
    Authentication Protocol (RKAP) provides protection
    against misconfiguration of a client caused by a
    Reconfigure message sent by a malicious DHCP
    server.";
                leaf datatype {
                  type uint8 {
                    range "1 .. 2";
                  }
                  description
                    "Type of data in the Value field carried in this
    option.
     1  Reconfigure key value (used in the Reply
        message).
     2  HMAC-MD5 digest of the message (used in
        the Reconfigure message).";
                }
    
                leaf auth-info-value {
                  type binary {
                    length "16";
                  }
                  description
                    "Data, as defined by the Type field.  A 16-octet
    field.";
                }
              }  // case rkap
            }  // choice protocol
          }  // container auth-option
        }  // grouping auth-option-group
    
        grouping rapid-commit-option-group {
          description
            "OPTION_RAPID_COMMIT (14) Rapid Commit Option.";
          reference
            "RFC 8415: Dynamic Host Configuration Protocol for
            IPv6 (DHCPv6), Section 21.14";
    
          container rapid-commit-option {
            presence
              "Enable sending of this option";
            description
              "OPTION_RAPID_COMMIT (14) Rapid Commit Option.";
          }  // container rapid-commit-option
        }  // grouping rapid-commit-option-group
    
        grouping vendor-specific-information-option-group {
          description
            "OPTION_VENDOR_OPTS (17) Vendor-specific Information
    Option.";
          reference
            "RFC 8415: Dynamic Host Configuration Protocol
            for IPv6 (DHCPv6), Section 21.17";
    
          container vendor-specific-information-options {
            description
              "OPTION_VENDOR_OPTS (17) Vendor-specific Information
    Option.";
            list vendor-specific-information-option {
              key "enterprise-number";
              description
                "The Vendor-specific Information option allows for
    multiple instances in a single message.  Each list entry
    defines the contents of an instance of the option.";
              leaf enterprise-number {
                type uint32;
                description
                  "The vendor's registered Enterprise Number, as
    maintained by IANA.";
                reference
                  "IANA 'Private Enterprise Numbers' registry
                  <https://www.iana.org/assignments/enterprise-numbers>";
    
              }
    
              list vendor-option-data {
                key "sub-option-code";
                description
                  "Vendor options, interpreted by vendor-specific
    client/server functions.";
                leaf sub-option-code {
                  type uint16;
                  description
                    "The code for the sub-option.";
                }
    
                leaf sub-option-data {
                  type binary;
                  description
                    "The data area for the sub-option.";
                }
              }  // list vendor-option-data
            }  // list vendor-specific-information-option
          }  // container vendor-specific-information-options
        }  // grouping vendor-specific-information-option-group
    
        grouping reconfigure-accept-option-group {
          description
            "OPTION_RECONF_ACCEPT (20) Reconfigure Accept Option.
    A client uses the Reconfigure Accept option to announce to
    the server whether or not the client is willing to accept
    Reconfigure messages, and a server uses this option to tell
    the client whether or not to accept Reconfigure messages.  In
    the absence of this option, the default behavior is that the
    client is unwilling to accept Reconfigure messages.  The
    presence node is used to enable the option.";
          reference
            "RFC 8415: Dynamic Host Configuration Protocol
            for IPv6 (DHCPv6), Section 21.20";
    
          container reconfigure-accept-option {
            presence
              "Enable sending of this option";
            description
              "OPTION_RECONF_ACCEPT (20) Reconfigure Accept Option.";
          }  // container reconfigure-accept-option
        }  // grouping reconfigure-accept-option-group
      }  // module ietf-dhcpv6-common
    

© 2023 YumaWorks, Inc. All rights reserved.