- Table of Contents
-
- 05-Network Connectivity Command Reference
- 00-Preface
- 01-MAC address table commands
- 02-Ethernet link aggregation commands
- 03-VLAN commands
- 04-Loop detection commands
- 05-Spanning tree commands
- 06-LLDP commands
- 07-Layer 2 forwarding commands
- 08-VLAN termination commands
- 09-PPP commands
- 10-L2TP commands
- 11-ARP commands
- 12-IP addressing commands
- 13-DHCP commands
- 14-DHCPv6 commands
- 15-DNS commands
- 16-NAT commands
- 17-IP performance optimization commands
- 18-IPv6 basics commands
- 19-GRE commands
- 20-Tunneling commands
- 21-Basic IP routing commands
- 22-IP forwarding basics commands
- 23-Static routing commands
- 24-IPv6 static routing commands
- 25-Policy-based routing commands
- 26-IPv6 policy-based routing commands
- 27-RIP commands
- 28-RIPng commands
- 29-IGMP snooping commands
- 30-MLD snooping commands
- Related Documents
-
Title | Size | Download |
---|---|---|
19-GRE commands | 69.94 KB |
Contents
display gre p2mp tunnel-table statistics
gre p2mp-template (system view)
GRE commands
display gre p2mp tunnel-table statistics
Use display gre p2mp tunnel-table statistics to display packet statistics of static tunnel entries for a GRE P2MP tunnel interface.
Syntax
display gre p2mp tunnel-table statistics interface tunnel number [ branch-network-address branch-network-address { mask | mask-length } ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface tunnel number: Specifies an existing GRE P2MP tunnel interface by its interface number.
branch-network-address branch-network-address: Specifies an IPv4 branch network address. If you do not specify this option, the command displays packets statistics of static tunnel entries for all IPv4 branch networks of the specified scope.
mask: Specifies the mask of the branch network address, in dotted decimal notation.
mask-length: Specifies the mask length of the branch network address, in the range of 0 to 32.
Usage guidelines
If you do not specify any parameters, this command displays packet statistics of all static tunnel entries on the public network for the specified GRE P2MP tunnel interface.
Examples
# Display packet statistics of all static tunnel entries on the public network for GRE P2MP tunnel interface Tunnel 1.
<Sysname> display gre p2mp tunnel-table statistics interface tunnel 1
VPN-instance name: - Map entries: 2
Branch network address : 192.168.11.1/32
Tunnel destination address: 11.1.1.1
Checksum value : 192.168.20.1
Input:
0 packets, 0 bytes, 0 drops
Output:
0 packets, 0 bytes, 0 drops
Branch network address : 192.168.12.1/32
Tunnel destination address: 11.1.1.1
Checksum value : 192.168.20.2
Input:
0 packets, 0 bytes, 0 drops
Output:
0 packets, 0 bytes, 0 drops
Table 1 Command output
Field |
Description |
VPN-instance name |
This field is not supported in the current software version. VPN instance of the branch networks. If the branch networks belong to the public network, this field displays a hyphen (-). |
Map entries |
Total number of GRE P2MP tunnel mapping entries. |
Branch network address |
IPv4 address and mask of a branch network. |
Tunnel destination address |
A destination address of the tunnel. |
Checksum value |
Value to fill in the checksum field. The system does not display the Checksum value field if no value is specified to fill in the checksum field. |
Input: 0 packets, 0 bytes, 0 drops |
Incoming traffic statistics: · Number of incoming packets. · Number of incoming bytes. · Number of dropped packets. |
Output: 0 packets, 0 bytes, 0 drops |
Outgoing traffic statistics: · Number of outgoing packets. · Number of outgoing bytes. · Number of dropped packets. |
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
gre p2mp-template (system view)
Use gre p2mp-template to create a GRE P2MP tunnel template and enter its view, or enter the view of an existing GRE P2MP tunnel template.
Use undo gre p2mp-template to delete a GRE P2MP tunnel template.
Syntax
gre p2mp-template template-name
undo gre p2mp-template template-name
Default
No GRE P2MP tunnel templates exist.
Views
System view
Predefined user roles
network-admin
Parameters
template-name: Specifies a name for the GRE P2MP tunnel template, a case-sensitive string of 1 to 31 characters.
Examples
# Create a GRE P2MP tunnel template named aa and enter its view.
<Sysname> system-view
[Sysname] gre p2mp-template aa
[Sysname-p2mp-template-aa]
Related commands
map
gre p2mp-template (tunnel interface view)
Use gre p2mp-template to apply a GRE P2MP tunnel template to a GRE P2MP tunnel interface.
Use undo gre p2mp-template to restore the default.
Syntax
gre p2mp-template template-name
undo gre p2mp-template
Default
No GRE P2MP tunnel template is applied to a GRE P2MP tunnel interface.
Views
Tunnel interface view
Predefined user roles
network-admin
Parameters
template-name: Specifies a GRE P2MP tunnel template by its name, a case-sensitive string of 1 to 31 characters.
Usage guidelines
A GRE P2MP tunnel interface can use only one GRE P2MP tunnel template. If you execute this command multiple times, the most recent configuration takes effect.
Examples
# Apply GRE P2MP tunnel template aa to GRE P2MP tunnel interface Tunnel 1.
<Sysname> system-view
[Sysname] interface tunnel 1 mode gre-p2mp
[Sysname-Tunnel1] gre p2mp-template aa
Related commands
gre p2mp-template (system view)
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 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
map
Use map to configure a tunnel mapping entry in a GRE P2MP tunnel template.
Use undo map to delete a tunnel mapping entry from a GRE P2MP tunnel template.
Syntax
map branch-network-address branch-network-address { mask | mask-length } tunnel-destination tunnel-dest-address [ checksum-fill checksum-value ]
undo map branch-network-address branch-network-address { mask | mask-length } [ tunnel-destination tunnel-dest-address ]
Default
No tunnel mapping entries are configured in a GRE P2MP tunnel template.
Views
GRE P2MP tunnel template view
Predefined user roles
network-admin
Parameters
branch-network-address branch-network-address: Specifies an IPv4 branch network address.
mask: Specifies the mask of the branch network IPv4 address, in dotted decimal notation.
mask-length: Specifies the mask length of the branch network IPv4 address, in the range of 0 to 32.
tunnel-destination tunnel-dest-address: Specifies the tunnel destination IPv4 address.
checksum-fill checksum-value: Specifies an IPv4 address to fill in the checksum field of the GRE header. The IPv4 address is in dotted decimal notation. If you do not specify this option, the device does not fill in the checksum field of the GRE header.
Usage guidelines
The tunnel mapping entries in the tunnel template are static tunnel entries.
You can repeat this command to configure multiple tunnel mapping entries for a GRE P2MP tunnel template. Each entry defines a mapping between a branch network address and a tunnel destination address. One branch network address can be mapped to only one tunnel destination address.
If a branch network contains VMs that have multiple users, fill the IPv4 address of the destination VM to the checksum field for correct forwarding of a GRE packet. Specify the checksum-fill checksum-value option depending on your network. Incorrect usage of the option will cause GRE checksum failures.
Examples
# In GRE P2MP tunnel template aa, configure a tunnel mapping entry. The branch network address is 192.168.0.11 and the mask length is 32, the tunnel destination address is 10.108.113.71, and the IPv4 address to fill in the checksum field is 192.168.20.1.
<Sysname> system-view
[Sysname] gre p2mp-template aa
[Sysname-p2mp-template-aa] map branch-network-address 192.168.0.11 32 tunnel-destination 10.108.113.71 checksum-fill 192.168.20.1
Related commands
gre p2mp-template (system view)
reset gre p2mp tunnel-table statistics
Use reset gre p2mp tunnel-table statistics to clear packet statistics of static tunnel entries for a GRE P2MP tunnel interface.
Syntax
reset gre p2mp tunnel-table statistics interface tunnel number [ branch-network-address branch-network-address { mask | mask-length } ]
Views
User view
Predefined user roles
network-admin
Parameters
interface tunnel number: Specifies an existing GRE P2MP tunnel interface by its interface number.
branch-network-address branch-network-address: Specifies a branch network IPv4 address. If you do not specify this option, the command clears packet statistics of static tunnel entries for all IPv4 branch networks of the specified scope.
mask: Specifies the mask of the branch network address, in dotted decimal notation.
mask-length: Specifies the mask length of the branch network address, in the range of 0 to 32.
Usage guidelines
If you do not specify any parameters, this command clears packet statistics of all static tunnel entries on the public network for the specified GRE P2MP tunnel interface.
Examples
# Clear packet statistics of all static tunnel entries on the public network for GRE P2MP tunnel interface Tunnel 1.
<Sysname> reset gre p2mp tunnel-table statistics interface tunnel 1
Related commands
display gre p2mp tunnel-table statistics