GRE Tunnel Interface Commands

This module describes the command line interface (CLI) commands for configuring GRE tunnel interfaces on the Cisco 8000 Series Routers.

For information on configuring GRE tunnels, see the Interface and Hardware Component Configuration Guide for Cisco 8000 Series Routers.

hw-module profile cef ttl tunnel-ip decrement disable

To disable the decrement of TTL value of inner payload header of an IP-in-IP packet, use the hw-module profile cef ttl tunnel-ip decrement disable command in XR Config mode.

hw-module profile cef ttl tunnel-ip decrement disable

Syntax Description

This command has no keywords or arguments.

Command Default

None

Command Modes

XR Config

Command History

Release

Modification

Release 7.0.14

This command was introduced.

Usage Guidelines

No specific guidelines impact the use of this command.

Examples

The following example shows how you can disable the decrement of TTL value of inner payload header of an IP-in-IP packet.

Router# configure
Router(config)# hw-module profile cef ttl tunnel-ip decrement disable
Router(config)# commit
Thu Jun 11 08:43:52.343 UTC
LC/0/0/CPU0:Jun 11 08:43:52.505 UTC: npu_drvr[204]: %FABRIC-NPU_DRVR-3-HW_MODULE_PROFILE_TTL_CHASSIS_CFG_CHANGED : Hw-module profile ttl config changed. Behaviour of IPinIP tunnel's inner header ttl decrement will be changed.

hw-module profile gue

To configure unique GUE port numbers to decapsulate IPv4, IPv6, and MPLS packets using UDP, use the hw-module profile gue udp-dest-port ipv4 <port number> ipv6 <port number> mpls <port number> command in XR Config mode on the destination router.

hw-module profile gue udp-dest-port ipv4 <port number> ipv6 <port number> mpls <port number>

Table 1. Command Description

Keyword

Description

gue

The UDP destination port configuration of the GUE decapsulation tunnel.

udp-dest-port

Configure separate UDP port numbers for IPv4, IPv6, and MPLS.

ipv4

Configure unreserved UDP port numbers for IPv4 payload. The supported range is from 1000 through 64000.

ipv6

Configure unreserved UDP port numbers for IPv6 payload. The supported range is from 1000 through 64000.

mpls

Configure unreserved UDP port numbers for MPLS payload. The supported range is from 1000 through 64000.

To remove this configuration, use the no prefix of the command:

no hw-module profile gue udp-dest-port ipv4 <port number> ipv6 <port number> mpls <port number>

Command Default

None

Command Modes

XR Config

Command History

Release

Modification

Release 7.3.3

This command was introduced.

Usage Guidelines

No specific guidelines impact the use of this command.

Examples

The following example shows how you can configure unique GUE port numbers to decapsulate IPv4, IPv6, and MPLS packets using UDP.

Router(config)#hw-module profile gue udp-dest-port ipv4 1001 ipv6 1002 mpls 1003

hw-module profile gue underlay-hash enable

To use only the outer IP header (L3 and L4 ) for calculating the hashing for incoming GUE packets, use the hw-module profile gue underlay-hash enable command in mode.

hw-module profile gue underlay-hash enable

Syntax Description

enable

To enable only the outer IP header (L3 and L4 ) for calculating the hashing.

Command Default

By default, both outer IP header (L3 and L4) and inner IP header (L3 and L4) are considered for calculating the hashing for incoming GUE packets.

Command Modes

XR Config mode

Command History

Release

Modification

Release 7.11.1

This command was introduced.

Usage Guidelines

This command is currently supported only on Q200-based ASICs.

Examples

The following example shows how to enable only the outer IP header (L3 and L4) for calculating the hashing:

RP/0/RP0/CPU0:R2#configure
RP/0/RP0/CPU0:R2(config)#hw-module profile gue underlay-hash enable 
RP/0/RP0/CPU0:R2(config)#commit
RP/0/RP0/CPU0:R2(config)#end

interface tunnel-ip

Configures an IP-in-IP tunnel interface.

To remove this configuration, use the no prefix of the command.

interface tunnel-ip id

no interface tunnel-ip id

Syntax Description

id

Specifies the tunnel interface identifier. Range is from 0 to 131070.

Command Default

None

Command Modes

XR Config mode

Command History

Release

Modification

Release 7.0.12

This command was introduced.

Usage Guidelines

No specific guidelines impact the use of this command.

Examples

The following example shows how you can configure an IP-in-IP tunnel interface.

RP/0/RP0/CPU0:router(config)# interface tunnel-ip 10
RP/0/RP0/CPU0:router(config-if)# ipv4 unnumbered loopback 20
RP/0/RP0/CPU0:router(config-if)# tunnel mode ipv4 decap 
RP/0/RP0/CPU0:router(config-if)# tunnel source loopback 0
RP/0/RP0/CPU0:router(config-if)# tunnel destination 50.10.1.2/32 

tunnel mode

Configures the mode of encapsulation for the tunnel interface.

To remove this configuration, use the no prefix of the command.

tunnel mode { gre { ipv4 | ipv6 } [ decap ] | ipv4 [ decap ] | ipv6 [ decap ] }

no tunnel mode { gre { ipv4 | ipv6 } [ decap ] | ipv4 [ decap ] | ipv6 [ decap ] }

Syntax Description

tunnel mode gre

Configures IP-over-GRE encapsulation for the tunnel interface.

tunnel mode ipv4

Configures generic packet tunneling over IPv4 encapsulation for the tunnel interface.

tunnel mode ipv6

Configures generic packet tunneling over IPv6 encapsulation for the tunnel interface.

tunnel mode gre ipv4

Configures GRE-over-IPv4 encapsulation for the tunnel interface.

tunnel mode gre ipv6

Configures GRE-over-IPv6 encapsulation for the tunnel interface.

decap

Configures the IP-in-IP or GRE tunnel to be used only for decapsulation.

Command Default

None

Command Modes

Tunnel interface configuration mode

Command History

Release

Modification

Release 7.0.12

This command was introduced.

Usage Guidelines

No specific guidelines impact the use of this command.

Examples

The following example shows how you can configure the tunnel mode for an IP-in-IP tunnel interface.

RP/0/RP0/CPU0:router(config)# interface tunnel-ip 10
RP/0/RP0/CPU0:router(config-if)# ipv4 unnumbered loopback 20
RP/0/RP0/CPU0:router(config-if)# tunnel mode ipv4 decap 
RP/0/RP0/CPU0:router(config-if)# tunnel source loopback 0
RP/0/RP0/CPU0:router(config-if)# tunnel destination 50.10.1.2/32 

tunnel source

Configures the source IP address for a tunnel interface.

To remove this configuration, use the no prefix of the command.

tunnel source { ipv4-address | interface-type interface-number }

no tunnel source { ipv4-address | interface-type interface-number }

Syntax Description

ipv4-address

Configures the specified IPv4 address as the source IP for the tunnel interface.

interface-type interface-number

Configures the specified interface type as the source for the tunnel interface.

Command Default

None

Command Modes

Tunnel interface configuration mode

Command History

Release

Modification

Release 7.0.12

This command was introduced.

Usage Guidelines

No specific guidelines impact the use of this command.

Examples

The following example shows how you can configure the Loopback 0 interface as the tunnel source for an IP-in-IP tunnel interface.

RP/0/RP0/CPU0:router(config)# interface tunnel-ip 10
RP/0/RP0/CPU0:router(config-if)# ipv4 unnumbered loopback 20
RP/0/RP0/CPU0:router(config-if)# tunnel mode ipv4 decap 
RP/0/RP0/CPU0:router(config-if)# tunnel source loopback 0
RP/0/RP0/CPU0:router(config-if)# tunnel destination 50.10.1.2/32 

tunnel destination

Configures the tunnel destination for the tunnel interface.

To remove this configuration, use the no prefix of the command.

tunnel destination { ipv4-address | ipv4 address/subnet-mask | ipv6-address | object-group-ipv4 | object-group-ipv6 }

no tunnel destination { ipv4-address | ipv4 address/subnet-mask | ipv6-address | object-group-ipv4 | object-group-ipv6 }

Syntax Description

ipv4-address

Configures the specified IPv4 address as the destination IP for the tunnel interface.

ipv4-address/subnet mask

Configures the specified IPv4 address with subnet mask as the destination IP for the tunnel interface.

ipv6-address

Configures the specified IPv6 address as the destination IP for the tunnel interface.

object-group-ipv4

Configures the specified IPv4 object group as the destination IP for the tunnel interface.

object-group-ipv6

Configures the specified IPv6 object group as the destination IP for the tunnel interface.

Command Default

None

Command Modes

Tunnel interface configuration mode

Command History

Release

Modification

Release 7.5.4

This command was modified to introduce object-group-ipv4 and object-group-ipv6 options.

Release 7.0.12

This command was introduced.

Usage Guidelines

No specific guidelines impact the use of this command.

Examples

The following example shows how you can configure an IPv4 address with subnet mask as the tunnel destination for an IP-in-IP tunnel interface.

RP/0/RP0/CPU0:router(config)# interface tunnel-ip 10
RP/0/RP0/CPU0:router(config-if)# ipv4 unnumbered loopback 20
RP/0/RP0/CPU0:router(config-if)# tunnel mode ipv4 decap 
RP/0/RP0/CPU0:router(config-if)# tunnel source loopback 0
RP/0/RP0/CPU0:router(config-if)# tunnel destination 50.10.1.2/32 

tunnel ttl disable

Disables the decrement of TTL value of an incoming packet in a interface tunnel before encapsulation for GRE forwarding.

tunnel ttl disable

Syntax Description

This command has no keywords or arguments.

Command Default

None

Command Modes

XR Config

Command History

Release

Modification

Release 7.3.2

This command was introduced.

Usage Guidelines

No specific guidelines impact the use of this command.

Examples

The following example shows how you can disable the decrement of TTL an incoming packet before encapsulation for GRE forwarding.

Router# configure
Router(config)# interface tunnel-ip30016
Router(config-if)# tunnel ttl disable
Router(config-if)# commit
Thu Sep 11 08:43:52.343 UTC

show interface tunnel accounting (encap)

To display accounting information about a tunnel interface in encapsulation mode, use the show int tunnel accounting command in XR EXEC mode.

show interface tunnel-ip <0-131070> accounting

Command Default

No default behavior or values.

Command Modes

XR EXEC

Command History

Release Modification
7.3.1

This command was introduced.

Examples

This example shows how to display accounting information about a tunnel interface in encapsulation mode.

RP/0/RP0/CPU0:router#show interface tunnel-ip 1 accounting
Tue Aug 25 06:23:49.405 UTC
tunnel-ip1
  Protocol              Pkts In         Chars In     Pkts Out        Chars Out
  IPV4_UNICAST                0                0         1848           857822

show interface tunnel accounting (decap)

To display accounting information about a tunnel interface in decapsulation mode, use the show int tunnel accounting command in XR EXEC mode.

show interface tunnel-ip <0-131070> accounting

Command Default

No default behavior or values.

Command Modes

XR EXEC

Command History

Release Modification
7.3.1

This command was introduced.

Examples

This example shows how to display accounting information about a tunnel interface in decapsulation mode.

RP/0/RP0/CPU0:router#show interface tunnel-ip 2002 accounting
tunnel-ip2002
  Protocol              Pkts In         Chars In     Pkts Out        Chars Out
  IPV4_UNICAST           106908         11759880            0                0

show tunnel ip ea database brief

To display tunnel ip ea database parameters in brief, use the show tunnel ip ea database brief command in XR EXEC mode.

show tunnel ip ea database brief location node-id

Syntax Description

location node-id

Displays information about the node location specified as rack / slot / module.

Command Default

No default behavior or values.

Command Modes

XR EXEC

Command History

Release Modification
24.1.1

This command was introduced.

Examples

The following is sample output from the show tunnel ip ea database brief command with the location keyword:

RP/0/RP0/CPU0:router#show tunnel ip ea database brief location 0/1/CPU0 
Mon Nov  6 13:04:37.361 IST

----- node0_1_CPU0 -----

Ifhandle        Src                            Dst                            Mode            Adjacency    Status   Tpt-Vrf-Tbl-ID
0x90           1.1.1.1                        15.15.15.5                     GREoIPv4(lite)      Up         Up        0xe0000000
0xb0           5.5.5.5                        14.14.14.14                    GREoIPv4            Up         Up        0xe0000000
0xd0           0.0.0.0                        8.8.8.8                        GREoIPv4            Down       Down      0xe0000000
0xf0           ::                             2a02:a90:4007:700::192         GREoIPv6            Down       Down      0xe0800000

show tunnel ip ma database brief

To display tunnel ip ma database parameters in brief, use the show tunnel ip ma database brief command in XR EXEC mode.

show tunnel ip ma database brief

Syntax Description

This command has no keywords or arguments.

Command Default

No default behavior or values.

Command Modes

XR EXEC

Command History

Release Modification
24.1.1

This command was introduced.

Examples

The following is sample output from the show tunnel ip ma database brief command:

RP/0/RP0/CPU0:router#show tunnel ip ma database brief
Mon Nov  6 13:04:28.905 IST

Interface       Src                            Dst                            Mode            Caps         Status     Tpt-Vrf-Name
tunnel-ip100   1.1.1.1                        15.15.15.5                     GREoIPv4(lite)  ipv4            Up        default 
tunnel-ip200   5.5.5.5                        14.14.14.14                    GREoIPv4        ipv4 ipv6 mpls  Up        default 
tunnel-ip300   0.0.0.0                        8.8.8.8                        GREoIPv4                        Down      default 
tunnel-ip500   ::                             2a02:a90:4007:700::192         GREoIPv6                        Down      default