Verification – H3C Technologies H3C SecPath F1000-E User Manual
Page 31
15
[DeviceB-Tunnel0] tunnel-protocol gre
# Configure the source and destination IP addresses of interface Tunnel 0.
[DeviceB-Tunnel0] source 11.1.1.2
[DeviceB-Tunnel0] destination 11.1.1.1
# Set the GRE key of Tunnel 0 to 1.
[DeviceB-Tunnel0] gre key 1
[DeviceB-Tunnel0] quit
# Configure a static route to the headquarters network with the outgoing interface being Tunnel 0.
[DeviceB] ip route-static 172.17.17.0 255.255.255.0 tunnel 0
Step3
Configure Device C
# Create interface Tunnel 0 and configure an IP address for it.
[DeviceC] interface tunnel 0
[DeviceC-Tunnel0] ip address 192.168.22.3 255.255.255.0
# Configure the tunnel encapsulation mode of interface Tunnel 0 as GRE over IPv4.
[DeviceC-Tunnel0] tunnel-protocol gre
# Configure the source and destination IP addresses of interface Tunnel 0.
[DeviceC-Tunnel0] source 11.1.1.3
[DeviceC-Tunnel0] destination 11.1.1.1
# Set the GRE key of Tunnel 0 to 2.
[DeviceC-Tunnel0] gre key 2
[DeviceC-Tunnel0] quit
# Configure a static route to the headquarters network with the outgoing interface being Tunnel 0.
[DeviceC] ip route-static 172.17.17.0 255.255.255.0 tunnel 0
Verification
# On Host B, specify Device C as the default gateway. Ping Host A from Host B. The ping operation
succeeds. View tunnel entries on Device A:
[DeviceA] display gre p2mp tunnel-table interface tunnel 0
Dest Addr Mask Tunnel Dest Addr Gre Key
192.168.1.0 255.255.255.0 11.1.1.3 2
# On Host B, specify Device B as the default gateway.Ping Host A from Host B. The ping operation
succeeds. View tunnel entries on Device A:
[DeviceA] display gre p2mp tunnel-table interface tunnel 0
Dest Addr Mask Tunnel Dest Addr Gre Key
192.168.1.0 255.255.255.0 11.1.1.3 2
192.168.1.0 255.255.255.0 11.1.1.2 1
The above output information indicates that on Device A there are two tunnel entries to the branch
network and Device A prefers the tunnel entry with a smaller GRE key value. In other words, packets are
forwarded to hosts on the branch network through Device B first.
# On Device B, shutdown interface Tunnel 0 to cut off the tunnel link between Device A and Device B.
[DeviceB] interface tunnel 0
[DeviceB-Tunnel0] shutdown