Cisco-IOS-XR-traffmon-netflow-cfg

This module contains a collection of YANG definitions for Cisco IOS-XR traffmon-netflow package configuration. This module cont...

  • Version: 2021-02-23

    Cisco-IOS-XR-traffmon-netflow-cfg@2021-02-23


    
      module Cisco-IOS-XR-traffmon-netflow-cfg {
    
        yang-version 1;
    
        namespace
          "http://cisco.com/ns/yang/Cisco-IOS-XR-traffmon-netflow-cfg";
    
        prefix traffmon-netflow-cfg;
    
        import ietf-inet-types {
          prefix inet;
        }
        import Cisco-IOS-XR-types {
          prefix xr;
        }
        import cisco-semver {
          prefix semver;
        }
        import Cisco-IOS-XR-ifmgr-cfg {
          prefix a1;
        }
        import Cisco-IOS-XR-l2vpn-cfg {
          prefix a2;
        }
    
        organization "Cisco Systems, Inc.";
    
        contact
          "Cisco Systems, Inc.
         Customer Service
         
         Postal: 170 West Tasman Drive
         San Jose, CA 95134
         
         Tel: +1 800 553-NETS
         
         E-mail: cs-yang@cisco.com";
    
        description
          "This module contains a collection of YANG definitions
         for Cisco IOS-XR traffmon-netflow package configuration.
         
         This module contains definitions
         for the following management objects:
           net-flow: NetFlow Configuration
         
         This YANG module augments the
           Cisco-IOS-XR-ifmgr-cfg,
           Cisco-IOS-XR-l2vpn-cfg
         modules with configuration data.
         
         Copyright (c) 2013-2021 by Cisco Systems, Inc.
         All rights reserved.";
    
        revision "2021-02-23" {
          description
            "Added class table export time-out
           2021-01-16
             Added l2 record type in monitor-map
           2020-11-16
             Increased maximum packet length in exporter configuration to support jumbo export packets
           2020-10-16
             Added gtp record type in monitor-map and protobuf version in exporter-map
           2020-07-15
             Added flow support for l2transport interfaces";
        }
    
        revision "2020-02-15" {
          description
            "Added sflow type for monitor-map record type and exporter-map version type, and associated sflow config changes.";
        }
    
        revision "2019-09-15" {
          description
            "Added map-t type for monitor-map and flow interface configuration.";
        }
    
        revision "2019-04-05" {
          description
            "Establish semantic version baseline.";
        }
    
        revision "2018-06-15" {
          description
            "Changed type of version node from range to enum and made it mandatory.";
        }
    
        revision "2018-06-15" {
          description
            "Allow min..max in range when min == max.";
        }
    
        revision "2018-05-28" {
          description
            "Changed some schema paths for commit check functionality.";
        }
    
        revision "2018-04-01" {
          description
            "Changed some schema paths for commit replace functionality.";
        }
    
        revision "2017-05-01" {
          description
            "Fixing backward compatibility error in module.";
        }
    
        revision "2015-11-09" {
          description "IOS XR 6.0 revision.";
        }
    
        semver:module-version "2.0.0";
        semver:module-version "1.2.0";
        semver:module-version "1.1.0";
        semver:module-version "1.0.0";
    
        typedef Nf-export-timeout {
          type uint32 {
            range "0..604800";
          }
          description "Nf export timeout";
        }
    
        typedef Nf-active-cache-aging-timeout {
          type uint32 {
            range "1..604800";
          }
          description
            "Nf active cache aging timeout";
        }
    
        typedef Nf-cache-option {
          type enumeration {
            enum "outphysint" {
              value 1;
              description "Option outphysint";
            }
            enum "filtered" {
              value 2;
              description "Option filtered";
            }
            enum "bgpattr" {
              value 3;
              description "Option bgpattr";
            }
            enum "outbundlemember" {
              value 4;
              description
                "Option outbundlemember";
            }
          }
          description "Nf cache option";
        }
    
        typedef Nf-inactive-cache-aging-timeout {
          type uint32 {
            range "0..604800";
          }
          description
            "Nf inactive cache aging timeout";
        }
    
        typedef Nf-sample-interval {
          type uint32 {
            range "1..262144";
          }
          description "Nf sample interval";
        }
    
        typedef Nf-sample-number {
          type uint32 {
            range "1";
          }
          description "Nf sample number";
        }
    
        typedef Nf-flow-direction {
          type enumeration {
            enum "ingress" {
              value 0;
              description
                "Netflow flow direction ingress";
            }
            enum "egress" {
              value 1;
              description
                "Netflow flow direction egress";
            }
          }
          description "Nf flow direction";
        }
    
        typedef Nf-record-format {
          type enumeration {
            enum "datalinkframesections-any" {
              value 1;
              description
                "Record Format datalinkframesections_any";
            }
            enum "default-mdi" {
              value 2;
              description
                "Record Format default_mdi";
            }
            enum "default-rtp" {
              value 3;
              description
                "Record Format default_rtp";
            }
            enum "ipv4-as-agg" {
              value 4;
              description
                "Record Format ipv4_as_agg";
            }
            enum "ipv4-as-tos-agg" {
              value 5;
              description
                "Record Format ipv4_as_tos_agg";
            }
            enum "ipv4-bgp-nexthop-tos-agg" {
              value 6;
              description
                "Record Format ipv4_bgp_nexthop_tos_agg";
            }
            enum "ipv4-destination" {
              value 7;
              description
                "Record Format ipv4_destination";
            }
            enum "ipv4-destination-tos-agg" {
              value 8;
              description
                "Record Format ipv4_destination_tos_agg";
            }
            enum "ipv4-destination-prefix-agg" {
              value 9;
              description
                "Record Format ipv4_destination_prefix_agg";
            }
            enum
              "ipv4-destination-prefix-tos-agg" {
              value 10;
              description
                "Record Format ipv4_destination_prefix_tos_agg";
            }
            enum "ipv4-peer-as" {
              value 11;
              description
                "Record Format ipv4_peer_as";
            }
            enum "ipv4-prefix-agg" {
              value 12;
              description
                "Record Format ipv4_prefix_agg";
            }
            enum "ipv4-prefix-port-agg" {
              value 13;
              description
                "Record Format ipv4_prefix_port_agg";
            }
            enum "ipv4-prefix-tos-agg" {
              value 14;
              description
                "Record Format ipv4_prefix_tos_agg";
            }
            enum "ipv4-protocol-port-agg" {
              value 15;
              description
                "Record Format ipv4_protocol_port_agg";
            }
            enum "ipv4-protocol-port-tos-agg" {
              value 16;
              description
                "Record Format ipv4_protocol_port_tos_agg";
            }
            enum "ipv4-raw" {
              value 17;
              description
                "Record Format ipv4_raw";
            }
            enum "ipv4-source-prefix-agg" {
              value 18;
              description
                "Record Format ipv4_source_prefix_agg";
            }
            enum "ipv4-source-prefix-tos-agg" {
              value 19;
              description
                "Record Format ipv4_source_prefix_tos_agg";
            }
            enum "ipv4-gtp" {
              value 20;
              description
                "Record Format ipv4_gtp";
            }
            enum "ipv6" {
              value 21;
              description "Record Format ipv6";
            }
            enum "ipv6-destination" {
              value 22;
              description
                "Record Format ipv6_destination";
            }
            enum "ipv6-peer-as" {
              value 23;
              description
                "Record Format ipv6_peer_as";
            }
            enum "mpls" {
              value 25;
              description "Record Format mpls";
            }
            enum "mpls-ipv4" {
              value 26;
              description
                "Record Format mpls_ipv4";
            }
            enum "mpls-ipv4-ipv6" {
              value 27;
              description
                "Record Format mpls_ipv4_ipv6";
            }
            enum "mpls-ipv6" {
              value 28;
              description
                "Record Format mpls_ipv6";
            }
            enum "mapt" {
              value 29;
              description "Record Format mapt";
            }
            enum "sflow" {
              value 30;
              description "Record Format sflow";
            }
          }
          description "Nf record format";
        }
    
        typedef Nf-template-timeout {
          type uint32 {
            range "1..604800";
          }
          description "Nf template timeout";
        }
    
        typedef Nf-sflow-flow-sample-flag-option {
          type enumeration {
            enum "extended-router" {
              value 0;
              description
                "Option extended-router flow type";
            }
            enum "extended-gateway" {
              value 1;
              description
                "Option extended-gateway flow type";
            }
          }
          description
            "Nf sflow flow sample flag option";
        }
    
        typedef Nf-sflow-sample-header-size {
          type uint32 {
            range "128..200";
          }
          description
            "Nf sflow sample header size";
        }
    
        typedef Nf-map-name {
          type string {
            length "1..32";
            pattern "[a-zA-Z0-9_\\-]+";
          }
          description "Nf map name";
        }
    
        typedef Nf-sflow-ifindex-option {
          type enumeration {
            enum "physical" {
              value 0;
              description
                "Physical Interface Ifindex";
            }
          }
          description "Nf sflow ifindex option";
        }
    
        typedef Nf-cache-aging-mode {
          type enumeration {
            enum "normal" {
              value 0;
              description "Normal, caches age";
            }
            enum "permanent" {
              value 1;
              description
                "Permanent, caches never age";
            }
            enum "immediate" {
              value 2;
              description
                "Immediate, caches age immediately";
            }
          }
          description "Nf cache aging mode";
        }
    
        typedef Nf-flow-protocol {
          type enumeration {
            enum "ipv4" {
              value 0;
              description
                "Netflow flow protocol ipv4";
            }
            enum "ipv6" {
              value 1;
              description
                "Netflow flow protocol ipv6";
            }
            enum "mpls" {
              value 2;
              description
                "Netflow flow protocol mpls";
            }
            enum "data-link-frame-section" {
              value 13;
              description
                "Netflow flow protocol data-link-frame-section";
            }
            enum "map" {
              value 14;
              description
                "Netflow flow protocol map-t";
            }
          }
          description "Nf flow protocol";
        }
    
        typedef Nf-cache-entry {
          type uint32 {
            range "4096..1000000";
          }
          description "Nf cache entry";
        }
    
        typedef Nf-hw-cache-inactive-aging-timeout {
          type uint32 {
            range "50..1800";
          }
          description
            "Nf hw cache inactive aging timeout";
        }
    
        typedef Nf-update-cache-aging-timeout {
          type uint32 {
            range "1..604800";
          }
          description
            "Nf update cache aging timeout";
        }
    
        typedef Nf-sampling-mode {
          type enumeration {
            enum "random" {
              value 2;
              description "Random sampling";
            }
          }
          description "Nf sampling mode";
        }
    
        typedef Nf-sflow-if-counter-polling-interval {
          type uint32 {
            range "5..1800";
          }
          description
            "Nf sflow if counter polling interval";
        }
    
        typedef Nf-export-version {
          type enumeration {
            enum "v9" {
              value 9;
              description "Version v9";
            }
            enum "ipfix" {
              value 10;
              description "Version ipfix";
            }
            enum "sflow" {
              value 11;
              description "Version sflow";
            }
            enum "protobuf" {
              value 12;
              description "Version protobuf";
            }
          }
          description "Nf export version";
        }
    
        typedef Nf-cache-timeout-rate-limit {
          type uint32 {
            range "1..1000000";
          }
          description
            "Nf cache timeout rate limit";
        }
    
        grouping FLOW-MONITOR-MAP {
          description
            "Common node of flow-monitor-map-table,
           flow-monitor-map-performance-table";
          list flow-monitor-map {
            key "monitor-map-name";
            description "Monitor map name";
            container exporters {
              description
                "Configure exporters to be used by the
               monitor-map";
              list exporter {
                key "exporter-name";
                description
                  "Configure exporter to be used by the
                 monitor-map";
                leaf exporter-name {
                  type Nf-map-name;
                  description "Exporter name";
                }
              }  // list exporter
            }  // container exporters
    
            container sflow-options {
              description
                "Specify sflow related options for the flow";
              container input {
                description
                  "Specify sample input related options";
                leaf ifindex {
                  type Nf-sflow-ifindex-option;
                  description
                    "Specify interface index option";
                }
              }  // container input
    
              container counter-sample-options-table {
                description
                  "Enable optional counter sample options";
                leaf if-counter-polling-interval {
                  type Nf-sflow-if-counter-polling-interval;
                  units "second";
                  description
                    "Specify the if-counter polling interval";
                }
              }  // container counter-sample-options-table
    
              container output {
                description
                  "Specify sample output related options";
                leaf ifindex {
                  type Nf-sflow-ifindex-option;
                  description
                    "Specify interface index option";
                }
              }  // container output
    
              container flow-sample-flag-options {
                description
                  "Enable optional flag-type flow sample options";
                list flow-sample-flag-option {
                  key "option";
                  description
                    "Enable flag type flow sample options";
                  leaf option {
                    type Nf-sflow-flow-sample-flag-option;
                    description "Option name";
                  }
                }  // list flow-sample-flag-option
              }  // container flow-sample-flag-options
    
              container sample-header {
                description
                  "Specify sample header related options";
                leaf header-size-maximum {
                  type Nf-sflow-sample-header-size;
                  description
                    "Specify the maximum sample header length ";
                }
              }  // container sample-header
            }  // container sflow-options
    
            container record {
              presence
                "Indicates a record node is configured.";
              description
                "Specify a flow record format";
              leaf record-format {
                type Nf-record-format;
                mandatory true;
                description "Flow record format";
              }
    
              leaf label {
                type uint32 {
                  range "1..6";
                }
                description
                  "Enter label value for MPLS record type";
              }
            }  // container record
    
            container options {
              description
                "Specify an option for the flow cache";
              list option {
                key "optionvalue";
                description
                  "Specify an option for the flow cache";
                leaf optionvalue {
                  type Nf-cache-option;
                  description "Option name";
                }
              }  // list option
            }  // container options
    
            leaf cache-update-aging-timeout {
              type Nf-update-cache-aging-timeout;
              units "second";
              description
                "Specify the update flow cache aging timeout";
            }
    
            leaf cache-entries {
              type Nf-cache-entry;
              description
                "Specify the number of entries in the flow cache";
            }
    
            leaf cache-inactive-aging-timeout {
              type Nf-inactive-cache-aging-timeout;
              units "second";
              description
                "Specify the inactive flow cache aging timeout";
            }
    
            leaf hw-cache-inactive-aging-timeout {
              type Nf-hw-cache-inactive-aging-timeout;
              units "second";
              description
                "Specify the inactive flow cache aging timeout
               in hw-cache if hw-cache exists";
            }
    
            leaf cache-active-aging-timeout {
              type Nf-active-cache-aging-timeout;
              units "second";
              description
                "Specify the active flow cache aging timeout";
            }
    
            leaf cache-timeout-rate-limit {
              type Nf-cache-timeout-rate-limit;
              description
                "Specify the maximum number of entries to age
               each second";
            }
    
            leaf cache-aging-mode {
              type Nf-cache-aging-mode;
              description
                "Specify the flow cache aging mode";
            }
    
            leaf monitor-map-name {
              type Nf-map-name;
              description "Monitor map name";
            }
          }  // list flow-monitor-map
        }  // grouping FLOW-MONITOR-MAP
    
        grouping NET-FLOW {
          description
            "Common node of interface-configuration,
           l2-transport";
          container flow-protocols {
            description
              "Interface netflow configuration";
            list flow-protocol {
              key "flow-protocol";
              description
                "Configure netflow flow protocol";
              leaf flow-protocol {
                type Nf-flow-protocol;
                description
                  "Netflow Flow Protocol";
              }
    
              list direction {
                key "flow-direction";
                description
                  "Configure netflow flow direction";
                leaf flow-direction {
                  type Nf-flow-direction;
                  description
                    "Netflow Flow Direction";
                }
    
                list monitor-info {
                  key "monitor-map sampler-map";
                  description
                    "Specify a sampler for a flow monitor";
                  leaf monitor-map {
                    type xr:Cisco-ios-xr-string;
                    description
                      "Flow monitor map name";
                  }
    
                  leaf sampler-map {
                    type xr:Cisco-ios-xr-string;
                    description
                      "Sampler map name";
                  }
                }  // list monitor-info
              }  // list direction
            }  // list flow-protocol
          }  // container flow-protocols
        }  // grouping NET-FLOW
    
        augment /a1:interface-configurations/a1:interface-configuration/a2:l2-transport {
          description
            "This augment extends the configuration data of
           'Cisco-IOS-XR-l2vpn-cfg'";
          uses NET-FLOW;
        }
    
        augment /a1:interface-configurations/a1:interface-configuration {
          description
            "This augment extends the configuration data of
           'Cisco-IOS-XR-ifmgr-cfg'";
          uses NET-FLOW;
        }
    
        container net-flow {
          description "NetFlow Configuration";
          container flow-exporter-maps {
            description
              "Configure a flow exporter map";
            list flow-exporter-map {
              key "exporter-map-name";
              description "Exporter map name";
              container udp {
                description
                  "Use UDP as transport protocol";
                leaf destination-port {
                  type uint32 {
                    range "1024..65535";
                  }
                  description
                    "Configure Destination UDP port";
                }
              }  // container udp
    
              container destination {
                description
                  "Configure export destination (collector)";
                leaf ip-address {
                  type inet:ipv4-address-no-zone;
                  description
                    "Destination IPv4 address";
                }
    
                leaf ipv6-address {
                  type inet:ipv6-address-no-zone;
                  description
                    "IPV6 address of the tunnel destination";
                }
    
                leaf vrf-name {
                  type xr:Cisco-ios-xr-string {
                    length "1..32";
                  }
                  description "VRF name";
                }
              }  // container destination
    
              container version {
                presence
                  "Indicates a version node is configured.";
                description
                  "Specify export version parameters";
                container options {
                  description
                    "Specify options for exporting templates";
                  leaf interface-table-export-timeout {
                    type Nf-export-timeout;
                    units "second";
                    description
                      "Specify timeout for exporting interface
                     table";
                  }
    
                  leaf sampler-table-export-timeout {
                    type Nf-export-timeout;
                    units "second";
                    description
                      "Specify timeout for exporting sampler table";
                  }
    
                  leaf class-table-export-timeout {
                    type Nf-export-timeout;
                    units "second";
                    description
                      "Specify timeout for exporting class table";
                  }
    
                  leaf vrf-table-export-timeout {
                    type Nf-export-timeout;
                    units "second";
                    description
                      "Specify timeout for exporting vrf table";
                  }
                }  // container options
    
                leaf version-type {
                  type Nf-export-version;
                  mandatory true;
                  description
                    "Export version number";
                }
    
                leaf options-template-timeout {
                  type Nf-template-timeout;
                  units "second";
                  default "1800";
                  description
                    "Option template configuration options";
                }
    
                leaf common-template-timeout {
                  type Nf-template-timeout;
                  units "second";
                  default "1800";
                  description
                    "Specify custom timeout for the template";
                }
    
                leaf data-template-timeout {
                  type Nf-template-timeout;
                  units "second";
                  default "1800";
                  description
                    "Data template configuration options";
                }
              }  // container version
    
              leaf dfbit {
                type empty;
                description
                  "Set Do Not Fragment flag in Export Packet";
              }
    
              leaf source-interface {
                type xr:Interface-name;
                description
                  "Configure source interface for collector";
              }
    
              leaf dscp {
                type uint32 {
                  range "0..63";
                }
                description
                  "Specify DSCP value for export packets";
              }
    
              leaf packet-length {
                type uint32 {
                  range "512..9000";
                }
                description
                  "Export Packet maximum L3 length, should
                 conform to outgoing interface mtu";
              }
    
              leaf exporter-map-name {
                type Nf-map-name;
                description "Exporter map name";
              }
            }  // list flow-exporter-map
          }  // container flow-exporter-maps
    
          container flow-sampler-maps {
            description
              "Flow sampler map configuration";
            list flow-sampler-map {
              key "sampler-map-name";
              description "Sampler map name";
              container sampling-modes {
                description
                  "Configure packet sampling mode";
                list sampling-mode {
                  key "mode";
                  description
                    "Configure sampling mode";
                  leaf mode {
                    type Nf-sampling-mode;
                    description "Sampling mode";
                  }
    
                  leaf sample-number {
                    type Nf-sample-number;
                    mandatory true;
                    description
                      "Number of packets to be sampled in the
                     sampling interval";
                  }
    
                  leaf interval {
                    type Nf-sample-interval;
                    mandatory true;
                    description
                      "Sampling interval in units of packets";
                  }
                }  // list sampling-mode
              }  // container sampling-modes
    
              leaf sampler-map-name {
                type Nf-map-name;
                description "Sampler map name";
              }
            }  // list flow-sampler-map
          }  // container flow-sampler-maps
    
          container flow-monitor-map-table {
            description
              "Flow monitor map configuration";
            uses FLOW-MONITOR-MAP;
          }  // container flow-monitor-map-table
    
          container flow-monitor-map-performance-table {
            description
              "Configure a performance traffic flow monitor map";
            uses FLOW-MONITOR-MAP;
          }  // container flow-monitor-map-performance-table
        }  // container net-flow
      }  // module Cisco-IOS-XR-traffmon-netflow-cfg
    

© 2023 YumaWorks, Inc. All rights reserved.