This section provides an example for configuring an L2TPv3 connection in local switching mode to carry services. An L2TPv3 connection in local switching mode can be configured for two CEs connecting to the same PE to exchange packets. The PE, which only transparently transmits service packets, allows service packets to use L2TPv3 encapsulation type.
An L2TPv3 connection in local switching mode supports the following service access modes: whole-interface mode, C-tag termination mode, S-tag termination mode, and S-tag+C-tag termination mode. The L2TPv3 tunnel configurations for different service access modes are similar. The following configuration example uses the C-tag termination mode.
Device | Interface | IP Address |
---|---|---|
CE1 | GE0/1/1 | - |
PE1 | GE0/1/1.4 | - |
GE0/1/2.4 | - | |
CE2 | GE0/1/1 | - |
The configuration roadmap is as follows:
Enable L2TPv3 on PE1.
Configure the inbound and outbound interfaces for the L2TPv3 connection on PE1.
To complete the configuration, you need the following data:
Types and numbers of L2TPv3 interfaces
Inbound and outbound interfaces for the L2TPv3 connection
<HUAWEI> system-view [~HUAWEI] sysname PE1 [*HUAWEI] commit [~PE1] l2tpv3 enable [*PE1] commit
# Configure PE1 to allow services to access the L2TPv3 connection in C-tag termination mode.
[~PE1] interface gigabitethernet0/1/1.4 mode 12 [*PE1-Gigabitethernet0/1/1.4] encapsulation dot1q vid 2 [*PE1-Gigabitethernet0/1/1.4] rewrite pop single [*PE1-Gigabitethernet0/1/1.4] commit [*PE1-Gigabitethernet0/1/1.4] quit [*PE1] interface gigabitethernet0/1/9.4 mode 12 [*PE1-Gigabitethernet0/1/9.4] encapsulation dot1q vid 2 [*PE1-Gigabitethernet0/1/9.4] rewrite pop single [*PE1-Gigabitethernet0/1/9.4] commit [*PE1-Gigabitethernet0/1/1.4] quit [*PE1] l2tpv3 local connection dot1q interface GigabitEthernet0/1/1.4 out-interface GigabitEthernet0/1/9.4
<HUAWEI> system-view [~HUAWEI] sysname CE1 [*HUAWEI] commit [~CE1] interface gigabitethernet 0/1/1 [~CE1-GigabitEthernet0/1/1] portswitch [*CE1-GigabitEthernet0/1/1] undo shutdown [*CE1-GigabitEthernet0/1/1] port link-type trunk [*CE1-GigabitEthernet0/1/1] port trunk allow-pass vlan 2 [*CE1-GigabitEthernet0/1/1] quit [*CE1] commit
[~CE2] interface gigabitethernet 0/1/1 [~CE2-GigabitEthernet0/1/1] portswitch [*CE2-GigabitEthernet0/1/1] undo shutdown [*CE2-GigabitEthernet0/1/1] port link-type trunk [*CE2-GigabitEthernet0/1/1] port trunk allow-pass vlan 2 [*CE2-GigabitEthernet0/1/1] quit [*CE2] commit
CE1 configuration file
#
sysname CE1
#
vlan 2
#
interface GigabitEthernet0/1/1
portswitch
undo shutdown
port link-type trunk
port trunk allow-pass vlan 2
#
return
PE1 configuration file
# sysname PE1 # l2tpv3 enable l2tpv3 local connection dot1q interface GigabitEthernet0/1/1.4 out-interface GigabitEthernet0/1/9.4 # interface GigabitEthernet0/1/1.4 mode l2 encapsulation dot1q vid 2 # interface GigabitEthernet0/1/9.4 mode l2 encapsulation dot1q vid 2 #
CE2 configuration file
#
sysname CE2
#
vlan 2
#
interface GigabitEthernet0/1/1
portswitch
undo shutdown
port link-type trunk
port trunk allow-pass vlan 2
#
return