blob: cb7e23d472bc55850b8022e6ceff73b339f920fc [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
Charles Chanc65ac052020-08-05 11:58:07 -070060 - When using OpenvSwitch, set this to ``ofdpa-ovs``
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 Chan756db002020-06-27 18:57:06 -070066
67Additional Device Configuration for Stratum Switches
68====================================================
69
70When using Stratum switches, following **additional** configurations need
71to be added to the ``basic`` section of device config.
72
73.. code-block:: json
74
75 {
76 "devices" : {
77 "device:montara1" : {
78 "segmentrouting" : {
79 "...": "...",
80 },
81 "basic" : {
82 "...": "...",
83 "managementAddress": "grpc://192.168.0.1:9339?device_id=1",
84 "driver": "stratum-tofino",
85 "pipeconf": "org.opencord.fabric.tofino.montara_sde_9_0_0"
86 }
87 }
88 }
89 }
90
91- ``managementAddress``: gRPC endpoint of the Stratum device and a numerical device ID.
92 The IP address can be replaced by domain name as well.
93
94- ``driver``: ``stratum-bmv2`` or ``stratum-tofino``, depending on which switch this is.
95
96- ``pipeconf``: A list of available pipeconfs can be dumped by running ``pipeconfs`` in ONOS CLI.
97 Select the pipeconf you would like to use for this device.
98
99
Charles Chan33bac082019-09-12 01:07:51 -0700100.. caution::
Zack Williamsd63d35b2020-06-23 14:12:46 -0700101 We should avoid using reserved MPLS labels for ``ipv4NodeSid`` and
102 ``ipv6NodeSid``. Please check here for the reserved values:
103 http://www.iana.org/assignments/mpls-label-values/mpls-label-values.xhtml
Charles Chan33bac082019-09-12 01:07:51 -0700104
Charles Chan4897f332019-09-09 00:16:22 -0700105.. note::
106 Most of the Trellis configurations support dynamic configuration updates.
Zack Williamsd63d35b2020-06-23 14:12:46 -0700107 Unfortunately, Trellis currently **do not support dynamic device
108 configuration updates**. You will have to restart the device when if
109 corresponding device configuration changes.
Charles Chan4897f332019-09-09 00:16:22 -0700110
111 Having said that, when introducing a completely new device in the network,
Zack Williamsd63d35b2020-06-23 14:12:46 -0700112 the device configurations pushed before the device's connection should
113 apply correctly.