The source command fills the source IP address into the IP header.
The undo source command deletes the source address.
source { [ vpn-instance vpn-instance-name ]source-ip-address | interface-type interface-number | source-ipv6-address }
undo source [ source-ip-address | interface-type interface-number | source-ipv6-address ]
| Parameter | Description | Value |
|---|---|---|
vpn-instance vpn-instance-name |
Specifies the name of the VPN instance to which a tunnel's source address belongs. This parameter can be set only when the tunnel is a P2MP GRE tunnel or an IPSec tunnel. |
A string of 1 to 31 case-sensitive characters without any spaces. When double quotation marks are used around the string, spaces are allowed in the string. |
source-ip-address |
Specifies the source address of the tunnel interface in the root system. |
It is in dotted decimal notation. |
interface-type interface-number |
Specifies the type and number of the source tunnel interface. The interface type can an Ethernet interface or loopback interface. |
- |
source-ipv6-address |
Specifies the source address of a tunnel interface. If a tunnel interface works in IPv4-IPv6 mode, specify an IPv6 address as the source address of the tunnel interface. |
A 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
By default, the source address of a tunnel is not specified.
The command can be executed only if the tunnel type of the tunnel interface is specified to be GRE, IPSec, IPv4 over IPv6 or IPv6 over IPv4.
When configuring the GRE, IPv6 over IPv4 tunnels, or IPv4 over IPv6 tunnels, you need to:
Use the source command to configure the source address of the tunnel, that is, the source IP address encapsulated in the packets over the tunnel.
The same source address and destination address cannot be configured on two or more tunnel interfaces using the same encapsulation protocol.
You must set different source addresses for different tunnel interfaces. Otherwise, tunnel establishment failures occur.