ietf-twamp

TWAMP Data Model

  • Version: 2015-06-30

    ietf-twamp@2015-06-30


    
      module ietf-twamp {
    
        yang-version 1;
    
        namespace
          "urn:ietf:params:xml:ns:yang:ietf-twamp";
    
        prefix ietf-twamp;
    
        import ietf-inet-types {
          prefix inet;
        }
    
        organization
          "IETF IPPM (IP Performance Metrics) Working Group";
    
        contact
          "draft-cmzrjp-ippm-twamp-yang@tools.ietf.org";
    
        description "TWAMP Data Model";
    
        revision "2015-06-30" {
          description
            "01 version. RFC5357, RFC5618, RFC5938 and RFC6038
        is covered. draft-ietf-ippm-metric-registry is also considered";
          reference
            "draft-cmzrjp-ippm-twamp-yang";
    
        }
    
    
        feature control-client {
          description
            "This feature relates to the device functions as
        the TWAMP Control-Client.";
        }
    
        feature server {
          description
            "This feature relates to the device functions as
        the TWAMP Server.";
        }
    
        feature session-sender {
          description
            "This feature relates to the device functions as
        the TWAMP Session-Sender.";
        }
    
        feature session-reflector {
          description
            "This feature relates to the device functions as
        the TWAMP Session-Reflector.";
        }
    
        typedef ctrl-connection-state {
          type enumeration {
            enum "active" {
              value 0;
              description
                "Control session is active.";
            }
            enum "idle" {
              value 1;
              description
                "Control session is idle.";
            }
          }
          description "Control connection state";
        }
    
        typedef mode {
          type bits {
            bit unauthenticated {
              position 0;
              description "Unauthenticated";
            }
            bit authenticated {
              position 1;
              description "Authenticated";
            }
            bit encrypted {
              position 2;
              description "Encrypted";
            }
            bit unauth-test-encrpyt-control {
              position 3;
              description
                "Mixed Security Mode per RFC 5618. Test
            protocol security mode in Unauthenticated mode,
            Control protocol in Encrypted mode.";
            }
            bit individual-session-control {
              position 4;
              description
                "Individual session control per RFC5938.";
            }
            bit reflect-octets {
              position 5;
              description
                "Reflect octets capability per RFC6038.";
            }
            bit symmetrical-size {
              position 6;
              description
                "Symmetrical size per RFC6038.";
            }
          }
          description
            "Authentication mode bit mask";
        }
    
        typedef test-session-state {
          type enumeration {
            enum "ok" {
              value 0;
              description
                "Test session is accepted.";
            }
            enum "failed" {
              value 1;
              description
                "Failure, reason unspecified (catch-all).";
            }
            enum "internal-error" {
              value 2;
              description "Internal error.";
            }
            enum "not-supported" {
              value 3;
              description
                "Some aspect of request is not supported.";
            }
            enum "permanent-resource-limit" {
              value 4;
              description
                "Cannot perform request due to
            permanent resource limitations.";
            }
            enum "temp-resource-limit" {
              value 5;
              description
                "Cannot perform request due to
            temporary resource limitations.";
            }
          }
          description "Test session state";
        }
    
        typedef server-ctrl-connection-state {
          type enumeration {
            enum "active" {
              value 0;
              description "Active";
            }
            enum "servwait" {
              value 1;
              description "Servwait";
            }
          }
          description
            "Server control connection state";
        }
    
        typedef fill-mode {
          type enumeration {
            enum "zero" {
              value 0;
              description "Zero";
            }
            enum "random" {
              value 1;
              description "Random";
            }
          }
          description
            "Indicates whether the padding added to the
        UDP test packets will contain pseudo-random numbers, or
        whether it should consist of all zeroes.";
        }
    
        typedef units {
          type enumeration {
            enum "seconds" {
              value 0;
              description "Seconds";
            }
            enum "milliseconds" {
              value 1;
              description "Milliseconds";
            }
            enum "microseconds" {
              value 2;
              description "Microseconds";
            }
            enum "nanoseconds" {
              value 3;
              description "Nanoseconds";
            }
          }
          description "Time units";
        }
    
        typedef sender-session-state {
          type enumeration {
            enum "setup" {
              value 0;
              description
                "Test session is active.";
            }
            enum "failure" {
              value 1;
              description
                "Test session is idle.";
            }
          }
          description "Sender session state.";
        }
    
        grouping maintenance-statistics {
          description
            "Maintenance statistics grouping";
          leaf sent-packets {
            type uint32;
            config false;
            description "Packets sent";
          }
    
          leaf rcv-packets {
            type uint32;
            config false;
            description "Packets received";
          }
    
          leaf last-sent-seq {
            type uint32;
            config false;
            description
              "Last sent sequence number";
          }
    
          leaf last-rcv-seq {
            type uint32;
            config false;
            description
              "Last received sequence number";
          }
        }  // grouping maintenance-statistics
    
        container twamp {
          description "Top level container";
          container twamp-client {
            if-feature control-client;
            presence "twamp-client";
            description "Twamp client container";
            leaf client-admin-state {
              type boolean;
              mandatory true;
              description
                "Indicates whether this device is allowed to run
            TWAMP to initiate control/test sessions";
            }
    
            list mode-preference-chain {
              key "priority";
              unique "mode";
              description
                "Authentication mode preference";
              leaf priority {
                type uint16;
                description "priority";
              }
    
              leaf mode {
                type mode;
                description
                  "Authentication mode bit mask";
              }
            }  // list mode-preference-chain
    
            list key-chain {
              key "key-id";
              description "Key chain";
              leaf key-id {
                type string {
                  length "1..80";
                }
                description "Key ID";
              }
    
              leaf secret-key {
                type string;
                description "Secret key";
              }
            }  // list key-chain
    
            list twamp-client-ctrl-connection {
              key "ctrl-connection-name";
              description
                "Twamp client control connections";
              leaf ctrl-connection-name {
                type string;
                description
                  "A unique name used as a key to identify this
                individual TWAMP control connection on the
                Control-Client device.";
              }
    
              leaf client-ip {
                type inet:ip-address;
                description "Client IP address";
              }
    
              leaf server-ip {
                type inet:ip-address;
                mandatory true;
                description "Server IP address";
              }
    
              leaf server-tcp-port {
                type inet:port-number;
                default "862";
                description "Server tcp port";
              }
    
              leaf dscp {
                type inet:dscp;
                default "0";
                description
                  "The DSCP value to be placed in the IP header
                of the TWAMP TCP Control packets generated
                by the Control-Client";
              }
    
              leaf key-id {
                type string {
                  length "1..80";
                }
                description "Key ID";
              }
    
              leaf max-count {
                type uint32 {
                  range "1024..4294967295";
                }
                default '32768';
                description "Max count value.";
              }
    
              leaf client-tcp-port {
                type inet:port-number;
                config false;
                description "Client TCP port";
              }
    
              leaf server-start-time {
                type uint64;
                config false;
                description
                  "The Start-Time advertized by the Server in
              the Server-Start message";
              }
    
              leaf ctrl-connection-state {
                type ctrl-connection-state;
                config false;
                description
                  "Control connection state";
              }
    
              leaf selected-mode {
                type mode;
                config false;
                description
                  "The TWAMP mode that the Control-Client has
              chosen for this control connection as set in the Mode
              field of the Set-Up-Response message";
              }
    
              leaf token {
                type binary {
                  length "64";
                }
                config false;
                description
                  "64 octets, containing the concatenation of a
                16-octet challenge, a 16-octet AES Session-key used
                for encryption, and a 32-octet HMAC-SHA1 Session-key
                used for authentication";
              }
    
              leaf client-iv {
                type binary {
                  length "16";
                }
                config false;
                description
                  "16 octets, Client-IV is generated randomly
                by the Control-Client.";
              }
    
              list twamp-session-request {
                key "test-session-name";
                description
                  "Twamp session requests";
                leaf test-session-name {
                  type string;
                  description
                    "A unique name for this test session to be
                used as a key for this test session on the
                Control-Client.";
                }
    
                leaf sender-ip {
                  type inet:ip-address;
                  description
                    "Sender IP address";
                }
    
                leaf sender-udp-port {
                  type inet:port-number;
                  description "Sender UDP port";
                }
    
                leaf reflector-ip {
                  type inet:ip-address;
                  mandatory true;
                  description
                    "Reflector IP address.";
                }
    
                leaf reflector-udp-port {
                  type inet:port-number;
                  description
                    "Reflector UDP port. If this value is not
                set, the device shall use the same port number as
                defined in the server-tcp-port parameter of this
                twamp-session-request's
                parent client-control-connection.";
                }
    
                leaf timeout {
                  type uint64;
                  default "2";
                  description
                    "The time (in seconds)Session-Reflector MUST
                wait after receiving a Stop-Session message.";
                }
    
                leaf padding-length {
                  type uint32 {
                    range "64..4096";
                  }
                  description
                    "The number of bytes of padding that should
                    be added to the UDP test packets generated by the
                    sender. Jumbo sized packets supported.";
                }
    
                leaf dscp {
                  type inet:dscp;
                  description
                    "The DSCP value to be placed in the UDP
                header of TWAMP-Test packets generated by the
                Session-Sender, and in the UDP header of the TWAMP-Test
                response packets generated by the Session-Reflector
                for this test session.";
                }
    
                leaf start-time {
                  type uint64;
                  default "0";
                  description
                    "Time when the session is to be started
                (but not before the Start-Sessions command is issued).
                This value is placed in the Start Time field of the
                Request-TW-Session message. The default value of 0
                indicates that the session will be started as soon
                as the Start-Sessions message is received.";
                }
    
                leaf repeat {
                  type boolean;
                  default "false";
                  description
                    "If the test session is to be run repeatedly.
                The default value of repeat is False, indicating that
                once the session has completed, it will not be
                renegotiated and restarted";
                }
    
                leaf repeat-interval {
                  when "../repeat='true'" {
                    description
                      "When repeat is true";
                  }
                  type uint32;
                  description
                    "Repeat interval (in minutes)";
                }
    
                list pm-reg-list {
                  key "pm-index";
                  description
                    "A list of one or more pm-index values,
                which communicate packet stream characteristics and one
                or more metrics to be measured.";
                  leaf pm-index {
                    type uint16;
                    description
                      "One or more Numerical index values of a
                  Registered Metric in the Performance Metric Registry";
                  }
                }  // list pm-reg-list
    
                leaf test-session-state {
                  type test-session-state;
                  config false;
                  description
                    "Test session state";
                }
    
                leaf sid {
                  type string;
                  config false;
                  description
                    "The SID allocated by the Server for
                this test session";
                }
              }  // list twamp-session-request
            }  // list twamp-client-ctrl-connection
          }  // container twamp-client
    
          container twamp-server {
            if-feature server;
            presence "twamp-server";
            description "Twamp sever container";
            leaf server-admin-state {
              type boolean;
              mandatory true;
              description
                "Indicates whether this device is allowed to run
              TWAMP to respond to control/test sessions";
            }
    
            leaf server-tcp-port {
              type inet:port-number;
              default "862";
              description
                "This parameter defines the well known TCP port
            number that is used by TWAMP.";
            }
    
            leaf servwait {
              type uint32 {
                range "1..604800";
              }
              default '900';
              description
                "SERVWAIT (TWAMP Control (TCP) session timeout),
              default value is 900";
            }
    
            leaf dscp {
              type inet:dscp;
              description
                "The DSCP value to be placed in the IP header of
            TCP TWAMP-Control packets generated by the Server";
            }
    
            leaf count {
              type uint32 {
                range "1024..4294967295";
              }
              description
                "Parameter used in deriving a key from a
            shared secret ";
            }
    
            leaf max-count {
              type uint32 {
                range "1024..4294967295";
              }
              default '32768';
              description "Max count value.";
            }
    
            leaf modes {
              type mode;
              description
                "The bit mask of TWAMP Modes this Server
            instance is willing to support.";
            }
    
            list key-chain {
              key "key-id";
              description
                "KeyIDs with the respective secret keys.";
              leaf key-id {
                type string {
                  length "1..80";
                }
                description "Key IDs.";
              }
    
              leaf secret-key {
                type string;
                description "Secret keys.";
              }
            }  // list key-chain
    
            list twamp-server-ctrl-connection {
              key "client-ip client-tcp-port server-ip server-tcp-port";
              config false;
              description
                "Twamp server control connections";
              leaf client-ip {
                type inet:ip-address;
                description "Client IP address";
              }
    
              leaf client-tcp-port {
                type inet:port-number;
                description "Client TCP port";
              }
    
              leaf server-ip {
                type inet:ip-address;
                description "Server IP address";
              }
    
              leaf server-tcp-port {
                type inet:port-number;
                description "Server TCP port";
              }
    
              leaf server-ctrl-connection-state {
                type server-ctrl-connection-state;
                description
                  "Server control connection state";
              }
    
              leaf dscp {
                type inet:dscp;
                description
                  "The DSCP value used in the IP header of the
              TCP control packets sent by the Server for this control
              connection. This will usually be the same value as is
              configured for twamp-server:dscp under the twamp-server.
              However, in the event that the user re-configures
              twamp-server:dscp after this control connection is already
              in progress, this read-only value will show the actual
              dscp value in use by this control connection.";
              }
    
              leaf selected-mode {
                type mode;
                description
                  "The mode that was chosen for this control
              connection as set in the Mode field of the
              Set-Up-Response message.";
              }
    
              leaf key-id {
                type string {
                  length "1..80";
                }
                description
                  "The key-id value that is in use by this
                      control connection.";
              }
    
              leaf count {
                type uint32 {
                  range "1024..4294967295";
                }
                description
                  "The count value that is in use by this control
                connection. This will usually be the same value as is
                configured under twamp-server. However, in the event that
                the user re-configured twamp-server:count after this
                control connection is already in progress, this read-only
                value will show the different count that is in use for
                this control connection.";
              }
    
              leaf max-count {
                type uint32 {
                  range "1024..4294967295";
                }
                description
                  "The max-count value that is in use by this
                control connection. This will usually be the same value
                as is configured under twamp-server. However, in the
                event that the user re-configured twamp-server:max-count
                after this control connection is already in progress,
                this read-only value will show the different max-count
                that is in use for this control connection.";
              }
    
              leaf salt {
                type binary {
                  length "16";
                }
                description
                  "Salt MUST be generated pseudo-randomly";
              }
    
              leaf server-iv {
                type binary {
                  length "16";
                }
                description
                  "16 octets, Server-IV is generated randomly
              by the Control-Client.";
              }
    
              leaf challenge {
                type binary {
                  length "16";
                }
                description
                  "Challenge is a random sequence of octets
              generated by the Server";
              }
            }  // list twamp-server-ctrl-connection
          }  // container twamp-server
    
          container twamp-session-sender {
            if-feature session-sender;
            description
              "Twamp session sender container";
            list twamp-sender-test-session {
              key "test-session-name";
              description
                "Twamp sender test sessions";
              leaf test-session-name {
                type string;
                description
                  "A unique name for this test session to be
              used as a key for this test session by the Session-Sender
              logical entity.";
              }
    
              leaf ctrl-connection-name {
                type string;
                config false;
                description
                  "The name of the parent control connection
              that is responsible for negotiating this test session.";
              }
    
              leaf fill-mode {
                type fill-mode;
                default 'zero';
                description
                  "Indicates whether the padding added to the
              UDP test packets will contain pseudo-random numbers, or
              whether it should consist of all zeroes.";
              }
    
              leaf number-of-packets {
                type uint32;
                description
                  "The overall number of UDP test packets to be
                transmitted by the sender for this test session.";
              }
    
              choice packet-distribution {
                description
                  "Packet distributions, poisson or periodic";
                case periodic {
                  leaf periodic-interval {
                    type uint32;
                    description
                      "Periodic interval";
                  }
    
                  leaf periodic-interval-units {
                    type units;
                    description
                      "Periodic interval units";
                  }
                }  // case periodic
    
                case poisson {
                  leaf lambda {
                    type uint32;
                    description
                      "The average rate of
                              packet transmission.";
                  }
    
                  leaf lambda-units {
                    type uint32;
                    description "Lambda units.";
                  }
    
                  leaf max-interval {
                    type uint32;
                    description
                      "maximum time between packet
                  transmissions.";
                  }
    
                  leaf truncation-point-units {
                    type units;
                    description
                      "Truncation point units";
                  }
                }  // case poisson
              }  // choice packet-distribution
    
              leaf sender-session-state {
                type sender-session-state;
                config false;
                description
                  "Sender session state.";
              }
    
              uses maintenance-statistics;
            }  // list twamp-sender-test-session
          }  // container twamp-session-sender
    
          container twamp-session-reflector {
            if-feature session-reflector;
            description
              "Twamp session reflector container";
            leaf refwait {
              type uint32 {
                range "1..604800";
              }
              default '900';
              description
                "REFWAIT (TWAMP test session timeout),
              the default value is 900";
            }
    
            list twamp-reflector-test-session {
              key "sender-ip sender-udp-port reflector-ip reflector-udp-port";
              config false;
              description
                "Twamp reflector test sessions";
              leaf sid {
                type string;
                description
                  "An auto-allocated identifier for this test
              session, that is unique within the context of this
              Server/Session-Reflector device only. ";
              }
    
              leaf sender-ip {
                type inet:ip-address;
                description "Sender IP address.";
              }
    
              leaf sender-udp-port {
                type inet:port-number;
                description "Sender UDP port.";
              }
    
              leaf reflector-ip {
                type inet:ip-address;
                description
                  "Reflector IP address.";
              }
    
              leaf reflector-udp-port {
                type inet:port-number;
                description
                  "Reflector UDP port.";
              }
    
              leaf parent-connection-client-ip {
                type inet:ip-address;
                description
                  "Parent connction client IP address.";
              }
    
              leaf parent-connection-client-tcp-port {
                type inet:port-number;
                description
                  "Parent connection client TCP port.";
              }
    
              leaf parent-connection-server-ip {
                type inet:ip-address;
                description
                  "Parent connection server IP address.";
              }
    
              leaf parent-connection-server-tcp-port {
                type inet:port-number;
                description
                  "Parent connection server TCP port";
              }
    
              leaf dscp {
                type inet:dscp;
                description
                  "The DSCP value present in the IP header of
              TWAMP UDP test packets belonging to this test session.";
              }
    
              uses maintenance-statistics;
            }  // list twamp-reflector-test-session
          }  // container twamp-session-reflector
        }  // container twamp
      }  // module ietf-twamp
    

© 2023 YumaWorks, Inc. All rights reserved.