Here's an example of running data plane tests on a physical POD with Spirent STC as the traffic generator:

POD Deployment

Make sure the POD deployment is successful:

1. Jenkins job passed (or verified manually)

2. Compute nodes are able to ping each other

Connecting Spirent STC to POD

Configure netcfg file for Spirent STC devices

1. Spirent boxes (traffic sender/receiver) need to be added to the netcfg file. Edit /opt/cord_profile/fabric-network-cfg.json on the head-node to include the following part into the ports section

 "of:0000cc37abd93769/6": {
       "interfaces": [
           {
               "ips": [ "10.6.1.254/24" ],
               "vlan-untagged" : 1
           }
       ]
   }
   "of:0000cc37abb6b564/6": {
       "interfaces": [
           {
               "ips": [ "10.6.2.254/24" ],
               "vlan-untagged" : 2
           }
       ]
   }

2. This configuration assumes that the traffic sender and receiver are connected to port 6 on device of:0000cc37abd93769 and of:0000cc37abb6b564. We suggest to connect the traffic sender to the compute-node that shares the same leaf switch as the head-node, and connect the traffic receiver to the compute node connected to other leaves.

3. Reload netcfg: run the following command on the head-node

http -a onos:rocks DELETE http://onos-fabric:8181/onos/v1/network/configuration/
http -a onos:rocks POST http://onos-fabric:8181/onos/v1/network/configuration/ < /opt/cord_profile/fabric-network-cfg.json
http -a onos:rocks DELETE http://onos-fabric:8181/onos/v1/applications/org.onosproject.segmentrouting/active
http -a onos:rocks POST http://onos-fabric:8181/onos/v1/applications/org.onosproject.segmentrouting/active

Configure VLAN cross connect

1. Find out the switch id and ports that need to be cross connected: from the head-node, do ssh -p 8101 onos@onos-fabric and run hosts to find the switch id and port number of the traffic generator (might need to send traffic for onos to discover it) and the compute node (that has the vsg vm)

2. Find out the VLAN tags for the cross connect: login to the vsg vm and do sudo docker ps to check the vcpe container name which has the double vlan tags. E.g. if we see vsg-808-802 in the docker list we use 808 as the VLAN tag

3. Update netcfg for onos: from the head-node edit /opt/cord_profile/fabric-network-cfg.json again to include the following part

"apps": {
  "org.onosproject.segmentrouting": {
    "xconnect": {
      "of:0000cc37abd93769": [{
        "vlan": 808,
        "ports": [1, 6],
        "name": "Spirent"
      }]
    }
  }
}

(Replace switch id, vlan and ports)

4. Reload netcfg again: follow the same steps as above


Configure Spirent STC to send traffic

1. Configure outer and inner VLAN tags

2. Destination MAC needs to be the MAC of the interface that traffic comes into the container. E.g. in the following case (ip config on the vcpe container), we choose MAC of eth1 as destination MAC

7: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc htb state UP group default qlen 1000
   link/ether 02:42:0a:07:01:17 brd ff:ff:ff:ff:ff:ff
   inet 10.7.1.23/24 scope global eth0
      valid_lft forever preferred_lft forever
   inet6 fe80::42:aff:fe07:117/64 scope link
      valid_lft forever preferred_lft forever
11: eth1@if10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc htb state UNKNOWN group default
   link/ether 56:f9:ab:85:6c:9d brd ff:ff:ff:ff:ff:ff
   inet 192.168.0.1/24 scope global eth1
      valid_lft forever preferred_lft forever
   inet6 fe80::54f9:abff:fe85:6c9d/64 scope link
      valid_lft forever preferred_lft forever

3. Source IP needs to be 192.168.0.10