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:
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.
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 . 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.
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