Lines Matching +full:up +full:- +full:to

1 .. SPDX-License-Identifier: GPL-2.0
8 network configuration suites by now and has to be performed manually.
10 .. _dsa-config-showcases:
13 -----------------------
15 To configure a DSA switch a couple of commands need to be executed. In this
33 interface. The CPU port is the switch port connected to an Ethernet MAC chip.
37 The user interfaces depend on the conduit interface being up in order for them
38 to send or receive traffic. Prior to kernel v5.12, the state of the conduit
39 interface had to be managed explicitly by the user. Starting with kernel v5.12,
42 - when a DSA user interface is brought up, the conduit interface is
43 automatically brought up.
44 - when the conduit interface is brought down, all DSA user interfaces are
71 * lan1: 192.0.2.1/30 (192.0.2.0 - 192.0.2.3)
72 * lan2: 192.0.2.5/30 (192.0.2.4 - 192.0.2.7)
73 * lan3: 192.0.2.9/30 (192.0.2.8 - 192.0.2.11)
76 * br0: 192.0.2.129/25 (192.0.2.128 - 192.0.2.255)
79 * br0: 192.0.2.129/25 (192.0.2.128 - 192.0.2.255)
80 * wan: 192.0.2.1/30 (192.0.2.0 - 192.0.2.3)
82 .. _dsa-tagged-configuration:
85 ----------------------------------
88 DSA switches. These switches are capable to tag incoming and outgoing traffic
92 .. code-block:: sh
99 # For kernels earlier than v5.12, the conduit interface needs to be
100 # brought up manually before the user ports.
101 ip link set eth0 up
103 # bring up the user interfaces
104 ip link set lan1 up
105 ip link set lan2 up
106 ip link set lan3 up
109 .. code-block:: sh
111 # For kernels earlier than v5.12, the conduit interface needs to be
112 # brought up manually before the user ports.
113 ip link set eth0 up
115 # bring up the user interfaces
116 ip link set lan1 up
117 ip link set lan2 up
118 ip link set lan3 up
123 # add ports to bridge
131 # bring up the bridge
132 ip link set dev br0 up
135 .. code-block:: sh
137 # For kernels earlier than v5.12, the conduit interface needs to be
138 # brought up manually before the user ports.
139 ip link set eth0 up
141 # bring up the user interfaces
142 ip link set wan up
143 ip link set lan1 up
144 ip link set lan2 up
152 # add ports to bridge
159 # bring up the bridge
160 ip link set dev br0 up
162 .. _dsa-vlan-configuration:
165 -------------------------------------
167 A minority of switches are not capable to use a taging protocol
172 The configuration can only be set up via VLAN tagging and bridge setup.
174 .. code-block:: sh
181 # For kernels earlier than v5.12, the conduit interface needs to be
182 # brought up manually before the user ports.
183 ip link set eth0 up
184 ip link set eth0.1 up
185 ip link set eth0.2 up
186 ip link set eth0.3 up
188 # bring up the user interfaces
189 ip link set lan1 up
190 ip link set lan2 up
191 ip link set lan3 up
199 # add ports to bridges
214 # bring up the bridge devices
215 ip link set br0 up
219 .. code-block:: sh
224 # For kernels earlier than v5.12, the conduit interface needs to be
225 # brought up manually before the user ports.
226 ip link set eth0 up
227 ip link set eth0.1 up
229 # bring up the user interfaces
230 ip link set lan1 up
231 ip link set lan2 up
232 ip link set lan3 up
240 # add ports to bridge
254 # bring up the bridge
255 ip link set dev br0 up
258 .. code-block:: sh
264 # For kernels earlier than v5.12, the conduit interface needs to be
265 # brought up manually before the user ports.
266 ip link set eth0 up
267 ip link set eth0.1 up
268 ip link set eth0.2 up
270 # bring up the user interfaces
271 ip link set wan up
272 ip link set lan1 up
273 ip link set lan2 up
281 # add ports to bridges
296 # bring up the bridge devices
297 ip link set br0 up
300 ------------------------------------
302 The existing DSA switches do not have the necessary hardware support to keep
308 Up until kernel v4.14, DSA only supported user space management of bridge FDB
313 .. code-block:: sh
319 Due to a bug, the bridge bypass FDB implementation provided by DSA did not
321 to be forwarded, while ``local`` are meant to be locally terminated, i.e. sent
322 to the host port). Instead, all FDB entries with the ``self`` flag (implicit or
325 .. code-block:: sh
335 The last command is an incorrect way of adding a static bridge FDB entry to a
338 such, will not forward it, as opposed to DSA.
341 adding a bridge FDB entry to the switch: the bridge bypass discussed above, as
345 .. code-block:: sh
353 .. code-block:: sh
361 # This command no longer installs a static FDB entry to hardware:
364 Script writers are therefore encouraged to use the ``master static`` set of
367 Affinity of user ports to CPU ports
368 -----------------------------------
370 Typically, DSA switches are attached to the host via a single Ethernet
372 may permit the use of 2 or more ports connected to the host, for an increase in
375 DSA can make use of multiple CPU ports in two ways. First, it is possible to
377 to be processed by a certain CPU port. This way, user space can implement
379 affinities according to the available CPU ports.
381 Secondly, it is possible to perform load balancing between CPU ports on a per
382 packet basis, rather than statically assigning user ports to CPU ports.
388 To make use of multiple CPU ports, the firmware (device tree) description of
391 and DSA conduit will be used - the numerically first port from the firmware
392 description which has an ``ethernet`` property. It is up to the user to
393 configure the system for the switch to use other conduits.
395 DSA uses the ``rtnl_link_ops`` mechanism (with a "dsa" ``kind``) to allow
404 .. code-block:: sh
407 ip -d link show dev swp0
418 ip link add bond0 type bond mode balance-xor && ip link set bond0 up
425 ip -d link show dev swp0
430 ip link add bond0 type bond mode balance-xor && ip link set bond0 up
433 ip -d link show dev swp0
439 reacts to the ``IFLA_MASTER`` attribute change of its present conduit (``eth0``)
440 and migrates all user ports to the new upper of ``eth0``, ``bond0``. Similarly,
442 that were assigned to this interface to the first physical DSA conduit which is
443 eligible, based on the firmware description (it effectively reverts to the
446 In a setup with more than 2 physical CPU ports, it is therefore possible to mix
447 static user to CPU port assignment with LAG between DSA conduits. It is not
448 possible to statically assign a user port towards a DSA conduit that has any
449 upper interfaces (this includes LAG devices - the conduit must always be the LAG
453 permitted, in order to allow dynamic redistribution in response to traffic.
455 Physical DSA conduits are allowed to join and leave at any time a LAG interface