What's new

Vlans on Merlin (mini howto)

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

c0mm0n

New Around Here
Hi,

I've discovering merlin, robocfg, etc... and needed to do something which is usually trivial : tag a VLAN on a given port, or LAN, etc...

I think I got it and wanted to share as it seems it's a frequent question.

You must have your ways in SSH, etc I don't go into the detail,s just giving you the big picture.

With default settings on AC66U Merlin firmware , a "robocfg show" would give me
Code:
   1: vlan1: 1 2 8t
   2: vlan2: 0 8u

1 2 = LAN ports 1/2
0 = WAN port
8 refers to router's internal interface, I'm not sure about the t and u so won't elaborate.

Let's say I would like to TAG the VLAN 835 on port 2

I would :
Code:
robocfg vlan 835 ports "2t 8t"

Which means (for me) : create vlan 835 and have it TAGGUED (t) on port 2.

If I want it on port 1 and 2 you can
Code:
robocfg vlan 835 ports "1t 2t 8t"

Tagging it on the wan would have you use "0t" etc...

Robocfg is the switch configuration utility So from there If you want IFs, IP adresses, etc... you still have to use vconfig for that afterwards.

These 2 links were useful and may give you hints at more commands with vconfig, etc...
English : http://zwizwa.be/-/openwrt/20110302-002431
Another one in French but commands still useful
http://www.neufbox4.org/wiki/index.php?title=Configurer_les_VLANs

Hope it helps, please report If I misinterpreted something.
 
Last edited:
T means Tagged, U for Untagged.
 
I know this is an old topic but im trying to tag vlan 10 on the WAN port as the fibre company im with requires it... ive managed to change it with the following command

Code:
robocfg switch enable port 0 state enabled stp none tag 10 jumbo off vlan 10 ports "0t 8t"

that then produces this when i run robocfg show

Code:
VLANs: BCM53115 enabled mac_check mac_hash
    1: vlan1: 1 2 3 4 8t
    2: vlan2: 0 8u
    3: vlan10: 0t 8t

and i can see under tools that the vlan on the WAN port is now 10.. however when i reboot the router it goes back to VLAN2. How do i permanently change this?? and do i need to remove vlan2 somehow?
 
My dream would be to see this solution in fw as gui... :)
 
If you only need vlan for internet, you should try in-gui options:

LAN -> IPTV . In your case, try with:

Internet: VID 10, PRIO 1

should work fine.

Anyway you can allways use a script.

Create a file called wan-start

#!/bin/sh
YOUR_CODE

copy the file to /jffs/scripts and enable on GUI JFFS custom scripts and configs
 
thanks Theliel but i have solved it using ssh and the nvram command

Code:
nvram unset 'vlan2ports'
nvram unset 'vlan2hwname'
nvram set 'vlan10ports=0t 8u'
nvram set 'vlan10hwname=et0'
nvram commit
 
Interesting - I had previously tried (unsuccessfully) to use DD-WRT and some instructions on the wiki site for enabling a multi-wan connection - like you can do via the GUI with Merlin and the base Asus. Unfortunately DD-WRT does not support doing that directly in the GUI. The thing I noticed that is similar between what you did above in your script and what those instructions suggest is that you set the new hwname to 'et0'. I was looking at the nvram configuration with Merlin and when multi-wan is enabled - this is what I have for the hw names:
vlan1hwname=et1
vlan2hwname=et1
vlan3hwname=et1

The ports are set up as follows (I am using AC-87U - and chose the Lan #4 labeled port for secondary wan - which is actually the port #1 in the nvram vars shown below):
vlan1ports = "2 3 5 7*"
vlan3ports = "1 7"
vlan2ports = "0 7"

Anyhow - based on my reading of the setup with DD-WRT - I would have expected to see my vlan3hwname to be set to et0 - but as you can see it is set to the same as vlan2 and 1. I really don't understand how this hw name plays into it. And I noticed that you used 'et0' for your solution above. What drives which one to choose here for setting the hwname?
 
I chose et0 because that's the WAN port and as i say i wanted to change the default vlan2 on the WAN port to vlan10
 
Hello,
I have been trying to understand how to configure my RT-AC66U running Merlin 380.57 so that I can provide internet connections to several apartments in my building, but keep them from accessing each other's LANs. Doing that would seem simple if I could assign LAN ports to separate VLANs and configure the AC68U as a DHCP service to provide addresses 192.168.1.x to LAN1, 192.168.2.x to LAN2,....
Reconfiguring via an ssh session is easy for me, but I hesitate to start experimenting with my AC66U without understanding the configuration changes after I change the VLAN assignments on the chip using robocfg.

I am starting with a pretty simple configuration:

admin@RT-AC66U-1680:/tmp/home/root# robocfg show
Switch: enabled gigabit
Port 0: 100FD enabled stp: none vlan: 2 jumbo: off mac: bc:e6:3f:d6:b7:1b
Port 1: 100FD enabled stp: none vlan: 3 jumbo: off mac: ec:08:6b:7d:c4:3a
Port 2: 1000FD enabled stp: none vlan: 1 jumbo: off mac: ba:8d:12:80:67:00
Port 3: 100FD enabled stp: none vlan: 1 jumbo: off mac: b8:8d:12:54:fc:98
Port 4: DOWN enabled stp: none vlan: 1 jumbo: off mac: b8:8d:12:54:fc:98
Port 8: 1000FD enabled stp: none vlan: 1 jumbo: off mac: bc:ee:7b:7a:16:80
VLANs: BCM53115 enabled mac_check mac_hash
1: vlan1: 2 3 4 8t
2: vlan2: 0 8t
3: vlan3: 1 8t
admin@RT-AC66U-1680:/tmp/home/root#

Thanks for any help or pointers to other threads.
 
Hello,
I have been trying to understand how to configure my RT-AC66U running Merlin 380.57 so that I can provide internet connections to several apartments in my building, but keep them from accessing each other's LANs. Doing that would seem simple if I could assign LAN ports to separate VLANs and configure the AC68U as a DHCP service to provide addresses 192.168.1.x to LAN1, 192.168.2.x to LAN2,....
Reconfiguring via an ssh session is easy for me, but I hesitate to start experimenting with my AC66U without understanding the configuration changes after I change the VLAN assignments on the chip using robocfg.

I am starting with a pretty simple configuration:

admin@RT-AC66U-1680:/tmp/home/root# robocfg show
Switch: enabled gigabit
Port 0: 100FD enabled stp: none vlan: 2 jumbo: off mac: bc:e6:3f:d6:b7:1b
Port 1: 100FD enabled stp: none vlan: 3 jumbo: off mac: ec:08:6b:7d:c4:3a
Port 2: 1000FD enabled stp: none vlan: 1 jumbo: off mac: ba:8d:12:80:67:00
Port 3: 100FD enabled stp: none vlan: 1 jumbo: off mac: b8:8d:12:54:fc:98
Port 4: DOWN enabled stp: none vlan: 1 jumbo: off mac: b8:8d:12:54:fc:98
Port 8: 1000FD enabled stp: none vlan: 1 jumbo: off mac: bc:ee:7b:7a:16:80
VLANs: BCM53115 enabled mac_check mac_hash
1: vlan1: 2 3 4 8t
2: vlan2: 0 8t
3: vlan3: 1 8t
admin@RT-AC66U-1680:/tmp/home/root#

Thanks for any help or pointers to other threads.

Hi,

Read this one, maybe some good information :)
http://www.snbforums.com/threads/fo...guest-network-for-asus-merlin-rt-ac68u.18969/
 
hello i have one question i'm very new with ssh commands

so when i do my config
robocfg vlan 835 ports "1t 2t 8t"

after a reboot i cannot save, so how can i save my command

thank you
 
hello i have one question i'm very new with ssh commands

so when i do my config
robocfg vlan 835 ports "1t 2t 8t"

after a reboot i cannot save, so how can i save my command

thank you
Code:
nvram commit
 
robocfg settings are not written to nvram. Committing nvram won't do anything.

You have to put the command within a user script. See the Wiki for more info.
 
robocfg settings are not written to nvram. Committing nvram won't do anything.

You have to put the command within a user script. See the Wiki for more info.

Thanks! I just had a play this weekend and was just about to report back with my failure :)
 
Hi guys,

Is there any command to clone my mac-address on port 4?

My ISP requires VLAN Tagging (200) and MAC ADDRESS cloning.

So far:
robocfg switch enable port 4 state enabled stp none tag 200 jumbo off vlan 200 ports "4t 8t"

Now, I need a specific MAC-Address on port 4.

Thank you.
PD: I'm using Merlin 380.63_2 on Asus AC88u. MAC adress cloning through Web UI does not work.
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top