- Table of Contents
-
- 05-Network Connectivity
- 00-Preface
- 01-ARP commands
- 02-DHCP commands
- 03-DHCPv6 commands
- 04-GRE commands
- 05-IGMP snooping commands
- 06-IP addressing commands
- 07-Basic IP routing commands
- 08-IP performance optimization commands
- 09-IP forwarding basics commands
- 10-L2TP commands
- 11-LLDP commands
- 12-MAC address table commands
- 13-NAT commands
- 14-PPP commands
- 15-MLD snooping commands
- 16-VLAN commands
- 17-VLAN termination commands
- 18-Policy-based routing commands
- 19-Port isolation commands
- 20-Layer 2 forwarding commands
- 21-Loop detection commands
- 22-RIP commands
- 23-RIPng commands
- 24-IPv6 static routing commands
- 25-IPv6 policy-based routing commands
- 26-IPv6 basics commands
- 27-Static routing commands
- 28-Spanning tree commands
- 29-Tunneling commands
- 30-Ethernet link aggregation commands
- 31-DNS commands
- 32-Modem management commands
- 33-3G and 4G modem management commands
- Related Documents
-
Title | Size | Download |
---|---|---|
04-GRE commands | 44.93 KB |
GRE commands
gre checksum
Use gre checksum to enable GRE checksum.
Use undo gre checksum to disable GRE checksum.
Syntax
gre checksum
undo gre checksum
Default
GRE checksum is disabled.
Views
Tunnel interface view
Predefined user roles
network-admin
Usage guidelines
GRE checksum verifies packet integrity.
You can enable or disable GRE checksum at each end of a tunnel as needed. After GRE checksum is enabled, the sender does the following:
· Calculates the checksum for the GRE header and the payload.
· Sends the packet containing the checksum information to the peer.
The receiver calculates the checksum for the received packet and compares it with that carried in the packet. If the checksums are the same, the receiver processes the packet. If the checksums are different, the receiver discards the packet.
If a packet carries a GRE checksum, the receiver checks the checksum whether or not the receiver is enabled with GRE checksum.
Examples
# Enable GRE checksum.
<Sysname> system-view
[Sysname] interface tunnel 2 mode gre
[Sysname-Tunnel2] gre checksum
gre key
Use gre key to configure a key for a GRE tunnel interface.
Use undo gre key to restore the default.
Syntax
gre key key
undo gre key
Default
No key is configured for a GRE tunnel interface.
Views
Tunnel interface view
Predefined user roles
network-admin
Parameters
key: Specifies the key for the GRE tunnel interface, in the range of 0 to 4294967295.
Usage guidelines
Both ends of a GRE tunnel must have the same key or no key.
Examples
# Configure the GRE key as 123 for the GRE tunnel interface Tunnel 2.
<Sysname> system-view
[Sysname] interface tunnel 2 mode gre
[Sysname-Tunnel2] gre key 123
keepalive
Use keepalive to enable GRE keepalive and set the keepalive interval and the keepalive number.
Use undo keepalive to disable GRE keepalive.
Syntax
keepalive [ interval [ times ] ]
undo keepalive
Default
GRE keepalive is disabled.
Views
Tunnel interface view
Predefined user roles
network-admin
Parameters
interval: Specifies the keepalive interval, in the range of 1 to 32767 seconds. The default value is 10.
times: Specifies the keepalive number, in the range of 1 to 255. The default value is 3.
Usage guidelines
This command enables the tunnel interface to send keepalive packets at the specified interval. If the device receives no response from the peer within the timeout time, it shuts down the local tunnel interface. The device brings the local tunnel interface up if it receives a keepalive acknowledgment packet from the peer. The timeout time is the result of multiplying the keepalive interval by the keepalive number.
The device always acknowledges the keepalive packets it receives whether or not GRE keepalive is enabled.
GRE/IPv6 mode tunnel interfaces do not support this command.
Examples
# Enable GRE keepalive, set the keepalive interval to 20 seconds, and set the keepalive number to 5.
<Sysname> system-view
[Sysname] interface tunnel 2 mode gre
[Sysname-Tunnel2] keepalive 20 5