The source command configures the source interface of an L2TPv3 tunnel.
The undo source command deletes the source interface of an L2TPv3 tunnel.
By default, no source interface is configured for an L2TPv3 tunnel.
Parameter | Description | Value |
---|---|---|
ipv6 ipv6-address |
Specifies the source IPv6 address. |
The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
ipv4-address |
Specifies the source IPv4 address. |
The value is in dotted decimal notation. |
interface interface-type interface-number |
Specifies the source interface of an L2TPv3 tunnel. |
The source interface can be a physical interface, a Layer 3 sub-interface, or a loopback interface. |
Usage Scenario
L2TPv3 uses unique source or destination IPv6 addresses to identify tunnels. To configure a source interface for an L2TPv3 tunnel, run the source command. The source interface of an L2TPv3 tunnel uses its configured IPv6/IPv4 address as its source IP address. If the source interface is a loopback address, the source interface can use as its source IP address an IP address that belongs to the same network segment as its configured IPv6/IPv4 address.
A source interface can be a loopback interface or Ethernet interface.Prerequisites
L2TPv3 has been enabled using the l2tpv3 enable command.
An L2TPv3 tunnel has been configured using the l2tpv3 pw command.Precautions
If an L2TPv3 tunnel has been bound to an AC interface, no source interface can be configured for the L2TPv3 tunnel.
The source address of an L2TPv3 PW is either an IPv6 or IPv4 address. An IPv6 address and an IPv4 address cannot be used together for an L2TPv3 PW.<HUAWEI> system-view [~HUAWEI] interface loopback 1 [*HUAWEI-LoopBack1] ip address 3.3.3.3 24 [*HUAWEI-LoopBack1] quit [*HUAWEI] l2tpv3 enable [*HUAWEI] l2tpv3 pw huawei [*HUAWEI-l2tpv3-pw-huawei] source interface LoopBack 1 3.3.3.3
<HUAWEI> system-view [~HUAWEI] interface loopback 1 [*HUAWEI-LoopBack1] ipv6 enable [*HUAWEI-LoopBack1] ipv6 address 2001:db08:1::1 64 [*HUAWEI-LoopBack1] quit [*HUAWEI] l2tpv3 enable [*HUAWEI] l2tpv3 pw huawei [*HUAWEI-l2tpv3-pw-huawei] source interface LoopBack 1 ipv6 2001:db08:1::1