netconfcentral logo

ietf-if-ex-pppoe@2017-09-19



  module ietf-if-ex-pppoe {

    yang-version 1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-if-ext-pppoe";

    prefix pppoe;

    import ietf-interfaces {
      prefix if;
    }
    import ietf-inet-types {
      prefix inet;
    }

    organization
      "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

    contact
      "Editor:   Hansance Han
                  <mailto:hansance.han@ericsson.com
        Editor:   Kevin Huang M
                  <mailto:kevin.m.huang@ericsson.com>";

    description
      "This module contains a collection of YANG definitions
for
              managing PPPoE network interfaces.";

    revision "2017-09-19" {
      description "Initial revision.";
      reference
        "RFC 7223: A YANG Data Model for Interface Management";

    }


    feature pppoe {
      description
        "Indicates that the interface supports configuration of
pppoe.";
    }

    feature pppoe-server {
      description
        "Indicates that the PPPoE supports server mode.";
    }

    feature pppoe-client {
      description
        "Indicates that the PPPoE support client mode.";
    }

    feature remote-ip-pool {
      description
        "Indicates that the PPPoE server support IPv4 and IPv6
address pool.";
    }

    feature pppoe-authentication {
      description
        "Indicates that the interface supports configuration of
           pppoe authentication.";
    }

    augment /if:interfaces/if:interface {
      when "if:type = 'ppp'";
      description
        "PPPoE link protocol is extension under interface.";
      container pppoe {
        presence "";
        description
          "A pppoe interface must specify the PPPoE parameters.";
        leaf pppoe-mode-type {
          type enumeration {
            enum "server" {
              value 0;
              description
                "To configure device to operate in the PPPoE server
mode.";
            }
            enum "client" {
              value 1;
              description
                "To configure device to operate in the PPPoE client
mode.";
            }
          }
          default 'server';
          description
            "The desired mode type for this PPPoE connection mode.";
        }

        container pppoe-server {
          if-feature pppoe-server;
          presence "";
          description
            "The PPPoE server configuration subtree.";
          leaf enabled {
            type boolean;
            default "false";
            description
              "This leaf contains the configured, desired state of
the PPPoE.";
          }

          container remote-ip-pool {
            if-feature remote-ip-pool;
            presence "";
            description
              "The PPPoE server support IPv4 and IPv6 address pool for
remote
             client device";
            choice address-pool {
              mandatory true;
              description
                "The address-pool for IPv4/IPv6 adress and IP pool
name.";
              leaf ip-pool {
                type inet:ip-prefix;
                description
                  "An IPv4/IPv6 prefix used for PPPoE remote IPv4/IPv6
                 pool purposes.";
              }
              leaf ip-pool-name {
                type string {
                  length "1..64";
                }
                description
                  "Name of the IP pool";
              }
            }  // choice address-pool
          }  // container remote-ip-pool

          container authentication {
            if-feature pppoe-authentication;
            presence "";
            description
              "The authentication configuration subtree.";
            choice authentication-mode {
              mandatory true;
              description
                "The authentication sub-mode pap and chap.";
              leaf pap {
                type empty;
                description
                  "Authentication pap for PPPoE.";
              }
              leaf chap {
                type empty;
                description
                  "Authentication pap for PPPoE.";
              }
            }  // choice authentication-mode
          }  // container authentication
        }  // container pppoe-server

        container pppoe-client {
          if-feature pppoe-client;
          presence "";
          description
            "The PPPoE server configuration subtree.";
          leaf enabled {
            type boolean;
            default "false";
            description
              "This leaf contains the configured, desired state of
the PPPoE.";
          }
        }  // container pppoe-client
      }  // container pppoe
    }
  }  // module ietf-if-ex-pppoe