Introduction

ONOS-1.12 RC3 introduces a lot of changes for Multicast. Firstly, the old Multicast Routing subsystem has been moved out from ONOS core and now it is an independent application. The new subsystem already supports dual-homed sinks and multiple-sources through its APIs (CLI/REST). However, Multicast features implemented in Segment Routing application, shipped with ONOS-1.12 RC3, support only H-AGG topology and dual-homed sinks


As consequence of this, ONOS_APPS needs to be modified:

ONOS_APPS
export ONOS_APPS=drivers,openflow,segmentrouting,fpm,dhcprelay,netcfghostprovider,routeradvertisement,mcast
 

As regards H-AGG support, this is entirely managed by the Segment Routing application and users won't notice changes in the APIs. While the dual-homing support comes with major changes in the Multicast Routing subsystem. Sink is now identified by an ONOS HostId (MAC/VLAN) and has associated a number of ConnectPoint while in the past we identified the Sink just using the ConnectPoint. Multicast subsystem listen for Host events and according to them modify properly the ConnectPoint associated to the HostId. In particular, it leverages the Host Location which is a collection of ONOS Connectpoint where the Host is attached. This information is maintained updated by ONOS thanks to several discovery mechanisms implemented in the Host subsystem. Following image try to summarize the workflow of the Multicast Routing subsystem after the aforementioned changes:

CLI commands

Hereafter a quick walkthrough of the new CLI implemented in the Multicast Routing subsystem.

Creating a route and adding sinks

In order to add a new Multicast route, we have to use mcast-host-join command and we need to provide following information: i) source address; ii) group address; iii) source connect points; iv) sinks. An example is reported in the following boxr:

Creating a route and adding sinks
mcast-host-join -sAddr * -gAddr 224.0.0.1 -srcs of:0000000000000204/6 -srcs of:0000000000000204/7 -sinks 00:AA:00:00:00:03/None -sinks 00:CC:00:00:00:01/None

As regards -sAddr we can provide * for ASM or an IPAddress for SSM. At the time being we do not enforce the matching of the -sAddr on the data-plane; -gAddr specifies Multicast group address; -srcs identifies the source connect points (in this release we don’t support multiple sources); finally -sinks specifies the sinks of the group, we changed from ConnectPoint to HostId in this release.

Removing a sink

A sink can be removed through mcast-host-delete command, the major difference is that the sinks to be removed is provided through -h option. If -h is not provided the command will issue a route removal

Removing a sink
mcast-host-delete -sAddr * -gAddr 224.0.0.1 -h 00:AA:00:00:00:03/None

Modifying a source

In this release, we have also a command to modify the sources of a Multicast group. In particular mcast-source-delete allows to modify the source connect points of a source. If -src is not provided, the command will issue a route removal

 

Modifying a source
mcast-source-delete -sAddr * -gAddr 224.0.0.1 -src of:0000000000000204/6

Removing a route

The removal of a route can be achieved in several ways: i) removing all sources; ii) not providing -h to the mcast-host-delete command; iii) not providing -src option to the mcast-source-delete command.

Removing the sources
mcast-source-delete -sAddr * -gAddr 224.0.0.1 -src of:0000000000000204/6 -src of:0000000000000204/7
Removing a route through mcast-host-delete
mcast-host-delete -sAddr * -gAddr 224.0.0.1
Removing a source through mcast-source-delete
mcast-source-delete -sAddr * -gAddr 224.0.0.1

REST APIs

You can find the REST API documentation at http://<ONOS-IP>:8181/onos/v1/docs
Please click the dropdown list and select Multicast API.

We configure and implement Multicast routes through the dedicated rest api. Some of the APIs are outlined here, you can find complete list in the ONOS docs page. The referenced files in these examples can be found in $ONOS_ROOT/apps/mcast/web/resources/jsonExamples

GET Operations

 

Get all routes
$ curl --user onos:rocks -X GET -H 'Accept: application/json' 'http://<controller-ip>:8181/onos/mcast/mcast'

 

 

Get a specific route
$ curl --user onos:rocks -X GET -H 'Accept: application/json' 'http://<controller-ip>:8181/onos/mcast/mcast/{group_ip}/{source_ip}/'
 

 

 

Get all source connect point for a route
$ curl --user onos:rocks -X GET -H 'Accept: application/json' 'http://<controller-ip>:8181/onos/mcast/mcast/sources/{group_ip}/{source_ip}/'
 

 

 

Get all sink connect points for a route
$ curl --user onos:rocks -X GET -H 'Accept: application/json' 'http://<controller-ip>:8181/onos/mcast/mcast/sinks/{group_ip}/{source_ip}/'

 

 

Get all connect points for a given host Id in a given route
$ curl --user onos:rocks -X GET -H 'Accept: application/json' 'http://<controller-ip>:8181/onos/mcast/mcast'

POST operations

 

Single route post
curl --user onos:rocks -X POST -H 'Content-Type:application/json' http://<controller-ip>:8181/onos/mcast/mcast -d@mcastRoute.json

 

 

Bulk routes post
$ curl --user onos:rocks -X POST -H 'Content-Type:application/json' http://<controller-ip>:8181/onos/mcast/mcast/bulk -d@mcastRoutes.json
 

 

 

Add a specific set of source connect points to a given route
$ curl --user onos:rocks -X POST -H 'Accept: application/json' 'http://<controller-ip>:8181/onos/mcast/mcast/sources/{group_ip}/{source_ip}/' -d@mcastSources.json

 

 

Add a specific set of host Ids as sinks to a given route
$ curl --user onos:rocks -X POST -H 'Accept: application/json' 'http://<controller-ip>:8181/onos/mcast/mcast/sinks/{group_ip}/{source_ip}/' -d@mcastSinks.json

 

 

Add a specific set of connect points from a host sink from a given route
$ curl --user onos:rocks -X POST -H 'Accept: application/json' 'http://<controller-ip>:8181/onos/mcast/mcast/{group_ip}/{source_ip}/{hostId}' -d@mcastSinksHostId.json

DELETE operations

 

Remove all routes
$ curl --user onos:rocks -X DELETE -H 'Accept: application/json' 'http://<controller-ip>:8181/onos/mcast/mcast

 

 

Bulk route removal
$ curl --user onos:rocks -X DELETE -H 'Content-Type:application/json' http://<controller-ip>:8181/onos/mcast/mcast/bulk -d@mcastRoutes.json

 

 

Remove a specific route given group and ip
$ curl --user onos:rocks -X DELETE -H 'Accept: application/json' 'http://<controller-ip>:8181/onos/mcast/mcast/{group_ip}/{source_ip}' 

 

 

Remove a specific source from a given route
$ curl --user onos:rocks -X DELETE -H 'Accept: application/json' 'http://<controller-ip>:8181/onos/mcast/mcast/sources/{group_ip}/{source_ip}/{source_cp}' 

 

 

Remove a specific sink from a given route
$ curl --user onos:rocks -X DELETE -H 'Accept: application/json' 'http://<controller-ip>:8181/onos/mcast/mcast/sinks/{group_ip}/{source_ip}/{host_id}' 

 

 

Remove a specific set of connect points from a host sink from a given route
$ curl --user onos:rocks -X DELETE -H 'Accept: application/json' 'http://<controller-ip>:8181/onos/mcast/mcast/{group_ip}/{source_ip}/{source_cp}' -d@mcastSinksHostId.json

 

JSON Example

Below we find the configuration json for a single Mcast Route

 

mcastRoute.json
{
 "group": "224.0.1.1",
 "source": "*",
 "sources": [
 	"of:0000000000000204/6",
 	"of:0000000000000204/7"
 ],
 "sinks": [
 	"00:CC:00:00:00:01/None",
 	"00:AA:00:00:00:03/None"
 ]
}

 

Fields:

  • group : IP address of the Multicast Group
  • source : IP address of the Multicast source. If specified (e.g. 10.0.1.1) we will treat this route as SSM (Single Source Multicast), if instead * is used the route will be ASM (Any Source Multicast)
  • sources : Array containing the connect points to which the source is connected to. 
  • sinks : Array containing a set of Hosts that we want as sinks of the multicast stream. ONOS will automatically handle the connect points of these hosts if they are single or dual homed.

 

 

 

 

 

 

Attachments: