Joined: 22 Jan 2011 Posts: 19 Location: N 1 17.684 E 103 51.533
Posted: Thu Mar 03, 2011 15:07 Post subject: VLAN ID settings for Singnet Fibre Broadband [SOLVED]
I'm interested to know if anyone had successfully used DD-WRT firmware to set the VLAN ID 10, 20, 30 & 40 on the WAN/LAN side of the router for Singnet Fibre Broadband users in Singapore.
Well you overlooked the part of that page that tells you that only VLAN's 1-15 are usable. There is a patched kernel module that enables more VLAN's but it requires a lot of knowledge to use and hasn't been tested much.
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=86919 _________________ Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
Joined: 22 Jan 2011 Posts: 19 Location: N 1 17.684 E 103 51.533
Posted: Mon Mar 07, 2011 15:38 Post subject:
phuzi0n wrote:
Well you overlooked the part of that page that tells you that only VLAN's 1-15 are usable. There is a patched kernel module that enables more VLAN's but it requires a lot of knowledge to use and hasn't been tested much.
I've picked up some tips form the above link and try several commands to get the VLAN ID 10 to work. Unfortunately it still doesn't get thru. I've telnet some commands to see if the WAN port get tagged. I've attached a file here. Could you please take a look at the file and advice if I have done something wrong.
Here is the command lines that I've used for activating the robo switch.
rmmod switch-robo
insmod /jffs/switch-robo.ko
echo "0t 3 8" >/proc/switch/eth0/vlan/10/ports
echo "0t 8" >/proc/switch/eth0/vlan/20/ports
echo "0* 8" >/proc/switch/eth0/vlan/2/ports
vconfig add eth0 10
ifconfig vlan10 up
vconfig add eth0 20
ifconfig vlan20 up
nvram set wan_ifname=eth0.10
startservice wan
I just upgraded to Singtel Fibre Optic last week and happen to own a WRT610N. I had a similar issue with the original poster where I need to figure how to configure WRT610 to work with VLANs. After numerous try and error, I finally got it working with the stocked dd-wrt firmware. I thought I should share it here as my first post in the forum.
Although the dd-wrt limits to the first 15 VLANs as written by phuzi0n, the limit does not bother me because I only subscribe to the Internet service (VLAN ID 10) and not the IPTV (VID 20) & VOIP (VID 30). If I were, I would probably use the modified switch-robo.ko kernel module compiled by tangsoft or cron2.
Anyway, here is the two steps to setup the VLAN.
1. In the VLANs tab, tagged the WAN port and then select VLAN10 and unselect VLAN2 (for my case). Apply setting and wait for a while.
2. In the Networking tab, assign VLAN10 as the VLAN for WAN. (If you don't see VLAN10 in the drop down list, it means you have not wait long enough in step 1. Cycle to other tab first and come back to check again). Apply setting. See attachment below.
My WAN connection type is set to "Automatic Configuration - DHCP". After applying the setting in step 2, the VLAN10 interface is up, WAN IP is assigned automatically from Singtel ISP. At this point, the internet surfing is possible.
Unfortunately, I believe there is a bug in the firmware. VLAN assignment setting for WAN does not survive the power cycle. It always reverts back to VLAN2 for my case. To me, this looks like the same bug reported in this post: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=56868
If it is true, this bug is not fixed since then until today. I have tried the latest BS build (b18777) and I believe I am observing the same problem. I hope the Gurus here agree it is a bug and have it fixed soon. I don't have enough karma to fix it myself .
All is not lost though as I figure out another way to workaround the problem. Here is my workaround, YMMV.
1. Enable the JFFS2 support.
2. Telnet/ssh into router and execute these commands:
Code:
mkdir -p /jffs/etc/config
echo '#!/bin/ash
PATH="/sbin:/usr/sbin:/bin:/usr/bin:${PATH}"
nvram set wan_iface=vlan10
nvram set wan_ifname2=vlan10
nvram set wan_ifname=vlan10
nvram set wan_ifnames=vlan10
nvram commit
startstop wan
ifconfig vlan2 down' >/jffs/etc/config/vlan10.startup
chmod 750 /jffs/etc/config/vlan10.startup
Above commands generate a folder containing new startup script that runs every time the router reboots. It basically reassigns the vlan10 as the VLAN for the WAN and restart the WAN service.
BTW, for those out there that still uses the old firmware builds that do not have the working webGUI for VLAN setup, you may want to try below instead to setup the VLANs via command line.
Code:
nvram set port0vlans="10 16"
nvram set port5vlans="1 10 16"
nvram set new_vlan2ports=
nvram set new_vlan2hwname=
nvram set vlan10ports="0t 8"
nvram set vlan10hwname=et0
nvram commit
I hope this help someone else with similar requirement. I also hope I am not too late for the original poster .
Joined: 22 Jan 2011 Posts: 19 Location: N 1 17.684 E 103 51.533
Posted: Sat Apr 07, 2012 14:09 Post subject:
Hi weitjong,
I've tried your method and I've managed to get the WAN IP from Singtel ISP. As you have metioned, after rebooting, the WAN Port Assignment switches back to vlan2.
Next step, I Enabled the JFFS2 support and Telnet. However, after rebooting, the WAN Port Assignment switches back to vlan2 again. I'm not sure what has gone wrong. I've taken a snapshot of what I have done in the picture below. Hope to hear for a viable solution. Thanks.
From the error message that you got, I can think of two possibilities:
1. You have not enabled the jffs correctly.
2. Your router may use different mount point than my WRT610N does.
Can you check the output of this command "df -h". Mine is something like this.
Code:
# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 5.6M 5.6M 0 100% /
/dev/mtdblock/4 1.1M 324.0K 828.0K 28% /jffs
If you only see one entry in the output then you have not enabled the new file system correctly. If you see two entries then check what is your system mount point for JFFS. As you can see mine is "/jffs".
Another way to test is by manually go to the "/jffs" or what have you, and try to create a temporary file for testing. You will only be able to do so when the JFFS is enabled correctly. You can do the test like this.
Code:
touch /jffs/test123 && ls /jffs && rm /jffs/test123
You should see "test123" being listed out as the output in the above test, if the filesystem is mounted properly.
Thanks LOM. I am about to point out the same section .
scorp588, you have to follow the steps in the wiki as close as possible. I am also new to the dd-wrt world and it took me a few attempts to get it right at first. I use the same wiki page, btw. When it says wait, it really means it.
I can see you are not that familiar with Linux, but it does not matter. Both your test outputs show you have not enabled the JFFS correctly. So, that is the reason why you failed to create the vlan10.startup script.
Joined: 22 Jan 2011 Posts: 19 Location: N 1 17.684 E 103 51.533
Posted: Mon Apr 09, 2012 5:27 Post subject: VLAN ID settings for Singnet Fibre Broadband [SOLVED]
Thanks weitjong & LOM.
I have re-flashed the router with the firmware “dd-wrt.v24-18946_NEWD-2_K2.6_std_usb_nas-nv60k.bin” and now all looks good. The jffs worked as it should be.
I was using the “big” version of build 18946 previously. I guess it doesn’t work well with E2000 router for enabling jffs. May be there is a hardware limitations.
PS: weitjong - A very big thank you to you pal. Another Problem Solved!
I just upgraded to Singtel Fibre Optic last week and happen to own a WRT610N. I had a similar issue with the original poster where I need to figure how to configure WRT610 to work with VLANs. After numerous try and error, I finally got it working with the stocked dd-wrt firmware. I thought I should share it here as my first post in the forum.
Although the dd-wrt limits to the first 15 VLANs as written by phuzi0n, the limit does not bother me because I only subscribe to the Internet service (VLAN ID 10) and not the IPTV (VID 20) & VOIP (VID 30). If I were, I would probably use the modified switch-robo.ko kernel module compiled by tangsoft or cron2.
Anyway, here is the two steps to setup the VLAN.
1. In the VLANs tab, tagged the WAN port and then select VLAN10 and unselect VLAN2 (for my case). Apply setting and wait for a while.
2. In the Networking tab, assign VLAN10 as the VLAN for WAN. (If you don't see VLAN10 in the drop down list, it means you have not wait long enough in step 1. Cycle to other tab first and come back to check again). Apply setting. See attachment below.
My WAN connection type is set to "Automatic Configuration - DHCP". After applying the setting in step 2, the VLAN10 interface is up, WAN IP is assigned automatically from Singtel ISP. At this point, the internet surfing is possible.
Unfortunately, I believe there is a bug in the firmware. VLAN assignment setting for WAN does not survive the power cycle. It always reverts back to VLAN2 for my case. To me, this looks like the same bug reported in this post: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=56868
If it is true, this bug is not fixed since then until today. I have tried the latest BS build (b18777) and I believe I am observing the same problem. I hope the Gurus here agree it is a bug and have it fixed soon. I don't have enough karma to fix it myself .
All is not lost though as I figure out another way to workaround the problem. Here is my workaround, YMMV.
1. Enable the JFFS2 support.
2. Telnet/ssh into router and execute these commands:
Code:
mkdir -p /jffs/etc/config
echo '#!/bin/ash
PATH="/sbin:/usr/sbin:/bin:/usr/bin:${PATH}"
nvram set wan_iface=vlan10
nvram set wan_ifname2=vlan10
nvram set wan_ifname=vlan10
nvram set wan_ifnames=vlan10
nvram commit
startstop wan
ifconfig vlan2 down' >/jffs/etc/config/vlan10.startup
chmod 750 /jffs/etc/config/vlan10.startup
Above commands generate a folder containing new startup script that runs every time the router reboots. It basically reassigns the vlan10 as the VLAN for the WAN and restart the WAN service.
BTW, for those out there that still uses the old firmware builds that do not have the working webGUI for VLAN setup, you may want to try below instead to setup the VLANs via command line.
Code:
nvram set port0vlans="10 16"
nvram set port5vlans="1 10 16"
nvram set new_vlan2ports=
nvram set new_vlan2hwname=
nvram set vlan10ports="0t 8"
nvram set vlan10hwname=et0
nvram commit
I hope this help someone else with similar requirement. I also hope I am not too late for the original poster .
hi weitjong,
i have a wrt350n
i have the same problem but i use a vpn build which doesn't have jffs
could you write a script for me to put in the startup command?
at the moment i have some vpn scripts in the start up command which works fine,
so all i need is the script to switch the vlan2 to vlan10 and restart the wan services before my vpn script kicks in