source
Function
The source command configures the source address or source interface of the tunnel.
The undo source command deletes the configured source address or source interface.
The source address and source interface of a tunnel are not specified by default.
Parameters
Parameter |
Description |
Value |
---|---|---|
source-ip-address |
Specifies the source address of a tunnel interface. If a tunnel interface works in IPv4 over IPv6 mode, specify an IPv6 address as the source address of the tunnel interface. |
The IPv4 address is in dotted decimal notation. The IPv6 address is a 32-digit hexadecimal number, in the format X:X:X:X:X:X:X:X. |
interface-type interface-number |
Specifies the type and the number of the source interface of the tunnel. The following types of interfaces are often used: VLANIF and loopback. |
- |
Usage Guidelines
Usage Scenario
When configuring a tunnel, you must create a tunnel interface. After a tunnel interface is created, run the source command to specify the source IP address for the tunnel interface.
Prerequisites
A tunnel interface has been created using the interface tunnel command, and the encapsulation mode is set to GRE, IPSec, IPv4 over IPv6, or IPv6 over IPv4 of manual mode using the tunnel-protocol command.
Precautions
Two tunnel interfaces with the same encapsulation mode, source address, and destination address cannot be configured simultaneously.
GRE, IPSec, IPv6 over IPv4, and IPv4 over IPv6 tunnels are bidirectional tunnels. The source address of the local tunnel interface is the destination address of the remote tunnel interface by the destination command, and the destination address of the local tunnel interface is the source address of the remote tunnel interface.
Two or more tunnel interfaces that use the same encapsulation protocol cannot be configured with the same source and destination addresses.
Example
<AC6605> system-view [AC6605] interface loopback 0 [AC6605-LoopBack0] ip address 10.10.10.10 32 [AC6605-LoopBack0] quit [AC6605] interface tunnel 0/0/2 [AC6605-Tunnel0/0/2] tunnel-protocol gre [AC6605-Tunnel0/0/2] source loopback 0
<AC6605> system-view [AC6605] interface tunnel 0/0/1 [AC6605-Tunnel0/0/1] tunnel-protocol ipv6-ipv4 [AC6605-Tunnel0/0/1] source 10.1.1.1