Gre over ipv4 tunnel configuration example 2, Network requirements, Configuration procedure – H3C Technologies H3C S12500 Series Switches User Manual
Page 244

230
[SwitchB-vlan100] port GigabitEthernet 3/0/1
[SwitchB-vlan100] quit
[SwitchB] interface vlan-interface 100
[SwitchB-Vlan-interface100] ip address 10.1.3.1 255.255.255.0
[SwitchB-Vlan-interface100] quit
# Configure an IPv4 address for interface GigabitEthernet 3/0/2, the physical interface of the
tunnel.
[SwitchB] vlan 101
[SwitchB-vlan101] port GigabitEthernet 3/0/2
[SwitchB-vlan101] quit
[SwitchB] interface vlan-interface 101
[SwitchB-Vlan-interface101] ip address 2.2.2.2 255.255.255.0
[SwitchB-Vlan-interface101] quit
# Create a tunnel interface Tunnel1.
[SwitchB] interface tunnel 1
# Configure an IPv4 address for the tunnel interface.
[SwitchB-Tunnel1] ip address 10.1.2.2 255.255.255.0
# Configure the tunnel encapsulation mode as GRE over IPv4.
[SwitchB-Tunnel1] tunnel-protocol gre
# Configure a source address for the tunnel interface (IP address of the VLAN interface to which
GigabitEthernet 3/0/2 belongs).
[SwitchB-Tunnel1] source vlan-interface 101
# Configure a destination address for the tunnel interface (IP address of the VLAN interface to
which GigabitEthernet 3/0/2 of Switch A belongs).
[SwitchB-Tunnel1] destination 1.1.1.1
[SwitchB-Tunnel1] quit
# Configure a static route from Switch B through the tunnel interface Tunnel1 to Group 1.
[SwitchB] ip route-static 10.1.1.0 255.255.255.0 Tunnel 1
GRE over IPv4 tunnel configuration example 2
Network requirements
Switch A and Switch B are interconnected through the Internet. Two private IPv6 subnets Group 1 and
Group 2 are interconnected through a GRE tunnel between the two switches.
Figure 101 Network diagram
Configuration procedure
Before the configuration, make sure Switch A and Switch B can reach each other.
1.
Configure Switch A: