H3C Technologies H3C S10500 Series Switches User Manual

Page 40

Advertising
background image

29

# Specify the tunnel protocol as GRE.

[MCE1-Tunnel0] tunnel-protocol gre

# Specify the source address of the tunnel.

[MCE1-Tunnel0] source vlan-interface 100

# Specify the destination address of the tunnel.

[MCE1-Tunnel0] destination 172.16.1.1

[MCE1-Tunnel0] quit

# Create loopback group 1 and specify the service type as tunnel.

[MCE1] service-loopback group 1 type tunnel

# Add any unused port (GigabitEthernet 1/0/3 in this example) to loopback group 1.

[MCE1] interface GigabitEthernet 1/0/3

[MCE1-GigabitEthernet1/0/3] undo stp enable

[MCE1-GigabitEthernet1/0/3] port service-loopback group 1

# Reference the loopback group on the tunnel interface.

[MCE1-GigabitEthernet1/0/3] quit

[MCE1] interface tunnel 0

[MCE1-Tunnel0] service-loopback-group 1

[MCE1-Tunnel0] quit

# Create the Tunnel1 interface.

[MCE1] interface tunnel 1

# Configure an IP address for the Tunnel 1 interface.

[MCE1-Tunnel1] ip address 10.1.2.1 255.255.255.0

# Specify the tunnel protocol as GRE.

[MCE1-Tunnel1] tunnel-protocol gre

# Specify the source address of the tunnel.

[MCE1-Tunnel1] source vlan-interface 101

# Specify the destination address of the tunnel.

[MCE1-Tunnel1] destination 172.16.2.1

# Reference loopback group 1 on the tunnel interface.

[MCE1-Tunnel1] service-loopback-group 1

[MCE1-Tunnel1] quit

Configure MCE2

# Create VLAN 100 and VLAN 101, configure GigabitEthernet 1/0/25 as a trunk port, and add it to the

two VLANs.

<MCE2> system-view

[MCE2] vlan 100 to 101

[MCE2] interface GigabitEthernet 1/0/25

[MCE2-GigabitEthernet1/0/25] port link-type trunk

[MCE2-GigabitEthernet1/0/25] port trunk permit vlan 100 101

[MCE2-GigabitEthernet1/0/25] quit

# Create VLAN interfaces, and configure IP addresses for them.

[MCE2] interfacevlan-interface 100

[MCE2-Vlan-interface100] ip address 172.16.1.1 255.255.255.0

Advertising