beautypg.com

H3C Technologies H3C S10500 Series Switches User Manual

Page 200

background image

189

[SwitchA-Tunnel1] tunnel-protocol gre

# Configure the source address of interface Tunnel 1 to be the IP address of the VLAN interface of

interface GigabitEthernet 1/0/2.

[SwitchA-Tunnel1] source vlan-interface 101

# Configure the destination address for interface Tunnel 1 (IP address of the VLAN interface to which
GigabitEthernet 1/0/2 of Switch B belongs).

[SwitchA-Tunnel1] destination 2.2.2.2

# Apply service loopback group 1 to the tunnel in tunnel interface view.

[SwitchA-Tunnel1] service-loopback-group 1

[SwitchA-Tunnel1] quit

# Configure a static route from Switch A through interface Tunnel 1 to Group 2.

[SwitchA] ip route-static 10.1.3.0 255.255.255.0 tunnel 1

2.

Configure Switch B

# Configure an IPv4 address for interface GigabitEthernet 1/0/1.

system-view

[SwitchB] vlan 100

[SwitchB-vlan100] port GigabitEthernet 1/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 1/0/2, 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] ip address 2.2.2.2 255.255.255.0

[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 1.

[SwitchB] interface tunnel 1

# Configure an IPv4 address for interface Tunnel 1.

[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 the source address for interface Tunnel 1 (IP address of the VLAN interface to which
GigabitEthernet 1/0/2 belongs).