This module describes the commands used to configure generic routing encapsulation (GRE).
For detailed information about GRE concepts, configuration tasks, and examples, refer to the
Cisco ASR 9000 Series Aggregation Services Router
L2VPN and Ethernet Services Configuration Guide.
To set the tunnel interface bandwidth, use the bandwidth command in interface configuration mode. To undo the tunnel interface bandwidth that is set, use the no form
of this command.
bandwidthkbps
nobandwidthkbps
Syntax Description
kbps
Interface bandwidth in kilobits per second (kbps). The range is from 0 to 4294967295. The default value is 100.
Command Default
None
Command Modes
interface configuration
Command History
Release
Modification
Release 4.2.0
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Task ID
Task ID
Operation
interface
read, write
Examples
This example shows how to set the bandwidth of the tunnel interface:
To specify the description of any interface, use the description command in the interface configuration mode. To undo the specified description, use the no form of the command.
descriptiondescription-name
nodescription
Syntax Description
description-name
Description of the Interface.
Command Default
None
Command Modes
Interface Configuration
Command History
Release
Modification
Release 4.2.0
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Task ID
Task ID
Operation
interface
read, write
Examples
The following output shows how to specify the description of an interface:
To set the IPv4 address of the tunnel interface, use the ipv4 address command in interface configuration mode. To remove the IPv4 addresses, use the no form of this command.
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Task ID
Task ID
Operations
network
read, write
acl
read, write
Examples
This example shows how to set the IPV4 address with route-tag option:
To set the IPv4 MTU on the tunnel interface, use the ipv4 mtu command in interface configuration mode. To remove the IPv4 MTU, use the no form of this command.
ipv4mtusize
noipv4mtusize
Syntax Description
size
Size of the MTU in bytes. The range is from 68 to 65535.
Command Default
None
Command Modes
Interface configuration
Command History
Release
Modification
Release 4.2.1
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Task ID
Task ID
Operations
network
read, write
acl
read, write
Examples
This example shows how to set the IPv4 MTU:
RP/0/RSP0/CPU0:router# configureRP/0/RSP0/CPU0:router(config)#interface tunnel-ip 78 ipv4 mtu 78
ipv6 address (LxVPN)
To set the IPv6 address of the tunnel interface, use the ipv6 address command in interface configuration mode. To remove the IPv6 addresses, use the no form of this command.
no ipv6
{ addresszone
{ prefixlength | link-local }
[ route-tagvalue ] | zone /length
[ route-tagvalue ] }
Syntax Description
zone
Specifies the IPv6 address of the interface.
prefix length
Specifies the length of the IPv6 address prefix, in bits. The range is from 1 to 128.
link-local
Specifies the link-local address.
route-tag
Specifies the tag associated with the address.
value
Tag value. The range is from 1 to 4294967295.
Command Default
None
Command Modes
Interface configuration
Command History
Release
Modification
Release 4.2.1
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Task ID
Task ID
Operations
network
read, write
interface
read, write
ipv6
read, write
Examples
This example shows how to set the ipv6 address for a tunnel interface:
To set the IPv6 MTU on the tunnel interface, use the ipv6 mtu command in interface configuration mode. To remove the IPv6 MTU, use the no form of this command.
ipv6mtusize
noipv6mtusize
Syntax Description
size
Size of the MTU in bytes. The range is from 1280 to 65535.
Command Default
None
Command Modes
Interface configuration
Command History
Release
Modification
Release 4.2.1
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Task ID
Task ID
Operations
network
read, write
interface
read, write
ipv6
read, write
Examples
This example shows how to set the IPv4 MTU:
RP/0/RSP0/CPU0:router# configureRP/0/RSP0/CPU0:router(config)#interface tunnel-ip 78 ipv6 mtu 3456
keepalive
To enable keepalive for a tunnel interface, use the keepalive
command. To remove keepalive, use the no form of this
command.
keepalive
[ time_in_seconds [retry_num] ]
nokeepalive
Syntax Description
time_in_seconds
Specifies the frequency (in seconds) at which keepalive check is performed.
The default is 10 seconds. The minimum value is 1 second.
retry_num
Specifies the number of keepalive retries before declaring that a tunnel
destination is unreachable. The default is 3 retries. The minimum value is 1
retry.
Command Default
None
Command Modes
interface configuration
Command History
Release
Modification
Release 4.2.0
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Use the keepalive command to enable keepalive for a tunnel
interface.
Task ID
Task ID
Operations
interface
read, write
Examples
The following example shows how to configure interface tunnel:
To set the MTU size of the tunnel interface, use the mtu command in interface configuration mode. To undo the MTU size of the tunnel interface that is set, use the no form of this command.
This is a Generic Routing Encapsulation (GRE) command.
mtusize
nomtusize
Syntax Description
size
Size of MTU in bytes. The default value is 1476.
Command Default
None
Command Modes
Interface configuration
Command History
Release
Modification
Release 4.2.0
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Task ID
Task ID
Operation
interface
read, write
Examples
This example shows how to set the MTU size of the tunnel interface:
RP/0/RSP0/CPU0:router# configureRP/0/RSP0/CPU0:router(config)# interface tunnel-ip 456RP/0/RSP0/CPU0:router(config-if)# mtu 334
shutdown (GRE)
To shut down any interface, use the shutdown command in interface configuration mode. To start the interface, use the no form of the command.
This is a Generic Routing Encapsulation (GRE) command.
shutdown
noshutdown
This command has no keywords or arguments.
Command Default
None
Command Modes
Interface configuration
Command History
Release
Modification
Release 4.2.0
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Task ID
Task ID
Operation
interface
read, write
Examples
This example shows how to shut down a given interface:
To specify a tunnel interface's destination, use the tunnel
destination command. To remove the destination, use the
no form of this command.
Note
The tunnel will not be operational until the tunnel destination is specified.
tunneldestinationA.B.C.D
no tunneldestinationA.B.C.D
Syntax Description
A.B.C.D
Specifies the IPv4 address of the host destination.
Command Default
None
Command Modes
interface configuration
Command History
Release
Modification
Release 4.2.0
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Task ID
Task ID
Operations
interface
read, write
Examples
The following example shows how to configure interface tunnel:
Configures the Time-To-Live (TTL) for packets entering the tunnel.
tunnel dfbit disable
To configure the DF bit setting in the tunnel transport header, use the
tunnel dfbit disable command. To revert to the default
DF bit setting value, use the no form of this command.
tunneldfbitdisable
notunneldfbitdisable
Syntax Description
This command has no keywords or arguments.
Command Default
None
Command Modes
interface configuration
Command History
Release
Modification
Release 4.2.0
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
The tunnel dfbit disable command specifies the DF bit setting
in the tunnel transport header. The default is to always set the DF bit. Hence, use the
tunnel dfbit disable command to override the
default.
Task ID
Task ID
Operations
interface
read, write
Examples
The following example shows how to configure interface tunnel:
Configures the Time-To-Live (TTL) for packets entering the tunnel.
tunnel mode
To set the encapsulation mode of the tunnel interface, use the tunnel
mode command. To remove the encapsulation mode, use the
no form of this command.
Note
The tunnel will not be operational until the encapsulation mode is specified. Only
one mode can be specified for a tunnel instance at any given time.
tunnelmodegreipv4
notunnelmode
Syntax Description
This command has no keywords or arguments.
Command Default
Disabled
Command Modes
interface configuration
Command History
Release
Modification
Release 4.2.0
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Task ID
Task ID
Operations
interface
read, write
Examples
The following example shows how to configure interface tunnel:
RP/0/RSP0/CPU0:router# configureRP/0/RSP0/CPU0:router(config)# interface tunnel-ip 400RP/0/RSP0/CPU0:router(config-if)#tunnel mode gre ipv4
Configures the Time-To-Live (TTL) for packets entering the tunnel.
tunnel source
To set a tunnel interface's source address, use the tunnel
source command. To remove the source address, use the
no form of this command.
Note
The tunnel will not be operational until the tunnel source is specified.
tunnelsource
{ interface_name | A .B .C .D }
notunnelsource
{ interface_name | A .B .C .D }
Syntax Description
interface_name
Specifies the name of the interface whose IP address will be used as the
source address of the tunnel. The interface name can be of a loopback
interface or a physical interface.
A.B.C.D
Specifies the IPv4 address to use as the source address for packets in the
tunnel.
Command Default
None
Command Modes
interface configuration
Command History
Release
Modification
Release 4.2.0
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Task ID
Task ID
Operations
interface
read, write
Examples
The following example shows how to configure interface tunnel:
Configures the Time-To-Live (TTL) for packets entering the tunnel.
tunnel tos
To specify the value of the TOS field in the tunnel encapsulating packets, use the
tunnel tos command. To return to the default TOS value,
use the no form of this command.
tunneltostos_value
notunneltostos_value
Syntax Description
tos_value
Specifies the value of the TOS field in the tunnel encapsulating packets.
The TOS value ranges between 0 to 255.
Command Default
Copies the TOS/COS bits of the internal IP header to the GRE IP header. In case of
labeled payload, EXP bits are copied to TOS bits of the GRE IP header.
Command Modes
interface configuration
Command History
Release
Modification
Release 4.2.0
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
Task ID
Task ID
Operations
interface
read, write
Examples
The following example shows how to configure interface tunnel:
RP/0/RSP0/CPU0:router# configureRP/0/RSP0/CPU0:router(config)# interface tunnel-ip 400RP/0/RSP0/CPU0:router(config-if)# tunnel tos 100
Configures the Time-To-Live (TTL) for packets entering the tunnel.
tunnel ttl
To configure the Time-To-Live (TTL) for packets entering the tunnel, use the
tunnel ttl command. To undo the configuration,
use the no form of this command.
tunnelttlttl_value
notunnelttlttl_value
Syntax Description
ttl_value
Specifies the value of TTL for packets entering the tunnel. The TTL value
ranges between 1 to 255.
Command Default
The default TTL value is set to 255.
Command Modes
interface configuration
Command History
Release
Modification
Release 4.2.0
This command was introduced.
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.
This command specifies the Time-To-Live for packets entering the tunnel so that the
packets are not dropped inside the carrier network before reaching the tunnel
destination.
Task ID
Task ID
Operations
interface
read, write
Examples
The following example shows how to configure interface tunnel: