blob: 9a5589576de51e6c17df12b122c18e3b157fbe83 [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
Charles Chan9e5c6172019-09-07 11:24:54 -07006
7 {
8 "devices" : {
9 "of:0000000000000001" : {
10 "segmentrouting" : {
11 "ipv4NodeSid" : 101,
12 "ipv4Loopback" : "192.168.0.201",
13 "ipv6NodeSid" : 111,
14 "ipv6Loopback" : "2000::c0a8:0201",
15 "routerMac" : "00:00:00:00:02:01",
16 "isEdgeRouter" : true,
17 "adjacencySids" : []
18 },
19 "basic" : {
20 "name" : "Leaf-R1",
21 "driver" : "ovs-ofdpa"
22 }
23 }
24 }
25 }
26
27- ``of:0000000000000001``: DPID of the device.
Zack Williamsd63d35b2020-06-23 14:12:46 -070028
29- ``ipv4NodeSid``: IPv4 node segment ID, which is used as an MPLS label in
30 forwarding IPv4 traffic. Can be arbitrary and should be globally unique.
31
32- ``ipv4Loopback``: IPv4 loopback address. Can be arbitrary, should be globally
33 unique and should not be part of the same subnet(s) defined on the data plane
34 ports (see port config).
35
36- ``ipv6NodeSid``: IPv6 node segment ID, which is used as an MPLS label in
37 forwarding IPv6 traffic. Can be arbitrary and should be globally unique. Only
38 required when using IPv6.
39
40- ``ipv6Loopback``: IPv6 loopback address. Can be arbitrary, should be globally
41 unique and should not be part of the same subnet(s) defined on the data plane
42 ports (see port config). Only required when using IPv6.
43
44- ``routerMac``: Router MAC address. Can be arbitrary and should be globally
45 unique. This MAC address will be used to reply the ARP request for the
46 loopback IP or the Interface IP that will be introduced later. (We recommend
47 using the MAC address of the device's management interface as the router
48 MAC.)
49
Charles Chan9e5c6172019-09-07 11:24:54 -070050- ``isEdgeRouter``: True for leaf switches. False for spine switches.
Zack Williamsd63d35b2020-06-23 14:12:46 -070051
Charles Chan9e5c6172019-09-07 11:24:54 -070052- ``adjacencySids``: Deprecated. Just put an empty array for now.
Zack Williamsd63d35b2020-06-23 14:12:46 -070053
Charles Chan9e5c6172019-09-07 11:24:54 -070054- ``name``: Name of the device. It is an arbitrary name to identify the device easily.
Zack Williamsd63d35b2020-06-23 14:12:46 -070055
56- ``driver``: This tells ONOS which OpenFlow driver should be loaded for this
57 device. It overrides the driver selected by ONOS automatically when the
58 device connects.
Charles Chan9e5c6172019-09-07 11:24:54 -070059
60 - When using OpenvSwitch, set this to ``ovs-ofdpa``
Zack Williamsd63d35b2020-06-23 14:12:46 -070061
62 - When using hardware switches, set this to ``ofdpa3`` or eliminate
63 ``driver`` entirely as the correct driver configuration will be set
64 automatically by ONOS
Charles Chan4897f332019-09-09 00:16:22 -070065
Charles Chan33bac082019-09-12 01:07:51 -070066.. caution::
Zack Williamsd63d35b2020-06-23 14:12:46 -070067 We should avoid using reserved MPLS labels for ``ipv4NodeSid`` and
68 ``ipv6NodeSid``. Please check here for the reserved values:
69 http://www.iana.org/assignments/mpls-label-values/mpls-label-values.xhtml
Charles Chan33bac082019-09-12 01:07:51 -070070
Charles Chan4897f332019-09-09 00:16:22 -070071.. note::
72 Most of the Trellis configurations support dynamic configuration updates.
Zack Williamsd63d35b2020-06-23 14:12:46 -070073 Unfortunately, Trellis currently **do not support dynamic device
74 configuration updates**. You will have to restart the device when if
75 corresponding device configuration changes.
Charles Chan4897f332019-09-09 00:16:22 -070076
77 Having said that, when introducing a completely new device in the network,
Zack Williamsd63d35b2020-06-23 14:12:46 -070078 the device configurations pushed before the device's connection should
79 apply correctly.