The connection command creates a BGP VPWS connection.
The undo connection command deletes a BGP VPWS connection.
By default, no BGP VPWS connection is created.
connection [ ce-offset ce-offset-id ] interface { interface-type interface-number | interface-name } [ tunnel-policy tunnel-policy-name ] [ raw | tagged ] [ secondary ]
connection instance-name instance-name-value [ ce-offset ce-offset-id ] interface { interface-type interface-number | interface-name } [ tunnel-policy tunnel-policy-name ] [ raw | tagged ]
undo connection ce-offset ce-offset-id
undo connection instance-name instance-name-value ce-offset ce-offset-id interface { interface-type interface-number | interface-name } [ tunnel-policy tunnel-policy-name ] [ raw | tagged ]
Parameter | Description | Value |
---|---|---|
ce-offset ce-offset-id |
Specifies a remote CE ID for an MPLS L2VPN instance. If ce-offset ce-offset-id is not specified:
|
The value is an integer ranging from 0 to 65534. ce-offset-id must be smaller than or equal to ce-range specified in the ce command.
|
interface interface-type interface-number |
Specifies an AC interface for an MPLS L2VPN instance. The encapsulation type of this interface must be the same as that of the MPLS L2VPN instance. Otherwise, the PW cannot go Up. |
- |
tunnel-policy tunnel-policy-name |
Specifies a tunnel policy for a VC. |
The value is a string of 1 to 39 case-sensitive characters, spaces not supported. The string can contain spaces if it is enclosed in double quotation marks ("). |
raw |
Indicates that user packets do not carry VLAN tags when being transmitted over a PW. This parameter applies only to Ethernet links. |
- |
tagged |
Indicates that user packets carry VLAN tags when being transmitted over a PW. This parameter applies only to Ethernet links. |
- |
secondary |
Configures a VPWS connection as a secondary one. If this keyword is not configured, the created VPWS connection will be a primary one. A secondary VPWS connection can be created only when the primary VPWS connection already exists. |
- |
instance-name instance-name-value |
Specify the L2VPN instance name. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. |
Usage Scenario
BGP VPWS uses two layers of labels. The inner label uses BGP signaling to transmit Layer 2 information and VC labels. To configure a BGP VPWS connection, run the connection command.
Prerequisites
The MPLS-L2VPN-CE view has been displayed using the ce command.
Precautions
If CE IDs are numbered consecutively, in ascending order starting from 1, and BGP VPWS connections use CE IDs in the order in which CE IDs are numbered, most connections can use the default CE offset. This helps simplify configurations.If both a local connection and a remote connection are created on an interface, the local connection takes precedence over the remote connection.
<HUAWEI> system-view [~HUAWEI] mpls l2vpn [*HUAWEI-l2vpn] quit [*HUAWEI] mpls l2vpn vpn1 encapsulation ethernet [*HUAWEI-mpls-l2vpn-vpn1] route-distinguisher 100:1 [*HUAWEI-mpls-l2vpn-vpn1] vpn-target 1:1 [*HUAWEI-mpls-l2vpn-vpn1] ce ce1 id 1 range 10 [*HUAWEI-mpls-l2vpn-vpn1-ce1] connection ce-offset 2 interface GigabitEthernet 0/1/0