Posted: Thu Oct 27, 2022 15:00 Post subject: [SOLVED] Help with VLAN on R8500
I recently got hold of an R8500. It has six physical ports labeled 1-6 and swconfig shows ports 0-8. I am trying to setup a VLAN with physical ports 2 and 3 on a different subnet but something seems off and not working. Any help appreciated or if anyone has working VLAN on R8500, if you can please share your config.
Here is what I did:
* Created a bridge br1 via GUI.
* Added DHCPd on br1.
* Added following startup commands
Code:
swconfig dev switch0 set enable_vlan 1
swconfig dev switch0 vlan 1 set ports "1 4 5 7 8t"
swconfig dev switch0 vlan 3 set ports "2 3 8t"
swconfig dev switch0 set apply
vconfig add eth1 3
brctl addif br1 vlan3
ifconfig eth1.3 up
Symptoms:
If I connect ethernet cable to any ports others than 2 and 3, I get DHCP address and static address too works fine and I am able to connect to the external network. But I conenct to port 2 or 3, I do not get DHCP address, nor am I able to connect to the external network if I use static IP. I also tried ping to the router via static IP and that too is not working when connected to port 2 or 3.
Trials:
I tried using the GUI for 'Switch Config' but moved away as that GUI only showed 4 ports, not all 6.
I tried switching eth1 in the above startup commands with eth0 thinking that my router has CPU device as eth0 but that too did not work.
Other info:
Version Firmware: DD-WRT v3.0-r50500 std (10/13/22)
Bridge config after the changes applied
WAN port assignment: vlan2
vlan3 bridge assignment: Default
br1: Multicast disabled, NAT enabled, WAN NAT Redir disabled, Net Isolation enabled, Force DNS disabled, IP 192.168.2.1/24, L2Mesh disabled
DHCPd: 192.168.2.1/24 on br1 enabled
Edit 1: Added factory port settings and WAN port assignment
Edit 2: Added vlan3 and br1 config
Last edited by coolgoose3 on Fri Oct 28, 2022 19:33; edited 3 times in total
Tried that, but did not help. The downside of this trial was that vlan3 was no longer being added to br1
Quote:
br0 no eth1 eth2 eth3 vlan1
br1 no
ho1Aetoo wrote:
if this is the default configuration then the router has only one CPU port and then you have to use eht0 as eth1 is most likely WLAN
I am not sure how you guessed it from vlanports, I guessed the same from the fact that eth1 was part of br0 and I did not expect that for CPU device. I had already tried eth0 but it did not help.
Thanks for the suggestions everyone, really appreciate the help.
I tried this but still the same. I tried both vconfig add eth1 3 and vconfig add eth0 3. The other issue that happens with the GUI assignment approach is that assignment is lost after reboot. I think it is an order-of-operations issue, GUI's 'assign-vlan3-to-br1' must be running before 'startup-swconfig-vlan3-set-ports'. I can see 'Assign vlan3 to br1' in the GUI after reboot but the bridge table does not show vlan3 assigned to br1.
Tried that, but did not help. The downside of this trial was that vlan3 was no longer being added to br1
Quote:
br0 no eth1 eth2 eth3 vlan1
br1 no
ho1Aetoo wrote:
if this is the default configuration then the router has only one CPU port and then you have to use eht0 as eth1 is most likely WLAN
I am not sure how you guessed it from vlanports, I guessed the same from the fact that eth1 was part of br0 and I did not expect that for CPU device. I had already tried eth0 but it did not help.
Because WAN and LAN share the same CPU port ( 8 ).
If the router had two CPU ports then they would be two different ports.
Also eth1 eth2 eth3 and VLAN1 is bridged with br0.
VLAN1 is your LAN, eth1 eth2 eth3 are your WLAN interfaces.
You can of course continue try to tag the WLAN
a small success story "how to tag VLAN on broadcom devices".
Taking clue from that I tried to down/up cycle for the vlan3 interface after using the startup commands and things seem to be working. Then I played a little with the order of the commands.
Final solution:
* Create a bridge in the GUI, wait for 2 mins for it to show up, may need a reboot
* Define DHCPd on the new bridge
* Use the following startup commands
Code:
swconfig dev switch0 vlan 1 set ports "1 4 5 7 8t"
swconfig dev switch0 vlan 3 set ports "2 3 8t"
swconfig dev switch0 set apply
vconfig add eth0 3
ifconfig vlan3 up
brctl addif br1 vlan3
Observations:
* brctl add should be after ifconfig up
* if I move port 4 to the vlan, it also applies the same vlan setting for physical ports 5 and 6 for some reason.
You were asking why if you move port 4 to the vlan3, it also applies the same vlan3 setting for physical ports 5 and 6 for some reason.
The reason is that port 0 (WAN) and ports 1, 2 and 3 connect to the BCM4709C0KFEBG’s internal switch on R8500, while ports 4,5 and 6 connect to a Broadcom BCM53125 7 port Gigabit switch. The second switch chip connects to the CPU via an RGMII port, which basically provides a 1 Gbps uplink port between the two switches.
You were asking why if you move port 4 to the vlan3, it also applies the same vlan3 setting for physical ports 5 and 6 for some reason.
The reason is that port 0 (WAN) and ports 1, 2 and 3 connect to the BCM4709C0KFEBG’s internal switch on R8500, while ports 4,5 and 6 connect to a Broadcom BCM53125 7 port Gigabit switch. The second switch chip connects to the CPU via an RGMII port, which basically provides a 1 Gbps uplink port between the two switches.
So, i guess that you cannot change the behavior of each port on the second as all ports copy the same port 4 config.
Regards,
mflorezm
Thanks, that helps. I doubt if there will be any throughput difference between ports 2/3 and 5/6. I was wondering if I should use 2/3 for high throughput media devices versus 5/6.