Running the BGP router application requires you to configure and run a local BGP speaker (e.g., Quagga). To eliminate this, we created the option to inject static routes directly into the app. This page gives you instructions on how to do that.
First, deactivate the running BGP router application, and its router component. The order is important here, unless you like exceptions in your logs.
onos> scr:deactivate org.onosproject.bgprouter.BgpRouter onos> scr:deactivate org.onosproject.routing.impl.Router
Then activate the static router component, after which you can reactivate the BGP router app. Again, note the order.
onos> scr:activate org.onosproject.routing.impl.StaticRouter onos> scr:activate org.onosproject.bgprouter.BgpRouter
From now on, you can inject static routes into ONOS as follows. The arguments to the add-route
call are (1) the routing prefix, (2) the next hop's IP, and (3) the next hop's MAC address. For instance:
onos> add-route 12.1.1.0/24 192.168.101.1 00:00:C0:A8:65:01
Be careful though, as the static router component currently does not implement the full RoutingService interface. This means that, for instance, the routes
command will not work.