Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:network:dsa:converting-to-dsa [2021/09/17 10:02] – [Local] Fix formatting arinc9docs:guide-user:network:dsa:converting-to-dsa [2023/05/17 02:11] – Adding a guided tutorial for DSA saudiqbal
Line 2: Line 2:
  
 Some OpenWrt 21.02 (and newer) devices use DSA for configuring network interfaces. 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 will need to do the following:+If you are upgrading your router to a firmware version that uses DSA, you should read this page.
  
-(Note: There is a companion [[:docs:guide-user:network:dsa:dsa-mini-tutorial|DSA Mini-Tutorial]] article that you can review.)+**Note:** There is a companion [[:docs:guide-user:network:dsa:dsa-mini-tutorial|DSA Mini-Tutorial]] article that you can review. 
 + 
 +**Note:** Also check the [[https://www.youtube.com/watch?v=qeuZqRqH-ug|very good Youtube video from onemarcfifty]] that talks about the theory of VLANs and describes the differences between OpenWrt 19.0x and 21.0x. 
 + 
 +**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.//
Line 10: Line 16:
 ===== Bridge all switch ports ===== ===== Bridge all switch ports =====
  
-Remove all other bridges, create a bridge and add all the switch ports to it.+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 =====
Line 23: Line 29:
  
 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|}}
Line 44: Line 52:
  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|}}
Line 73: Line 83:
 ==== 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 ====
  • Last modified: 2023/12/21 21:55
  • by axx