blob: 5bc5fc4ceee3f760f0c90579c3cfdb9ffe39dfaf [file] [log] [blame]
Charles Chan9e5c6172019-09-07 11:24:54 -07001VLAN Cross Connect
2==================
Charles Chan9e5c6172019-09-07 11:24:54 -07003
Zack Williamsd63d35b2020-06-23 14:12:46 -07004VLAN cross connect creates a L2 bridge between two given ports on the same
5device. Once configured, every packets arriving at one of the port with
6specific VLAN tag will be sent to another port directly. Current
7implementation only matches on the outermost VLAN tag. If the packet is double
8tagged, the S-tag will be matched and both the S-tag and C-tag will be
9persisted.
10
11VLAN cross connect only works on the same device. If you are looking for
12transporting L2 traffic across devices, please refer to :doc:`pseoduwire
13<pseudowire>`
Charles Chan9e5c6172019-09-07 11:24:54 -070014
15View cross connect via CLI
16--------------------------
17To view a list of cross connects configured in the system through ONOS CLI:
18
19.. code-block:: text
20
21 sr-xconnect
22
23Add 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
35Remove 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
45View 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
52Add 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
67Remove 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 Williamsd63d35b2020-06-23 14:12:46 -070078- ``vlanId``: VLAN ID, e.g. **94**
Charles Chanc65ac052020-08-05 11:58:07 -070079
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)