| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision |
| docs:guide-user:network:dsa:converting-to-dsa [2022/05/31 18:23] – [Egress untagged and PVID (Port VLAN ID)] Address misconception on PVID arinc9 | 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|}} |
| 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. | 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 (Primary VLAN ID) ==== | ==== Egress Untagged, Egress Tagged and PVID ==== |
| |
| **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 untagged traffic coming in to the switch through the specified port to the specified VLAN ID. This is useful only if a port is assigned to multiple VLANs and egress is set to untagged or tagged on multiple VLANs. | * **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. This will also assign the untagged ingress to the specified VLAN ID. | * **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. |
| | |
| | {{:media:dsa:br-vid-filter-examples-05.png-05-29_14-17-38.png|}} |
| |
| ==== Wireless ==== | ==== Wireless ==== |