Netgear X10 (R9000)

The likelihood of finding out why VLAN tagging is not working on trunk ports is basically 0 because i have no switch documentation. The default setup is based on the information i extracted from the Netgear FW and DDWRT.

Update 1

I think i have got a solution for you, my tests were successful, it would be nice if you could test the new patches to further confirm it.

I tried hard to get tagging working with trunk ports, but unfortunately i couldn't get it to work.

My next idea was to make do without trunking at all. I removed trunk ports from the switch configuration.

By the way trunking really means Link Aggregation. The name trunk is very confusing.

To undo trunking you need to change target/linux/alpine/files/arch/arm/boot/dts/alpine-netgear.dtsi:

@@ -1075,8 +1075,8 @@
 			0x00090 0x4e        /* PORT5_STATUS */
 			0x00094 0x7e        /* PORT6_STATUS */
 			/* Trunk 1: P4 + P6 */
-			0x00700 0xd000      /* GOL_TRUNK_CTRL0 */
-			0x00704 0xec0000    /* GOL_TRUNK_CTRL1 */
+			0x00700 0x0000      /* GOL_TRUNK_CTRL0 */
+			0x00704 0x000000    /* GOL_TRUNK_CTRL1 */
 			0x00808 0x7f004e    /* QM_CTRL_REG */
 			>;
 	};
@@ -1098,8 +1098,8 @@
 			0x0007c 0x7e        /* PORT0_STATUS */
 			0x00090 0x7e        /* PORT5_STATUS */
 			/* Trunk 0: P0 + P5 */
-			0x00700 0xa1        /* GOL_TRUNK_CTRL0 */
-			0x00704 0xd8        /* GOL_TRUNK_CTRL1 */
+			0x00700 0x00        /* GOL_TRUNK_CTRL0 */
+			0x00704 0x00        /* GOL_TRUNK_CTRL1 */
 			0x00808 0x7f004e    /* QM_CTRL_REG */
 			>;
 	};

Then rebuild your image and flash it. Make sure you actually use this change, just in case remove kernel build dir before re-compiling.

This is my new switch config:

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0t 1 2 4t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '3 5t'

config switch
        option name 'switch1'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch1'
        option vlan '1'
        option ports '5t 1 2'

config switch_vlan
        option device 'switch1'
        option vlan '3'
        option ports '5t 3 4'

As you can see above, i use tagged ports P4 of switch0 and P5 of switch1 to connect both switches.
It is important to make these two ports tagged, otherwise you cannot have multiple VLANs on the slave switch.

As example i have configured 2 VLANs on the slave switch:

  1. VLAN1 with ports P1 and P2
  2. VLAN3 with ports P3 and P4

Please test these and report back. Thanks!

Update 2

By the way, for your information, P4 of master is connected to P5 of slave, and P6 of master is connected to P0 of slave.
In the above switch configuration i used the pair P4 <-> P5 to connect both switches. I also tested the pair P6 <-> P0, it works as well. But don't use both pairs at once, there is no link aggregation anymore.

Update 3

By getting rid of link aggregation between the switches, i couldn't see any performance difference.
iperf3 shows the same stats. if your tests are successful then i will remove link aggregation from my branch.

1 Like