351
Step Command Remarks
9. (Optional.) Configure the
device to discard IPv6
packets with IPv4-compatible
IPv6 addresses
tunnel discard
ipv4-compatible-packet
By default, the device does not
discard such IPv6 packets.
Displaying and maintaining GRE
Execute display commands in any view and reset commands in user view.
Task Command Remarks
Display information about
tunnel interfaces.
display interface
[
tunnel
[ number ] ] [
brief
[
description
|
down
] ]
For more information about the
commands,
see Layer 3—IP
Services Command Reference.
Display IPv6 information
about tunnel interface.
display ipv6 interface
[
tunnel
[ number ] ] [
brief
]
For more information about this
command,
see Layer 3—IP
Services Command Reference.
Clear tunnel interface
statistics.
reset counters interface
[
tunnel
[ number ] ]
For more information about this
command, see Layer 3—IP
Services Command Reference.
GRE configuration examples
Configuring an IPv4 over IPv4 GRE tunnel
Network requirements
As shown in Figure 139, Group 1 and Group 2 are two private IPv4 networks. The two networks both
use private network addresses and belong to the same VPN. Establish a GRE tunnel between
Router A and Router B to interconnect the two private IPv4 networks Group 1 and Group 2.
Figure 139 Network diagram
Configuration procedure
Before performing the following configuration, configure an IP address for each interface, and make
sure Router A and Router B can reach each other.
1. Configure Router A:
# Create a tunnel interface Tunnel 0, and specify the tunnel mode as GRE/IPv4.
<RouterA> system-view
[RouterA] interface tunnel 0 mode gre
# Configure an IP address for the tunnel interface.