<S9300-A> system-view
[S9300-A] interface tunnel 1/0/0
[S9300-A-Tunnel1/0/0] ip address 40.1.1.1 255.255.255.0
[S9300-A-Tunnel1/0/0] tunnel-protocol gre
[S9300-A-Tunnel1/0/0] source 20.1.1.1
[S9300-A-Tunnel1/0/0] destination 30.1.1.2
[S9300-A-Tunnel1/0/0] keepalive period 20 retry-times 3
[S9300-A-Tunnel1/0/0] quit
Step 3 Configure a tunnel on S9300-B and enable the Keepalive function.
<S9300-B> system-view
[S9300-B] interface tunnel 1/0/0
[S9300-B-Tunnel1/0/0] ip address 40.1.1.2 255.255.255.0
[S9300-B-Tunnel1/0/0] tunnel-protocol gre
[S9300-B-Tunnel1/0/0] source 30.1.1.2
[S9300-B-Tunnel1/0/0] destination 20.1.1.1
[S9300-B-Tunnel1/0/0] keepalive period 20 retry-times 3
[S9300-B-Tunnel1/0/0] quit
Step 4 Verify the configuration.
# The tunnel interface on S9300-A can successfully ping the tunnel interface on S9300-B.
<S9300-A> ping -a 40.1.1.1 40.1.1.2
PING 40.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 40.1.1.2: bytes=56 Sequence=1 ttl=255 time=9 ms
Reply from 40.1.1.2: bytes=56 Sequence=2 ttl=255 time=7 ms
Reply from 40.1.1.2: bytes=56 Sequence=3 ttl=255 time=7 ms
Reply from 40.1.1.2: bytes=56 Sequence=4 ttl=255 time=7 ms
Reply from 40.1.1.2: bytes=56 Sequence=5 ttl=255 time=7 ms
--- 40.1.1.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 7/7/9 ms
# Enable the debugging of the Keepalive messages on S9300-A and view information about the
Keepalive messages.
<S9300A> debugging tunnel keepalive
*0.21628063 S9300A TUNNEL/7/debug:GRE_KEEP:Judge keepalive finished. Keepalive
packet from peer router.
*0.21628064 S9300A TUNNEL/7/debug:GRE_FWD: Receive peer keepalive on mainboard
successfully. Put into decapsulation.
*0.21628064 S9300A TUNNEL/7/debug:Slot=1;GRE_KEEP:Judge keepalive finished. Ke
epalive packet from peer router.
*0.21628064 S9300A TUNNEL/7/debug:Slot=1;GRE_FWD: IO board received keepalive
packet, resend to mainboard.
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10
#
interface Vlanif10
ip address 20.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface Tunnel1/0/0
Quidway S9300 Terabit Routing Switch
Configuration Guide - VPN 2 GRE Configuration
Issue 03 (2009-08-20) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
2-33