127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
Step 3
Configure the tunnel interface.
# Configure Switch A.
[SwitchA]
interface tunnel 1/0/1
[SwitchA-Tunnel1/0/1]
tunnel-protocol gre
[SwitchA-Tunnel1/0/1]
ip address 40.1.1.1 255.255.255.0
[SwitchA-Tunnel1/0/1]
source 20.1.1.1
[SwitchA-Tunnel1/0/1]
destination 30.1.1.2
[SwitchA-Tunnel1/0/1]
quit
# Configure Switch C.
[SwitchC]
interface tunnel 1/0/1
[SwitchC-Tunnel1/0/1]
tunnel-protocol gre
[SwitchC-Tunnel1/0/1]
ip address 40.1.1.2 255.255.255.0
[SwitchC-Tunnel1/0/1]
source 30.1.1.2
[SwitchC-Tunnel1/0/1]
destination 20.1.1.1
[SwitchC-Tunnel1/0/1]
quit
# After the configuration, the status of tunnel interfaces is Up, and the tunnel interfaces can ping
each other.
# Take Switch A for example. The information is displayed as follows:
[SwitchA]
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=24 ms
Reply from 40.1.1.2: bytes=56 Sequence=2 ttl=255 time=33 ms
Reply from 40.1.1.2: bytes=56 Sequence=3 ttl=255 time=48 ms
Reply from 40.1.1.2: bytes=56 Sequence=4 ttl=255 time=33 ms
Reply from 40.1.1.2: bytes=56 Sequence=5 ttl=255 time=36 ms
--- 40.1.1.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 24/34/48 ms
Step 4
Configure static routes.
# Configure Switch A.
[SwitchA]
ip route-static 10.2.1.0 255.255.255.0 tunnel 1/0/1
# Configure Switch C.
[SwitchC]
ip route-static 10.1.1.0 255.255.255.0 tunnel 1/0/1
# Run the
display
ip routing-table
command on Switch A and Switch C. You can see the static
route from the tunnel interface to the use-side network segment of the peer.
# Take Switch A for example. The information is displayed as follows:
[SwitchA]
display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 16 Routes : 16
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.1.0/24 Direct 0 0 D 10.1.1.2 Vlanif30
10.1.1.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.1.1.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.2.1.0/24
Static 60 0 D 40.1.1.1 Tunnel1/0/1
20.1.1.0/24 Direct 0 0 D 20.1.1.1 Vlanif10
20.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
Quidway S7700 Smart Routing Switch
Configuration Guide - VPN
2 GRE Configuration
Issue 01 (2011-07-15)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
77