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 pseoduwire

View cross connect via CLI

To view a list of cross connects configured in the system through ONOS CLI:

sr-xconnect

Add cross connect via CLI

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

sr-xconnect-remove <deviceId> <vlanId>
  • deviceId: device ID, e.g. of:0000000000000201

  • vlanId: VLAN ID, e.g. 94

View cross connect via REST

$ curl -X GET --header 'Accept: application/json' 'http://${ONOS-IP}:8181/onos/segmentrouting/xconnect'

Add cross connect via REST

$ 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

$ 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

Caution

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)