OpenWrt Forum Archive

Topic: VLAN on Netgear WNDR3700

The content of this topic has been archived on 6 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,
I have been a regular visitor on these excellent forum discussions and have learned a lot.

I have finally moved from Netgear stick firmware to a pre-build OpeWrt firmware by "arokh" on my WNDR3700(1). Its working so much better than the stock.

I needed a help on configuring VLAN on my WNDR3700(1).

This is my scenario. I have a Netgear GS108T swtich serving as a backbone. I want to connect 2 ISPs connected to this 8 port switch. I want to achieve the setup below.

Switch GS108T - Port1-------Port2--------Port3------Port 4 -------+---- Port5----Port6----Port7----Port8
                       Modem1 - WAN1(R1) - Modem2 - WAN2(R2) ---+--- LAN(R1) -(LANR2)--LAN-------->

On the switch
VLAN10 is for Modem1 WAN
VLAN20 is for WNDR3700(1) LAN

Will be creating
VLAN30 for Modem2 WAN
VLAN40 is for WNDR3700(2) LAN

As you can see I want to attached Modem1 to port 1 on the GS108T switch and (WNDR3700)Router1 WAN port to switch port 2. On port 3 I want connect Modem2 and on port 4 connect (WNDR3700)Router2 WAN port. I want the rest of the ports as LAN ports in which the Router1 & Router2 LAN ports will connected. Need to create additional VLANs later to manage 50+ mix devices (wired/wireless)



After a lot of invaluable help from members on broadbandreports Netgear forum I managed to successfully get the first modem and router to the switch. And its working beautifully.
Some history here. http://www.dslreports.com/forum/r254633 … gure-VLANs

Port1-------Port2-----Port3----Port 4 --+--- Port5----Port6----Port7----Port8
Modem1 - WAN(R1) - LAN(R1) - LAN ----+--- LAN -------------------------->

I was able to achieve this by doing this on the Netgear GS108T switch..

vlan 10 is WAN(1)
vlan 1 is LAN

Switch port: vlanID, pvid
1-2: 10U, 10
3-8: 1U, 1

Nothing has been done on the WNDR3700(1) to achieve this.

Now I need to move one step ahead to get the second ISP Modem2 and WNDR3700(2) on the switch. But to do this I need to create 2 VLANs on the WNDR3700(1) first so that it will accept only VLAN10 data on its WAN port from Modem1 and VLAN20 data for it's LAN.

Please keep in mind that I do not want to change any ports on the router. I just want to let them function the way they are... that is 1 WAN port and 4 LAN ports need to function like they do in stock firmware. I had to move to OpenWrt as Netgear stock firmware does not support VLAN.

I am more comfortable with Luci GUI but if needed I can try to edit the files by connecting through ssh.

WNDR3700 internal details are here http://www.dslreports.com/speak/slidesh … VkxBTnM%3D


So my main question is

What is the configuration needed to achieve my setup on WNDR3700(1) ??????

I am looking for VLAN10 data from switch on router WAN port and VLAN20 data from switch on router LAN ports

(Last edited by banstro on 12 Feb 2011, 18:48)

Change the ifname of the wan interface from eth1 to eth1.10, and add eth1.20 to the ifname option of the lan interface.

It should look something like this (wether there's eth0.1 or eth0 for the lan interface depends on your image, just leave that and add eth1.20):

config interface lan
    option ifname    "eth0.1 eth1.20"
    option type    bridge
    option proto    static
    option ipaddr    192.168.1.1
    option netmask    255.255.255.0

config interface wan
    option ifname    eth1.10
    option proto    dhcp

KM

(Last edited by KanjiMonster on 12 Feb 2011, 19:55)

Thanks KM !!

A few concerns...

My lan config shows ..

config interface lan
    option ifname    "eth0.1"


Should I make it  "eth0.1 eth1.20" or "eth0.1 eth0.20" ? since LAN is on eth0 and WAN is on eth1. I am connecting the router LAN port to the 5th port on the GS108T's switch so that the router's LAN and DHCP can be used on the remaining ports on the switch plus the router's switch.

Also, could you please give me an example of how I could segregate two different wireless clients.. Since I have a mix of wireless client TVs/BluRayPlayers/SetTop boxes and client laptops.

This is my current config with your recommendation..

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

### LAN
config 'interface' 'lan'
    option 'ifname' 'eth0.1 eth1.20'
    option 'type' 'bridge'
    option 'proto' 'static'
    option 'ipaddr' '10.0.0.1'
    option 'netmask' '255.0.0.0'

### WAN
config 'interface' 'wan'
    option 'ifname' 'eth1.10'
    option 'proto' 'dhcp'

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

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

(Last edited by banstro on 12 Feb 2011, 22:32)

banstro wrote:

Should I make it  "eth0.1 eth1.20" or "eth0.1 eth0.20" ? since LAN is on eth0 and WAN is on eth1.

"eth0.1 eth1.20", since you want to treat packets coming from the wan with VID 20 and packets from the lan (which have VID 1) as belonging to one "network" and bridge between them (at least that's the way I understood you).

banstro wrote:

Also, could you please give me an example of how I could segregate two different wireless clients.. Since I have a mix of wireless client TVs/BluRayPlayers/SetTop boxes and client laptops.

Sorry, can't help you there, never did very much with wifi. Hopefully somebody else can.

KM

Thanks KM.

I tried your suggestion but ..


config interface wan
    option ifname    eth1.10
    option proto    dhcp

.. the WAN interface is not picking up an IP from the switch. Anything you think I need to do on the switch to make the router WAN pick up an IP?

Make sure your switch leaves the vlan tags intact, so the port where the WNDR3700 is is set to always tagged.

Also the switch doesn't provide IPs, your modem should probably wink.

KM again thanks for helping me out. Appreciate it.

Correct me if I am wrong.. In VLAN membership I need to put a "T" tag on the port where the WNDR3700 WAN port is correct? Coz both are marked "U and "U" untagged. Do I "T tag both port 1 and 2 or just port 2 on the switch?

In PVID VLANID10 is already set on the both port 1 and 2 on the switch. Do I keep this?

You only need to set the port tagged where you need more than one vlan. In your case, its 2. Leave 1 as untagged, as I doubt that your modem can receive vlan tagged frames.

Made progress.. all thanks to KM. I can now successfully browse the internet with the WAN port set to eth1.10 and tagging port 2 on the switch. PVID for both port 1 and 2 is VLANID10.


But my LAN isn't working. Infact I can't get DHCP IP if I do this.

config 'interface' 'lan'
    option 'ifname' 'eth0.1 eth1.20'


My current VLAN20 has ports 3 to 8 "U" untagged. If I "T" port 3 it does not help. Any suggesstions?

ok a reboot helped. Also the wifi network in OpenWRT Luci switched from LAN to unspecified/create.. hence I was not able to acquire an IP on the wireless side. LAN port worked fine.
I have kept port 3 "T" tagged for VLAN20 on the switch.

(Last edited by banstro on 13 Feb 2011, 05:46)

The discussion might have continued from here.