VLAN Cross Connect

VLAN cross connect creates a L2 bridge between two given endpoints on the same device. Once configured, every packets arriving at one of the endpoints with specific VLAN tag will be sent to another endpoint 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.

Note

An endpoint could be a physical port number or a logical port load balancer ID. See examples below.

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> <ep1> <ep2>
  • deviceId: device ID, e.g. of:0000000000000201

  • vlanId: VLAN ID, e.g. 94

  • ep1: One end point of the cross connect. Use integer to specify physical port number (e.g. 1). Use LB:<key> to specify port load balancer key (e.g. LB:2)

  • ep2: Another end point of the cross connect. Use integer to specify physical port number (e.g. 3). Use LB:<key> to specify port load balancer key (e.g. LB:4)

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", \
  "endpoints": [ 1, 2 ] \
}' 'http://${ONOS-IP}/onos/segmentrouting/xconnect'
  • deviceId: device ID, e.g. of:0000000000000201

  • vlanId: VLAN ID, e.g. 94

  • endpoints: 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)