GRE Tunnel Interface Commands

GRE Tunnel Interface Commands

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

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

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

Release Modification

Release 7.2.1

This command was introduced.

Examples

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

RP/0/RP0RSP0/CPU0:router(config)# interface tunnel-ip 10
RP/0/RP0RSP0/CPU0:router(config-if)# ipv4 unnumbered loopback 20
RP/0/RP0RSP0/CPU0:router(config-if)# tunnel mode ipv4 decap 
RP/0/RP0RSP0/CPU0:router(config-if)# tunnel source loopback 0
RP/0/RP0RSP0/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

Release Modification

Release 7.2.1

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/RP0RSP0/CPU0:router(config)# interface tunnel-ip 10
RP/0/RP0RSP0/CPU0:router(config-if)# ipv4 unnumbered loopback 20
RP/0/RP0RSP0/CPU0:router(config-if)# tunnel mode ipv4 decap 
RP/0/RP0RSP0/CPU0:router(config-if)# tunnel source loopback 0
RP/0/RP0RSP0/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

Release Modification

Release 7.2.1

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/RP0RSP0/CPU0:router(config)# interface tunnel-ip 10
RP/0/RP0RSP0/CPU0:router(config-if)# ipv4 unnumbered loopback 20
RP/0/RP0RSP0/CPU0:router(config-if)# tunnel mode ipv4 decap 
RP/0/RP0RSP0/CPU0:router(config-if)# tunnel source loopback 0
RP/0/RP0RSP0/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 }

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

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.

Command Default

None

Command Modes

Tunnel interface configuration mode

Release Modification

Release 7.2.1

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/RP0RSP0/CPU0:router(config)# interface tunnel-ip 10
RP/0/RP0RSP0/CPU0:router(config-if)# ipv4 unnumbered loopback 20
RP/0/RP0RSP0/CPU0:router(config-if)# tunnel mode ipv4 decap 
RP/0/RP0RSP0/CPU0:router(config-if)# tunnel source loopback 0
RP/0/RP0RSP0/CPU0:router(config-if)# tunnel destination 50.10.1.2/32