Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:network:dsa:converting-to-dsa [2021/08/08 18:53] – Delete richb-hanover | docs:guide-user:network:dsa:converting-to-dsa [2023/05/17 02:11] – Adding a guided tutorial for DSA saudiqbal | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Converting to DSA ====== | ||
| + | Some OpenWrt 21.02 (and newer) devices use DSA for configuring network interfaces. | ||
| + | If you are upgrading your router to a firmware version that uses DSA, you should read this page. | ||
| + | |||
| + | **Note:** There is a companion [[: | ||
| + | |||
| + | **Note:** Also check the [[https:// | ||
| + | |||
| + | **Note**: DSA support does not affect wireless configuration in ''/ | ||
| + | |||
| + | **Note:** An easy to use [[https:// | ||
| + | |||
| + | //This page is a Work In Process. If you can contribute your knowledge, we would be pleased for the help.// | ||
| + | |||
| + | ===== Bridge all switch ports ===== | ||
| + | |||
| + | Gather all of the interfaces for the switch ports (wan, lan1, lan2, etc.) in one bridge interface. Remove them from other bridges if they exist. | ||
| + | |||
| + | ===== VLAN Configuration ===== | ||
| + | |||
| + | Back with swconfig we had CPU ports, eth0/eth1, to tag the CPU in a VLAN (i.e. eth0.2 or eth1.2 for VLAN ID 2). | ||
| + | |||
| + | With DSA, we just create a subinterface of the bridge interface (i.e. br0.2) to get the router (CPU) involved in that VLAN. | ||
| + | |||
| + | If you specify br0.2 as the " | ||
| + | |||
| + | ==== swconfig & DSA VLAN Configuration Comparison ==== | ||
| + | |||
| + | Here is a comparison of VLAN configuration on swconfig and DSA. | ||
| + | |||
| + | swconfig: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | < | ||
| + | config switch | ||
| + | option name ' | ||
| + | option reset ' | ||
| + | option enable_vlan ' | ||
| + | |||
| + | config switch_vlan | ||
| + | option device ' | ||
| + | option vlan ' | ||
| + | option ports '0 1 2 3 5t' | ||
| + | option vid ' | ||
| + | |||
| + | config switch_vlan | ||
| + | option device ' | ||
| + | option vlan ' | ||
| + | option ports '4 6t' | ||
| + | option vid ' | ||
| + | </ | ||
| + | |||
| + | dsa: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | < | ||
| + | config device | ||
| + | option type ' | ||
| + | option name ' | ||
| + | list ports ' | ||
| + | list ports ' | ||
| + | list ports ' | ||
| + | list ports ' | ||
| + | list ports ' | ||
| + | |||
| + | config bridge-vlan | ||
| + | option device ' | ||
| + | option vlan ' | ||
| + | list ports ' | ||
| + | list ports ' | ||
| + | list ports ' | ||
| + | list ports ' | ||
| + | |||
| + | config bridge-vlan | ||
| + | option device ' | ||
| + | option vlan ' | ||
| + | list ports ' | ||
| + | </ | ||
| + | |||
| + | ==== Local ==== | ||
| + | |||
| + | Local option will automatically assign the specified VLAN ID to the bridge interface and create a VLAN interface of the bridge interface. So the router can use the VLAN interface to be involved in that VLAN. | ||
| + | |||
| + | If you don't want the router to be involved in that VLAN, you can disable this option and run '' | ||
| + | |||
| + | ==== Egress Untagged, Egress Tagged and PVID ==== | ||
| + | |||
| + | **Untagged Traffic**: Traffic between devices where there' | ||
| + | |||
| + | **Ingress**: | ||
| + | * **PVID**: Primary VLAN ID makes the specified VLAN ID assigned to the interface the primary one. Untagged ingress will be assigned to the specified VLAN ID. There can be multiple VLAN IDs assigned to the interface. This is not useful if only a single VLAN ID with egress set to untagged is assigned to the interface. | ||
| + | **Egress**: Traffic going out of the bridge through an interface on the bridge | ||
| + | * **Egress untagged**: Frames will leave the bridge through the specified interface as untagged. Untagged ingress will be assigned to the specified VLAN ID unless PVID is set to a different VLAN ID on the interface. Tagged ingress is discarded. | ||
| + | * **Egress tagged**: Frames will leave the bridge through the specified interface as tagged with the specified VLAN ID. Untagged ingress is discarded unless PVID is set to a VLAN ID on the interface. Tagged ingress is discarded if the VLAN ID on the tag doesn' | ||
| + | |||
| + | ==== Egress Untagged, Egress Tagged and PVID Examples ==== | ||
| + | |||
| + | Untagged ingress from the second interface is assigned to VLAN ID 600 in both cases. | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Untagged ingress from the second interface is assigned to VLAN ID 601. | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Untagged ingress from the third interface is discarded. | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Untagged ingress from the third interface is assigned to VLAN 600. | ||
| + | |||
| + | {{: | ||
| + | |||
| + | Untagged ingress from the third interface is assigned to VLAN 601. | ||
| + | |||
| + | {{: | ||
| + | |||
| + | ==== Wireless ==== | ||
| + | |||
| + | Back with swconfig, we couldn' | ||
| + | |||
| + | With DSA, this is not the case anymore. | ||
| + | |||
| + | Go to Network → Wireless and choose the network that wireless interfaces should attach to. | ||
| + | |||
| + | Wireless interfaces will automatically be included in the bridge and belong in the correct VLAN. | ||
| + | |||
| + | {{: | ||
| + | |||
| + | ===== Complex VLAN Configuration - VLANs tagged on multiple switch ports and the router ===== | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||