| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision |
| docs:guide-user:network:dsa:converting-to-dsa [2022/03/15 11:24] – Add Youtube link; minor edits richb-hanover | docs:guide-user:network:dsa:converting-to-dsa [2023/05/17 02:11] – Adding a guided tutorial for DSA saudiqbal |
|---|
| |
| **Note**: DSA support does not affect wireless configuration in ''/etc/config/wireless''. In particular the wireless config option ifname continues to be valid for specifying a custom name for a WiFi interface. | **Note**: DSA support does not affect wireless configuration in ''/etc/config/wireless''. In particular the wireless config option ifname continues to be valid for specifying a custom name for a WiFi interface. |
| | |
| | **Note:** An easy to use [[https://www.saudiqbal.com/blog/openwrt-vlan-setup-guide-using-luci-for-iot-and-wireless-with-dsa.php|step by step]] tutorial for setting up VLANs for DSA. |
| |
| //This page is a Work In Process. If you can contribute your knowledge, we would be pleased for the help.// | //This page is a Work In Process. If you can contribute your knowledge, we would be pleased for the help.// |
| ===== Bridge all switch ports ===== | ===== Bridge all switch ports ===== |
| |
| Gather all of the switchport interfaces (wan, lan1, lan2, etc.) in one bridge interface. Remove them from other bridges if they exist. | 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 ===== | ===== VLAN Configuration ===== |
| |
| |
| Here is a comparison of VLAN configuration on swconfig and DSA. | Here is a comparison of VLAN configuration on swconfig and DSA. |
| | |
| | swconfig: |
| |
| {{:media:dsa:dsa-simple-01.png|}} | {{:media:dsa:dsa-simple-01.png|}} |
| option vid '2' | option vid '2' |
| </code> | </code> |
| | |
| | dsa: |
| |
| {{:media:dsa:dsa-simple-04.png|}} {{:media:dsa:dsa-simple-02.png|}} | {{:media:dsa:dsa-simple-04.png|}} {{:media:dsa:dsa-simple-02.png|}} |
| ==== Local ==== | ==== Local ==== |
| |
| Local option will automatically assign the specified VLAN ID on the bridge interface for local traffic. So the router can use a subinterface to be involved in that VLAN. | 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 to tag the router for a VLAN on DSA, you can disable this option and run ''service network restart'' for this change to take effect. | If you don't want the router to be involved in that VLAN, you can disable this option and run ''service network restart'' for this change to take effect. |
| |
| ==== Egress untagged and PVID (Port VLAN ID) ==== | ==== Egress Untagged, Egress Tagged and PVID ==== |
| | |
| //Disclaimer: LuCI calls PVID: Primary VLAN ID. This is incorrect and it should be renamed as Port VLAN ID.// | |
| |
| **Untagged Traffic**: Traffic between devices where there's no VLAN ID in the frames. Computers, printers, etc. send and receive untagged traffic by default. | **Untagged Traffic**: Traffic between devices where there's no VLAN ID in the frames. Computers, printers, etc. send and receive untagged traffic by default. |
| |
| **Ingress**: Traffic coming in to the switch through a switch port | **Ingress**: Traffic coming in to the bridge through an interface on the bridge |
| * **PVID**: Switch will assign the specified VLAN ID to the untagged traffic coming in to the switch through the specified port. | * **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 switch through a switch port | **Egress**: Traffic going out of the bridge through an interface on the bridge |
| * **Egress untagged**: Switch will forward the specified VLAN ID traffic going out of the switch through the specified port as untagged. | * **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't match the VLAN ID(s) assigned to the interface. |
| | |
| | ==== Egress Untagged, Egress Tagged and PVID Examples ==== |
| | |
| | Untagged ingress from the second interface is assigned to VLAN ID 600 in both cases. |
| | |
| | {{:media:dsa:br-vid-filter-examples-01.png|}} |
| | |
| | {{:media:dsa:br-vid-filter-examples-03.png-05-29_13-48-41.png|}} |
| | |
| | Untagged ingress from the second interface is assigned to VLAN ID 601. |
| | |
| | {{:media:dsa:br-vid-filter-examples-02.png|}} |
| | |
| | Untagged ingress from the third interface is discarded. |
| | |
| | {{:media:dsa:br-vid-filter-examples-03.png-05-29_13-48-41.png|}} |
| | |
| | Untagged ingress from the third interface is assigned to VLAN 600. |
| | |
| | {{:media:dsa:br-vid-filter-examples-04.png|}} |
| | |
| | Untagged ingress from the third interface is assigned to VLAN 601. |
| |
| To be able to transmit and receive packets on the same VLAN (default way of swconfig), have the PVID and egress untagged on the same VLAN ID for a port. | {{:media:dsa:br-vid-filter-examples-05.png-05-29_14-17-38.png|}} |
| |
| ==== Wireless ==== | ==== Wireless ==== |