AstroIT
New Around Here
Hi there
I have been lurking for a few weeks now and have been impressed with both the width and depth of knowledge on here
I have recently bought an Asus RT-AC87U router and have installed the Merlin firmware on it (v 380.62_1). I am trying to get my head around VLAN configuration (which is a topic pretty new to me).
The end goal is to configure the Asus in conjunction with some wireless access points from Ubiquiti and some Netgear smart switches. I want to establish 3 wireless networks on the Ubiquiti kit, each on a separate VLAN (so VLAN1 for a "staff" network, VLAN10 for a paying guest network and VLAN20 for a free guest network). I know that Ubiquiti can do this without VLANs, but I know that at some point in future, the client are going to want to share printers with the paying guests but not the free ones, etc, and so I think VLANs will support the sort of things I want.
So far, I have managed with help from a few threads on SNB to set up one of the LAN ports on the Asus to tag traffic to VLAN10 (I am leaving the Netgear switches and Ubiquiti APs out of the picture for now, and am connecting my laptop to the LAN port). I have then been able to configure dnsmasq to issue DHCP IP addresses in a separate subnet on VLAN10 (192.168.10.1/24) as opposed to VLAN1 (192.168.1.1/22).
The problem comes when I want to allow clients on VLAN10 access to the internet. I know from other threads that this is where things like iptables and ebtables probably come into play (full disclosure: I am a Windows guy and know very little about Linux command line stuff )
With a few iptables rules, I can get m laptop to reach the DHCP server in the VLAN10 subnet and get an IP address, and I can access the internet. However, internet access is not very reliable. Some sites load fine, others seem to "hang" on some requests (often for CSS, JS files, etc) which is weird. The same sites are OK on VLAN1, either via LAN ports or Asus WiFi.
This seems counter-intuitive to me, and I can't see why some HTTP traffic would work and some not just because of firewall rules. My config is posted below - I am not 100% sure what the iptables commands do, and have patched them together from several other threads. Any help or advice would be much appreciated
Thanks in advance,
Trev
Standard config for the router via the UI:
IP address: 192.168.1.1
Subnet mask: 255.255.252.0
DHCP starting address: 192.168.1.2
DHCP ending address: 192.168.2.254
DNS: 208.67.222.222 (OpenDNS)
I am issuing these commands via telnet when the router starts up (I know ultimately I need to put them in services-start or similar, but for now it is nice to know that rebooting the box will clear all my config in case I lock myself out...)
I have tried to comment on what I *think* each command does - if I am mistaken, please let me know - as I said, I am a newbie to Linux networking...
# remove port 2 from VLAN1
robocfg vlan 1 ports "1 3 4 5u 7t"
# add port 2 to VLAN10
# untagged if connecting laptop - when connecting switch or AP, it should be "2t 7t"
robocfg vlan 10 ports "2u 7t"
# create device vlan10
vconfig add eth0 10
# create interface vlan10 with IP, netmask and start it
ifconfig vlan10 192.168.10.1 netmask 255.255.255.0 up
Output from robocfg show:
Switch: enabled
Port 0: 100FD enabled stp: none vlan: 2 jumbo: off mac: a0:f3:e4:35:55:8e
Port 1: 1000FD enabled stp: none vlan: 1 jumbo: off mac: 00:11:32:51:c6:ed
Port 2: 100FD enabled stp: none vlan: 10 jumbo: off mac: 00:0e:c6:c3:16:9d
Port 3: DOWN enabled stp: none vlan: 1 jumbo: off mac: 00:00:00:00:00:00
Port 4: DOWN enabled stp: none vlan: 1 jumbo: off mac: 00:00:00:00:00:00
Port 8: DOWN enabled stp: none vlan: 1 jumbo: off mac: 00:00:00:00:00:00
VLANs: BCM5301x enabled mac_check mac_hash
1: vlan1: 1 3 4 5 7t
2: vlan2: 0 7
10: vlan10: 2 7t
Add the following to /jffs/configs/dnsmasq.conf.add:
interface=vlan10
dhcp-range=vlan10,192.168.10.100,192.168.10.200,255.255.255.0,8h
dhcp-option=vlan10,3,192.168.10.1
dhcp-option=vlan10,6,208.67.222.222,0.0.0.0
dhcp-option=vlan10,252,"\n"
(I am not sure what the last line does, but the existing config for the VLAN1 DHCP has that too, so this mimics it)
Issue the following commands:
iptables -I FORWARD -i vlan10 -j ACCEPT
iptables -I INPUT 1 -i vlan10 -j ACCEPT
(I believe this should allow all traffic between vlan10 and the internet - probably the internal network too, but that's the next problem )
After connecting my laptop to LAN port 2, I am assigned an IP in 192.168.10.xxx via DHCP as expected, and I can ping hosts on the internet. However, some internet web sites do not load.
For example:
https://mail.office365.com works
http://www.bbc.co.uk/news does not (using Fiddler, I can see it hanging on requests to bbci.co.uk)
I have been lurking for a few weeks now and have been impressed with both the width and depth of knowledge on here
I have recently bought an Asus RT-AC87U router and have installed the Merlin firmware on it (v 380.62_1). I am trying to get my head around VLAN configuration (which is a topic pretty new to me).
The end goal is to configure the Asus in conjunction with some wireless access points from Ubiquiti and some Netgear smart switches. I want to establish 3 wireless networks on the Ubiquiti kit, each on a separate VLAN (so VLAN1 for a "staff" network, VLAN10 for a paying guest network and VLAN20 for a free guest network). I know that Ubiquiti can do this without VLANs, but I know that at some point in future, the client are going to want to share printers with the paying guests but not the free ones, etc, and so I think VLANs will support the sort of things I want.
So far, I have managed with help from a few threads on SNB to set up one of the LAN ports on the Asus to tag traffic to VLAN10 (I am leaving the Netgear switches and Ubiquiti APs out of the picture for now, and am connecting my laptop to the LAN port). I have then been able to configure dnsmasq to issue DHCP IP addresses in a separate subnet on VLAN10 (192.168.10.1/24) as opposed to VLAN1 (192.168.1.1/22).
The problem comes when I want to allow clients on VLAN10 access to the internet. I know from other threads that this is where things like iptables and ebtables probably come into play (full disclosure: I am a Windows guy and know very little about Linux command line stuff )
With a few iptables rules, I can get m laptop to reach the DHCP server in the VLAN10 subnet and get an IP address, and I can access the internet. However, internet access is not very reliable. Some sites load fine, others seem to "hang" on some requests (often for CSS, JS files, etc) which is weird. The same sites are OK on VLAN1, either via LAN ports or Asus WiFi.
This seems counter-intuitive to me, and I can't see why some HTTP traffic would work and some not just because of firewall rules. My config is posted below - I am not 100% sure what the iptables commands do, and have patched them together from several other threads. Any help or advice would be much appreciated
Thanks in advance,
Trev
Standard config for the router via the UI:
IP address: 192.168.1.1
Subnet mask: 255.255.252.0
DHCP starting address: 192.168.1.2
DHCP ending address: 192.168.2.254
DNS: 208.67.222.222 (OpenDNS)
I am issuing these commands via telnet when the router starts up (I know ultimately I need to put them in services-start or similar, but for now it is nice to know that rebooting the box will clear all my config in case I lock myself out...)
I have tried to comment on what I *think* each command does - if I am mistaken, please let me know - as I said, I am a newbie to Linux networking...
# remove port 2 from VLAN1
robocfg vlan 1 ports "1 3 4 5u 7t"
# add port 2 to VLAN10
# untagged if connecting laptop - when connecting switch or AP, it should be "2t 7t"
robocfg vlan 10 ports "2u 7t"
# create device vlan10
vconfig add eth0 10
# create interface vlan10 with IP, netmask and start it
ifconfig vlan10 192.168.10.1 netmask 255.255.255.0 up
Output from robocfg show:
Switch: enabled
Port 0: 100FD enabled stp: none vlan: 2 jumbo: off mac: a0:f3:e4:35:55:8e
Port 1: 1000FD enabled stp: none vlan: 1 jumbo: off mac: 00:11:32:51:c6:ed
Port 2: 100FD enabled stp: none vlan: 10 jumbo: off mac: 00:0e:c6:c3:16:9d
Port 3: DOWN enabled stp: none vlan: 1 jumbo: off mac: 00:00:00:00:00:00
Port 4: DOWN enabled stp: none vlan: 1 jumbo: off mac: 00:00:00:00:00:00
Port 8: DOWN enabled stp: none vlan: 1 jumbo: off mac: 00:00:00:00:00:00
VLANs: BCM5301x enabled mac_check mac_hash
1: vlan1: 1 3 4 5 7t
2: vlan2: 0 7
10: vlan10: 2 7t
Add the following to /jffs/configs/dnsmasq.conf.add:
interface=vlan10
dhcp-range=vlan10,192.168.10.100,192.168.10.200,255.255.255.0,8h
dhcp-option=vlan10,3,192.168.10.1
dhcp-option=vlan10,6,208.67.222.222,0.0.0.0
dhcp-option=vlan10,252,"\n"
(I am not sure what the last line does, but the existing config for the VLAN1 DHCP has that too, so this mimics it)
Issue the following commands:
iptables -I FORWARD -i vlan10 -j ACCEPT
iptables -I INPUT 1 -i vlan10 -j ACCEPT
(I believe this should allow all traffic between vlan10 and the internet - probably the internal network too, but that's the next problem )
After connecting my laptop to LAN port 2, I am assigned an IP in 192.168.10.xxx via DHCP as expected, and I can ping hosts on the internet. However, some internet web sites do not load.
For example:
https://mail.office365.com works
http://www.bbc.co.uk/news does not (using Fiddler, I can see it hanging on requests to bbci.co.uk)