Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 1 | Device Configuration |
| 2 | ==================== |
| 3 | Each switch in Trellis requires a device config. |
| 4 | |
| 5 | .. code-block:: json |
Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 6 | |
| 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 Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 28 | |
| 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 Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 50 | - ``isEdgeRouter``: True for leaf switches. False for spine switches. |
Zack Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 51 | |
Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 52 | - ``adjacencySids``: Deprecated. Just put an empty array for now. |
Zack Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 53 | |
Charles Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 54 | - ``name``: Name of the device. It is an arbitrary name to identify the device easily. |
Zack Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 55 | |
| 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 Chan | 9e5c617 | 2019-09-07 11:24:54 -0700 | [diff] [blame] | 59 | |
Charles Chan | c65ac05 | 2020-08-05 11:58:07 -0700 | [diff] [blame] | 60 | - When using OpenvSwitch, set this to ``ofdpa-ovs`` |
Zack Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 61 | |
| 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 Chan | 4897f33 | 2019-09-09 00:16:22 -0700 | [diff] [blame] | 65 | |
Charles Chan | 756db00 | 2020-06-27 18:57:06 -0700 | [diff] [blame] | 66 | |
| 67 | Additional Device Configuration for Stratum Switches |
| 68 | ==================================================== |
| 69 | |
| 70 | When using Stratum switches, following **additional** configurations need |
| 71 | to 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 Chan | 33bac08 | 2019-09-12 01:07:51 -0700 | [diff] [blame] | 100 | .. caution:: |
Zack Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 101 | 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 Chan | 33bac08 | 2019-09-12 01:07:51 -0700 | [diff] [blame] | 104 | |
Charles Chan | 4897f33 | 2019-09-09 00:16:22 -0700 | [diff] [blame] | 105 | .. note:: |
| 106 | Most of the Trellis configurations support dynamic configuration updates. |
Zack Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 107 | 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 Chan | 4897f33 | 2019-09-09 00:16:22 -0700 | [diff] [blame] | 110 | |
| 111 | Having said that, when introducing a completely new device in the network, |
Zack Williams | d63d35b | 2020-06-23 14:12:46 -0700 | [diff] [blame] | 112 | the device configurations pushed before the device's connection should |
| 113 | apply correctly. |