Cisco-IOS-XR-um-if-tunnel-cfg

This module contains a collection of YANG definitions for Cisco IOS-XR if-tunnel package configuration. This YANG module augmen...

  • Version: 2021-01-21

    Cisco-IOS-XR-um-if-tunnel-cfg@2021-01-21


    
      module Cisco-IOS-XR-um-if-tunnel-cfg {
    
        yang-version 1;
    
        namespace
          "http://cisco.com/ns/yang/Cisco-IOS-XR-um-if-tunnel-cfg";
    
        prefix um-if-tunnel-cfg;
    
        import Cisco-IOS-XR-types {
          prefix xr;
        }
        import ietf-inet-types {
          prefix inet;
        }
        import Cisco-IOS-XR-um-interface-cfg {
          prefix a1;
        }
        import tailf-common {
          prefix tailf;
        }
        import cisco-semver {
          prefix semver;
        }
    
        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 if-tunnel package configuration.
         
         This YANG module augments the
         modules with configuration data.
         
         Copyright (c) 2019-2021 by Cisco Systems, Inc.
         All rights reserved.";
    
        revision "2021-01-21" {
          description
            "Added containers under tunnel";
        }
    
        revision "2019-06-10" {
          description "Initial version";
        }
    
        semver:module-version "2.0.0";
        semver:module-version "1.0.1";
    
        feature is_tunnel_ipv6_any_mode_supported {
          description
            "is tunnel ipv6 any mode supported";
        }
    
        feature is_tunnel_mode_decap_supported {
          description
            "is tunnel mode decap supported";
        }
    
        feature is_tunnel_gre_supported {
          description "is tunnel gre supported";
        }
    
        feature is_tunnel_gre_ipv6_trans_supported {
          description
            "is tunnel gre ipv6 trans supported";
        }
    
        feature is_mgre_through_cli_supported {
          description
            "is mgre through cli supported";
        }
    
        feature is_mgre_tunnel_ipv4_trans_supported {
          description
            "is mgre tunnel ipv4 trans supported";
        }
    
        feature is_mgre_tunnel_ipv6_trans_supported {
          description
            "is mgre tunnel ipv6 trans supported";
        }
    
        feature is_tunnel_ipv4_trans_supported {
          description
            "is tunnel ipv4 trans supported";
        }
    
        feature is_tunnel_ipv6_trans_supported {
          description
            "is tunnel ipv6 trans supported";
        }
    
        feature is_tunnel_ip_dfbit_copy_supported {
          description
            "is tunnel ip dfbit copy supported";
        }
    
        feature is_tunnel_gre_key_ignore_supported {
          description
            "is tunnel gre key ignore supported";
        }
    
        feature is_tunnel_gre_key_entropy_supported {
          description
            "is tunnel gre key entropy supported";
        }
    
        feature is_tunnel_gre_key_supported {
          description
            "is tunnel gre key supported";
        }
    
        feature is_tunnel_ip_transport_vrf_supported {
          description
            "is tunnel ip transport vrf supported";
        }
    
        grouping GROUP-TUNNEL {
          container tunnel {
            tailf:dependency "../a1:interface-name";
            when
              "../a1:interface-name[starts-with(text(),'tunnel-ip')]";
            description
              "Configure GRE/IP tunnel parameters";
            container source {
              description
                "Configure source of tunnel";
              leaf interface-name {
                type xr:Interface-name;
                must
                  "not(../ipv4-address or ../ipv6-address)";
                description
                  "Name of tunnel source interface";
              }
    
              leaf ipv4-address {
                type inet:ipv4-address-no-zone;
                must
                  "not(../interface-name or ../ipv6-address)";
                description
                  "IPV4 address of the tunnel source";
              }
    
              leaf ipv6-address {
                type inet:ipv6-address-no-zone;
                must
                  "not(../interface-name or ../ipv4-address)";
                description
                  "IPV6 address of the tunnel source";
              }
            }  // container source
    
            container destination {
              description
                "Configure destination of tunnel";
              leaf prefix-list {
                type xr:Cisco-ios-xr-string {
                  length "1..64";
                }
                must
                  "../ipv4-address or ../ipv6-address";
                description
                  "Prefix-list to validate destination's resolving prefix";
              }
    
              leaf ipv4-address {
                type inet:ipv4-address-no-zone;
                must "not(../ipv6-address)";
                description
                  "IPV4 address of the tunnel destination";
              }
    
              leaf length {
                type inet:ipv4-address-no-zone;
                must "../ipv4-address";
                description
                  "IPv4 prefix length of the tunnel destination";
              }
    
              leaf ipv6-address {
                type inet:ipv6-address-no-zone;
                must "not(../ipv4-address)";
                description
                  "IPV6 address of the tunnel destination";
              }
            }  // container destination
    
            container bfd {
              description
                "Configure bfd for tunnel";
              container destination {
                description
                  "Configure bfd for tunnel";
                leaf ipv4-address {
                  type inet:ipv4-address-no-zone;
                  must "not(../ipv6-address)";
                  description
                    "IPV4 address of the BFD destination";
                }
    
                leaf ipv6-address {
                  type inet:ipv6-address-no-zone;
                  must "not(../ipv4-address)";
                  description
                    "IPV6 address of the tunnel destination";
                }
              }  // container destination
    
              leaf period {
                type uint32 {
                  range "1..32767";
                }
                description
                  "Keepalive period in seconds (default 10 seconds)";
              }
    
              leaf retry {
                type uint32 {
                  range "1..255";
                }
                description
                  "Number of retries for Keepalive (default 3)";
              }
    
              leaf minimum-interval {
                type uint32 {
                  range "150..30000";
                }
                description "Hello interval";
              }
    
              leaf multiplier {
                type uint32 {
                  range "3..50";
                }
                description "Detect multiplier";
              }
            }  // container bfd
    
            container mode {
              description
                "Tunnel encapsulation method (default: gre ipv4)";
              container gre {
                if-feature is_tunnel_gre_supported;
                description
                  "IP over GRE encapsulation";
                container multipoint {
                  if-feature is_mgre_through_cli_supported;
                  description
                    "multipoint GRE over IPv4/IPv6 encapsulation";
                  container ipv4 {
                    if-feature is_mgre_tunnel_ipv4_trans_supported;
                    must
                      "not(../ipv6 or ../../ipv4 or ../../ipv6 or
                         ../../../ipv4 or ../../../ipv6)";
                    presence
                      "Indicates a ipv4 node is configured.";
                    description
                      "multipoint GRE over IPv4 encapsulation";
                  }  // container ipv4
    
                  container ipv6 {
                    if-feature is_mgre_tunnel_ipv6_trans_supported;
                    must
                      "not(../ipv4 or ../../ipv4 or ../../ipv6 or
                         ../../../ipv4 or ../../../ipv6)";
                    presence
                      "Indicates a ipv6 node is configured.";
                    description
                      "multipoint GRE over IPv6 encapsulation";
                  }  // container ipv6
                }  // container multipoint
    
                container ipv4 {
                  must
                    "not(../ipv6 or ../multipoint/ipv4 or ../multipoint/ipv6 or
                       ../../ipv4 or ../../ipv6)";
                  presence
                    "Indicates a ipv4 node is configured.";
                  description
                    "GRE over IPv4 encapsulation";
                }  // container ipv4
    
                container ipv6 {
                  if-feature is_tunnel_gre_ipv6_trans_supported;
                  must
                    "not(../ipv4 or ../multipoint/ipv4 or ../multipoint/ipv6 or
                       ../../ipv4 or ../../ipv6)";
                  presence
                    "Indicates a ipv6 node is configured.";
                  description
                    "GRE over IPv6 encapsulation";
                }  // container ipv6
              }  // container gre
    
              container ipv4 {
                if-feature is_tunnel_ipv4_trans_supported;
                must
                  "not(../ipv6 or ../gre/ipv4 or ../gre/ipv6 or
                     ../gre/multipoint/ipv4 or ../gre/multipoint/ipv6)";
                presence
                  "Indicates a ipv4 node is configured.";
                description
                  "Generic packet tunneling over IPv4 encapsulation";
              }  // container ipv4
    
              container ipv6 {
                if-feature is_tunnel_ipv6_trans_supported;
                must
                  "not(../ipv4 or ../gre/ipv4 or ../gre/ipv6 or
                     ../gre/multipoint/ipv4 or ../gre/multipoint/ipv6)";
                presence
                  "Indicates a ipv6 node is configured.";
                description
                  "Generic packet tunneling over IPv6 encapsulation";
              }  // container ipv6
    
              leaf encapsulation-mode {
                if-feature is_tunnel_mode_decap_supported;
                type enumeration {
                  enum "decap" {
                    value 1;
                    description
                      "Decap-only tunnel";
                  }
                  enum "encap" {
                    value 2;
                    description
                      "Encap-only tunnel";
                  }
                }
                must
                  "(../ipv4 or ../ipv6 or ../gre/ipv4 or ../gre/ipv6) and
                 not(../gre/multipoint/ipv4 or ../gre/multipoint/ipv6)";
                description
                  "configure this node";
              }
            }  // container mode
    
            leaf tos {
              type uint32 {
                range "0..255";
              }
              description
                "Configure Type of Service bits for this tunnel";
            }
    
            container ttl {
              description
                "Configure the time-to-live for packets sent over this tunnel";
              container disable {
                must "not(../ttl-value)";
                presence
                  "Indicates a disable node is configured.";
                description
                  "Disable decrement of TTL";
              }  // container disable
    
              leaf ttl-value {
                type uint32 {
                  range "1..255";
                }
                must "not(../disable)";
                description
                  "Enter the TTL value";
              }
            }  // container ttl
    
            container dfbit {
              description
                "Modify Do not Fragment Bit";
              container disable {
                must "not(../copy)";
                presence
                  "Indicates a disable node is configured.";
                description
                  "Disable DF bit (i.e. allow fragmentation)";
              }  // container disable
    
              container copy {
                if-feature is_tunnel_ip_dfbit_copy_supported;
                must "not(../disable)";
                presence
                  "Indicates a copy node is configured.";
                description
                  "Copy DF bit from inner payload";
              }  // container copy
            }  // container dfbit
    
            container key-ignore {
              if-feature is_tunnel_gre_key_ignore_supported;
              presence
                "Indicates a key-ignore node is configured.";
              description
                "GRE key field processing configuration";
            }  // container key-ignore
    
            container key {
              if-feature is_tunnel_gre_key_entropy_supported;
              description
                "Configure the key value for packets sent over this tunnel";
              container entropy {
                if-feature is_tunnel_gre_key_entropy_supported;
                must "not(../key-value)";
                presence
                  "Indicates a entropy node is configured.";
                description
                  "Key contains entropy hash";
              }  // container entropy
    
              leaf key-value {
                if-feature is_tunnel_gre_key_supported;
                type uint32 {
                  range "0..4294967295";
                }
                must "not(../entropy)";
                description
                  "Enter the Key value";
              }
            }  // container key
    
            leaf vrf {
              if-feature is_tunnel_ip_transport_vrf_supported;
              type xr:Cisco-ios-xr-string {
                length "1..32";
              }
              description
                "set tunnel vrf membership";
            }
          }  // container tunnel
    
          container keepalive {
            presence
              "Indicates a keepalive node is configured.";
            description
              "Enable keepalive packets on this tunnel";
            leaf keepalive-period {
              type uint32 {
                range "1..32767";
              }
              description
                "Keepalive period in seconds (default 10 seconds)";
            }
    
            leaf retries {
              type uint32 {
                range "1..255";
              }
              must "../keepalive-period";
              description
                "Number of retries (default 3)";
            }
          }  // container keepalive
        }  // grouping GROUP-TUNNEL
    
        augment /a1:interfaces/a1:interface {
          uses GROUP-TUNNEL;
        }
    
        augment /a1:interfaces/a1:interface-preconfigure {
          uses GROUP-TUNNEL;
        }
      }  // module Cisco-IOS-XR-um-if-tunnel-cfg
    

© 2023 YumaWorks, Inc. All rights reserved.