VLAN Network Config error - WNDR3800 running Gargoyle 1.11

Report wireless and/or network connectivity problems in this forum.

Moderator: Moderators

RonV
Posts: 6
Joined: Tue Oct 15, 2019 6:31 am

VLAN Network Config error - WNDR3800 running Gargoyle 1.11

Post by RonV »

I have a Netgear WNDR3800 running Gargoyle version 1.11. In the network config file I am trying to set up a VLAN ID of 2 which is required for my ISP (they provided a router that needs a reboot every month and DHCP can't reserve more than 32 IP addresses). This needs to be done in the /etc/config/network file.

I've coded comms software before but this network thing is a whole new kettle of fish.

The config is as follows and it is not correct - my fixed lan connections are not connecting with this:

Code: Select all

config interface 'loopback'                       
        option ifname 'lo'        
        option proto 'static'      
        option ipaddr '127.0.0.1'   
        option netmask '255.0.0.0'      

config globals 'globals'                               
        option ula_prefix 'fdee:bdcf:b059::/48'        

config interface 'lan'                            
        option type 'bridge'                        
        option ifname 'eth0.1'                  
        option proto 'static'                 
        option ipaddr '192.168.1.1'                
        option netmask '255.255.255.0'           
        option ip6assign '60'          
        option dns '192.168.1.1'             

config interface 'wan'                                   
        option ifname 'eth1.2'                             
        option ipv6 '0'                              
        option proto 'pppoe'                   
        option keepalive '3 5'                         
        option username 'USERNAME'              
        option password 'PASSWORD'                        
        option mtu '1480'                   

config interface 'wan6'                         
        option ifname 'eth1.2'                
        option proto 'dhcpv6'                        

config switch                               
        option name 'switch0'                  
        option reset '1'                
        option enable_vlan '1'                     
        option blinkrate '2'                  

config switch_vlan                                 
        option device 'switch0'                
        option vlan '1'                              
        option ports '0 1 2 3'            

config switch_vlan                      
        option device 'switch0'                         
        option vlan '2'                   
        option ports '5t'

config switch_port                               
        option device 'switch0'                    
        option port '1'                             
        option led '6'                  

config switch_port                               
        option device 'switch0'                     
        option port '2'                              
        option led '9'                      
        
config switch_port                             
        option device 'switch0'          
        option port '5'                 
        option led '2'
The original config had one "config switch vlan" section which included all ports '0 1 2 3 5t' I'm not 100% sure but believe the 'config interface lan' had ifname - 'eth0' defined, no plan. The 'config interface wan' was set to eth1 (again not 100% sure, might have been eth0 as well.

I thought I would have to separate the LAN and WAN by going them each their own vlan but as it is now, the hardwired connections don't work.

I tried changing the lan interface to 'eth0.2' and then the fixed ports work. But I think there might be contention somehow as the wifi dropped out at some stage.

Would any network guru be able to help?

Thanks Ron

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: VLAN Network Config error - WNDR3800 running Gargoyle 1.11

Post by Lantis »

It is probably easier to assist you if you post the original config along with what you have changed.

The other thing to remember is that if you make this change manually, any time you use the GUI it may (probably will) overwrite your settings and you'll need to do them again.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

RonV
Posts: 6
Joined: Tue Oct 15, 2019 6:31 am

Re: VLAN Network Config error - WNDR3800 running Gargoyle 1.11

Post by RonV »

The original config was this, with a single VLAN ID 1 on the LAN side. My aim is to get an additional VLAN ID 2 for the WAN side.

Code: Select all

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdee:bdcf:b059::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option dns '192.168.1.1'

config interface 'wan'
        option ifname 'eth1'
        option ipv6 '0'
        option proto 'pppoe'
        option keepalive '3 5'
        option username 'USERNAME'
        option password 'PASSWORD'
        option mtu '1480'

config interface 'wan6'
        option ifname 'eth1'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'
        option blinkrate '2'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 3 5t'

config switch_port
        option device 'switch0'
        option port '1'
        option led '6'

config switch_port
        option device 'switch0'
        option port '2'
        option led '9'

config switch_port
        option device 'switch0'
        option port '5'
        option led '2'  
The WNDR3800 has a 4 port switch for LAN and a single WAN port.

Other than adding devices with specific IP addresses in the DHCP section I'm not making any changes via the GUI. This doesn't appear to affect the /etc/config/network file.

Rog66
Posts: 206
Joined: Fri Jan 04, 2013 4:53 pm

Re: VLAN Network Config error - WNDR3800 running Gargoyle 1.11

Post by Rog66 »

Flash openwrt - use the vlan GUI to configure what you want and make sure it works. Copy the config file to a pc so you have a copy. Flash Gargoyle back and then modify the necessary parts of config file as per your openwrt network config file.

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: VLAN Network Config error - WNDR3800 running Gargoyle 1.11

Post by Lantis »

Roman's suggestion is probably the fastest way to get it right first time.

Port "5" is the CPU of your router and needs to be included (and tagged) in both VLANs or you'll get nothing.

I'm a bit confused as to whether the wndr3800 is internally wired to "port 4" or whether "eth1" is directly tied to the CPU (i.e. not through the switch device).
If it is directly wired to the CPU, i'm not that familiar with how to make a VLAN on it.
To convert one of the LAN ports, the config would be like:

Code: Select all

config switch_vlan                                 
        option device 'switch0'               
        option vlan '1'                             
        option ports '1 2 3 5t'           

config switch_vlan                     
        option device 'switch0'                         
        option vlan '2'                   
        option ports '0 5t'
and then change all references from "eth1" to "eth0.2".

Using openwrt temporarily might be simpler and quicker...
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

RonV
Posts: 6
Joined: Tue Oct 15, 2019 6:31 am

Re: VLAN Network Config error - WNDR3800 running Gargoyle 1.11

Post by RonV »

Thanks Roman, Lantis

I've gone the OpenWRT way and have this running now. I don't see where I can specify the VLAN ID for the WAN / WAN6 side though.

In the WAN config I can set of of the following interfaces:
Ethernet switch: eth0
Switch vlan: eth0.1 (lan)
Ethernet adapter: eth1 (wan6)
Custom:

I added custom eth0.2 which in the config file now shows:

Code: Select all

config interface 'wan'
	option proto 'pppoe'
	option username 'USERNAME'
	option password 'PASSWORD'
	option ipv6 'auto'
	option mtu '1480'
	option ifname 'eth0.2'

I don't see a second 'config switch_vlan' section with 'option vlan 2'.

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: VLAN Network Config error - WNDR3800 running Gargoyle 1.11

Post by Lantis »

There should be a LUCI application for configuring the VLANs in a GUI.
This will ensure everything goes right :)
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

RonV
Posts: 6
Joined: Tue Oct 15, 2019 6:31 am

Re: VLAN Network Config error - WNDR3800 running Gargoyle 1.11

Post by RonV »

I've got it working now. According to your earlier info lantis, it seemed to me all that was missing with my initial problem was the '5t' on the vlan '1' ports definition.

Having OpenWrt up and running I tried getting that to work by editing the /etc/config/network file, where you mentioned to replace all the references to eth1 to eth0.2 that didn't work. What did work is changing those to 'eth1.2'.

The WAN and vlan config now looks like:

Code: Select all

config interface 'wan'                       
        option proto 'pppoe'                 
        option username 'USERNAME'
        option password 'PASSWORD'
        option ipv6 '0'          
        option mtu '1480'                      
        option ifname 'eth1.2'                 
        option keepalive '3 5' 
        
config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 3 5t'
                                              
config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '5t'
  
I then did another firmware flash to Gargoyle 1.11 but the network config remained the same, so was still working then.
I'm happy. Both WIFI and wired internet access working. Thank you all very much for your help!

Additional info for anyone with a similar issue, this was to make my router work with a Hybrid Fibre Coaxial (HFC) NBN connection in Australia. The HFC connection required a VLAN ID of 2.

Regards
Ron

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: VLAN Network Config error - WNDR3800 running Gargoyle 1.11

Post by Lantis »

Good to hear it is working. :) which RSP are you with on HFC?
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

RonV
Posts: 6
Joined: Tue Oct 15, 2019 6:31 am

Re: VLAN Network Config error - WNDR3800 running Gargoyle 1.11

Post by RonV »

I’m with TPG. Had a bit of a rocky start with them but is has come good. I have one of the SamKnows boxes to monitor the speed and on average get around 93 Mbps down.

Post Reply