A virtual tunnel interface is a Layer 3 logical interface. The device provides IPSec protection for logical Generic Routing Encapsulation (GRE) or IPSec interfaces. An IPSec tunnel interface is created based on IKE negotiation. You can configure an IPSec tunnel interface and apply an IPSec profile to the tunnel interface to establish an IPSec tunnel. After an IPSec profile is applied to the tunnel interface, only one IPSec tunnel is established through negotiation to protect all the data flows passing through the tunnel interface.
The IP address of an IPSec tunnel interface can be manually configured or dynamically requested through IKEv2 negotiation. Dynamically requesting an IP address of the IPSec tunnel interface through IKEv2 negotiation reduces the configuration and maintenance workload of branch devices when many branches connect to the headquarters.
When multiple branches connect to the headquarters, multiple tunnel interfaces in the headquarters borrow the same physical interface IP address. In this scenario, the headquarters can identify the tunnel interface connected to a branch through the peer IP address or peer ID of the IKE peer (Only IKEv1 in aggressive mode supports the peer ID mode.). If you run the destination command on a tunnel interface of the headquarters to specify the IP address of a branch interface, the headquarters preferentially uses this IP address to identify the access of the branch.
When multiple branches are connected to the headquarters, if some tunnel interfaces at the headquarters borrow an IP address from a physical interface and borrow an IP address from a physical interface as their source address, the mappings between IKE peers and tunnel interfaces may be incorrect. As a result, an IPSec tunnel fails to be established.
The system view is displayed.
The tunnel interface view is displayed.
The encapsulation mode of a tunnel interface is configured.
A private IPv4 address is configured.
The source address or source interface is configured.
You can specify the vpn-instance vpn-instance-name parameter only when the encapsulation mode of a tunnel interface is set to IPSec .
If the source address of a tunnel interface is an IP address dynamically obtained by another interface, you are advised to specify the source interface to prevent the dynamic IP address from affecting IPSec configuration.
The source tunnel interface must be a Layer 3 interface.
The destination address is configured.
When the destination address of an IPSec tunnel interface is not configured, the remote address of the IKE peer referenced by an IPSec profile can be used to initiate negotiation. When the destination address of an IPSec tunnel interface and remote address of an IKE peer are not configured, the local end can only accept the negotiation request initiated by the remote end.
If the encapsulation mode of a tunnel interface is set to IPSec, you can configure the destination address at one end only. If the encapsulation mode of a tunnel interface is set to GRE, you need to configure destination addresses at both ends.
An IPSec profile is applied to the tunnel interface.
By default, no IPSec profile is applied to a tunnel interface.
Only one IPSec profile can be applied to a tunnel interface, and an IPSec profile can be applied to only one tunnel interface.
If a tunnel interface in the root system is bound to a virtual system, the IPSec profile in the root system cannot be applied to this tunnel interface.