L2X Configuration

Configuration Hierarchy

The diagram illustrates the L2X configuration hierarchy.

L2X Configuration Hierarchy

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

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
        }
      ]
    }
  }

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"
        }
      ]
    }
  }

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
        }
      ]
    }
  }