Configuring a VXLAN tunnel
This task provides basic VXLAN tunnel configuration. For more information about tunnel configuration and commands, see Layer 3—IP Services Configuration Guide and Layer 3—IP Services Command Reference.
Use the local-first load sharing on an aggregate interface in the following situations:
The aggregate interface is a Layer 3 aggregate interface and is the outgoing interface of a VXLAN tunnel.
The aggregate interface is a Layer 2 aggregate interface and is in the VLAN of which the VLAN interface is the outgoing interface of a VXLAN tunnel.
If the VXLAN packets of two VXLAN tunnels are sent to different next hops in the transport network, make sure the VXLAN tunnels use different physical outgoing interfaces.
To configure a VXLAN tunnel:
Step | Command | Remarks | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
1. Enter system view. | system-view | N/A | ||||||||
2. Create a VXLAN tunnel interface and enter tunnel interface view. | interface tunnel tunnel-number mode vxlan | By default, no tunnel interfaces exist. The endpoints of a tunnel must use the same tunnel mode. | ||||||||
3. Specify a source IP address or source interface for the tunnel. | source { ipv4-address | interface-type interface-number } |
By default, no source IP address or source interface is specified for a tunnel. This step specifies the source IP address in the outer IP header of tunneled VXLAN packets. If an interface is specified, its primary IP address is used. For a multicast-mode VXLAN, the source IP address cannot be a loopback interface's address, and the source interface cannot be a loopback interface. | ||||||||
4. Specify a destination IP address for the tunnel. | destination ipv4-address | By default, no destination IP address is specified for a tunnel. Specify the remote VTEP's IP address. This IP address will be the destination IP address in the outer IP header of tunneled VXLAN packets. As a best practice, do not configure multiple VXLAN tunnels to use the same source and destination IP addresses. | ||||||||
5. (Optional.) Enable BFD on the tunnel. | tunnel bfd enable destination-mac mac-address | By default, BFD is disabled on a tunnel. For BFD sessions to come up, you must reserve a VXLAN by using the reserved vxlan command. Do not use BFD together with uRPF. When uRPF is enabled, BFD sessions cannot come up. For more information about uRPF, see Security Configuration Guide. | ||||||||
6. (Optional.) Return to system view. | quit | N/A | ||||||||
7. (Optional.) Specify the reserved VXLAN. | reserved vxlan vxlan-id | By default, no VXLAN has been reserved. You can specify only one reserved VXLAN on the VTEP. The reserved VXLAN cannot be the VXLAN created on any VSI. |