This YANG module defines components for the definition and configuration of the client class selector function for a DHCPv6 serv...
Version: 2022-06-20
module example-dhcpv6-class-select { yang-version 1.1; namespace "https://example.com/ns/" + "example-dhcpv6-class-select"; prefix dhc6-class-sel; import ietf-inet-types { prefix inet; } import ietf-interfaces { prefix if; } import ietf-dhcpv6-common { prefix dhc6; } import ietf-dhcpv6-server { prefix dhc6-srv; } 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 components for the definition and configuration of the client class selector function for a DHCPv6 server. As this functionality varies greatly between different implementations, the module provided as an example only. 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"; } grouping client-class-id { description "Definitions of client message classification for authorization and assignment purposes."; leaf client-class-name { type string; mandatory true; description "Unique identifier for client class identification list entries."; } choice id-type { mandatory true; description "Definitions for different client identifier types."; case client-id-id { description "Client class selection based on a string literal client identifier."; leaf client-id { type string; mandatory true; description "String literal client identifier."; } } // case client-id-id case received-interface-id { description "Client class selection based on the incoming interface of the DHCPv6 message."; leaf received-interface { type if:interface-ref; description "Reference to the interface entry for the incoming DHCPv6 message."; } } // case received-interface-id case packet-source-address-id { description "Client class selection based on the source address of the DHCPv6 message."; leaf packet-source-address { type inet:ipv6-address; mandatory true; description "Source address of the DHCPv6 message."; } } // case packet-source-address-id case packet-destination-address-id { description "Client class selection based on the destination address of the DHCPv6 message."; leaf packet-destination-address { type inet:ipv6-address; mandatory true; description "Destination address of the DHCPv6 message."; } } // case packet-destination-address-id case relay-link-address-id { description "Client class selection based on the prefix of the link-address field in the relay agent message header."; leaf relay-link-address { type inet:ipv6-prefix; mandatory true; description "Prefix of the link-address field in the relay agent message header."; } } // case relay-link-address-id case relay-peer-address-id { description "Client class selection based on the value of the peer-address field in the relay agent message header."; leaf relay-peer-address { type inet:ipv6-prefix; mandatory true; description "Prefix of the peer-address field in the relay agent message header."; } } // case relay-peer-address-id case relay-interface-id { description "Client class selection based on a received instance of OPTION_INTERFACE_ID (18)."; leaf relay-interface { type string; description "An opaque value of arbitrary length generated by the relay agent to identify one of the relay agent's interfaces."; } } // case relay-interface-id case user-class-option-id { description "Client class selection based on the value of the OPTION_USER_CLASS (15) and its user-class-data field."; leaf user-class-data { type string; mandatory true; description "User Class value to match."; } } // case user-class-option-id case vendor-class-present-id { description "Client class selection based on the presence of OPTION_VENDOR_CLASS (16) in the received message."; leaf vendor-class-present { type boolean; mandatory true; description "Presence of OPTION_VENDOR_CLASS (16) in the received message."; } } // case vendor-class-present-id case vendor-class-option-enterprise-number-id { description "Client class selection based on the value of the enterprise-number field in OPTION_VENDOR_CLASS (16)."; leaf vendor-class-option-enterprise-number { type uint32; mandatory true; description "Value of the enterprise-number field."; } } // case vendor-class-option-enterprise-number-id case vendor-class-option-data { description "Client class selection based on the value of a data field within a vendor-class-data entry for a matching enterprise-number field in OPTION_VENDOR_CLASS (16)."; container vendor-class-option-data { description "Vendor class option data container."; leaf enterprise-number { type uint32; description "The vendor's registered Enterprise Number, as maintained by IANA."; } leaf vendor-class-data-id { type uint8; description "Vendor class data ID."; } leaf vendor-class-data { type string; description "Opaque field for matching the client's vendor class data."; } } // container vendor-class-option-data } // case vendor-class-option-data case client-duid-id { description "Client class selection based on the value of the received client DUID."; leaf duid { type dhc6:duid; description "Client DUID."; } } // case client-duid-id } // choice id-type } // grouping client-class-id augment /dhc6-srv:dhcpv6-server/dhc6-srv:class-selector { description "Augment class selector functions to the DHCPv6 server module."; container client-classes { description "Client classes to augment."; list class { key "client-class-name"; description "List of the client class identifiers applicable to clients served by this address pool."; uses client-class-id; } // list class } // container client-classes } augment /dhc6-srv:dhcpv6-server/dhc6-srv:allocation-ranges/dhc6-srv:allocation-range { description "Augment class selector functions to the DHCPv6 server allocation-ranges."; leaf-list client-class { type leafref { path "/dhc6-srv:dhcpv6-server/dhc6-srv:class-selector/client-classes/class/client-class-name"; } description "Leafrefs to client classes."; } } augment /dhc6-srv:dhcpv6-server/dhc6-srv:allocation-ranges/dhc6-srv:allocation-range/dhc6-srv:address-pools/dhc6-srv:address-pool { description "Augment class selector functions to the DHCPv6 server address-pools."; leaf-list client-class { type leafref { path "/dhc6-srv:dhcpv6-server/dhc6-srv:class-selector/client-classes/class/client-class-name"; } description "Leafrefs to client classes."; } } augment /dhc6-srv:dhcpv6-server/dhc6-srv:allocation-ranges/dhc6-srv:allocation-range/dhc6-srv:prefix-pools/dhc6-srv:prefix-pool { description "Augment class selector functions to the DHCPv6 server prefix-pools."; leaf-list client-class { type leafref { path "/dhc6-srv:dhcpv6-server/dhc6-srv:class-selector/client-classes/class/client-class-name"; } description "Leafrefs to client classes."; } } } // module example-dhcpv6-class-select
© 2023 YumaWorks, Inc. All rights reserved.