blob: 6da9acdf59ac397df0abb87031cd4318387fe567 [file] [log] [blame]
Charles Chan9e5c6172019-09-07 11:24:54 -07001Device Configuration
2====================
3Each switch in Trellis requires a device config.
4
5.. code-block:: json
6 :linenos:
7
8 {
9 "devices" : {
10 "of:0000000000000001" : {
11 "segmentrouting" : {
12 "ipv4NodeSid" : 101,
13 "ipv4Loopback" : "192.168.0.201",
14 "ipv6NodeSid" : 111,
15 "ipv6Loopback" : "2000::c0a8:0201",
16 "routerMac" : "00:00:00:00:02:01",
17 "isEdgeRouter" : true,
18 "adjacencySids" : []
19 },
20 "basic" : {
21 "name" : "Leaf-R1",
22 "driver" : "ovs-ofdpa"
23 }
24 }
25 }
26 }
27
28- ``of:0000000000000001``: DPID of the device.
29- ``ipv4NodeSid``: IPv4 node segment ID, which is used as an MPLS label in forwarding IPv4 traffic. Can be arbitrary and should be globally unique.
30- ``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).
31- ``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.
32- ``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).
33 Only required when using IPv6.
34- ``routerMac``: Router MAC address. Can be arbitrary and should be globally unique.
35 This MAC address will be used to reply the ARP request for the loopback IP or the Interface IP that will be introduced later.
36 (We recommend using the MAC address of the device's management interface as the router MAC.)
37- ``isEdgeRouter``: True for leaf switches. False for spine switches.
38- ``adjacencySids``: Deprecated. Just put an empty array for now.
39- ``name``: Name of the device. It is an arbitrary name to identify the device easily.
40- ``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.
41
42 - When using OpenvSwitch, set this to ``ovs-ofdpa``
43 - When using hardware switches, set this to ``ofdpa3`` or eliminate ``driver`` entirely as the correct driver configuration will be set automatically by ONOS
Charles Chan4897f332019-09-09 00:16:22 -070044
Charles Chan33bac082019-09-12 01:07:51 -070045.. caution::
46 We should avoid using reserved MPLS labels for ``ipv4NodeSid`` and ``ipv6NodeSid``.
47 Please check here for the reserved values: http://www.iana.org/assignments/mpls-label-values/mpls-label-values.xhtml
48
Charles Chan4897f332019-09-09 00:16:22 -070049.. note::
50 Most of the Trellis configurations support dynamic configuration updates.
51 Unfortunately, Trellis currently **do not support dynamic device configuration updates**.
52 You will have to restart the device when if corresponding device configuration changes.
53
54 Having said that, when introducing a completely new device in the network,
55 the device configurations pushed before the device's connection should apply correctly.