Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ONOS vRouter application

Configuration

There are two three parts to the configuration of the vRouter application. vRouter is effectively turning an OpenFlow switch into a router. This means we need to configure 'interfaces' on the switch, just as you'd do for a regular router. Of course, seeing as it is an OpenFlow switch, the switch itself has no knowledge of this interface configuration, but rather it is a logical configuration the the vRouter application uses to do its job of controlling the switch as though it was a router.

Check out the Network Configuration Service for information on how to upload configuration to ONOS.

Depending on which switch you are using, you may need to configure which driver ONOS will use for it. If you are using OVS, we need to configure ONOS to use the softrouter driver, because the default ovs driver doesn't support multi-table pipelines.

Code Block
{
	"devices" : {
        "of:00000000000000b1" : {
            "basic" : {
                "driver" : "softrouter"
            }
        }
    }
}

 

The interface configuration in ONOS looks like this:

Code Block
{
    "ports" : {
        "of:00000000000000b1/1" : {
            "interfaces" : [
                {
					"name" : "b1-1",
                    "ips"  : [ "10.0.1.2/24" ],
                    "mac"  : "00:00:00:00:00:01"
                }
            ]
        },
        "of:00000000000000b1/2" : {
            "interfaces" : [
                {
					"name" : "b1-2",
                    "ips"  : [ "10.0.2.2/24" ],
                    "mac"  : "00:00:00:00:00:01"
                }
            ]
        },
        "of:00000000000000b1/3" : {
            "interfaces" : [
                {
					"name" : "b1-3",
                    "ips"  : [ "10.0.3.2/24" ],
                    "mac"  : "00:00:00:00:00:01"
                }
            ]
        },
        "of:00000000000000b1/4" : {
            "interfaces" : [
                {
					"name" : "b1-4",
                    "ips"  : [ "10.0.4.2/24" ],
                    "mac"  : "00:00:00:00:00:02"
                    "vlan" : 100
                }
            ]
        }
    }
}

...

Code Block
{
    "apps" : {
        "org.onosproject.router" : {
            "router" : {
                "controlPlaneConnectPoint" : "of:00000000000000b1/5",
                "ospfEnabled" : "true",
				"interfaces" : [ "b1-1", "b1-2", "b1-2", "b1-4" ]
            }
        }
    }
}

Once these two configuration sections have been uploaded to ONOS, the vRouter application should be ready to run.

The interfaces field contains a list of names of interfaces that should be used by the vRouter. It is an optional field, and if it is omitted then all interfaces on the device will be used.

Running the application

Log in to your ONOS cluster and start the vRouter application.

...