Skip to content

Interface tunnel-ip

Configure 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
NameTypeConstraintMandatoryDefault Value
tunnel_ipsList[tunnel_ips]No

tunnel_ips (iosxr.devices.configuration.interfaces)

Section titled “tunnel_ips (iosxr.devices.configuration.interfaces)”
NameTypeConstraintMandatoryDefault Value
idAnyInteger[min: 0] or String[Regex: ^[0-9][0-9]*$] or String[Regex: ^.*[\$\%]\{.*$]Yes
interface_groupsListStringNo
bandwidthIntegermin: 0, max: 9223372036854775807No
descriptionStringNo
ipv4Class[ipv4]No
ipv6Class[ipv6]No
keepaliveIntegermin: 1, max: 32767No
load_intervalIntegermin: 30, max: 600No
logging_events_link_statusBooleantrue, falseNo
mtuIntegermin: 64, max: 65535No
shutdownBooleantrue, falseNo
tunnel_bfd_destinationIPNo
tunnel_bfd_minimum_intervalIntegermin: 150, max: 30000No
tunnel_bfd_multiplierIntegermin: 3, max: 50No
tunnel_bfd_periodIntegermin: 1, max: 32767No
tunnel_bfd_retryIntegermin: 1, max: 255No
tunnel_destinationIPNo
tunnel_destination_prefix_listStringNo
tunnel_df_disableBooleantrue, falseNo
tunnel_keyIntegermin: 0, max: 4294967295No
tunnel_modeChoiceipv4, ipv6No
tunnel_mode_greChoiceipv4, ipv6No
tunnel_sourceAnyIP or String or String[Regex: ^.*[\$\%]\{.*$]No
tunnel_source_interfaceStringNo
tunnel_tosIntegermin: 0, max: 255No
tunnel_ttlAnyInteger[min: 1, max: 255] or Choice[disable] or String[Regex: ^.*[\$\%]\{.*$]No
tunnel_vrfStringNo
vrfStringNo

ipv4 (iosxr.devices.configuration.interfaces.tunnel_ips)

Section titled “ipv4 (iosxr.devices.configuration.interfaces.tunnel_ips)”
NameTypeConstraintMandatoryDefault Value
access_group_egressClass[access_group_egress]No
access_group_ingressClass[access_group_ingress]No
addressIPNo
forwarding_enableBooleantrue, falseNo
maskIPNo
ttl_propagate_disableBooleantrue, falseNo
unnumberedStringNo

ipv6 (iosxr.devices.configuration.interfaces.tunnel_ips)

Section titled “ipv6 (iosxr.devices.configuration.interfaces.tunnel_ips)”
NameTypeConstraintMandatoryDefault Value
access_group_egressClass[access_group_egress]No
access_group_ingressClass[access_group_ingress]No
addressesList[addresses]No
autoconfigBooleantrue, falseNo
enableBooleantrue, falseNo
link_local_addressIPNo
link_local_zoneStringNo
ttl_propagate_disableBooleantrue, falseNo

access_group_egress (iosxr.devices.configuration.interfaces.tunnel_ips.ipv4)

Section titled “access_group_egress (iosxr.devices.configuration.interfaces.tunnel_ips.ipv4)”
NameTypeConstraintMandatoryDefault Value
aclStringNo
hardware_countBooleantrue, falseNo
interface_statisticsBooleantrue, falseNo

access_group_egress (iosxr.devices.configuration.interfaces.tunnel_ips.ipv6)

Section titled “access_group_egress (iosxr.devices.configuration.interfaces.tunnel_ips.ipv6)”
NameTypeConstraintMandatoryDefault Value
aclStringNo
interface_statisticsBooleantrue, falseNo

addresses (iosxr.devices.configuration.interfaces.tunnel_ips.ipv6)

Section titled “addresses (iosxr.devices.configuration.interfaces.tunnel_ips.ipv6)”
NameTypeConstraintMandatoryDefault Value
addressIPYes
lengthIntegermin: 0, max: 128Yes
zoneStringNo

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: 1476
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: 10

Example 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.2
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: TRANSPORT

Example 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: true
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