H3C Technologies H3C S10500 Series Switches User Manual
Page 204

193
[SwitchB] interface vlan-interface 100
[SwitchB-Vlan-interface100] ip address 10.1.3.1 255.255.255.0
[SwitchB-Vlan-interface100] quit
# Configure interface VLAN-interface 101, the physical interface of the tunnel.
[SwitchB] vlan 101
[SwitchB-vlan101] port GigabitEthernet 1/0/2
[SwitchB-vlan101] quit
[SwitchB] interface vlan-interface 101
[SwitchB-Vlan-interface101] ipv6 address 2001::2:1 64
[SwitchB-Vlan-interface101] quit
# Create service loopback group 1, and configure the service type as tunnel.
[SwitchB] service-loopback group 1 type tunnel
# Add port GigabitEthernet 1/0/3 to service loopback group 1, and disable STP and LLDP on the port.
[SwitchB] interface GigabitEthernet 1/0/3
[SwitchB-GigabitEthernet1/0/3] undo stp enable
[SwitchB-GigabitEthernet1/0/3] undo lldp enable
[SwitchB-GigabitEthernet1/0/3] port service-loopback group 1
[SwitchB-GigabitEthernet1/0/3] quit
# Create a tunnel interface Tunnel 0.
[SwitchB] interface tunnel 0
# Configure an IPv4 address for interface Tunnel 0.
[SwitchB-Tunnel0] ip address 10.1.2.2 255.255.255.0
# Configure the tunnel encapsulation mode as GRE over IPv6.
[SwitchB-Tunnel0] tunnel-protocol gre ipv6
# Configure the source address of interface Tunnel 0 to be the IP address of interface VLAN-interface
101.
[SwitchB-Tunnel0] source 2001::2:1
# Configure the destination address of interface Tunnel 0 to be the IP address of interface VLAN-interface
101 on Switch A.
[SwitchB-Tunnel0] destination 2002::1:1
# Apply service loopback group 1 to the tunnel in tunnel interface view.
[SwitchB-Tunnel0] service-loopback-group 1
[SwitchB-Tunnel0] quit
# Configure a static route from Switch B through interface Tunnel 0 to Group 1.
[SwitchB] ip route-static 10.1.1.0 255.255.255.0 tunnel 0
3.
Verify the configuration
# After the configuration, view the tunnel interface status on Switch A and Switch B respectively.
[SwitchA] display interface Tunnel 0
Tunnel0 current state: UP
Line protocol current state: UP
Description: Tunnel0 Interface
The Maximum Transmit Unit is 1456
Internet Address is 10.1.2.1/24 Primary
Encapsulation is TUNNEL, service-loopback-group ID is 1.