This module contains a collection of YANG definitions for Cisco IOS-XR Ethernet-SPAN package configuration. This module contain...
Version: 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"; } grouping IPV6ACL { description "Common node of span-monitor-session, span-monitor-session, span-attachment"; container ipv6acl { presence "Indicates a ipv6acl node is configured."; description "Enable IPv6 ACL matching for traffic mirroring"; leaf acl-enable { type empty; mandatory true; description "Enable ACL"; } leaf acl-name { type dt1:Span-acl-name; description "ACL Name"; } } // container ipv6acl } // grouping IPV6ACL grouping SPAN-ATTACHMENT-TABLE { description "Common node of interface-configuration, l2-transport"; container span-attachments { description "Monitor Session container for this source interface"; list span-attachment { key "session-name"; description "Configuration for a particular Monitor Session"; leaf session-name { type dt1:Span-session-name; description "Session Name"; } uses MIRROR-FIRST; uses MIRROR-INTERVAL; uses ATTACHMENT-CONFIG; uses ACL; uses DROPS; uses IPV4ACL; uses IPV6ACL; } // list span-attachment } // container span-attachments } // grouping SPAN-ATTACHMENT-TABLE grouping ETHERNET-SPAN-DYN-TMPL-CFG-SPAN-ATTACHMENT-TABLE { description "Common node of interface-configuration, l2-transportCommon node of ip-subscriber, ppp, subscriber-service"; container span-attachments { description "Monitor Session container for this source interface"; list span-attachment { key "session-name"; description "Configuration for a particular Monitor Session"; leaf session-name { type dt1:Span-session-name; description "Session Name"; } uses MIRROR-FIRST; uses MIRROR-INTERVAL; uses ATTACHMENT-CONFIG; uses ACL; } // list span-attachment } // container span-attachments } // grouping ETHERNET-SPAN-DYN-TMPL-CFG-SPAN-ATTACHMENT-TABLE grouping MIRROR-INTERVAL { description "Common node of span-monitor-session, span-monitor-session, span-attachment, span-attachment"; leaf mirror-interval { type Span-mirror-interval; description "Specify the mirror interval"; } } // grouping MIRROR-INTERVAL grouping DROPS { description "Common node of span-monitor-session, span-monitor-session, span-attachment"; leaf drops { type boolean; description "Specify whether or not to mirror dropped packets"; } } // grouping DROPS grouping MIRROR-FIRST { description "Common node of span-monitor-session, span-monitor-session, span-attachment, span-attachment"; leaf mirror-first { type uint32 { range "1..10000"; } units "byte"; description "Mirror a specified number of bytes from start of packet"; } } // grouping MIRROR-FIRST grouping SPAN-MONITOR-SESSION-TABLE { description "Common node of ip-subscriber, ppp, subscriber-service"; container span-monitor-sessions { status deprecated; description "Monitor Session container for this template"; list span-monitor-session { key "session-class"; description "Configuration for a particular class of Monitor Session"; leaf session-class { type dt1:Span-session-class; description "Session Class"; } uses MIRROR-FIRST; uses ATTACHMENT; uses MIRROR-INTERVAL; uses ACL; uses DROPS; uses IPV4ACL; uses IPV6ACL; } // list span-monitor-session } // container span-monitor-sessions } // grouping SPAN-MONITOR-SESSION-TABLE grouping ETHERNET-SPAN-INTERFACE-CFG-SPAN-MONITOR-SESSION-TABLE { description "Common node of ip-subscriber, ppp, subscriber-serviceCommon node of interface-configuration, l2-transport"; container span-monitor-sessions { status deprecated; description "Monitor Session container for this source interface"; list span-monitor-session { key "session-class"; description "Configuration for a particular class of Monitor Session"; leaf session-class { type dt1:Span-session-class; description "Session Class"; } uses MIRROR-FIRST; uses ATTACHMENT; uses MIRROR-INTERVAL; uses ACL; uses DROPS; uses IPV4ACL; uses IPV6ACL; } // list span-monitor-session } // container span-monitor-sessions } // grouping ETHERNET-SPAN-INTERFACE-CFG-SPAN-MONITOR-SESSION-TABLE grouping ACL { description "Common node of span-monitor-session, span-monitor-session, span-attachment, span-attachment"; container acl { presence "Indicates a acl node is configured."; description "Enable ACL matching for traffic mirroring"; leaf acl-enable { type empty; mandatory true; description "Enable ACL"; } leaf acl-name { type dt1:Span-acl-name; description "ACL Name"; } } // container acl } // grouping ACL grouping ATTACHMENT-CONFIG { description "Common node of span-attachment, span-attachment"; container attachment-config { presence "Indicates a attachment-config node is configured."; description "Attach the interface to a Monitor Session"; leaf session-class { type dt1:Span-session-class; mandatory true; description "Traffic class for the session"; } leaf direction { type Span-traffic-direction; description "Specify the direction of traffic to replicate (optional)"; } leaf port-level-enable { type empty; description "Enable port level traffic mirroring"; } } // container attachment-config } // grouping ATTACHMENT-CONFIG grouping IPV4ACL { description "Common node of span-monitor-session, span-monitor-session, span-attachment"; container ipv4acl { presence "Indicates a ipv4acl node is configured."; description "Enable IPv4 ACL matching for traffic mirroring"; leaf acl-enable { type empty; mandatory true; description "Enable ACL"; } leaf acl-name { type dt1:Span-acl-name; description "ACL Name"; } } // container ipv4acl } // grouping IPV4ACL grouping ATTACHMENT { description "Common node of span-monitor-session, span-monitor-session"; container attachment { presence "Indicates a attachment node is configured."; description "Attach the interface to a Monitor Session"; leaf session-name { type dt1:Span-session-name; mandatory true; description "Session Name"; } leaf direction { type Span-traffic-direction; description "Specify the direction of traffic to replicate (optional)"; } leaf port-level-enable { type empty; description "Enable port level traffic mirroring"; } } // container attachment } // grouping ATTACHMENT augment /a1:interface-configurations/a1:interface-configuration/a2:l2-transport { description "This augment extends the configuration data of 'Cisco-IOS-XR-l2vpn-cfg'"; uses ETHERNET-SPAN-INTERFACE-CFG-SPAN-MONITOR-SESSION-TABLE; } augment /a1:interface-configurations/a1:interface-configuration { description "This augment extends the configuration data of 'Cisco-IOS-XR-ifmgr-cfg'"; uses ETHERNET-SPAN-INTERFACE-CFG-SPAN-MONITOR-SESSION-TABLE; } augment /a1:interface-configurations/a1:interface-configuration/a2:l2-transport { description "This augment extends the configuration data of 'Cisco-IOS-XR-l2vpn-cfg'"; uses SPAN-ATTACHMENT-TABLE; } augment /a1:interface-configurations/a1:interface-configuration { description "This augment extends the configuration data of 'Cisco-IOS-XR-ifmgr-cfg'"; uses SPAN-ATTACHMENT-TABLE; } 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.