blob: 6486d96277e1a4a12de9112b8e784d619aff7210 [file] [log] [blame]
VLAN Cross Connect
==================
VLAN cross connect creates a L2 bridge between two given ports on the same device.
Once configured, every packets arriving at one of the port with specific VLAN tag will be sent to another port directly.
Current implementation only matches on the outermost VLAN tag. If the packet is double tagged, the S-tag will be matched and both the S-tag and C-tag will be persisted.
VLAN cross connect only works on the same device.
If you are looking for transporting L2 traffic across devices, please refer to :doc:`pseoduwire <pseudowire>`
View cross connect via CLI
--------------------------
To view a list of cross connects configured in the system through ONOS CLI:
.. code-block:: text
sr-xconnect
Add cross connect via CLI
-------------------------
.. code-block:: text
sr-xconnect-add <deviceId> <vlanId> <port1> <port2>
- ``deviceId``: device ID, e.g. **of:0000000000000201**
- ``vlanId``: VLAN ID, e.g. **94**
- ``port1``: One end of the cross connect, e.g. **2**
- ``port2``: Another end of the cross connect, e.g. **54**
Remove cross connect via CLI
----------------------------
.. code-block:: text
sr-xconnect-remove <deviceId> <vlanId>
- ``deviceId``: device ID, e.g. **of:0000000000000201**
- ``vlanId``: VLAN ID, e.g. **94**
View cross connect via REST
---------------------------
.. code-block:: console
$ curl -X GET --header 'Accept: application/json' 'http://${ONOS-IP}:8181/onos/segmentrouting/xconnect'
Add cross connect via REST
--------------------------
.. code-block:: console
$ curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ \
"deviceId": "of:0000000000000201", \
"vlanId": "94", \
"ports": [ 1, 2 ] \
}' 'http://${ONOS-IP}/onos/segmentrouting/xconnect'
- ``deviceId``: device ID, e.g. **of:0000000000000201**
- ``vlanId``: VLAN ID, e.g. **94**
- ``ports``: endpoints of the cross connect, e.g. **[1, 2]**
Remove cross connect via REST
-----------------------------
.. code-block:: console
$ curl -X DELETE --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ \
"deviceId": "of:0000000000000201", \
"vlanId": "94" \
}' 'http://${ONOS-IP}:8181/onos/segmentrouting/xconnect'
- ``deviceId``: device ID, e.g. **of:0000000000000201**
- ``vlanId``: VLAN ID, e.g. **94**