netconfcentral logo

ietf-pcp-server@2017-10-17



  module ietf-pcp-server {

    yang-version 1.1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-pcp-server";

    prefix pcp-server;

    import ietf-inet-types {
      prefix inet;
    }
    import ietf-yang-types {
      prefix yang;
    }
    import ietf-pcp {
      prefix pcp;
    }

    organization "xxxx Working Group";

    contact
      "Mohamed Boucadair <mohamed.boucadair@orange.com>
      Christian Jacquenet <christian.jacquenet@orange.com>";

    description
      "This module contains a collection of YANG definitions for
        PCP server implementations.

        Copyright (c) 2017 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 Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC XXXX; see
        the RFC itself for full legal notices.";

    revision "2017-10-17" {
      description "Align with NMDA";
      reference
        "-05";

    }

    revision "2015-08-05" {
      description "Changes xxxx.";
      reference
        "xxxx";

    }


    typedef percent {
      type uint8 {
        range "0 .. 100";
      }
      description "Percentage";
    }

    grouping port-set-option {
      description "PORT_SET option.";
      leaf port-set-enable {
        type boolean;
        description
          "Enable/disable PORT_SET option.";
      }

      leaf default-port-set-size {
        type uint16;
        description
          "Indicates the default size of a port set.";
      }

      leaf maximum-port-set-size {
        type uint16;
        description
          "Indicates the maximum size of a port set.";
      }
    }  // grouping port-set-option

    grouping prefix64-option {
      description
        "PREFIX64 option as defined in [RFC7225].";
      leaf prefix64-option-enable {
        type boolean;
        description
          "Indicates whether the option is enabled/disabled.";
      }

      list prefix64 {
        key "prefix64-id";
        description
          "maintains a list of Prefix64s.";
        leaf prefix64-id {
          type uint32;
          description
            "An identifier of a Prefix64.";
        }

        leaf prefix64 {
          type inet:ipv6-prefix;
          description "A Prefix64";
        }

        leaf suffix {
          type yang:hex-string;
          description
            "The suffix is used for constructing an
                 IPv4-converted IPv6 address from an IPv4 address as
                 specified in Section 2.2 of [RFC6052]. No suffix is
                 included if a /96 Prefix64 is used.";
        }

        list dest-ipv4-prefix {
          key "ipv4-prefix-id";
          description
            "used to solve the destination-dependent
                  Pref64::/n discovery problem discussed in
                  Section 5.1 of [RFC7050].";
          leaf ipv4-prefix-id {
            type uint32;
            description
              "An identifier of a destination IPv4 prefix";
          }

          leaf ipv4-prefix {
            type inet:ipv4-prefix;
            description "an IPv4 prefix.";
          }
        }  // list dest-ipv4-prefix
      }  // list prefix64
    }  // grouping prefix64-option

    grouping option-server {
      description
        "Used for option-related operations
       at the server's side.";
      leaf third-party {
        type boolean;
        description
          "enable/disable THIRD_PARTY option.";
      }

      leaf prefer-failure {
        type boolean;
        description
          "enable/disable PREFER_FAILURE option.";
      }

      container filter {
        description
          "enable/disable FILTER option.";
        uses pcp:filter-option;
      }  // container filter

      container port-set-option {
        description
          "enable/disable PORT_SET option.";
        uses pcp:port-set-option;
      }  // container port-set-option

      container description {
        description
          "enable/disable DESCRIPTION option.";
        uses pcp:description-option;
      }  // container description

      container prefix64-option {
        description
          "enable/disable PREFIX64 option.";
        uses prefix64-option;
      }  // container prefix64-option
    }  // grouping option-server

    container pcp-serve {
      description "PCP server";
      leaf enable {
        type boolean;
        description
          "Enable/Disable PCP server function.";
      }

      container instances {
        description "PCP server instances";
        list instance {
          key "id";
          description
            "a PCP server instance.";
          leaf id {
            type uint32;
            description
              "PCP server instance identifier.";
          }

          leaf name {
            type string;
            description
              "A name associated with the PCP server instance";
          }

          container capabilities {
            description "Capabilities";
            list supported-version {
              key "version";
              description
                "List of supported PCP versions.";
              uses pcp:pcp-version;
            }  // list supported-version

            leaf preferred-version {
              type uint8;
              description
                "List of preferred version.
                  Mainly used for unsolicited messages.";
            }

            leaf authentication-support {
              type boolean;
              description
                "Status of the support of PCP authentication";
            }

            container opcode-capability {
              description
                "Opcode-related capabilities";
              uses pcp:opcode;
            }  // container opcode-capability

            container option-capability {
              description
                "Option-related capabilities";
              uses pcp:option;
            }  // container option-capability

            leaf port-randomization-support {
              type boolean;
              description
                "Indicates whether port randomization is
             supported.";
            }

            leaf port-preservation-suport {
              type boolean;
              description
                "Indicates whether port preservation
             is supported.";
            }

            leaf port-parity-preservation-support {
              type boolean;
              description
                "Indicates whether port parity preservation is
             supported.";
            }

            list protocol-capabilities {
              key "protocol-id";
              description
                "A set of supported transported protocols";
              leaf protocol-id {
                type uint8;
                description
                  "transport protocol";
              }
            }  // list protocol-capabilities

            container pcp-controlled-function-capability {
              description
                "list of controlled functions.";
              uses pcp:pcp-controlled-function;
            }  // container pcp-controlled-function-capability
          }  // container capabilities

          list version {
            key "version";
            description
              "Indicates the PCP version(s) supported by the
                  PCP server.
                  Current supported versions are 0, 1, and 2.";
            uses pcp:pcp-version;
          }  // list version

          list pcp-server-ip-address {
            key "address-id";
            description
              "set one or multiple IP addresses for
                  the PCP server";
            leaf address-id {
              type uint32;
              description
                "The identifier of the address";
            }

            leaf ip-address {
              type inet:ipv6-address;
              description
                "IP (v4/v6) address of the PCP server";
            }
          }  // list pcp-server-ip-address

          leaf authentication-enable {
            type boolean;
            description
              "Enable/disable PCP authentication";
          }

          container opcode-configuration {
            description
              "Opcode-related configuration";
            uses pcp:opcode;
          }  // container opcode-configuration

          container option-configuration {
            description
              "Option-related configuration";
            uses option-server;
          }  // container option-configuration

          leaf port-randomization-enable {
            type boolean;
            description
              "Enable/disable port randomization
                  feature.";
          }

          leaf port-preservation-enable {
            type boolean;
            description
              "Indicates whether the PCP server should
                  preserve the internal port number.";
          }

          leaf port-parity-preservation-enable {
            type boolean;
            description
              "Indicates whether the PCP server should
                  preserve the port parity of the
                  internal port number.";
          }

          leaf nonce-validation-checks-enable {
            type boolean;
            description
              "Indicates whether the PCP server has to
                  disable/enable Nonce validation checks.";
          }

          leaf subscriber-mask {
            type uint8 {
              range "0 .. 128";
            }
            description
              "The subscriber-mask is an integer that indicates
             the length of significant bits to be applied on
             the source IPv6 address (internal side) to
             identify unambiguously a CPE.

             Subscriber-mask is a system-wide configuration
             parameter that is used to enforce generic per-subscriber
             policies (e.g., port-quota).

             Applying these generic policies does not require
             configuring every subscriber's prefix.

             Example: suppose the 2001:db8:100:100::/56 prefix is
             assigned to a DS-Lite enabled CPE. Suppose also that the
             2001:db8:100:100::1 is the IPv6 address used by the
             client that resides in that CPE. When the server
             receives  a packet from this client,
             the server applies the subscriber-mask (e.g., 56) on
             the source IPv6 address to compute the associated prefix
             for this client (that is 2001:db8:100:100::/56).  Then,
             the server enforces policies based on that prefix
             (2001:db8:100:100::/56), not on the exact
             source IPv6 address.";
          }

          leaf port-quota {
            type uint16;
            description
              "configure a port quota to be assigned per
                  PCP client/subscriber.";
          }

          list exclude-ports {
            key "id";
            description
              "The set of ports not to be assigned
                     by the server.";
            leaf id {
              type uint16;
              description "An identifier";
            }

            uses pcp:port-number;
          }  // list exclude-ports

          list protocol {
            key "protocol-id";
            description
              "set of protocols supported by
                    the PCP-controlled function.";
            leaf protocol-id {
              type uint8;
              description
                "identifier of the protocol";
            }
          }  // list protocol

          leaf epoch-set {
            type uint32;
            description
              "Set the Epoch parameter.";
          }

          container lifetime {
            description
              "Configure values for the lifetime to be
                assigned to requesting PCP clients.

               The client requests a certain lifetime, and the server
               responds with the assigned lifetime.

               The server may grant a lifetime smaller or larger than
               the requested lifetime.

               The minimum value should be 120 seconds.

               The maximum value should be the remaining
               lifetime of the IP address assigned to
               the PCP client if that information is available,
               or half the lifetime of IP address
               assignments, or 24 hours.

               Excessively long lifetimes can cause consumption
               of ports even if the internal host is no longer
               interested in receiving the traffic or is no
               longer connected to the network.
               (Section 15 [RFC6877].";
            leaf minimum-lifetime {
              type uint32;
              default '120';
              description
                "Minimum lifetime.";
            }

            leaf maximum-lifetime {
              type uint32;
              default '86400';
              description
                "Maximum lifetime.";
            }
          }  // container lifetime

          container error-lifetime {
            description
              "Configure values for the error lifetime to be
                returned to requesting PCP clients.";
            leaf minimum-error-lifetime {
              type uint32;
              default '30';
              description
                "Minimum error lifetime, in seconds.

                       [RFC6877] recommends that short lifetime
                       errors use a 30-second lifetime.";
            }

            leaf maximum-error-lifetime {
              type uint32;
              default '1800';
              description
                "Maximum error lifetime, in seconds.

                     [RFC6877] recommends that long lifetime
                     errors use a 30-minute lifetime.";
            }
          }  // container error-lifetime

          container mapping-table {
            description
              "PCP mapping table as maintained by
                  the PCP server";
            list mapping-entry {
              key "index";
              description
                "PCP mapping entry";
              uses pcp:mapping-entry;
            }  // list mapping-entry
          }  // container mapping-table

          container traffic-statistics {
            description "traffic statistics";
            uses pcp:traffic-stat;

            container mapping-table {
              description
                "mapping table statistics";
              uses pcp:mapping-table-stats;
            }  // container mapping-table

            leaf port-in-use {
              type percent;
              description
                "ratio of the port usage.";
            }
          }  // container traffic-statistics
        }  // list instance
      }  // container instances
    }  // container pcp-serve
  }  // module ietf-pcp-server