GRE Tunnel Interface Configuration Mode Commands

The Generic Routing Encapsulation (GRE) Tunnel Interface Configuration Mode is used to create and manage the GRE tunneling interfaces for addresses, address resolution options, etc.

Mode

Exec > Global Configuration > Context Configuration > Tunnel Interface Configuration > GRE Tunnel Interface Configuration

configure > context context_name > interface interface_name tunnel > tunnel-mode gre

Entering the above command sequence results in the following prompt:

[context_name]host_name(config-if-tunnel-gre)# 

Important

The commands or keywords/variables that are available are dependent on platform type, product version, and installed license(s).


destination

This command configures the destination IP address of the tunnel by specifying the destination end address. This is a mandatory configuration for a GRE tunnel interface.

Product

All

Privilege

Security Administrator, Administrator

Mode

Exec > Global Configuration > Context Configuration > Tunnel Interface Configuration > GRE Tunnel Interface Configuration

configure > context context_name > interface interface_name tunnel > tunnel-mode gre

Entering the above command sequence results in the following prompt:

[context_name]host_name(config-if-tunnel-gre)# 

Syntax

[ no ] destination address ipv4_address 

no

Removes or disassociates the configured destination IPv4 address from a specific GRE tunnel interface configuration.

address ipv4_address

Configures the IPv4 address for the interface. ipv4_address must be specified using the IPv4 dotted-decimal notation.

Usage Guidelines

Use this command to configure the destination IP address of the tunnel for GRE tunnel interface.


Important

The state of the source address will affect the operational state of the tunnel.


Example

The following command sets 10.2.3.4 as the destination IPv4 address of the GRE tunnel interface:
destination address 10.2.3.4 

end

Exits the current configuration mode and returns to the Exec mode.

Product

All

Privilege

Security Administrator, Administrator

Syntax

end 

Usage Guidelines

Use this command to return to the Exec mode.

exit

Exits the current mode and returns to the parent configuration mode.

Product

All

Privilege

Security Administrator, Administrator

Syntax

exit 

Usage Guidelines

Use this command to return to the parent configuration mode.

keepalive

This command configures various parameters for sending keepalive messages to the remote end-point in GRE tunnel interface configuration. By default sending keepalives is disabled.

Product

All

Privilege

Security Administrator, Administrator

Mode

Exec > Global Configuration > Context Configuration > Tunnel Interface Configuration > GRE Tunnel Interface Configuration

configure > context context_name > interface interface_name tunnel > tunnel-mode gre

Entering the above command sequence results in the following prompt:

[context_name]host_name(config-if-tunnel-gre)# 

Syntax

keepalive [ interval time_interval num-retry retry ] 
{ default | no } keepalive 

default

Sets the sending of keepalive messages with default parameters.

interval : 10 seconds

num-retry : 3 retries

no

Disables keepalive and turns off the sending of keepalive messages.

interval time_interval

Specifies the time interval (in seconds) between two keepalive messages sent to remote ends of GRE tunnel interface configuration.

time_interval is an integer from 5 to 3600.

Default: 10

num-retry retry

Specifies the number of retransmission of keepalive messages to remote node without getting any response before the remote node is marked as dead/down.

retry is an integer from 0 to 10.

Default: 3

Usage Guidelines

Use this command to configure the parameters for sending keepalives to the remote end-point of GRE tunnel. It also configures the interval at which GRE keepalives are sent on the interface and number of retries without getting a response from the remote end-point before the tunnel is shutdown. By default, keepalives will not be sent.

Example

The following command enables keepalive and sets the other parameters to default values:
default keepalive 

source

This command configures the source IP address of the tunnel either by specifying the IP address (host address) or by specifying another configured non-tunnel IP interface. This is a mandatory configuration for GRE tunnel interface.

Product

All

Privilege

Security Administrator, Administrator

Mode

Exec > Global Configuration > Context Configuration > Tunnel Interface Configuration > GRE Tunnel Interface Configuration

configure > context context_name > interface interface_name tunnel > tunnel-mode gre

Entering the above command sequence results in the following prompt:

[context_name]host_name(config-if-tunnel-gre)# 

Syntax

[ no ] source { address ipv4_address | interface interface_name } 

no

Removes or disassociates the configured source IP address or host interface from a specific GRE tunnel interface configuration.

address ipv4_address

Configures the IP address for the interface specifying the IPv4 address.

ipv4_address must be specified using IPv4 dotted-decimal notation.

interface interface_name

Configures the name of the pre-configured non-tunnel IP interface, whose address is used as the source address of the GRE tunnel.

interface_name is an alphanumeric string of 1 through 79 characters.

Usage Guidelines

Use this command to configure the source IP address of the tunnel either by specifying the IP address (host address) or by specifying another configured non-tunnel IP interface for GRE tunnel interface.


Important

State of the source address will affect the operational state of the tunnel.


Example

The following command sets 10.2.3.4 as the source IP address of the GRE tunnel interface:
source address 10.2.3.4 

tos

This command configures the parameters/action for the type of Service (ToS) parameter in the IP tunnel transport protocol header.

Product

All

Privilege

Security Administrator, Administrator

Mode

Exec > Global Configuration > Context Configuration > Tunnel Interface Configuration > GRE Tunnel Interface Configuration

configure > context context_name > interface interface_name tunnel > tunnel-mode gre

Entering the above command sequence results in the following prompt:

[context_name]host_name(config-if-tunnel-gre)# 

Syntax

tos { value [ af11 | af12 | af13 | af21 | af22 | af23 | af31 | af32 | af33 | af41 | af42 | af43 | be | ef | lower-bits tos_value ] | copy } 
default tos 

default

Sets the IP TOS to lower bits value of 0.

value [ tos_value ]

Specifies the IP QoS DSCP per-hop behavior to be marked on the outer header of signaling packets originating from the Access Gateway. This is a standards-based feature (RFC 2597). The following forwarding types are supported:

  • af11 : Assured Forwarding 11 per-hop behavior

  • af12 : Assured Forwarding 12 per-hop behavior

  • af13 : Assured Forwarding 13 per-hop behavior

  • af21 : Assured Forwarding 21 per-hop behavior

  • af22 : Assured Forwarding 22 per-hop behavior

  • af23 : Assured Forwarding 23 per-hop behavior

  • af31 : Assured Forwarding 31 per-hop behavior

  • af32 : Assured Forwarding 32 per-hop behavior

  • af33 : Assured Forwarding 33 per-hop behavior

  • af41 : Assured Forwarding 41 per-hop behavior

  • af42 : Assured Forwarding 42 per-hop behavior

  • af43 : Assured Forwarding 43 per-hop behavior

  • be : Best Effort forwarding per-hop behavior

  • ef : Expedited Forwarding per-hop behavior typically dedicated to low-loss, low-latency traffic.

Default: af11

The assured forwarding behavior groups are listed in the table below.

Class 1 Class 2 Class 3 Class 4

Low Drop

AF11

AF21

AF31

AF41

Medium Drop

AF12

AF22

AF32

AF42

High Drop

AF13

AF23

AF33

AF43

Traffic marked with a higher class is given priority during congestion periods. If congestion occurs to traffic with the same class, the packets with the higher AF value are dropped first.

lower-bits tos_value

Sets the least-significant 6 bits in the ToS byte with the specified numeric value.

tos_value is an integer from 0 to 255.

Default: 0

copy

Instructs the system to copy the ToS value from the passenger IPv4 packet or Traffic class value from the passenger IPv6 packet to the ToS value of the IPv4 tunnel transport protocol header.

Usage Guidelines

Use this command either to set the ToS parameter in the IPv4 tunnel transport protocol header to the specified value or instructs to copy the ToS value from the passenger IPv4 packet or Traffic class value from the passenger IPv6 packet to the ToS value of the IPv4 tunnel transport protocol header. If one of the enumerated values is set, the DSCP bits which are the six most-significant bits in the ToS byte are marked. If the integer value is set, it will be written into the six least-significant bits of the ToS byte.

Example

The following command instructs the system to copy the ToS value from the passenger IPv4 packet or Traffic class value from the passenger IPv6 packet to the ToS value of the IPv4 tunnel transport protocol header:
tos copy 

ttl

This command configures the time to live (TTL) parameter to be used in the tunnel transport protocol header for the current GRE tunnel interface.

Product

All

Privilege

Security Administrator, Administrator

Mode

Exec > Global Configuration > Context Configuration > Tunnel Interface Configuration > GRE Tunnel Interface Configuration

configure > context context_name > interface interface_name tunnel > tunnel-mode gre

Entering the above command sequence results in the following prompt:

[context_name]host_name(config-if-tunnel-gre)# 

Syntax

ttl ttl_value 
default ttl 

default

Sets the TTL value to the system default value.

ttl_value

Specifies the maximum time to live to be used in the tunnel transport protocol header. The time to live (TTL) is not a measure of time but the number of hops through the network.

ttl_value is an integer from 1 to 255.

Default: 15

Usage Guidelines

Use this command to set the TTL parameter to be used in the tunnel transport protocol header for the GRE tunnel configuration.

Example

The following command configures the TTL value to 10 :
ttl 10