1. Introduction
Layer 2 Cross-Connect (L2X) is a data plane feature that connects two physical ports (IFPs)) using Layer 2 switching. At the simplest, L2X can switch all the traffic between two IFPs to provide the trunk service of an Ethernet switch.
1.1. Port and VLAN Cross-connects
Both types of L2X switches Layer 2 traffic from input interface to output interface. The difference is that a port cross-connect switches all Layer 2 traffic arriving at an input interface, but a VLAN cross-connect only switches the Layer 2 traffic associated with a specific VLAN. A port-based L2X means a port-only configuration, so there are no VLANs involved.
Both single-tag and double-tagged (inner and outer VLAN tags) are supported. The port and VLAN L2X support both local and remote L2X configurations. In remote L2X connections, the VLAN cross-connects are typically configured on the MPLS tunnel ingress router.
Untagged traffic on L2X interfaces is also supported. However, there is no way to select only untagged traffic for cross-connecting. Therefore, only port crossconnects are supported for untagged traffic.
2. VLAN Editing Examples
These examples cover the various possibilities for VLAN value editing in local L2X.
2.1. Ingress Interface Action
Traffic will be matched at ingress direction based on the match criterion. RtBrick Full Stack (RBFS) supports below match parameters.
All the modes mentioned below can be configured with/without VLAN operation. RBFS supports the below mentioned VLAN action options. VLAN action is valid only in egress direction. |
-
Single-Vlan-Add
-
Single-Vlan-Delete
-
Swap-Outer-Vlan
2.1.1. Port and Any VLAN
You can run the following commands in this mode:
set incoming-interface <incoming-interface> outgoing-interface <outgoing-interface>
set incoming-interface <incoming-interface> outgoing-interface <outgoing-interface> vlan-operation <vlan-action> <vlan>
set incoming-interface <incoming-interface> next-hop <nexthop> lookup-instance <lookup_instance> <lookup_afi> <lookup_safi> service-label <service_label> vlan-operation
set incoming-interface <incoming-interface> next-hop <nexthop> lookup-instance <lookup_instance> <lookup_afi> <lookup_safi> service-label <service_label> vlan-operation <vlan-action> <vlan>
Command Arguments
Command Argument | Description |
---|---|
<incoming-interface> |
Incoming interface is where the traffic originates |
<outgoing-interface> |
Outgoing interface traffic is going to |
<vlan-action> |
Indicates the VLAN action such as Single-Vlan-Add, Single-Vlan-Delete, or Swap-Outer-Vlan |
<vlan> |
VLAN ID value (2 to 4095) |
<nexthop> |
Next-Hop address |
<lookup_instance> |
Instance name |
<lookup_afi> |
AFI value: ipv4 or ipv6 |
<lookup_safi> |
SAFI value: safi values are unicast, labeled-unicast |
<service_label> |
Service label value |
Configuration Example
rtb confd set static l2x name test1 direction ingress incoming-interface ifp-0/0/4 outgoing-interface ifp-0/0/8 rtb confd set static l2x name test2 direction ingress incoming-interface ifp-0/0/4 outgoing-interface ifp-0/0/8 vlan-operation Single-Vlan-Add 100 rtb confd set static l2x name test3 direction ingress incoming-interface ifp-0/0/4 next-hop 10.1.1.2 lookup-instance default ipv4 labeled-unicast service-label 1000 rtb confd set static l2x name test4 direction ingress incoming-interface ifp-0/0/4 next-hop 10.1.1.2 lookup-instance default ipv4 labeled-unicast service-label 2000 vlan-operation Single-Vlan-Delete
2.1.2. Port and Untagged VLAN
You can run the following commands in this mode:
set incoming-interface <incoming-interface> match-untagged outgoing-interface <outgoing-interface>
set incoming-interface <incoming-interface> match-untagged outgoing-interface <outgoing-interface> vlan-operation <vlan-action> <vlan>
set incoming-interface <incoming-interface> match-untagged next-hop <nexthop> lookup-instance <lookup_instance> <lookup_afi> <lookup_safi> service-label <service_label> vlan-operation
set incoming-interface <incoming-interface> match-untagged next-hop <nexthop> lookup-instance <lookup_instance> <lookup_afi> <lookup_safi> service-label <service_label> vlan-operation <vlan-action> <vlan>
Command Arguments
See the Command Arguments section.
Configuration Example
rtb confd set static l2x name test1 direction ingress incoming-interface ifp-0/0/4 match-untagged outgoing-interface ifp-0/0/8 rtb confd set static l2x name test2 direction ingress incoming-interface ifp-0/0/4 match-untagged outgoing-interface ifp-0/0/8 rtb confd set static l2x name test3 direction ingress incoming-interface ifp-0/0/4 match-untagged next-hop 10.1.1.2 lookup-instance default ipv4 labeled-unicast service-label 1000 rtb confd set static l2x name test4 direction ingress incoming-interface ifp-0/0/4 match-untagged next-hop 10.1.1.2 lookup-instance default ipv4 labeled-unicast service-label 2000
2.1.3. Port and Outer VLAN
You can run the following commands in this mode:
set incoming-interface <incoming-interface> outer-vlan <vlan-id> outgoing-interface <outgoing-interface>
set incoming-interface <incoming-interface> outer-vlan <vlan-id> outgoing-interface <outgoing-interface> vlan-operation <vlan-action> <vlan>
set incoming-interface <incoming-interface> outer-vlan <vlan-id> next-hop <nexthop> lookup-instance <lookup_instance> <lookup_afi> <lookup_safi> service-label <service_label>
set incoming-interface <incoming-interface> outer-vlan <vlan-id> next-hop <nexthop> lookup-instance <lookup_instance> <lookup_afi> <lookup_safi> service-label <service_label> vlan-operation <vlan-action> <vlan>
Command Arguments
See the Command Arguments section.
Configuration Example
rtb confd set static l2x name test1 direction ingress incoming-interface ifp-0/0/4 outer-vlan 100 outgoing-interface ifp-0/0/8 rtb confd set static l2x name test2 direction ingress incoming-interface ifp-0/0/4 outer-vlan 200 outgoing-interface ifp-0/0/8 rtb confd set static l2x name test3 direction ingress incoming-interface ifp-0/0/4 outer-vlan 300 next-hop 10.1.1.2 lookup-instance default ipv4 labeled-unicast service-label 1000 rtb confd set static l2x name test4 direction ingress incoming-interface ifp-0/0/4 outer-vlan 400 next-hop 10.1.1.2 lookup-instance default ipv4 labeled-unicast service-label 2000
2.1.4. Port and Dual (Inner and Outer) VLAN Tags
You can run the following commands in this mode:
set incoming-interface <incoming-interface> outer-vlan <vlan-id> inner-vlan <inner-vlan-id> outgoing-interface <outgoing-interface>
set incoming-interface <incoming-interface> outer-vlan <vlan-id> inner-vlan <inner-vlan-id> outgoing-interface <outgoing-interface> vlan-operation <vlan-action> <vlan>
set incoming-interface <incoming-interface> outer-vlan <vlan-id> inner-vlan <inner-vlan-id> next-hop <nexthop> lookup-instance <lookup_instance> <lookup_afi> <lookup_safi> service-label <service_label>
set incoming-interface <incoming-interface> outer-vlan <vlan-id> inner-vlan <inner-vlan-id> next-hop <nexthop> lookup-instance <lookup_instance> <lookup_afi> <lookup_safi> service-label <service_label> vlan-operation <vlan-action> <vlan>
Command Arguments
See the Command Arguments section.
Configuration Example
rtb confd set static l2x name test1 direction ingress incoming-interface ifp-0/0/4 outer-vlan 100 inner-vlan 500 outgoing-interface ifp-0/0/8 rtb confd set static l2x name test2 direction ingress incoming-interface ifp-0/0/4 outer-vlan 200 inner-vlan 600 outgoing-interface ifp-0/0/8 rtb confd set static l2x name test3 direction ingress incoming-interface ifp-0/0/4 outer-vlan 300 inner-vlan 700 next-hop 10.1.1.2 lookup-instance default ipv4 labeled-unicast service-label 1000 rtb confd set static l2x name test4 direction ingress incoming-interface ifp-0/0/4 outer-vlan 400 inner-vlan 800 next-hop 10.1.1.2 lookup-instance default ipv4 labeled-unicast service-label 2000
2.1.5. Port + Outer VLAN + Inner VLAN Any
You can run the following commands in this mode:
set incoming-interface <incoming-interface> outer-vlan <vlan-id> match-inner-any outgoing-interface <outgoing-interface>
set incoming-interface <incoming-interface> outer-vlan <vlan-id> match-inner-any outgoing-interface <outgoing-interface> vlan-operation <vlan-action> <vlan>
set incoming-interface <incoming-interface> outer-vlan <vlan-id> match-inner-any next-hop <nexthop> lookup-instance <lookup_instance> <lookup_afi> <lookup_safi> service-label <service_label>
set incoming-interface <incoming-interface> outer-vlan <vlan-id> match-inner-any next-hop <nexthop> lookup-instance <lookup_instance> <lookup_afi> <lookup_safi> service-label <service_label> vlan-operation <vlan-action> <vlan>
Command Arguments
See the Command Arguments section.
Configuration Example
rtb confd set static l2x name test1 direction ingress incoming-interface ifp-0/0/4 outer-vlan 100 match-inner-any outgoing-interface ifp-0/0/8 rtb confd set static l2x name test2 direction ingress incoming-interface ifp-0/0/4 outer-vlan 200 match-inner-any outgoing-interface ifp-0/0/8 rtb confd set static l2x name test3 direction ingress incoming-interface ifp-0/0/4 outer-vlan 300 match-inner-any next-hop 10.1.1.2 lookup-instance default ipv4 labeled-unicast service-label 1000 rtb confd set static l2x name test4 direction ingress incoming-interface ifp-0/0/4 outer-vlan 400 match-inner-any next-hop 10.1.1.2 lookup-instance default ipv4 labeled-unicast service-label 2000
2.2. Egress Interface Action
In the Egress direction, incoming-interface is not required, and RBFS supports the below commands.
set service-label <service_label> outgoing-interface <outgoing-interface>
set service-label <service_label> outgoing-interface <outgoing-interface> vlan-operation <vlan-action> <vlan>
Command Arguments
See the Command Arguments section.
Configuration Example
rtb confd set static l2x name test1 direction egress service-label 1000 outgoing-interface ifp-0/0/8 rtb confd set static l2x name test1 direction egress service-label 1000 outgoing-interface ifp-0/0/8 vlan-operation Single-Vlan-Add 100
2.3. Deleting L2x Configuration
To delete the L2X configuration, enter the following command:
Syntax
delete l2x <l2x-name> direction <direction>
Command Arguments
Command Argument | Description |
---|---|
<l2x-name> |
Name of the Layer 2 Cross-Connect |
<direction> |
Indicates the direction of the traffic, that is egress or ingress |
Example
rtb confd delete static test1 direction ingress
©Copyright 2020 RtBrick, Inc. All rights reserved. The information contained herein is subject to change without notice. The trademarks, logos and service marks ("Marks") displayed in this documentation are the property of RtBrick in the United States and other countries. Use of the Marks are subject to RtBrickās Term of Use Policy, available at https://www.rtbrick.com/privacy. Use of marks belonging to other parties is for informational purposes only.