Charles Chan | fcfe890 | 2022-02-02 17:06:27 -0800 | [diff] [blame] | 1 | .. SPDX-FileCopyrightText: 2021 Open Networking Foundation <info@opennetworking.org> |
| 2 | .. SPDX-License-Identifier: Apache-2.0 |
| 3 | |
Charles Chan | 2caff7b | 2021-10-11 20:25:16 -0700 | [diff] [blame] | 4 | .. _onos_network_config: |
| 5 | |
Charles Chan | caebcf3 | 2021-09-20 22:17:52 -0700 | [diff] [blame] | 6 | Network Configuration |
| 7 | ===================== |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 8 | SD-Fabric uses several different types of network configurations. |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 9 | We only focus on ``devices`` and ``ports`` configuration in this section, which |
| 10 | are used to provide basic L2/L3 connectivity. |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 11 | |
| 12 | See :ref:`advanced-features` for advanced feature configurations. |
| 13 | |
| 14 | Device Configuration |
| 15 | -------------------- |
| 16 | Each switch in SD-Fabric requires a device config. |
| 17 | |
| 18 | .. code-block:: json |
| 19 | |
| 20 | { |
| 21 | "devices" : { |
| 22 | "device:leaf1" : { |
| 23 | "segmentrouting" : { |
| 24 | "ipv4NodeSid" : 101, |
| 25 | "ipv4Loopback" : "192.168.0.201", |
| 26 | "ipv6NodeSid" : 111, |
| 27 | "ipv6Loopback" : "2000::c0a8:0201", |
| 28 | "routerMac" : "00:00:00:00:02:01", |
| 29 | "isEdgeRouter" : true, |
| 30 | "adjacencySids" : [] |
| 31 | }, |
| 32 | "basic" : { |
| 33 | "name": "Leaf1", |
| 34 | "managementAddress": "grpc://10.128.100.51:9339?device_id=1", |
| 35 | "driver": "stratum-tofino", |
Carmelo Cascone | f2b1791 | 2022-02-04 09:27:27 -0800 | [diff] [blame^] | 36 | "pipeconf": "org.stratumproject.fabric-upf-int.montara_sde_9_5_0" |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 37 | } |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 42 | - ``device:leaf1``: arbitrary globally unique identifier of the device, must always be prefixed with ``device:``. |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 43 | |
| 44 | - ``ipv4NodeSid``: IPv4 node segment ID, which is used as an MPLS label in |
| 45 | forwarding IPv4 traffic. Can be arbitrary and should be globally unique. |
| 46 | |
| 47 | - ``ipv4Loopback``: IPv4 loopback address. Can be arbitrary, should be globally |
| 48 | unique and should not be part of the same subnet(s) defined on the data plane |
| 49 | ports (see port config). |
| 50 | |
| 51 | - ``ipv6NodeSid``: IPv6 node segment ID, which is used as an MPLS label in |
| 52 | forwarding IPv6 traffic. Can be arbitrary and should be globally unique. Only |
| 53 | required when using IPv6. |
| 54 | |
| 55 | - ``ipv6Loopback``: IPv6 loopback address. Can be arbitrary, should be globally |
| 56 | unique and should not be part of the same subnet(s) defined on the data plane |
| 57 | ports (see port config). Only required when using IPv6. |
| 58 | |
| 59 | - ``routerMac``: Router MAC address. Can be arbitrary and should be globally |
| 60 | unique. This MAC address will be used to reply the ARP request for the |
| 61 | loopback IP or the Interface IP that will be introduced later. (We recommend |
| 62 | using the MAC address of the device's management interface as the router |
| 63 | MAC.) |
| 64 | |
| 65 | - ``isEdgeRouter``: True for leaf switches. False for spine switches. |
| 66 | |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 67 | - ``adjacencySids``: Deprecated. Always use an empty array. |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 68 | |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 69 | - ``name``: Human friendly name used in the ONOS UI. |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 70 | |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 71 | - ``managementAddress``: gRPC endpoint of the Stratum device and the P4Runtime |
| 72 | internal device ID associated to the ASIC (usually ``1``), |
| 73 | in the format of ``grpc://[device_addr]?device_id=[P4Runtime device ID]`` |
| 74 | The IP address can be replaced by a domain name. |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 75 | |
| 76 | - ``driver``: ``stratum-bmv2`` or ``stratum-tofino``, depending on which switch this is. |
| 77 | |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 78 | - ``pipeconf``: the P4 program to deploy on this switch. A list of available |
| 79 | pipeconfs can be dumped by running ``pipeconfs`` in the ONOS CLI. When running |
| 80 | with Tofino-based devices, we provide pre-installed pipeconfs with ID |
| 81 | ``org.stratumproject.<profile>.<device-type>_<bf-sde-version>``: |
| 82 | |
| 83 | - The available *profiles* are: |
| 84 | |
| 85 | - ``fabric``: for basic L2/L3 capabilities |
Carmelo Cascone | f2b1791 | 2022-02-04 09:27:27 -0800 | [diff] [blame^] | 86 | - ``fabric-upf``: with 4G/5G mobile user plane (UPF) support |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 87 | - ``fabric-int``: with INT support |
Carmelo Cascone | f2b1791 | 2022-02-04 09:27:27 -0800 | [diff] [blame^] | 88 | - ``fabric-upf-int``: with UPF and INT support |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 89 | |
Hung-Wei Chiu | 554a9d0 | 2021-11-22 14:10:19 -0800 | [diff] [blame] | 90 | - The supported *device-types*: Use the command ``weutil`` in the BMC mode to get the product name. |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 91 | |
Hung-Wei Chiu | 554a9d0 | 2021-11-22 14:10:19 -0800 | [diff] [blame] | 92 | - ``montara``: for dual-pipe Tofino ASIC SKUs (Product name is 100BF-32X) |
| 93 | - ``mavericks``: for quad-pipe Tofino ASIC SKUs (Product name is 100BF-32QS) |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 94 | |
| 95 | - The Intel/Barefoot SDE version used in Stratum, e.g., ``sde_9_5_0`` |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 96 | |
| 97 | .. caution:: |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 98 | You should avoid using reserved MPLS labels for ``ipv4NodeSid`` and |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 99 | ``ipv6NodeSid``. Please check here for the reserved values: |
| 100 | http://www.iana.org/assignments/mpls-label-values/mpls-label-values.xhtml |
| 101 | |
| 102 | .. note:: |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 103 | Most of the SD-Fabric configurations support dynamic updates. Unfortunately, |
| 104 | we currently **do not support dynamic device configuration updates**. You |
| 105 | will have to restart (reboot) the switch if the corresponding device |
| 106 | configuration changes. |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 107 | |
| 108 | Having said that, when introducing a completely new device in the network, |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 109 | the device configurations pushed before ONOS connects to the switch for the |
| 110 | first time should be applied correctly. |
| 111 | |
| 112 | Port IDs for Tofino-based devices |
| 113 | --------------------------------- |
| 114 | |
| 115 | Before describing the ONOS netcfg, it is worth nothing how we refer to ports for |
| 116 | Tofino-based devices. Netcfg uses the format ``device:<name>/<port-number>``. |
| 117 | |
| 118 | ``<port-number>`` is a special value that is usually different than the number |
| 119 | shown in the switch front panel. It is the same number used for P4 table |
| 120 | programming and depends on the specific Tofino ASIC SKU (e.g., dual-pipe vs. |
| 121 | quad-pipe) and switch vendor/platform. In Stratum this is often referred to as |
| 122 | the *SDK port ID*, as this is the number used for all Tofino SDK calls. In Intel |
| 123 | documentation this is referred to as the ``DP_ID``. We plan to remove this |
| 124 | dependency on such a low level detail in future releases, but for now, to find |
| 125 | out the mapping between front-panel ports and ``DP_ID`` you have the following |
| 126 | options: |
| 127 | |
| 128 | - Ask your switch vendor |
| 129 | - Use the command `pm.show` on the BF shell of a running Stratum instance |
| 130 | (see :ref:`troubleshooting_guide`) |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 131 | |
| 132 | Bridging and Unicast Routing |
| 133 | ---------------------------- |
| 134 | |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 135 | In the following we illustrate how to enable basic bridging and routing on a |
| 136 | per-port basis. |
| 137 | |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 138 | .. attention:: |
| 139 | - VLAN **4094** is reserved for unconfigured ports (e.g. spine facing ports) |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 140 | - VLAN **4090** is reserved for pseudowire transport flow rules on the spines |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 141 | |
| 142 | Access Ports |
| 143 | ^^^^^^^^^^^^ |
| 144 | |
| 145 | The necessary but minimum configuration for an access port is simply a VLAN. |
| 146 | |
| 147 | .. code-block:: json |
| 148 | |
| 149 | { |
| 150 | "ports" : { |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 151 | "device:leaf1/12" : { |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 152 | "interfaces" : [{ |
| 153 | "name" : "serverA-intf", |
| 154 | "vlan-untagged": 10 |
| 155 | }] |
| 156 | }, |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 157 | "device:leaf1/16" : { |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 158 | "interfaces" : [{ |
| 159 | "name" : "serverB-intf", |
| 160 | "vlan-untagged": 10 |
| 161 | }] |
| 162 | } |
| 163 | } |
| 164 | } |
| 165 | |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 166 | The example above shows two ports (12 and 16) on switch ``leaf1`` that have |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 167 | been assigned to VLAN 10 using the ``vlan-untagged`` keyword. |
| 168 | |
| 169 | It simply means that packets come in and leave out of these switches untagged, |
| 170 | but internally they are assigned VLAN 10 and they belong to the bridging domain |
| 171 | defined for VLAN 10. |
| 172 | |
| 173 | ``name`` is used to associate the interface with a globally unique, user |
| 174 | friendly name. It can be omitted. |
| 175 | |
| 176 | With the configuration shown above, the packets will always be bridged, but |
| 177 | they cannot be routed out of the VLAN (e.g. to other subnets). To add the |
| 178 | capability to route out of VLAN 10, we need to add a subnet/gateway IP (similar |
| 179 | to `interface-vlans or SVIs in traditional networks |
| 180 | <https://www.youtube.com/watch?v=bUXpmiJpGb0>`_). |
| 181 | |
| 182 | .. code-block:: json |
| 183 | |
| 184 | { |
| 185 | "ports" : { |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 186 | "device:leaf1/12" : { |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 187 | "interfaces" : [{ |
| 188 | "name" : "serverA-intf", |
| 189 | "ips" : [ "10.0.1.254/24"], |
| 190 | "vlan-untagged": 10 |
| 191 | }] |
| 192 | }, |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 193 | "device:leaf1/16" : { |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 194 | "interfaces" : [{ |
| 195 | "name" : "serverB-intf", |
| 196 | "ips" : [ "10.0.1.254/24"], |
| 197 | "vlan-untagged": 10 |
| 198 | }] |
| 199 | } |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | In this example, VLAN 10 is associated with subnet ``10.0.1.0/24``, and the |
| 204 | gateway IP for hosts in this subnet is ``10.0.1.254/32``. |
| 205 | |
| 206 | When the desire is to route out of a VLAN, this assignment is currently |
| 207 | necessary on all ports configured in the same VLAN. |
| 208 | |
| 209 | .. note:: |
| 210 | Typically we only expect a single subnet for a VLAN. Similar to traditional |
| 211 | networks, for us, a subnet == VLAN. Different VLANs should be configured in |
| 212 | different subnets. |
| 213 | |
| 214 | In certain use-cases, it may be necessary to configure multiple subnets in |
| 215 | the same VLAN. This is possible by adding more subnet/gateway IPs in the |
| 216 | ``ips`` array. |
| 217 | |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 218 | .. attention:: |
| 219 | The same subnet cannot be configured on multiple leaf switches. |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 220 | |
| 221 | We usually configure one subnet for all the ports on the same leaf switch. |
| 222 | |
| 223 | Tagged Ports |
| 224 | ^^^^^^^^^^^^ |
| 225 | Tagged port configuration is similar. |
| 226 | |
| 227 | .. code-block:: json |
| 228 | |
| 229 | { |
| 230 | "ports" : { |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 231 | "device:leaf1/24" : { |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 232 | "interfaces" : [{ |
| 233 | "name" : "serverA-intf", |
| 234 | "ips" : [ "10.0.2.254/24", "10.0.4.254/24" ], |
| 235 | "vlan-tagged" : [ 20, 40 ] |
| 236 | }] |
| 237 | } |
| 238 | } |
| 239 | } |
| 240 | |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 241 | The configuration above for port 24 on switch ``leaf1`` shows two VLANs 20 and |
| 242 | 40 configured on that port, with corresponding subnets and gateway IPs. |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 243 | |
| 244 | Note that there is no specific ordering required in the ``ips`` or |
| 245 | ``vlan-tagged`` arrays to correlate the VLANs to their corresponding subnets. |
| 246 | |
| 247 | In a future release, we will correlate VLAN and subnets configuration in a more |
| 248 | readable way. |
| 249 | |
| 250 | Native VLAN on Tagged Ports |
| 251 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 252 | |
| 253 | An additional configuration ``vlan-native`` possible on tagged ports includes |
| 254 | the ability to specify a VLAN (and thus a bridging domain) for incoming |
| 255 | untagged packets. |
| 256 | |
| 257 | Typically, such configuration in trunk ports in traditional networks is |
| 258 | referred to a native VLAN. |
| 259 | |
| 260 | .. code-block:: json |
| 261 | |
| 262 | { |
| 263 | "ports" : { |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 264 | "device:leaf1/24" : { |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 265 | "interfaces" : [ { |
| 266 | "name" : "serverA-intf", |
| 267 | "ips" : [ "10.0.2.254/24", "10.0.4.254/24", "10.0.1.254/24" ], |
| 268 | "vlan-tagged" : [ 20, 40 ], |
| 269 | "vlan-native" : 10 |
| 270 | }] |
| 271 | } |
| 272 | } |
| 273 | } |
| 274 | |
| 275 | Note that it is also necessary to configure the subnet/gateway IP corresponding |
| 276 | to the native VLAN if you wish to route out of that VLAN. |
| 277 | |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 278 | Configuring interface for IPv6 [#f1]_ |
| 279 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 280 | |
| 281 | It is similar to configure IPv6 routing. Simply replace the addresses in |
| 282 | ``ips`` with IPv6 addresses. For example: |
| 283 | |
| 284 | .. code-block:: json |
| 285 | |
| 286 | { |
| 287 | "ports" : { |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 288 | "device:leaf1/24" : { |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 289 | "interfaces" : [ { |
| 290 | "name" : "serverA-intf", |
| 291 | "ips" : [ "10.0.2.254/24", "2000::1ff/120" ], |
| 292 | "vlan-tagged" : [ 20, 40 ] |
| 293 | }] |
| 294 | } |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | .. note:: |
| 299 | There is a known issue that breaks dynamic VLAN configuration. |
| 300 | Until the issue get resolved, you need to restart the switch agent to reinstall the flows. |
| 301 | |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 302 | IPv6 Router Advertisement [#f1]_ |
| 303 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 304 | |
| 305 | Router Advertisement overview |
| 306 | """"""""""""""""""""""""""""" |
| 307 | |
| 308 | Router advertisement application is for enabling **Router Advertisement** and |
| 309 | **Router Solicitation** functionalities supported by IPv6 routers. |
| 310 | |
| 311 | More details are available in `RFC 4861 <https://tools.ietf.org/html/rfc4861>`_. |
| 312 | |
| 313 | Application identifies which IPv6 interfaces are currently configured in the |
| 314 | system and it will try to send out **unsolicited Router Advertisement** (RA) |
| 315 | messages from these interfaces. |
| 316 | |
| 317 | Each such RA message will have two mandatory options named **Source link-layer |
| 318 | address** and **MTU**. |
| 319 | |
| 320 | Additional RA option **prefix** can be enabled using component configuration |
| 321 | **raGlobalPrefixConfStatus**. |
| 322 | |
| 323 | Application also processes **Router Solicitations** (RS) sent from hosts. Upon |
| 324 | receiving RS on a particular interface application stops RA transmission in |
| 325 | that interface and immediately sends RA targeted to the solicited host. After |
| 326 | that application continues unsolicited RA transmission on that interface. |
| 327 | |
| 328 | Activate and configure RA |
| 329 | """"""""""""""""""""""""" |
| 330 | |
| 331 | RA application can be activated from CLI by running |
| 332 | |
| 333 | .. code-block:: console |
| 334 | |
| 335 | onos> app activate routeradvertisement |
| 336 | |
| 337 | Behavior of RA application is controlled by ONOS component configuration |
| 338 | subsystem and following are possible configuration options. |
| 339 | |
| 340 | - ``raThreadDelay``: Delay between consecutive RA transmissions |
| 341 | |
| 342 | - ``raPoolSize``: Capacity of thread pool to be used for RA transmissions |
| 343 | |
| 344 | - ``raFlagMbitStatus``: RA flag “Managed address configuration” |
| 345 | enabled/disabled |
| 346 | |
| 347 | - ``raFlagObitStatus``: RA flag “Other configuration” enabled/disabled |
| 348 | |
| 349 | - ``raOptionPrefixStatus``: RA Option “prefix” is enabled/disabled. Router |
| 350 | prefixes will be available in RA only if this flag is “true” |
| 351 | |
| 352 | - ``raGlobalPrefixConfStatus``: Enable switch level global prefix |
| 353 | configuration. |
| 354 | Once ``raGlobalPrefixConfStatus`` is enabled, RA prefix option is generated |
| 355 | from port configuration of device, see for more details. |
| 356 | |
| 357 | To set the options, following the command (example for ``raOptionPrefixStatus``) |
| 358 | |
| 359 | .. code-block:: console |
| 360 | |
| 361 | onos> cfg set org.onosproject.ra.RouterAdvertisementManager raOptionPrefixStatus true |
| 362 | |
| 363 | Prefix details are picked up from network interface configuration. |
| 364 | |
| 365 | RA app will filter out link-local IPs while preparing prefixes. |
| 366 | |
| 367 | For example, in following configuration, Prefix will include only |
| 368 | **2001:0558:FF10:04C9::2:1ff/120**. |
| 369 | |
| 370 | .. code-block:: json |
| 371 | |
| 372 | { |
| 373 | "ports": { |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 374 | "device:leaf2/16": { |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 375 | "interfaces": [{ |
| 376 | "ips": [ "192.168.114.1/24", "2001:0558:FF10:04C9::2:1ff/120", "FE80::4EA8:2AFF:FE24:8E5F/120" ], |
| 377 | "vlan-untagged": "11", |
| 378 | "name": "18-15" |
| 379 | }] |
| 380 | } |
| 381 | } |
| 382 | } |
| 383 | |
| 384 | Global prefix configuration |
| 385 | """"""""""""""""""""""""""" |
| 386 | |
| 387 | In some cases, users may want to have a set of global prefix **advertised on |
| 388 | all edge interfaces**. |
| 389 | |
| 390 | Such prefixes can be configured in **devices** section of network configuration |
| 391 | in the following way. |
| 392 | |
| 393 | .. code-block:: json |
| 394 | |
| 395 | { |
| 396 | "devices": { |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 397 | "device:leaf2": { |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 398 | "routeradvertisement" : { |
| 399 | "prefixes": [ "2001:0558:FF10:04C9::3:1ff/120"] |
| 400 | } |
| 401 | } |
| 402 | } |
| 403 | } |
| 404 | |
| 405 | .. note:: |
| 406 | When global prefix is configured, RA app will ignore any prefixes |
| 407 | configured on switch interfaces. |
| 408 | |
| 409 | Notes about interface config |
| 410 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 411 | |
| 412 | There is no need to configure ports on switches that are meant to connect to |
| 413 | other switches. |
| 414 | |
| 415 | The VLAN (untagged or tagged) configuration is only meant for ports that are |
| 416 | connected to hosts (edge ports). |
| 417 | |
| 418 | .. image:: ../images/config-vlan.png |
| 419 | |
| 420 | Furthermore, note that the same VLAN can be configured on multiple ToRs - e.g. |
| 421 | VLAN 20 in the figure above. |
| 422 | |
| 423 | However this does not mean that the ports are in the same bridging domain, |
| 424 | because in the fabric, the communication between ToRs is through a routed |
| 425 | network. |
| 426 | |
| 427 | In other words, a host on VLAN 20 (untagged or tagged) connected to one ToR can |
| 428 | communicate with another host on VLAN 20 (untagged or tagged) connected to a |
| 429 | different ToR, but the MAC addresses will change as the traffic goes through a |
| 430 | routed network. |
| 431 | |
| 432 | Please do not use this feature to connect switches in unsupported topologies as |
| 433 | shown in the example below. |
| 434 | |
| 435 | The fabric is not designed to be one big Ethernet fabric. The bridging domain |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 436 | is restricted to one ToR. |
Wailok Shum | 2f05cd3 | 2021-09-30 22:18:19 +0800 | [diff] [blame] | 437 | |
| 438 | If the bridging domain is extended across two ToRs directly linked to each |
| 439 | other, there is a chance of loops. |
| 440 | |
| 441 | In other words, the ToRs/Leafs are not standalone 802.1Q bridges, and should |
| 442 | not be used as such. |
| 443 | |
| 444 | .. image:: ../images/config-vlan-invalid.png |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 445 | |
| 446 | .. rubric:: Footnotes |
| 447 | |
| 448 | .. [#f1] IPv6 support on the data plane (P4 program) is still work-in-progress. |