TWAMP Data Model
Version: 2015-03-06
module ciena-ietf-twamp { yang-version 1; namespace "urn:ciena:params:xml:ns:yang:ciena-pn:ciena-ietf-twamp"; prefix 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-03-06" { description "Initial version. RFC5357 is covered. RFC5618, RFC5938 and RFC6038 are not covered."; reference "RFC5357 A Two-Way Active Measurement Protocol, October 2008"; } feature controlClient { 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 sessionSender { description "This feature relates to the device functions as the TWAMP Session-Sender."; } feature sessionReflector { description "This feature relates to the device functions as the TWAMP Session-Reflector."; } grouping maintenanceStatistics { leaf sentPackets { type uint32; config false; } leaf rcvPackets { type uint32; config false; } leaf lastSentSeq { type uint32; config false; } leaf lastRcvSeq { type uint32; config false; } } // grouping maintenanceStatistics container twamp { container twampClient { if-feature controlClient; presence "twampClient"; leaf clientAdminState { type boolean; mandatory true; description "Indicates whether this device is allowed to run TWAMP to initiate control/test sessions"; } list modePreferenceChain { key "priority"; unique "mode"; leaf priority { type uint16; } leaf mode { type enumeration { enum "unauthenticated" { value 1; } enum "authenticated" { value 2; } enum "encrypted" { value 4; } enum "unauthtestencrpytcontrol" { value 8; } enum "individualsessioncontrol" { value 16; } enum "reflectoctets" { value 32; } enum "symmetricalsize" { value 64; } } } } // list modePreferenceChain list keyChain { key "keyId"; leaf keyId { type string; } leaf secretKey { type string; } } // list keyChain list twampClientCtrlConnection { key "ctrlConnectionName"; leaf ctrlConnectionName { type string; description "A unique name used as a key to identify this individual TWAMP control connection on the Control-Client device."; } leaf clientIp { type inet:ip-address; } leaf serverIp { type inet:ip-address; } leaf serverTcpPort { type inet:port-number; } leaf dscp { type inet:dscp; description "The DSCP value to be placed in the IP header of the TWAMP TCP Control packets generated by the Control-Client"; } leaf keyId { type string; } leaf dkLen { type uint32; } leaf clientTcpPort { type inet:port-number; config false; } leaf serverStartTime { type uint64; config false; } leaf ctrlConnectionState { type enumeration { enum "active" { value 0; description "Control session is active."; } enum "idle" { value 1; description "Control session is idle."; } } config false; } leaf selectedMode { type enumeration { enum "unauthenticated" { value 1; } enum "authenticated" { value 2; } enum "encrypted" { value 4; } enum "unauthtestencrpytcontrol" { value 8; } enum "individualsessioncontrol" { value 16; } enum "reflectoctets" { value 32; } enum "symmetricalsize" { value 64; } } config false; } leaf token { type string { length "1..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 clientIv { type string { length "1..16"; } config false; description "16 octets, Client-IV is generated randomly by the Control-Client."; } list twampSessionRequest { key "testSessionName"; leaf testSessionName { type string; } leaf senderIp { type inet:ip-address; } leaf senderUdpPort { type inet:port-number; } leaf reflectorIp { type inet:ip-address; } leaf reflectorUdpPort { type inet:port-number; } leaf timeout { type uint64; description "The time Session-Reflector MUST wait after receiving a Stop-Session message"; } leaf paddingLength { type uint32 { range "64..1500"; } description "The number of bytes of padding that should be added to the UDP test packets generated by the sender."; } leaf startTime { type uint64; } leaf repeat { type boolean; } leaf repeatInterval { when "../repeat='true'"; type uint32; description "Repeat interval (in minutes)"; } leaf pmIndex { type uint16; description "Numerical index value of a Registered Metric in the Performance Metric Registry"; } leaf testSessionState { type enumeration { enum "ok" { value 0; description "Test session is accepted."; } enum "failed" { value 1; description "Failure, reason unspecified (catch-all)."; } enum "internalError" { value 2; description "Internal error."; } enum "notSupported" { value 3; description "Some aspect of request is not supported."; } enum "permanentResLimit" { value 4; description "Cannot perform request due to permanent resource limitations."; } enum "tempResLimit" { value 5; description "Cannot perform request due to temporary resource limitations."; } } config false; } leaf sid { type string; config false; } } // list twampSessionRequest } // list twampClientCtrlConnection } // container twampClient container twampServer { if-feature server; presence "twampServer"; leaf serverAdminState { type boolean; mandatory true; description "Indicates whether this device is allowed to run TWAMP to respond to control/test sessions"; } leaf serverTcpPort { type inet:port-number; default "862"; } 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 the TWAMP TCP Control packets generated by the Server"; } leaf count { type uint32 { range "1024..4294967295"; } } leaf maxCount { type uint32 { range "1024..4294967295"; } default '32768'; } leaf modes { type bits { bit unauthenticated { position 0; } bit authenticated { position 1; } bit encrypted { position 2; } bit unauthtestencryptcontrol { position 3; } bit individualsessioncontrol { position 4; } bit reflectoctets { position 5; } bit symmetricalsize { position 6; } } } leaf salt { type string; config false; description "Salt MUST be generated pseudo-randomly"; } leaf serverIv { type string { length "1..16"; } config false; description "16 octets, Server-IV is generated randomly by the Control-Client."; } leaf challenge { type string; config false; description "Challenge is a random sequence of octets generated by the Server"; } list keyChain { key "keyId"; leaf keyId { type string; } leaf secretKey { type string; } } // list keyChain list twampServerCtrlConnection { key "clientIp clientTcpPort serverIp serverTcpPort"; config false; leaf clientIp { type inet:ip-address; } leaf clientTcpPort { type inet:port-number; } leaf serverIp { type inet:ip-address; } leaf serverTcpPort { type inet:port-number; } leaf serverCtrlConnectionState { type enumeration { enum "active" { value 0; } enum "servwait" { value 1; } } } leaf dscp { type inet:dscp; description "The DSCP value used in the 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 twampServer:dscp under the twampServer. However, in the event that the user re-configures twampServer: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 selectedMode { type enumeration { enum "unauthenticated" { value 1; } enum "authenticated" { value 2; } enum "encrypted" { value 4; } enum "unauthtestencrpytcontrol" { value 8; } enum "individualsessioncontrol" { value 16; } enum "reflectoctets" { value 32; } enum "symmetricalsize" { value 64; } } description "The mode that was chosen for this control connection as set in the Mode field of the Set-Up-Response message."; } leaf keyId { type string; description "The keyId value that is in use by this control connection."; } leaf dkLen { type uint32; description "The dkLen value that is in use by this control connection. This will usually be the same value as is configured under twampServer. In the event that the user re-configured twampServer:dkLen after this control connection is already in progress, this read-only value will show the actual dkLen that is in use for 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 twampServer. However, in the event that the user re-configured twampServer:count after this control connection is already in progress, this read-only value will show the actual count that is in use for this control connection."; } leaf maxCount { type uint32 { range "1024..4294967295"; } description "The maxCount value that is in use by this control connection. This will usually be the same value as is configured under twampServer. However, in the event that the user re-configured twampServer:maxCount after this control connection is already in progress, this read-only value will show the actual maxCount that is in use for this control connection."; } } // list twampServerCtrlConnection } // container twampServer container twampSessionSender { if-feature sessionSender; list twampSenderTestSession { key "testSessionName"; leaf testSessionName { 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 ctrlConnectionName { type string; config false; description "The name of the parent control connection that is responsible for negotiating this test session."; } leaf dscp { type inet:dscp; description "The DSCP value to be placed in the header of TWAMP UDP test packets generated by the sender."; } leaf dot1dPriority { type uint8 { range "0..7"; } } leaf fillMode { type enumeration { enum "zero" { value 0; } enum "random" { value 1; } } default 'zero'; } leaf numberOfPackets { type uint32; description "The overall number of UDP test packets to be transmitted by the sender for this test session."; } choice packetDistribution { case fixed { leaf fixedInterval { type uint32; } leaf fixedIntervalUnits { type enumeration { enum "seconds" { value 0; } enum "milliseconds" { value 1; } enum "microseconds" { value 2; } enum "nanoseconds" { value 3; } } } } // case fixed case poisson { leaf lambda { type uint32; } leaf lambdaUnits { type uint32; } leaf maxInterval { type uint32; } leaf truncationPointUnits { type enumeration { enum "seconds" { value 0; } enum "milliseconds" { value 1; } enum "microseconds" { value 2; } enum "nanoseconds" { value 3; } } } } // case poisson } // choice packetDistribution leaf senderSessionState { type enumeration { enum "setup" { value 0; description "Test session is active."; } enum "failure" { value 1; description "Test session is idle."; } } config false; } uses maintenanceStatistics; } // list twampSenderTestSession } // container twampSessionSender container twampSessionReflector { if-feature sessionReflector; leaf refwait { type uint32 { range "1..604800"; } default '900'; description "REFWAIT(TWAMP test session timeout), the default value is 900"; } list twampReflectorTestSession { key "senderIp senderUdpPort reflectorIp reflectorUdpPort"; config false; leaf sid { type string; } leaf senderIp { type inet:ip-address; } leaf senderUdpPort { type inet:port-number; } leaf reflectorIp { type inet:ip-address; } leaf reflectorUdpPort { type inet:port-number; } leaf parentConnectionClientIp { type inet:ip-address; } leaf parentConnectionClientTcpPort { type inet:port-number; } leaf parentConnectionServerIp { type inet:ip-address; } leaf parentConnectionServerTcpPort { type inet:port-number; } leaf dscp { type inet:dscp; description "The DSCP value placed in the header of TWAMP UDP test packets generated by the Session-Sender."; } uses maintenanceStatistics; } // list twampReflectorTestSession } // container twampSessionReflector } // container twamp } // module ciena-ietf-twamp
© 2023 YumaWorks, Inc. All rights reserved.