Create VLAN WAN automatically - WNDR3700v2 AA 12.09

Hi!

My ISP has the WAN on a VLAN, so for it to work, I do:

  • vconfig add eth1 1234
  • in the GUI set the WAN interface to "eth1.1234"

The problem: after reboot, the VLAN interface does not exist.

My question is, how to create it "properly".

On this page it suggests to just use the vlan if name:

config interface 'wan'
	option ifname 'eth0.204'
	option proto 'dhcp'

But that does not work (maybe it works in later versions, I have 12.09).
Is there a way to create the vlan interface via entry in /etc/config/network? I know I could just add the vconfig command to the startup scripts, but if the existing config framework supports it, I would prefer that way.

Hardware: Netgear WNDR3700v2
Software: OpenWrt Attitude Adjustment 12.09 (yes, old, I consider updating in the future)

The most people dont know how this is handled on the old 12.09 release.
The suggestion (software vlan) works on the newer releases for sure, but keep in mind that your device does also have a switch with hw vlan capability.

Please update your device to a recent and maintained stable release as the old barrier breaker release is like swiss cheese with a lot of big security holes.

That model has a separate 7 port Ethernet switch chip (2 CPU and 5 external) that all Ethernet passes through, so you will have to also modify the VLAN configuration of the switch. Change the WAN from it's default of 2 to what the ISP requires, and make the external port tagged.

But first of course upgrade to 19.07.2. The settings cannot be saved, so be prepared to configure the new install from scratch.