Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 1 | VLAN Cross Connect |
| 2 | ================== |
Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 3 | |
Zack Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 4 | VLAN cross connect creates a L2 bridge between two given ports on the same |
| 5 | device. Once configured, every packets arriving at one of the port with |
| 6 | specific VLAN tag will be sent to another port directly. Current |
| 7 | implementation only matches on the outermost VLAN tag. If the packet is double |
| 8 | tagged, the S-tag will be matched and both the S-tag and C-tag will be |
| 9 | persisted. |
| 10 | |
| 11 | VLAN cross connect only works on the same device. If you are looking for |
| 12 | transporting L2 traffic across devices, please refer to :doc:`pseoduwire |
| 13 | <pseudowire>` |
Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 14 | |
| 15 | View cross connect via CLI |
| 16 | -------------------------- |
| 17 | To view a list of cross connects configured in the system through ONOS CLI: |
| 18 | |
| 19 | .. code-block:: text |
| 20 | |
| 21 | sr-xconnect |
| 22 | |
| 23 | Add cross connect via CLI |
| 24 | ------------------------- |
| 25 | |
| 26 | .. code-block:: text |
| 27 | |
| 28 | sr-xconnect-add <deviceId> <vlanId> <port1> <port2> |
| 29 | |
| 30 | - ``deviceId``: device ID, e.g. **of:0000000000000201** |
| 31 | - ``vlanId``: VLAN ID, e.g. **94** |
| 32 | - ``port1``: One end of the cross connect, e.g. **2** |
| 33 | - ``port2``: Another end of the cross connect, e.g. **54** |
| 34 | |
| 35 | Remove cross connect via CLI |
| 36 | ---------------------------- |
| 37 | |
| 38 | .. code-block:: text |
| 39 | |
| 40 | sr-xconnect-remove <deviceId> <vlanId> |
| 41 | |
| 42 | - ``deviceId``: device ID, e.g. **of:0000000000000201** |
| 43 | - ``vlanId``: VLAN ID, e.g. **94** |
| 44 | |
| 45 | View cross connect via REST |
| 46 | --------------------------- |
| 47 | |
| 48 | .. code-block:: console |
| 49 | |
| 50 | $ curl -X GET --header 'Accept: application/json' 'http://${ONOS-IP}:8181/onos/segmentrouting/xconnect' |
| 51 | |
| 52 | Add cross connect via REST |
| 53 | -------------------------- |
| 54 | |
| 55 | .. code-block:: console |
| 56 | |
| 57 | $ curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ \ |
| 58 | "deviceId": "of:0000000000000201", \ |
| 59 | "vlanId": "94", \ |
| 60 | "ports": [ 1, 2 ] \ |
| 61 | }' 'http://${ONOS-IP}/onos/segmentrouting/xconnect' |
| 62 | |
| 63 | - ``deviceId``: device ID, e.g. **of:0000000000000201** |
| 64 | - ``vlanId``: VLAN ID, e.g. **94** |
| 65 | - ``ports``: endpoints of the cross connect, e.g. **[1, 2]** |
| 66 | |
| 67 | Remove cross connect via REST |
| 68 | ----------------------------- |
| 69 | |
| 70 | .. code-block:: console |
| 71 | |
| 72 | $ curl -X DELETE --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ \ |
| 73 | "deviceId": "of:0000000000000201", \ |
| 74 | "vlanId": "94" \ |
| 75 | }' 'http://${ONOS-IP}:8181/onos/segmentrouting/xconnect' |
| 76 | |
| 77 | - ``deviceId``: device ID, e.g. **of:0000000000000201** |
Zack Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 78 | - ``vlanId``: VLAN ID, e.g. **94** |
Charles Chan | c65ac05 | 2020-08-05 11:58:07 -0700 | [diff] [blame^] | 79 | |
| 80 | .. caution:: |
| 81 | For a given port, we should avoid using the same VLAN ID in both xconnect and interface configuration at the same time (regardless of untagged, tagged or native) |