[SOLVED] Help with VLAN on R8500

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
coolgoose3
DD-WRT Novice


Joined: 05 Mar 2021
Posts: 20

PostPosted: Thu Oct 27, 2022 15:00    Post subject: [SOLVED] Help with VLAN on R8500 Reply with quote
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.

References:
I studied the following threads:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=313472
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=331625
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=313472
Also studied https://wiki.dd-wrt.com/wiki/index.php/Switched_Ports https://wiki.dd-wrt.com/wiki/index.php/VLAN_Configuration and https://wiki.dd-wrt.com/wiki/index.php/Detached_Networks_using_VLAN

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
Quote:
br0 no eth1 eth2 eth3 vlan1
br1 no vlan3

Factory port settings were:
Quote:
vlan1ports=1 2 3 4 5 7 8*
vlan2ports=0 8u
port0vlans=2
port1vlans=1
port2vlans=1
port3vlans=1
port4vlans=1
port5vlans=1 2 16000
vlan1hwname=et2
vlan2hwname=et2

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
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12884
Location: Netherlands

PostPosted: Thu Oct 27, 2022 15:08    Post subject: Reply with quote
Try this:
brctl addif br1 eth1.3 instead of brctl addif br1 vlan3

see: https://ixnfo.com/en/configuring-vlans-in-ubuntu.html


Edit: probably reboot after changing

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2975
Location: Germany

PostPosted: Thu Oct 27, 2022 15:37    Post subject: Reply with quote
Quote:
vlan1ports=1 2 3 4 5 7 8*
vlan2ports=0 8u


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
coolgoose3
DD-WRT Novice


Joined: 05 Mar 2021
Posts: 20

PostPosted: Thu Oct 27, 2022 19:53    Post subject: Reply with quote
egc wrote:
Try this:
brctl addif br1 eth1.3 instead of brctl addif br1 vlan3

see: https://ixnfo.com/en/configuring-vlans-in-ubuntu.html


Edit: probably reboot after changing


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.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6867
Location: Romerike, Norway

PostPosted: Thu Oct 27, 2022 21:10    Post subject: Reply with quote
Drop these from the startup script:

brctl addif br1 vlan3
ifconfig eth1.3 up

Do you see vlan3 in the Networking Tab?

Assign vlan3 to br1 in the GUI.
coolgoose3
DD-WRT Novice


Joined: 05 Mar 2021
Posts: 20

PostPosted: Thu Oct 27, 2022 21:58    Post subject: Reply with quote
Per Yngve Berg wrote:
Drop these from the startup script:

brctl addif br1 vlan3
ifconfig eth1.3 up

Do you see vlan3 in the Networking Tab?

Assign vlan3 to br1 in the GUI.

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.
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2975
Location: Germany

PostPosted: Fri Oct 28, 2022 6:39    Post subject: Reply with quote
coolgoose3 wrote:
egc wrote:
Try this:
brctl addif br1 eth1.3 instead of brctl addif br1 vlan3

see: https://ixnfo.com/en/configuring-vlans-in-ubuntu.html


Edit: probably reboot after changing


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 Mr. Green



a small success story "how to tag VLAN on broadcom devices".

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1274085#1274085

a small hint: you have to go to the "networking tab" and add eth0 with tag number 3 under "vlan tagging"

Then under "bridging" create the bridge br1 and then under "bridge assignment" assign br1 eth0.3/vlan3

These are the only startup commands that are needed

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
coolgoose3
DD-WRT Novice


Joined: 05 Mar 2021
Posts: 20

PostPosted: Fri Oct 28, 2022 19:32    Post subject: Reply with quote
ho1Aetoo wrote:

You can of course continue try to tag the WLAN Mr. Green

Thanks for confirming that I should be using eth0, that helped.

SOLVED, thanks to this post https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1167440#1167440

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.
mflorezm
DD-WRT Novice


Joined: 19 Feb 2018
Posts: 11

PostPosted: Fri Jan 06, 2023 2:45    Post subject: Reply with quote
Hi coolgoose3,

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.

That was wrote on https://www.smallnetbuilder.com/wireless/wireless-reviews/netgear-r8500-nighthawk-x8-smart-wifi-router-reviewed/ where they follow each trace on the R8500 PCV to find where is connected each one.

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
coolgoose3
DD-WRT Novice


Joined: 05 Mar 2021
Posts: 20

PostPosted: Tue Nov 14, 2023 22:40    Post subject: Reply with quote
mflorezm wrote:
Hi coolgoose3,

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.

That was wrote on https://www.smallnetbuilder.com/wireless/wireless-reviews/netgear-r8500-nighthawk-x8-smart-wifi-router-reviewed/ where they follow each trace on the R8500 PCV to find where is connected each one.

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.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum