blob: 6486d96277e1a4a12de9112b8e784d619aff7210 [file] [log] [blame]
Charles Chan9e5c6172019-09-07 11:24:54 -07001VLAN Cross Connect
2==================
3VLAN cross connect creates a L2 bridge between two given ports on the same device.
4Once configured, every packets arriving at one of the port with specific VLAN tag will be sent to another port directly.
5Current 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.
6
7VLAN cross connect only works on the same device.
8If you are looking for transporting L2 traffic across devices, please refer to :doc:`pseoduwire <pseudowire>`
9
10View cross connect via CLI
11--------------------------
12To view a list of cross connects configured in the system through ONOS CLI:
13
14.. code-block:: text
15
16 sr-xconnect
17
18Add cross connect via CLI
19-------------------------
20
21.. code-block:: text
22
23 sr-xconnect-add <deviceId> <vlanId> <port1> <port2>
24
25- ``deviceId``: device ID, e.g. **of:0000000000000201**
26- ``vlanId``: VLAN ID, e.g. **94**
27- ``port1``: One end of the cross connect, e.g. **2**
28- ``port2``: Another end of the cross connect, e.g. **54**
29
30Remove cross connect via CLI
31----------------------------
32
33.. code-block:: text
34
35 sr-xconnect-remove <deviceId> <vlanId>
36
37- ``deviceId``: device ID, e.g. **of:0000000000000201**
38- ``vlanId``: VLAN ID, e.g. **94**
39
40View cross connect via REST
41---------------------------
42
43.. code-block:: console
44
45 $ curl -X GET --header 'Accept: application/json' 'http://${ONOS-IP}:8181/onos/segmentrouting/xconnect'
46
47Add cross connect via REST
48--------------------------
49
50.. code-block:: console
51
52 $ curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ \
53 "deviceId": "of:0000000000000201", \
54 "vlanId": "94", \
55 "ports": [ 1, 2 ] \
56 }' 'http://${ONOS-IP}/onos/segmentrouting/xconnect'
57
58- ``deviceId``: device ID, e.g. **of:0000000000000201**
59- ``vlanId``: VLAN ID, e.g. **94**
60- ``ports``: endpoints of the cross connect, e.g. **[1, 2]**
61
62Remove cross connect via REST
63-----------------------------
64
65.. code-block:: console
66
67 $ curl -X DELETE --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ \
68 "deviceId": "of:0000000000000201", \
69 "vlanId": "94" \
70 }' 'http://${ONOS-IP}:8181/onos/segmentrouting/xconnect'
71
72- ``deviceId``: device ID, e.g. **of:0000000000000201**
73- ``vlanId``: VLAN ID, e.g. **94**