bbf-l2-dhcpv4-relay

This module contains a collection of YANG definitions for supporting the Broadband Forum requirements on subscriber management v...

  • Version: 2023-12-15

    bbf-l2-dhcpv4-relay@2023-12-15


    
      module bbf-l2-dhcpv4-relay {
    
        yang-version 1.1;
    
        namespace
          "urn:bbf:yang:bbf-l2-dhcpv4-relay";
    
        prefix bbf-l2-d4r;
    
        import ietf-interfaces {
          prefix if;
        }
        import ietf-yang-types {
          prefix yang;
        }
        import bbf-if-type {
          prefix bbfift;
        }
        import bbf-l2-dhcpv4-relay-profile-common {
          prefix bbf-l2-d4r-pc;
        }
    
        organization
          "Broadband Forum <https://www.broadband-forum.org>
    Common YANG Work Area";
    
        contact
          "Comments or questions about this Broadband Forum YANG module
    should be directed to <mailto:help@broadband-forum.org>.
    
    Editor:      Nick Hancock, Adtran
    
    Editor:      Ludwig Pauwels, Nokia
    
    PS Leader:   Joey Boyd, Adtran
    
    WA Director: Joey Boyd, Adtran
    
    WA Director: Sven Ooghe, Nokia";
    
        description
          "This module contains a collection of YANG definitions for
    supporting the Broadband Forum requirements on subscriber
    management via the DHCPv4 protocol as applicable to access
    network equipment. As such, this module is specific to access
    network equipment (e.g., BBF-specified Access Nodes and FTTdp
    DPUs).
    
    Copyright (c) 2017-2023, Broadband Forum
    
    Redistribution and use in source and binary forms, with or
    without modification, are permitted provided that the following
    conditions are met:
    
    1. Redistributions of source code must retain the above copyright
       notice, this list of conditions and the following disclaimer.
    
    2. Redistributions in binary form must reproduce the above
       copyright notice, this list of conditions and the following
       disclaimer in the documentation and/or other materials
       provided with the distribution.
    
    3. Neither the name of the copyright holder nor the names of its
       contributors may be used to endorse or promote products
       derived from this software without specific prior written
       permission.
    
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
    CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
    NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
    STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
    ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    
    The above license is used as a license under copyright only.
    Please reference the Forum IPR Policy for patent licensing terms
    <https://www.broadband-forum.org/ipr-policy>.
    
    Any moral rights which are necessary to exercise under the above
    license grant are also deemed granted under this license.
    
    This version of this YANG module is part of TR-383a7; see
    the TR itself for full legal notices.";
    
        revision "2023-12-15" {
          description
            "Amendment 7.
    * Approval Date:    2023-12-15.
    * Publication Date: 2023-12-15.";
          reference
            "TR-383a7: Common YANG Modules
            	  <https://www.broadband-forum.org/technical/download/
            		   TR-383_Amendment-7.pdf>";
    
        }
    
        revision "2023-03-07" {
          description
            "Amendment 6.
    * Approval Date:    2023-03-07.
    * Publication Date: 2023-03-07.";
          reference
            "TR-383a6: Common YANG Modules
            	  <https://www.broadband-forum.org/technical/download/
            		   TR-383_Amendment-6.pdf>";
    
        }
    
        revision "2022-03-01" {
          description
            "Amendment 5.
    * Approval Date:    2022-03-01.
    * Publication Date: 2022-03-01.";
          reference
            "TR-383a5: Common YANG Modules
            	  <https://www.broadband-forum.org/technical/download/
            		   TR-383_Amendment-5.pdf>";
    
        }
    
        revision "2017-05-08" {
          description
            "Initial revision.
    * Approval Date:    see revision date above.
    * Publication Date: 2017-06-02.";
          reference
            "TR-383: Common YANG Modules
            	<https://www.broadband-forum.org/technical/download/
            		 TR-383.pdf>";
    
        }
    
    
        feature replace-option-82 {
          description
            "Indicates support for accepting DHCPv4 messages that contain
    option 82 and forwarding the message after having replaced the
    option 82 with a new one generated by the device itself.";
        }
    
        uses bbf-l2-d4r-pc:l2-dhcpv4-relay-profiles;
    
        augment /if:interfaces/if:interface {
          when
            "derived-from-or-self(if:type,
    		     'bbfift:vlan-sub-interface')" {
            description
              "Applies only to VLAN sub-interfaces.";
          }
          description
            "Additions for L2 DHCPv4 Relay Agent on the VLAN
    sub-interface.";
          container l2-dhcpv4-relay {
            presence
              "Enables the management of DHCPv4 message processing at this
    VLAN sub-interface.";
            description
              "L2 DHCPv4 Relay Agent configuration parameters.
    
    The presence of the container itself does not instantiate a
    L2 DHCPv4 Relay Agent, this is dependent on the value of the
    contained leaf 'enable'.
    
    If the container is not present, no L2 DHCPv4 Relay Agent
    functionality is performed on this interface. Any received
    DHCPv4 messages are processed based on the layer 2 forwarding
    configuration, e.g., VLAN sub-interface and/or layer 2
    forwarding.";
            leaf enable {
              type boolean;
              default "false";
              description
                "Controls the L2 DHCPv4 Relay Agent processing of DHCPv4
    messages received on this interface and messages to be sent
    to this interface.
    
    If 'true', enables the L2 DHCPv4 Relay Agent to process
    DHCPv4 messages based on the additional Relay Agent
    configuration.
    
    If 'false', no L2 DHCPv4 Relay Agent functionality is
    performed on this interface. Any received DHCPv4 messages
    are processed based on the layer 2 forwarding
    configuration, e.g., VLAN sub-interface and/or layer 2
    forwarding.";
            }
    
            leaf trusted-port {
              type union {
                type boolean;
                type enumeration {
                  enum "replace" {
                    value 0;
                    description
                      "For DHCPv4 messages containing option 82 information,
    remove the existing option 82 information and replace
    it based on the additional configuration for the L2
    DHCPv4 Relay Agent.";
                  }
                }
              }
              default "false";
              description
                "Affects the processing of DHCPv4 messages received on the
    interface and contain option 82.
    
    The value 'true' means messages containing option 82 are
    accepted and forwarded with option 82 unchanged. When the
    L2 DHCP Relay Agent receives in the downstream direction a
    reply containing option 82, which is a copy of the value
    that was passed in the upstream direction, then it does not
    remove this and sends the message on the interface with
    option 82 kept in.
    
    The value 'false' means the DHCPv4 messages containing
    option 82 shall be discarded.
    
    The value 'replace' means that the DHCPv4 message received
    on the interface will be modified before forwarding the
    message. The option 82 that is present in downstream
    messages, which is a copy of the one generated by the L2
    DHCPv4 Relay Agent, shall be removed before sending the
    message on the interface.
    
    Does not affect the processing of DHCPv4 messages received
    on the interface without option 82.";
            }
    
            leaf profile-ref {
              when "../enable = 'true'" {
                description
                  "Applicable only when L2 DHCPv4 Relay Agent functionality
    is enabled.";
              }
              type leafref {
                path "/bbf-l2-d4r:l2-dhcpv4-relay-profiles/bbf-l2-d4r:l2-dhcpv4-relay-profile/bbf-l2-d4r:name";
              }
              mandatory true;
              description
                "Reference to the DHCPv4 configuration profile.
    
    Affects the processing of DHCPv4 messages received on the
    interface and do not contain option 82. The existence of
    the 'profile-ref' means that option 82 shall be added
    before forwarding the message upstream. The content of
    option 82 is determined by the referenced profile. When
    option 82 is inserted in the upstream direction, then
    option 82 shall be removed from the downstream replies
    before sending the message on the interface.
    
    Affects the processing of DHCPv4 messages received on the
    interface with option 82 when 'trusted-port' is set to
    'replace'. In that case the option 82 received on the
    interface is removed and replaced by a newly generated one
    according the referenced profile.
    
    Does not affect the processing of DHCPv4 messages received
    on the interface with option 82 when 'trusted-port' has a
    value different from 'replace'.";
            }
          }  // container l2-dhcpv4-relay
        }
    
        augment /if:interfaces-state/if:interface/if:statistics {
          when
            "derived-from-or-self(../if:type,
    		     'bbfift:vlan-sub-interface')" {
            description
              "Applies only to VLAN sub-interfaces.";
          }
          description
            "L2 DHCPv4 Relay Agent statistics.";
          container dhcpv4 {
            presence
              "L2 DHCPv4 Relay Agent functionality is enabled and L2 DHCPv4
    Relay Agent statistics are available.";
            description
              "Container presents the message statistics related to the L2
    DHCPv4 Relay Agent.";
            leaf in-bad-packets-from-client {
              type yang:counter32;
              units "messages";
              description
                "Bad DHCPv4 messages received on the interface. The messages
    are received from a DHCPv4 Client connected to it (directly
    or indirectly through a network).
    
    Discontinuities in the counter can occur at
    re-initialization of the management system, and/or when the
    L2 DHCPv4 Relay Agent functionality is disabled/enabled.";
            }
    
            leaf in-bad-packets-from-server {
              type yang:counter32;
              units "messages";
              description
                "Bad DHCPv4 messages received on the interface. The messages
    are received from a DHCPv4 Server connected to it (directly
    or indirectly through a network).
    
    Discontinuities in the counter can occur at
    re-initialization of the management system, and/or when the
    L2 DHCPv4 Relay Agent functionality is disabled/enabled.";
            }
    
            leaf in-packets-from-client {
              type yang:counter32;
              units "messages";
              description
                "Valid DHCPv4 messages received on the interface. The
    messages are received from a DHCPv4 Client connected to it
    (directly or indirectly through a network).
    
    Discontinuities in the counter can occur at
    re-initialization of the management system, and/or when the
    L2 DHCPv4 Relay Agent functionality is disabled/enabled.";
            }
    
            leaf in-packets-from-server {
              type yang:counter32;
              units "messages";
              description
                "Valid DHCPv4 messages received on the interface. The
    messages are received from a DHCPv4 Server connected to it
    (directly or indirectly through a network).
    
    Discontinuities in the counter can occur at
    re-initialization of the management system, and/or when the
    L2 DHCPv4 Relay Agent functionality is disabled/enabled.";
            }
    
            leaf out-packets-to-server {
              type yang:counter32;
              units "messages";
              description
                "Valid DHCPv4 messages sent to the interface. The messages
    are sent to a DHCPv4 Server connected to it (directly or
    indirectly through a network).
    
    Discontinuities in the counter can occur at
    re-initialization of the management system, and/or when the
    L2 DHCPv4 Relay Agent functionality is disabled/enabled.";
            }
    
            leaf out-packets-to-client {
              type yang:counter32;
              units "messages";
              description
                "Valid DHCPv4 messages sent to the interface. The messages
    are sent to a DHCPv4 Client connected to it (directly or
    indirectly through a network).
    
    Discontinuities in the counter can occur at
    re-initialization of the management system, and/or when the
    L2 DHCPv4 Relay Agent functionality is disabled/enabled.";
            }
    
            leaf option-82-inserted-packets-to-server {
              type yang:counter32;
              units "messages";
              description
                "DHCPv4 messages from a Client to a Server that pass this
    interface and into which the L2 DHCPv4 Relay inserted
    option 82.
    
    Discontinuities in the counter can occur at
    re-initialization of the management system, and/or when the
    L2 DHCPv4 Relay Agent functionality is disabled/enabled.";
            }
    
            leaf option-82-removed-packets-to-client {
              type yang:counter32;
              units "messages";
              description
                "DHCPv4 messages from a Server to a Client that pass this
    interface and from which the L2 DHCPv4 Relay removed option
    82.
    
    Discontinuities in the counter can occur at
    re-initialization of the management system, and/or when the
    L2 DHCPv4 Relay Agent functionality is disabled/enabled.";
            }
    
            leaf option-82-not-inserted-to-server {
              type yang:counter32;
              units "messages";
              description
                "DHCPv4 messages from a Client to a Server that pass this
    interface and for which the L2 DHCPv4 Relay did not insert
    option 82 because after insertion the length would exceed
    the maximum allowed packet size.
    
    Discontinuities in the counter can occur at
    re-initialization of the management system, and/or when the
    L2 DHCPv4 Relay Agent functionality is disabled/enabled.";
            }
          }  // container dhcpv4
        }
      }  // module bbf-l2-dhcpv4-relay
    

© 2023 YumaWorks, Inc. All rights reserved.