Netgear XR500 vlan [SOLVED]

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware
Author Message
weky
DD-WRT Novice


Joined: 29 Jun 2020
Posts: 3

PostPosted: Tue Jul 07, 2020 19:55    Post subject: Netgear XR500 vlan [SOLVED] Reply with quote
Hi, I recently decided to flash my XR500 with dd-wrt (DD-WRT v3.0-r43516 std) and am running into some problems when getting everything to work. I'll post all my questions in one topic here together with configuration, hoping that somebody might be able to point me towards something I did wrong.

I upgraded mostly because I needed more fine-grained control over VLANs, and the ability to work with trunks and isolated networks. My network looks something like this:

Code:

                                             |--------------------[VMWare ESXi]--------------------|
                                             |    /-----VLAN0 ()                                               |
                                             |   /------VLAN1 (local?)                                       |
WAN---[XR500]====(LAN4)==|==-----VLAN3 (isolated, 192.168.3.1/24)             |
               \                             |  \------VLAN4 (local, 192.168.4.1/24, part of br0)|
                \                            |---------------------------------------------------------|
                 \
                  \---(ath0,ath1)----------br0 (local, 192.168.1.1/24)


And the router configuration is:
Code:

nvram set vlan0ports="1 2 3 4 5t*"
nvram set vlan1ports="0 5"
nvram set vlan2ports="4t 5t"
nvram set vlan3ports="4t 5t"
nvram set vlan4ports="4t 5t"
nvram set port5vlans="1 2 3 4 5 16"
nvram set port4vlans="1 3 4 5 16 17"
nvram set port3vlans="1 16 17"
nvram set port2vlans="1 16 17"
nvram set port1vlans="1 16 17"
nvram set port0vlans="2 17"
nvram commit
swconfig dev switch0 set enable_vlan 1
swconfig dev switch0 vlan 1 set ports "1 2 3 4 5t 6t"
swconfig dev switch0 vlan 3 set ports "4t 5t 6t"
swconfig dev switch0 vlan 4 set ports "4t 5t 6t"
swconfig dev switch0 vlan 2 set ports "0 5"
swconfig dev switch0 set apply


There are few problems with the configuration, depending on the VLAN being used:
1. All virtual machines using VLAN 0:

  • Successfully get 192.168.1.1/24 IP from DHCP
  • Local speed to the router is acceptable (700-800 Mbps)
  • Internet speed is capping at around 10/3Mbps


2. All virtual machines using VLAN 1:

  • Never get IP from DHCP (/tmp/var/log/messages shows that machine is requesting IP, dnsmasq offers an IP but for some reason machine never ends up using this IP)

3. All virtual machines using VLAN 3,4:

  • Routing works as expected (3 is isolated from everything, 4 can communicate with WIFI devices in br0)
  • Both local and internet speed is capping at 200-300Mbps

4. The remaining 3 Ethernet ports show the same problem as VLAN0 VMs, internet speed capped at few Mbps

Few more notes:

  • My ISP speed is 1000/100, confirmed working through the same port once I go back for factory defaults (disable VLAN)
  • During speed tests, router CPU usage does not seem to exceed 30%
  • Local speed measured with iperf3 on all devices
  • Internet speed measured by downloading a large file using wget, or speedtest.net


For VLAN speed, I found similar problem in an older post https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1059988 but it's likely due to slow router. From what I read, XR500 uses IPQ chipset that should be able to deliver decent routing times.
Sponsor
Per Yngve Berg
DD-WRT Guru


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

PostPosted: Wed Jul 08, 2020 16:22    Post subject: Reply with quote
Code:
nvram set vlan0ports="1 2 3 4 5t*"
nvram set vlan1ports="0 5"
nvram set vlan2ports="4t 5t"
nvram set vlan3ports="4t 5t"
nvram set vlan4ports="4t 5t"
nvram set port5vlans="1 2 3 4 5 16"
nvram set port4vlans="1 3 4 5 16 17"
nvram set port3vlans="1 16 17"
nvram set port2vlans="1 16 17"
nvram set port1vlans="1 16 17"
nvram set port0vlans="2 17"
nvram commit


These are for Broadcom. Don't touch them or the switch config in the GUI. Mays screw up your swconfig settings.

LAN (VLAN1) is on eth1. That is port 6 without the t.

swconfig dev switch0 vlan 1 set ports "1 2 3 4 5t 6"

VLAN 3 and 4 is eth1.3 and eth1.4.
weky
DD-WRT Novice


Joined: 29 Jun 2020
Posts: 3

PostPosted: Wed Jul 08, 2020 18:30    Post subject: Reply with quote
Thank you for your reply, I appreciate the help Smile

Yeah, I had some problems after enabling VLAN from web interface, so I ended up adding both. I removed the nvram part now.

I tried removing t from vlan 1 in startup script and power cycling the router. Something has changed.

VMs in VLAN0 can't get IP from DHCP, but with static IP their internet speed is about 200-300Mbps. I guess I can live with static IPs in wired VLAN0. So now they match speed in other VLANs, that's good improvement.

No change in VMs in in VLAN1 - they can't get IP from DHCP (even though they are offered one) and even when using static IP, they can't reach the internet.

The last question remains why the speed to WAN is so low?
iperf between two VMs in two separate VLANs shows >900Mbps. I think this confirms that the router is fast enough and I messed up somewhere in config Laughing. Clients were even in separate subnets (going from 192.168.1.1/24 to 192.168.4.100/24) to try and force routing on XR500 and not VMware switch.
I also tried tail -F /tmp/var/log/messages | grep <VM_MAC> hoping I'd see some drop log entries, but there are none.
weky
DD-WRT Novice


Joined: 29 Jun 2020
Posts: 3

PostPosted: Thu Jul 09, 2020 9:01    Post subject: Reply with quote
Resolved. Inspired by Per Yngve Berg's reply, I did factory reset and then configured vlan using only cmd and swconfig/vconfig. DHCP now works as it should on LAN devices in trunk, local and internet speeds are as they should be.

I arrived at the following
Code:

swconfig dev switch0 set enable_vlan 1
swconfig dev switch0 vlan 1 set ports "1 2 3 4 5t 6"
swconfig dev switch0 vlan 3 set ports "4t 5t 6t"
swconfig dev switch0 vlan 4 set ports "4t 5t 6t"
swconfig dev switch0 vlan 2 set ports "0 5"
swconfig dev switch0 set apply
vconfig add eth1 3
vconfig add eth1 4
ifconfig eth1.3 192.168.3.1 netmask 255.255.255.0
ifconfig eth1.4 192.168.4.1 netmask 255.255.255.0

And configured DHCP on vlans 3 & 4 through GUI.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware 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