Creating a tunnel interface
Enter system view.
system-view
Create a tunnel interface, specify the tunnel mode, and enter tunnel interface view.
interface tunnel number mode { gre | ipv4-ipv4 | ipv6-ipv4 | mpls-te | vxlan | vxlan-dci }
For packet tunneling to succeed, the two ends of a tunnel must use the same tunnel mode.
Configure a source address or source interface for the tunnel interface.
source { ipv4-address | interface-type interface-number }
By default, no source address or source interface is configured for the tunnel interface.
If you specify a source address, it is used as the source address of tunneled packets.
If you specify a source interface, the primary IP address of this interface is used as the source IP address of tunneled packets.
Configure a destination address for the tunnel interface.
destination ipv4-address
By default, no destination address is configured for the tunnel interface.
The tunnel destination address must be the IP address of the receiving interface on the tunnel peer. It is used as the destination IP address of tunneled packets.
(Optional.) Configure a description for the interface.
description text
By default, the description for a tunnel interface is Tunnel number Interface.
(Optional.) Set the MTU of the tunnel interface.
mtu size
The default settings are as follows:
If the tunnel interface has never been up, the MTU is 64000 bytes.
If the tunnel interface is up, its MTU is identical to the outgoing interface's MTU minus the length of the tunnel headers. The outgoing interface is automatically obtained through routing table lookup based on the tunnel destination address.
(Optional.) Set the expected bandwidth for the tunnel interface.
bandwidth bandwidth-value
The default expected bandwidth (in kbps) is the interface maximum rate divided by 1000.
The expected bandwidth is an informational parameter used only by higher-layer protocols for calculation. You cannot adjust the actual bandwidth of an interface by using this command.
Bring up the tunnel interface.
undo shutdown
By default, a tunnel interface is down.