module ietf-ipsecme-iptfs {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-ipsecme-iptfs";
prefix iptfs;
import ietf-ipsec-ike {
prefix ike;
}
import ietf-ipsec-ikeless {
prefix ikeless;
}
organization
"IETF IPSECME Working Group (IPSECME)";
contact
"WG Web:
WG List:
Author: Don Fedyk
Author: Christian Hopps
";
// RFC Ed.: replace XXXX with actual RFC number and
// remove this note.
description
"This module defines the configuration and operational state for
managing the IP Traffic Flow Security functionality [RFC XXXX].
Copyright (c) 2020 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
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://tools.ietf.org/html/rfcXXXX); see the RFC itself for
full legal notices.";
revision 2020-07-13 {
description
"Initial Revision";
reference
"RFC XXXX: IP Traffic Flow Security YANG Module";
}
feature ipsec-stats {
description
"This feature indicates the device supports IPsec
statistics";
}
feature iptfs-stats {
description
"This feature indicates the device supports IP
Traffic Flow Security statistics";
}
/*--------------------*/
/* groupings */
/*--------------------*/
grouping ipsec-tx-stat-grouping {
description
"IPsec outbound statistics";
leaf tx-packets {
type uint64;
config false;
description
"Outbound Packet count";
}
leaf tx-octets {
type uint64;
config false;
description
"Outbound Packet bytes";
}
leaf tx-drop-packets {
type uint64;
config false;
description
"Outbound dropped packets count";
}
}
grouping ipsec-rx-stat-grouping {
description
"IPsec inbound statistics";
leaf rx-packets {
type uint64;
config false;
description
"Inbound Packet count";
}
leaf rx-octets {
type uint64;
config false;
description
"Inbound Packet bytes";
}
leaf rx-drop-packets {
type uint64;
config false;
description
"Inbound dropped packets count";
}
container rx-dropped-packet-detail {
description
"The detail information of dropped packets";
leaf sa-non-exist {
type uint64;
config false;
description
"The dropped packets counts caused by SA
non-exist.";
}
leaf queue-full {
type uint64;
config false;
description
"The dropped packets counts caused by full
processing queue";
}
leaf auth-failure {
type uint64;
config false;
description
"The dropped packets counts caused by
authentication failure";
}
leaf malform {
type uint64;
config false;
description
"The dropped packets counts of malform";
}
leaf replay {
type uint64;
config false;
description
"The dropped packets counts of replay";
}
leaf large-packet {
type uint64;
config false;
description
"The dropped packets counts of too large";
}
leaf invalid-sa {
type uint64;
config false;
description
"The dropped packets counts of invalid SA";
}
leaf policy-deny {
type uint64;
config false;
description
"The dropped packets counts of denied by policy";
}
leaf other-reason {
type uint64;
config false;
description
"The dropped packets counts of other reason";
}
}
}
grouping iptfs-tx-stat-grouping {
description
"IP-TFS outbound statistics";
leaf tx-inner-packets {
type uint64;
config false;
description
"Total number of IP-TFS inner packets sent. This
count is whole packets only. A fragmented packet
counts as one packet";
reference
"draft-ietf-ipsecme-iptfs-01";
}
leaf tx-inner-octets {
type uint64;
config false;
description
"Total number of IP-TFS inner octets sent. This is
inner packet octets only. Does not count padding.";
reference
"draft-ietf-ipsecme-iptfs-01";
}
leaf tx-extra-pad-packets {
type uint64;
config false;
description
"Total number of transmitted outer IP-TFS packets
that included some padding.";
reference
"draft-ietf-ipsecme-iptfs-01";
}
leaf tx-extra-pad-octets {
type uint64;
config false;
description
"Total number of transmitted octets of padding added
to outer IP-TFS packets with data.";
reference
"draft-ietf-ipsecme-iptfs-01";
}
leaf tx-all-pad-packets {
type uint64;
config false;
description
"Total number of transmitted IP-TFS packets that
were all padding with no inner packet data.";
reference
"draft-ietf-ipsecme-iptfs-01";
}
leaf tx-all-pad-octets {
type uint64;
config false;
description
"Total number transmitted octets of padding added to
IP-TFS packets with no inner packet data.";
reference
"draft-ietf-ipsecme-iptfs-01";
}
}
grouping iptfs-rx-stat-grouping {
description
"IP-TFS inbound statistics";
leaf rx-inner-packets {
type uint64;
config false;
description
"Total number of IP-TFS inner packets received.";
reference
"draft-ietf-ipsecme-iptfs-01";
}
leaf rx-inner-octets {
type uint64;
config false;
description
"Total number of IP-TFS inner octets received. Does
not include padding or overhead";
reference
"draft-ietf-ipsecme-iptfs-01";
}
leaf rx-extra-pad-packets {
type uint64;
config false;
description
"Total number of received outer IP-TFS packets that
included some padding.";
reference
"draft-ietf-ipsecme-iptfs-01";
}
leaf rx-extra-pad-octets {
type uint64;
config false;
description
"Total number of received octets of padding added to
outer IP-TFS packets with data.";
reference
"draft-ietf-ipsecme-iptfs-01";
}
leaf rx-all-pad-packets {
type uint64;
config false;
description
"Total number of received IP-TFS packets that were
all padding with no inner packet data.";
reference
"draft-ietf-ipsecme-iptfs-01";
}
leaf rx-all-pad-octets {
type uint64;
config false;
description
"Total number received octets of padding added to
IP-TFS packets with no inner packet data.";
reference
"draft-ietf-ipsecme-iptfs-01";
}
leaf rx-errored-packets {
type uint64;
config false;
description
"Total number of IP-TFS outer packets dropped due to
errors.";
reference
"draft-ietf-ipsecme-iptfs-01";
}
leaf rx-missed-packets {
type uint64;
config false;
description
"Total number of IP-TFS outer packets missing
indicated by missing sequence number.";
reference
"draft-ietf-ipsecme-iptfs-01";
}
leaf rx-incomplete-inner-packets {
type uint64;
config false;
description
"Total number of IP-TFS inner packets that were
incomplete. Usually this is due to fragments not
received. Also, this may be due to misordering or
errors in received outer packets.";
reference
"draft-ietf-ipsecme-iptfs-01";
}
}
grouping iptfs-config {
description
"This is the grouping for iptfs configuration";
container traffic-flow-security {
// config true; want this so we can refine?
description
"Configure the IPSec TFS in Security
Association Database (SAD)";
leaf congestion-control {
type boolean;
default "true";
description
"Congestion Control With the congestion controlled
mode, IP-TFS adapts to network congestion by
lowering the packet send rate to accommodate the
congestion, as well as raising the rate when
congestion subsides.";
reference
"draft-ietf-ipsecme-iptfs-01 Section 2.5.2";
}
container packet-size {
description
"Packet size is either auto-discovered or manually
configured.";
leaf use-path-mtu {
type boolean;
default "true";
description
"Utilize path-mtu to determine maximum IP-TFS
packet size. If the packet size is explicitly
configured, then it will only be adjusted
downward if use-path-mtu is set.";
reference
"draft-ietf-ipsecme-iptfs-01 Section 4.2";
}
leaf outer-packet-size {
type uint16;
description
"The size of the outer encapsulating tunnel
packet (i.e., the IP packet containing the ESP
payload).";
reference
"draft-ietf-ipsecme-iptfs-01 Section 4.2";
}
}
choice tunnel-rate {
description
"TFS bit rate may be specified at layer 2 wire
rate or layer 3 packet rate";
leaf l2-fixed-rate {
type uint64;
description
"Target bandwidth/bit rate in bps for iptfs
tunnel. This fixed rate is the nominal timing
for the fixed size packet. If congestion control
is enabled the rate may be adjusted down (or up
if unset).";
reference
"draft-ietf-ipsecme-iptfs-01 section 4.1";
}
leaf l3-fixed-rate {
type uint64;
description
"Target bandwidth/bit rate in bps for iptfs
tunnel. This fixed rate is the nominal timing
for the fixed size packet. If congestion control
is enabled the rate may be adjusted down (or up
if unset).";
reference
"draft-ietf-ipsecme-iptfs-01 section 4.1";
}
}
leaf dont-fragment {
type boolean;
default "false";
description
"Disable packet fragmentation across consecutive iptfs
tunnel packets";
reference
"draft-ietf-ipsecme-iptfs-01 section 2.2.4 and 6.4.1";
}
}
}
/*
* IP-TFS ike configuration
*/
augment "/ike:ipsec-ike/ike:conn-entry/ike:spd/"
+ "ike:spd-entry/"
+ "ike:ipsec-policy-config/"
+ "ike:processing-info/"
+ "ike:ipsec-sa-cfg" {
description
"IP-TFS configuration for this policy.";
uses iptfs-config;
}
augment "/ike:ipsec-ike/ike:conn-entry/"
+ "ike:child-sa-info" {
description
"IP-TFS configured on this SA.";
uses iptfs-config {
refine "traffic-flow-security" {
config false;
}
}
}
/*
* IP-TFS ikeless configuration
*/
augment "/ikeless:ipsec-ikeless/ikeless:spd/"
+ "ikeless:spd-entry/"
+ "ikeless:ipsec-policy-config/"
+ "ikeless:processing-info/"
+ "ikeless:ipsec-sa-cfg" {
description
"IP-TFS configuration for this policy.";
uses iptfs-config;
}
augment "/ikeless:ipsec-ikeless/ikeless:sad/"
+ "ikeless:sad-entry" {
description
"IP-TFS configured on this SA.";
uses iptfs-config {
refine "traffic-flow-security" {
config false;
}
}
}
/*
* packet counters
*/
augment "/ike:ipsec-ike/ike:conn-entry/"
+ "ike:child-sa-info" {
description
"Per-SA IPsec SA with IP-TFS packet counters.";
uses ipsec-tx-stat-grouping {
//when "direction = 'outbound'";
if-feature "ipsec-stats";
}
uses ipsec-rx-stat-grouping {
//when "direction = 'inbound'";
if-feature "ipsec-stats";
}
uses iptfs-tx-stat-grouping {
//when "direction = 'outbound'";
if-feature "iptfs-stats";
}
uses iptfs-rx-stat-grouping {
//when "direction = 'inbound'";
if-feature "iptfs-stats";
}
}
/*
* packet counters
*/
augment "/ikeless:ipsec-ikeless/ikeless:sad/"
+ "ikeless:sad-entry" {
description
"Per-SA IPsec SA with IP-TFS packet counters.";
uses ipsec-tx-stat-grouping {
//when "direction = 'outbound'";
if-feature "ipsec-stats";
}
uses ipsec-rx-stat-grouping {
//when "direction = 'inbound'";
if-feature "ipsec-stats";
}
uses iptfs-tx-stat-grouping {
//when "direction = 'outbound'";
if-feature "iptfs-stats";
}
uses iptfs-rx-stat-grouping {
//when "direction = 'inbound'";
if-feature "iptfs-stats";
}
}
}