Cisco-IOS-XR-Ethernet-SPAN-cfg

This module contains a collection of YANG definitions for Cisco IOS-XR Ethernet-SPAN package configuration. This module contain...

  • Version: 2020-12-03

    Cisco-IOS-XR-Ethernet-SPAN-cfg@2020-12-03


    
      module Cisco-IOS-XR-Ethernet-SPAN-cfg {
    
        yang-version 1;
    
        namespace
          "http://cisco.com/ns/yang/Cisco-IOS-XR-Ethernet-SPAN-cfg";
    
        prefix ethernet-span-cfg;
    
        import ietf-inet-types {
          prefix inet;
        }
        import Cisco-IOS-XR-types {
          prefix xr;
        }
        import cisco-semver {
          prefix semver;
        }
        import Cisco-IOS-XR-Ethernet-SPAN-datatypes {
          prefix dt1;
        }
        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 Ethernet-SPAN package configuration.
         
         This module contains definitions
         for the following management objects:
           span-monitor-session: none
         
         This YANG module augments the
           Cisco-IOS-XR-ifmgr-cfg,
           Cisco-IOS-XR-l2vpn-cfg
         modules with configuration data.
         
         Copyright (c) 2013-2020 by Cisco Systems, Inc.
         All rights reserved.";
    
        revision "2020-12-03" {
          description
            "Added support for multiple attachments per class on an interface
           2020-09-14
             Added support for mirror rx and tx traffic to separate destinations";
        }
    
        revision "2020-01-30" {
          description
            "Added support for L3 IPv4 and IPv6 ACLs on a L2 ethernet SPAN session
           2019-12-12
           Added support for file format and PCAP filter expressions under file";
        }
    
        revision "2019-10-31" {
          description
            "Added mandatory nodes.
           2019-05-12
           Added support for file destinations.";
        }
    
        revision "2019-04-05" {
          description
            "Establish semantic version baseline.";
        }
    
        revision "2015-11-09" {
          description "IOS XR 6.0 revision.";
        }
    
        semver:module-version "3.1.0";
        semver:module-version "3.0.0";
        semver:module-version "2.0.0";
        semver:module-version "1.0.0";
    
        typedef Span-traffic-direction {
          type enumeration {
            enum "rx-only" {
              value 1;
              description
                "Replicate only received (ingress) traffic";
            }
            enum "tx-only" {
              value 2;
              description
                "Replicate only transmitted (egress) traffic";
            }
          }
          description "Span traffic direction";
        }
    
        typedef Span-mirror-interval {
          type enumeration {
            enum "512" {
              value 1;
              description
                "Mirror 1 in every 512 packets";
            }
            enum "1k" {
              value 2;
              description
                "Mirror 1 in every 1024 packets";
            }
            enum "2k" {
              value 3;
              description
                "Mirror 1 in every 2048 packets";
            }
            enum "4k" {
              value 4;
              description
                "Mirror 1 in every 4096 packets";
            }
            enum "8k" {
              value 5;
              description
                "Mirror 1 in every 8192 packets";
            }
            enum "16k" {
              value 6;
              description
                "Mirror 1 in every 16384 packets";
            }
          }
          description "Span mirror interval";
        }
    
        typedef Span-destination {
          type enumeration {
            enum "interface" {
              value 0;
              description
                "Destination Interface";
            }
            enum "pseudowire" {
              value 1;
              description
                "Destination Pseudowire";
            }
            enum "ipv4-address" {
              value 2;
              description
                "Destination next-hop IPv4 address";
            }
            enum "ipv6-address" {
              value 3;
              description
                "Destination next-hop IPv6 address";
            }
            enum "file" {
              value 5;
              description "Destination File";
            }
            enum "udp" {
              value 6;
              description
                "Destination IP address over UDP";
            }
          }
          description "Span destination";
        }
    
        typedef Span-buffer {
          type enumeration {
            enum "circular" {
              value 1;
              description "File buffer circular";
            }
            enum "linear" {
              value 2;
              description "File buffer linear";
            }
          }
          description "Span buffer";
        }
    
        typedef Span-file-format {
          type enumeration {
            enum "pcapng" {
              value 2;
              description "File format pcapng";
            }
          }
          description "Span file format";
        }
    
        typedef Span-buffer-size {
          type uint32;
          description "Span buffer size";
        }
    
        container span-monitor-session {
          description "none";
          container sessions {
            description
              "Monitor-session configuration commands";
            list session {
              key "session";
              description
                "Configuration for a particular Monitor Session";
              container destination-rx {
                description
                  "Specify a destination for Rx direction traffic";
                leaf destination-type {
                  type Span-destination;
                  description
                    "Specify the type of destination";
                }
    
                leaf destination-interface-name {
                  when
                    "../destination-type = 'interface' or ../destination-type = 'udp'" {
                    description
                      "../DestinationType = Interface or .
                     ./DestinationType = UDP";
                  }
                  type xr:Interface-name;
                  description
                    "Specify the destination interface name";
                }
    
                leaf destination-ipv4-address {
                  when
                    "../destination-type = 'ipv4-address' or ../destination-type = 'udp'" {
                    description
                      "../DestinationType = IPv4Address or .
                     ./DestinationType = UDP";
                  }
                  type inet:ipv4-address-no-zone;
                  description
                    "Specify the destination IPv4 address";
                }
    
                leaf destination-ipv6-address {
                  when
                    "../destination-type = 'ipv6-address' or ../destination-type = 'udp'" {
                    description
                      "../DestinationType = IPv6Address or .
                     ./DestinationType = UDP";
                  }
                  type inet:ipv6-address-no-zone;
                  description
                    "Specify the destination IPv6 address";
                }
    
                leaf destination-buffer-size {
                  when
                    "../destination-type = 'file'" {
                    description
                      "../DestinationType = File";
                  }
                  type Span-buffer-size;
                  units "kilobyte";
                  description
                    "Specify buffer size in kilobytes for
                   destination file";
                }
    
                leaf destination-buffer-type {
                  when
                    "../destination-type = 'file'" {
                    description
                      "../DestinationType = File";
                  }
                  type Span-buffer;
                  description
                    "Specify the buffer type for destination file";
                }
    
                leaf destination-port {
                  when
                    "../destination-type = 'udp'" {
                    description
                      "../DestinationType = UDP";
                  }
                  type uint32;
                  description
                    "Specify the destination port";
                }
    
                leaf source-ipv4-address {
                  when
                    "../destination-type = 'udp'" {
                    description
                      "../DestinationType = UDP";
                  }
                  type inet:ipv4-address-no-zone;
                  description
                    "Specify the source IPv4 address";
                }
    
                leaf source-ipv6-address {
                  when
                    "../destination-type = 'udp'" {
                    description
                      "../DestinationType = UDP";
                  }
                  type inet:ipv6-address-no-zone;
                  description
                    "Specify the source  IPv6 address";
                }
    
                leaf source-port {
                  when
                    "../destination-type = 'udp'" {
                    description
                      "../DestinationType = UDP";
                  }
                  type uint32;
                  description
                    "Specify the source port";
                }
    
                leaf vrf-name {
                  when
                    "../destination-type = 'udp'" {
                    description
                      "../DestinationType = UDP";
                  }
                  type string;
                  description
                    "Specify the VRF name";
                }
    
                leaf destination-file-format {
                  when
                    "../destination-type = 'file'" {
                    description
                      "../DestinationType = File";
                  }
                  type Span-file-format;
                  description
                    "Specify the file format";
                }
    
                leaf destination-pcap-filter {
                  when
                    "../destination-type = 'file'" {
                    description
                      "../DestinationType = File";
                  }
                  type string;
                  description
                    "Specify a pcap filter";
                }
              }  // container destination-rx
    
              container cloud-span {
                description
                  "CloudSPAN configuration options for this
                 session";
                leaf cloud-span-enable {
                  type empty;
                  description
                    "Enable CloudSPAN on this session";
                }
              }  // container cloud-span
    
              container destination-tx {
                description
                  "Specify a destination for Tx direction traffic";
                leaf destination-type {
                  type Span-destination;
                  description
                    "Specify the type of destination";
                }
    
                leaf destination-interface-name {
                  when
                    "../destination-type = 'interface' or ../destination-type = 'udp'" {
                    description
                      "../DestinationType = Interface or .
                     ./DestinationType = UDP";
                  }
                  type xr:Interface-name;
                  description
                    "Specify the destination interface name";
                }
    
                leaf destination-ipv4-address {
                  when
                    "../destination-type = 'ipv4-address' or ../destination-type = 'udp'" {
                    description
                      "../DestinationType = IPv4Address or .
                     ./DestinationType = UDP";
                  }
                  type inet:ipv4-address-no-zone;
                  description
                    "Specify the destination IPv4 address";
                }
    
                leaf destination-ipv6-address {
                  when
                    "../destination-type = 'ipv6-address' or ../destination-type = 'udp'" {
                    description
                      "../DestinationType = IPv6Address or .
                     ./DestinationType = UDP";
                  }
                  type inet:ipv6-address-no-zone;
                  description
                    "Specify the destination IPv6 address";
                }
    
                leaf destination-buffer-size {
                  when
                    "../destination-type = 'file'" {
                    description
                      "../DestinationType = File";
                  }
                  type Span-buffer-size;
                  units "kilobyte";
                  description
                    "Specify buffer size in kilobytes for
                   destination file";
                }
    
                leaf destination-buffer-type {
                  when
                    "../destination-type = 'file'" {
                    description
                      "../DestinationType = File";
                  }
                  type Span-buffer;
                  description
                    "Specify the buffer type for destination file";
                }
    
                leaf destination-port {
                  when
                    "../destination-type = 'udp'" {
                    description
                      "../DestinationType = UDP";
                  }
                  type uint32;
                  description
                    "Specify the destination port";
                }
    
                leaf source-ipv4-address {
                  when
                    "../destination-type = 'udp'" {
                    description
                      "../DestinationType = UDP";
                  }
                  type inet:ipv4-address-no-zone;
                  description
                    "Specify the source IPv4 address";
                }
    
                leaf source-ipv6-address {
                  when
                    "../destination-type = 'udp'" {
                    description
                      "../DestinationType = UDP";
                  }
                  type inet:ipv6-address-no-zone;
                  description
                    "Specify the source  IPv6 address";
                }
    
                leaf source-port {
                  when
                    "../destination-type = 'udp'" {
                    description
                      "../DestinationType = UDP";
                  }
                  type uint32;
                  description
                    "Specify the source port";
                }
    
                leaf vrf-name {
                  when
                    "../destination-type = 'udp'" {
                    description
                      "../DestinationType = UDP";
                  }
                  type string;
                  description
                    "Specify the VRF name";
                }
    
                leaf destination-file-format {
                  when
                    "../destination-type = 'file'" {
                    description
                      "../DestinationType = File";
                  }
                  type Span-file-format;
                  description
                    "Specify the file format";
                }
    
                leaf destination-pcap-filter {
                  when
                    "../destination-type = 'file'" {
                    description
                      "../DestinationType = File";
                  }
                  type string;
                  description
                    "Specify a pcap filter";
                }
              }  // container destination-tx
    
              container destination {
                description
                  "Specify a destination";
                leaf destination-type {
                  type Span-destination;
                  description
                    "Specify the type of destination";
                }
    
                leaf destination-interface-name {
                  when
                    "../destination-type = 'interface' or ../destination-type = 'udp'" {
                    description
                      "../DestinationType = Interface or .
                     ./DestinationType = UDP";
                  }
                  type xr:Interface-name;
                  description
                    "Specify the destination interface name";
                }
    
                leaf destination-ipv4-address {
                  when
                    "../destination-type = 'ipv4-address' or ../destination-type = 'udp'" {
                    description
                      "../DestinationType = IPv4Address or .
                     ./DestinationType = UDP";
                  }
                  type inet:ipv4-address-no-zone;
                  description
                    "Specify the destination IPv4 address";
                }
    
                leaf destination-ipv6-address {
                  when
                    "../destination-type = 'ipv6-address' or ../destination-type = 'udp'" {
                    description
                      "../DestinationType = IPv6Address or .
                     ./DestinationType = UDP";
                  }
                  type inet:ipv6-address-no-zone;
                  description
                    "Specify the destination IPv6 address";
                }
    
                leaf destination-buffer-size {
                  when
                    "../destination-type = 'file'" {
                    description
                      "../DestinationType = File";
                  }
                  type Span-buffer-size;
                  units "kilobyte";
                  description
                    "Specify buffer size in kilobytes for
                   destination file";
                }
    
                leaf destination-buffer-type {
                  when
                    "../destination-type = 'file'" {
                    description
                      "../DestinationType = File";
                  }
                  type Span-buffer;
                  description
                    "Specify the buffer type for destination file";
                }
    
                leaf destination-port {
                  when
                    "../destination-type = 'udp'" {
                    description
                      "../DestinationType = UDP";
                  }
                  type uint32;
                  description
                    "Specify the destination port";
                }
    
                leaf source-ipv4-address {
                  when
                    "../destination-type = 'udp'" {
                    description
                      "../DestinationType = UDP";
                  }
                  type inet:ipv4-address-no-zone;
                  description
                    "Specify the source IPv4 address";
                }
    
                leaf source-ipv6-address {
                  when
                    "../destination-type = 'udp'" {
                    description
                      "../DestinationType = UDP";
                  }
                  type inet:ipv6-address-no-zone;
                  description
                    "Specify the source  IPv6 address";
                }
    
                leaf source-port {
                  when
                    "../destination-type = 'udp'" {
                    description
                      "../DestinationType = UDP";
                  }
                  type uint32;
                  description
                    "Specify the source port";
                }
    
                leaf vrf-name {
                  when
                    "../destination-type = 'udp'" {
                    description
                      "../DestinationType = UDP";
                  }
                  type string;
                  description
                    "Specify the VRF name";
                }
    
                leaf destination-file-format {
                  when
                    "../destination-type = 'file'" {
                    description
                      "../DestinationType = File";
                  }
                  type Span-file-format;
                  description
                    "Specify the file format";
                }
    
                leaf destination-pcap-filter {
                  when
                    "../destination-type = 'file'" {
                    description
                      "../DestinationType = File";
                  }
                  type string;
                  description
                    "Specify a pcap filter";
                }
              }  // container destination
    
              leaf class {
                type dt1:Span-session-class;
                mandatory true;
                description
                  "Enable a Monitor Session.  Setting this item
                 causes the Monitor Session to be created.";
              }
    
              leaf discard-class {
                type uint32 {
                  range "0..7";
                }
                description
                  "Specify the discard class value to be set on
                 all traffic mirrored to the destination";
              }
    
              leaf inject-interface {
                type xr:Interface-name;
                description
                  "Specify the inject interface name";
              }
    
              leaf traffic-class {
                type uint32 {
                  range "0..7";
                }
                description
                  "Specify the traffic class value to be set on
                 all traffic mirrored to the destination";
              }
    
              leaf session {
                type dt1:Span-session-name;
                description "Session Name";
              }
            }  // list session
          }  // container sessions
        }  // container span-monitor-session
      }  // module Cisco-IOS-XR-Ethernet-SPAN-cfg
    

© 2024 YumaWorks, Inc. All rights reserved.