Device Configuration¶
Each switch in Trellis requires a device config.
{
"devices" : {
"of:0000000000000001" : {
"segmentrouting" : {
"ipv4NodeSid" : 101,
"ipv4Loopback" : "192.168.0.201",
"ipv6NodeSid" : 111,
"ipv6Loopback" : "2000::c0a8:0201",
"routerMac" : "00:00:00:00:02:01",
"isEdgeRouter" : true,
"adjacencySids" : []
},
"basic" : {
"name" : "Leaf-R1",
"driver" : "ovs-ofdpa"
}
}
}
}
of:0000000000000001
: DPID of the device.ipv4NodeSid
: IPv4 node segment ID, which is used as an MPLS label in forwarding IPv4 traffic. Can be arbitrary and should be globally unique.ipv4Loopback
: IPv4 loopback address. Can be arbitrary, should be globally unique and should not be part of the same subnet(s) defined on the data plane ports (see port config).ipv6NodeSid
: IPv6 node segment ID, which is used as an MPLS label in forwarding IPv6 traffic. Can be arbitrary and should be globally unique. Only required when using IPv6.ipv6Loopback
: IPv6 loopback address. Can be arbitrary, should be globally unique and should not be part of the same subnet(s) defined on the data plane ports (see port config). Only required when using IPv6.routerMac
: Router MAC address. Can be arbitrary and should be globally unique. This MAC address will be used to reply the ARP request for the loopback IP or the Interface IP that will be introduced later. (We recommend using the MAC address of the device’s management interface as the router MAC.)isEdgeRouter
: True for leaf switches. False for spine switches.adjacencySids
: Deprecated. Just put an empty array for now.name
: Name of the device. It is an arbitrary name to identify the device easily.driver
: This tells ONOS which OpenFlow driver should be loaded for this device. It overrides the driver selected by ONOS automatically when the device connects.When using OpenvSwitch, set this to
ofdpa-ovs
When using hardware switches, set this to
ofdpa3
or eliminatedriver
entirely as the correct driver configuration will be set automatically by ONOS
Additional Device Configuration for Stratum Switches¶
When using Stratum switches, following additional configurations need
to be added to the basic
section of device config.
{
"devices" : {
"device:montara1" : {
"segmentrouting" : {
"...": "...",
},
"basic" : {
"...": "...",
"managementAddress": "grpc://192.168.0.1:9339?device_id=1",
"driver": "stratum-tofino",
"pipeconf": "org.opencord.fabric.tofino.montara_sde_9_0_0"
}
}
}
}
managementAddress
: gRPC endpoint of the Stratum device and a numerical device ID. The IP address can be replaced by domain name as well.driver
:stratum-bmv2
orstratum-tofino
, depending on which switch this is.pipeconf
: A list of available pipeconfs can be dumped by runningpipeconfs
in ONOS CLI. Select the pipeconf you would like to use for this device.
Caution
We should avoid using reserved MPLS labels for ipv4NodeSid
and
ipv6NodeSid
. Please check here for the reserved values:
http://www.iana.org/assignments/mpls-label-values/mpls-label-values.xhtml
Note
Most of the Trellis configurations support dynamic configuration updates. Unfortunately, Trellis currently do not support dynamic device configuration updates. You will have to restart the device when if corresponding device configuration changes.
Having said that, when introducing a completely new device in the network, the device configurations pushed before the device’s connection should apply correctly.