L2X Configuration
Configuration Syntax and Commands
The following sections describe the L2X configuration syntax and commands.
Local L2X Configuration
The following sections describe the Local L2X unidirectional and bidirectional configurations.
Local L2X Ingress Configuration
This configuration enables local unidirectional L2X (Local Cross-Connect) on the same device.
Syntax:
set l2x name <l2x-name> ingress <attribute> <value>
Attribute | Description |
---|---|
<l2x-name> |
Name of L2X |
description <description> |
(Optional) L2X description |
egress-vlan-encapsulation <encapsulation> |
(Optional) Egress VLAN encapsulation value. NOTE: This option can be configured only after ‘swap-outer-vlan’ configuration. |
egress-vlan-operation <vlan-action> |
(Optional) Outgoing VLAN operation |
incoming-inner-vlan <vlan-id> |
(Optional) Incoming inner VLAN |
incoming-interface <incoming-interface> |
(Mandatory) Incoming physical interface name |
incoming-outer-vlan <vlan-id> |
(Optional) Incoming outer VLAN |
ingress-outer-vlan <vlan-id> |
(Optional) Outer VLAN at ingress side |
ingress-vlan-encapsulation <encapsulation> |
(Optional) Ingress VLAN encapsulation value. NOTE: This option can be configured only after ‘swap-outer-vlan’ configuration. |
ingress-vlan-operation <vlan-action> |
(Optional) VLAN operation on ingress side outer VLAN |
match-type <match-type> |
(Mandatory) L2X match type |
match-tp-id 802.1ad |
The option enables L2X to recognize and handle packets tagged with 0x88a8 TPID, allowing interoperability with 802.1ad encapsulated traffic. |
outgoing-interface <outgoing-interface> |
(Mandatory) Outgoing physical interface name |
outgoing-outer-vlan <vlan-id> |
(Optional) Outgoing outer VLAN |
Example 1: Local L2X Ingress Configuration with Port Match
{
"rtbrick-config:l2x": {
"name": [
{
"name": "test1",
"direction": "ingress",
"incoming-interface": "ifp-0/1/64",
"outgoing-interface": "ifp-0/1/66",
"match-type": "match-any"
}
]
}
}
Example 2: Local L2X Ingress Configuration with VLAN Match
{
"rtbrick-config:l2x": {
"name": [
{
"name": "test4",
"direction": "ingress",
"incoming-interface": "ifp-0/1/12",
"incoming-outer-vlan": 200,
"outgoing-interface": "ifp-0/1/13",
"match-type": "match-outer"
}
]
}
}
Example 3: Local L2X Ingress VLAN Operations
{
"rtbrick-config:l2x": {
"name": [
{
"name": "test4",
"direction": "ingress",
"incoming-interface": "ifp-0/1/12",
"incoming-outer-vlan": 200,
"outgoing-interface": "ifp-0/1/13",
"match-type": "match-outer",
"ingress-vlan-operation": "single-vlan-add",
"ingress-outer-vlan": 400
}
]
}
}
Example 4: Local L2X Configuration with 0x88a8 TPID tagged packets.
"rtbrick-config:l2x": {
"name": [
{
"name": "local_1",
"direction": "ingress",
"incoming-interface": "ifp-0/0/3",
"incoming-outer-vlan": 100,
"outgoing-interface": "ifp-0/0/22",
"egress-vlan-operation": "swap-outer-vlan",
"outgoing-outer-vlan": 100,
"egress-vlan-encapsulation": "802.1ad",
"match-type": "match-outer",
"ingress-vlan-operation": "single-vlan-delete",
"match-tp-id": "802.1ad"
}
]
},
Local L2X Bidirectional Configuration
This configuration enables redirecting traffic incoming (ingress) on a particular interface to another interface and vice versa on the same hardware device.
Syntax:
set l2x name <l2x-name> bi-directional <attribute> <value>
Attribute | Description |
---|---|
match-type <match-type> |
(Mandatory) Match types with which traffic can be matched. |
incoming-interface <incoming-interface> |
(Mandatory) Incoming interface is where the traffic originates from. |
outgoing-interface <outgoing-interface> |
(Mandatory) Outgoing interface where the traffic is going to. |
description <description> |
(Optional) L2X description |
egress-vlan-encapsulation <encapsulation> |
(Optional) Egress VLAN encapsulation |
incoming-inner-vlan <vlan-id> |
(Optional) Incoming inner VLAN |
incoming-outer-vlan <vlan-id> |
(Optional) Incoming outer VLAN |
ingress-outer-vlan <vlan-id> |
(Optional) Outer VLAN at ingress side |
ingress-vlan-encapsulation <encapsulation> |
(Optional) Ingress VLAN encapsulation |
outgoing-outer-vlan <vlan-id> |
(Optional) Outgoing outer VLAN |
Example 1: Local L2X Bidirectional Configuration
{
"rtbrick-config:l2x": {
"name": [
{
"name": "test2",
"direction": "bi-directional",
"incoming-interface": "ifp-0/1/64",
"outgoing-interface": "ifp-0/1/66",
"match-type": "match-untagged"
}
]
}
}
Local L2X VLAN Operation Configuration
This configuration enables VLAN operations for both ingress and egress traffic on a particular interface to another interface and vice versa on the same hardware device.
Syntax:
set l2x name <l2x-name> ingress [egress-vlan-operation | ingress-vlan-operation] <attribute> <value>
Attribute | Description |
---|---|
<l2x-name> |
Name of the l2x. |
double-vlan-add |
Adds two VLAN tags (QinQ tagging) to the packet. |
double-vlan-delete |
Removes two VLAN tags from the packet. |
single-vlan-add |
Adds a single VLAN tag to the packet. |
single-vlan-delete |
Removes a single VLAN tag from the packet. |
swap-outer-vlan |
Replaces the outer VLAN tag with a new one. |
Remote L2X Configuration
The following sections describe the remote L2X configurations.
Remote L2X Ingress Configuration
This configuration enables the remote L2X ingress side.
Syntax:
set l2x name <l2x-name> ingress <attribute> <value>
Attribute | Description |
---|---|
match-type <match-type> |
(Mandatory) Match types with which traffic can be matched. |
incoming-interface <incoming-interface> |
(Mandatory) Incoming interface is where the traffic originates from. |
ingress-vlan-operation <ingress-vlan-action> |
(Optional) VLAN operation on ingress side outer VLAN |
ingress-outer-vlan <vlan-id> |
(Optional) Outer VLAN at ingress side |
ingress-vlan-encapsulation <encapsulation> |
(Optional) Ingress VLAN encapsulation value |
nexthop4/nexthop6 <nexthop> |
(Mandatory) Next-Hop address |
lookup-instance <lookup-instance> |
(Optional) Instance name |
lookup-afi <lookup-afi> |
(Optional) AFI value: ipv4 or ipv6 |
lookup-safi <lookup-safi> |
(Optional) SAFI value: safi values are unicast, labeled-unicast |
service-label <service_label> |
(Mandatory) Service label value. NOTE: Supported MPLS label values are 0 - 1048575. The reserved MPLS label range is 0 - 15. In RBFS, BGP uses the label range 20000 - 100000. It is recommended to assign label values outside of these reserved ranges to avoid conflicts. |
Example 1: Remote L2X Ingress Configuration with Port Match
{
"rtbrick-config:l2x": {
"name": [
{
"name": "test8",
"direction": "ingress",
"incoming-interface": "ifp-0/1/64",
"nexthop4": "198.51.100.44",
"lookup-instance": "default",
"lookup-afi": "ipv4",
"lookup-safi": "labeled-unicast",
"service-label": 10000,
"match-type": "match-any"
}
]
}
}
Example 2: Remote L2X Ingress Configuration with VLAN match
{
"rtbrick-config:l2x": {
"name": [
{
"name": "test4",
"direction": "ingress",
"incoming-interface": "ifp-0/1/12",
"incoming-outer-vlan": 100,
"incoming-inner-vlan": 200,
"nexthop4": "198.51.100.44",
"lookup-instance": "default",
"lookup-afi": "ipv4",
"lookup-safi": "labeled-unicast",
"service-label": 8000,
"match-type": "match-outer-inner"
}
]
}
}
Example 3: Remote L2X Ingress VLAN operations
{
"rtbrick-config:l2x": {
"name": [
{
"name": "test4",
"direction": "ingress",
"incoming-interface": "ifp-0/1/12",
"incoming-outer-vlan": 100,
"incoming-inner-vlan": 200,
"nexthop4": "198.51.100.44",
"lookup-instance": "default",
"lookup-afi": "ipv4",
"lookup-safi": "labeled-unicast",
"service-label": 10000,
"match-type": "match-outer-inner",
"ingress-vlan-operation": "Single-Vlan-Delete"
}
Remote L2X Egress Configuration
This configuration enables the remote L2X egress side.
Syntax:
set l2x name <l2x-name> egress <attribute> <value>
Attribute | Description |
---|---|
service-label <service_label> |
(Mandatory) Service label value. NOTE: Supported MPLS label values are 0 - 1048575. The reserved MPLS label range is 0 - 15. In RBFS, BGP uses the label range between 20000 - 100000. It is recommended to assign a label value outside of these reserved ranges to avoid conflicts. |
outgoing-interface <outgoing-interface> |
(Mandatory) Interface where traffic is going to. |
egress-vlan-operation <vlan-action> |
(Optional) Outgoing VLAN operation |
outgoing-outer-vlan <vlan-id> |
(Optional) Outgoing outer VLAN |
Example 1: Local L2X Egress Configuration
{
"rtbrick-config:l2x": {
"name": [
{
"name": "test4",
"direction": "egress",
"service-label": 10000,
"outgoing-interface": "ifp-0/1/66"
}
]
}
}
Example 2: Local L2X Egress Configuration with VLAN Operation
{
"rtbrick-config:l2x": {
"name": [
{
"name": "test4",
"direction": "egress",
"service-label": 10000,
"outgoing-interface": "ifp-0/1/12",
"egress-vlan-operation": "single-vlan-add",
"outgoing-outer-vlan": 400
}
]
}
}