Interface tunnel-ip
IOS-XRConfigure tunnel-ip interfaces on IOS XR devices for GRE tunnels, IP-in-IP tunnels, and other Layer 3 tunneling protocols. Tunnel interfaces provide virtual point-to-point connections across IP networks, enabling secure communication, network extension, and overlay services through various encapsulation protocols including GRE and MPLS over IP.
Diagram
Section titled “Diagram”Classes
Section titled “Classes”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| devices | List | devices | No | |
| device_groups | List | device_groups | No | |
| global | Class | global | No |
devices (iosxr)
Section titled “devices (iosxr)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
device_groups (iosxr)
Section titled “device_groups (iosxr)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
global (iosxr)
Section titled “global (iosxr)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
configuration (iosxr.devices)
Section titled “configuration (iosxr.devices)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| interfaces | Class | interfaces | No |
interfaces (iosxr.devices.configuration)
Section titled “interfaces (iosxr.devices.configuration)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| tunnel_ips | List | tunnel_ips | No |
tunnel_ips (iosxr.devices.configuration.interfaces)
Section titled “tunnel_ips (iosxr.devices.configuration.interfaces)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| id | Any | Integer[min: 0] or String[Regex: ^[0-9][0-9]*$] or String[Regex: ^.*[\$\%]\{.*$] | Yes | |
| interface_ | List | String | No | |
| bandwidth | Integer | min: 0, max: 9223372036854775807 | No | |
| description | String | No | ||
| ipv4 | Class | ipv4 | No | |
| ipv6 | Class | ipv6 | No | |
| keepalive | Integer | min: 1, max: 32767 | No | |
| load_interval | Integer | min: 30, max: 600 | No | |
| logging_ | Boolean | true, false | No | |
| mtu | Integer | min: 64, max: 65535 | No | |
| shutdown | Boolean | true, false | No | |
| tunnel_ | IP | No | ||
| tunnel_ | Integer | min: 150, max: 30000 | No | |
| tunnel_ | Integer | min: 3, max: 50 | No | |
| tunnel_ | Integer | min: 1, max: 32767 | No | |
| tunnel_ | Integer | min: 1, max: 255 | No | |
| tunnel_ | IP | No | ||
| tunnel_ | String | No | ||
| tunnel_ | Boolean | true, false | No | |
| tunnel_key | Integer | min: 0, max: 4294967295 | No | |
| tunnel_mode | Choice | ipv4, ipv6 | No | |
| tunnel_mode_gre | Choice | ipv4, ipv6 | No | |
| tunnel_source | Any | IP or String or String[Regex: ^.*[\$\%]\{.*$] | No | |
| tunnel_ | String | No | ||
| tunnel_tos | Integer | min: 0, max: 255 | No | |
| tunnel_ttl | Any | Integer[min: 1, max: 255] or Choice[disable] or String[Regex: ^.*[\$\%]\{.*$] | No | |
| tunnel_vrf | String | No | ||
| vrf | String | No |
ipv4 (iosxr.devices.configuration.interfaces.tunnel_ips)
Section titled “ipv4 (iosxr.devices.configuration.interfaces.tunnel_ips)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| access_ | Class | access_ | No | |
| access_ | Class | access_ | No | |
| address | IP | No | ||
| forwarding_ | Boolean | true, false | No | |
| mask | IP | No | ||
| ttl_ | Boolean | true, false | No | |
| unnumbered | String | No |
ipv6 (iosxr.devices.configuration.interfaces.tunnel_ips)
Section titled “ipv6 (iosxr.devices.configuration.interfaces.tunnel_ips)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| access_ | Class | access_ | No | |
| access_ | Class | access_ | No | |
| addresses | List | addresses | No | |
| autoconfig | Boolean | true, false | No | |
| enable | Boolean | true, false | No | |
| link_ | IP | No | ||
| link_local_zone | String | No | ||
| ttl_ | Boolean | true, false | No |
access_group_egress (iosxr.devices.configuration.interfaces.tunnel_ips.ipv4)
Section titled “access_group_egress (iosxr.devices.configuration.interfaces.tunnel_ips.ipv4)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| acl | String | No | ||
| hardware_count | Boolean | true, false | No | |
| interface_ | Boolean | true, false | No |
access_group_ingress (iosxr.devices.configuration.interfaces.tunnel_ips.ipv4)
Section titled “access_group_ingress (iosxr.devices.configuration.interfaces.tunnel_ips.ipv4)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| acl | String | No | ||
| hardware_count | Boolean | true, false | No | |
| interface_ | Boolean | true, false | No |
access_group_egress (iosxr.devices.configuration.interfaces.tunnel_ips.ipv6)
Section titled “access_group_egress (iosxr.devices.configuration.interfaces.tunnel_ips.ipv6)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| acl | String | No | ||
| interface_ | Boolean | true, false | No |
access_group_ingress (iosxr.devices.configuration.interfaces.tunnel_ips.ipv6)
Section titled “access_group_ingress (iosxr.devices.configuration.interfaces.tunnel_ips.ipv6)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| acl | String | No | ||
| interface_ | Boolean | true, false | No |
addresses (iosxr.devices.configuration.interfaces.tunnel_ips.ipv6)
Section titled “addresses (iosxr.devices.configuration.interfaces.tunnel_ips.ipv6)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| address | IP | Yes | ||
| length | Integer | min: 0, max: 128 | Yes | |
| zone | String | No |
Examples
Section titled “Examples”Example 1: Basic GRE IPv4 Tunnel
Section titled “Example 1: Basic GRE IPv4 Tunnel”iosxr: devices: - name: router-1 host: 10.10.10.1:57400 configuration: hostname: router-1 interfaces: tunnel_ips: - id: 1 description: "GRE tunnel to remote site" tunnel_mode_gre: ipv4 tunnel_source_interface: Loopback0 tunnel_destination: 10.1.1.2 shutdown: false mtu: 1476Example 2: GRE Tunnel with BFD
Section titled “Example 2: GRE Tunnel with BFD”iosxr: devices: - name: router-1 host: 10.10.10.1:57400 configuration: hostname: router-1 interfaces: tunnel_ips: - id: 10 description: "GRE tunnel with BFD monitoring" ipv4: address: 192.168.1.1 mask: 255.255.255.252 tunnel_mode_gre: ipv4 tunnel_source: 192.168.1.1 tunnel_destination: 192.168.1.2 tunnel_bfd_destination: 192.168.1.2 tunnel_bfd_minimum_interval: 100 tunnel_bfd_multiplier: 3 bandwidth: 100000 keepalive: 10Example 3: Dual-Stack GRE Tunnel (IPv4 and IPv6)
Section titled “Example 3: Dual-Stack GRE Tunnel (IPv4 and IPv6)”iosxr: devices: - name: router-1 host: 10.10.10.1:57400 configuration: hostname: router-1 interfaces: tunnel_ips: - id: 20 description: "Dual-stack GRE tunnel" mtu: 1400 ipv4: address: 192.168.10.1 mask: 255.255.255.252 ipv6: enable: true addresses: - address: 2001:db8:100::1 length: 127 tunnel_mode_gre: ipv4 tunnel_source_interface: GigabitEthernet0/0/0/0 tunnel_destination: 10.1.1.2Example 4: IP-in-IP Tunnel with VRF
Section titled “Example 4: IP-in-IP Tunnel with VRF”iosxr: devices: - name: router-1 host: 10.10.10.1:57400 configuration: hostname: router-1 interfaces: tunnel_ips: - id: 30 description: "IP-in-IP tunnel in VRF" vrf: CUSTOMER_A ipv4: address: 172.16.1.1 mask: 255.255.255.252 tunnel_mode: ipv4 tunnel_source: 10.1.1.1 tunnel_destination: 10.1.1.2 tunnel_vrf: TRANSPORTExample 5: GRE Tunnel with TTL and TOS Settings
Section titled “Example 5: GRE Tunnel with TTL and TOS Settings”iosxr: devices: - name: router-1 host: 10.10.10.1:57400 configuration: hostname: router-1 interfaces: tunnel_ips: - id: 40 description: "GRE tunnel with custom TTL/TOS" ipv4: address: 192.168.20.1 mask: 255.255.255.252 tunnel_mode_gre: ipv4 tunnel_source_interface: Loopback0 tunnel_destination: 10.1.1.2 tunnel_key: 1000 tunnel_ttl: 64 tunnel_tos: 192 tunnel_df_disable: trueExample 6: GRE IPv6 Tunnel
Section titled “Example 6: GRE IPv6 Tunnel”iosxr: devices: - name: router-1 host: 10.10.10.1:57400 configuration: hostname: router-1 interfaces: tunnel_ips: - id: 50 description: "GRE IPv6 tunnel" ipv6: addresses: - address: 2001:db8:100:100::1 length: 64 tunnel_mode_gre: ipv6 tunnel_source: 2001:db8:100:100::1 tunnel_destination: 2001:db8:200:200::1