WAN on WLAN (Client 2G) Netgear WNDR4500

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
lfb
DD-WRT Novice


Joined: 13 Nov 2016
Posts: 16

PostPosted: Sun Aug 18, 2019 13:16    Post subject: WAN on WLAN (Client 2G) Netgear WNDR4500 Reply with quote
I use a Netgear WNDR4500 as 2G Client on a 'foreign' WLAN, own LAN on the Ethernet ports, original/ wired WAN port not assigned.

Configured the router without too much reading and it seemed to work. Since there were still some incosistencies, I decided to read me up to configure the router properly... (read articles see below)

According to what I read the proper way to accomplish separating the WLAN and assigning it to WAN for this device seems to be:
- Remove physical WLAN interface from vlan1
- Create br1
- Assign vlan2 and the physical WLAN interface to br1
- Tell br1 to use DHCP (how?)
- be happy...

But there are some things no too easy to understand and I'd appreciate it if someone could give me a hint how to understand the following information better and how to configure the router in a more correct way! Thanks a lot in advance!


nvram show | grep vlan.*ports | sort
vlan1ports=0 1 2 3 8*
vlan2ports=4 8
OK, 8 seems to be CPU

nvram show | grep port.*vlans | sort
port0vlans=18 19 21
port1vlans=1 18 19 21
port2vlans=1 18 19 21
port3vlans=1 18 19 21
port4vlans=1 18 19 21
port5vlans=1 16
'8' is gone, who's '5' and why are all ports despite port0 assigned to vlan1 and no port to vlan2? Port5 is tagged, could be the (new) WAN-port?
Port0 isn't assigned to any vlan, would be the wired standard WAN port no longer assigned?


vlan1hwname=et0
vlan2hwname=et0
wl0_ifname eth1
wl1_ifname eth2
OK, who's et0? CPU- ports? Eth0 is bridged(?) to vlan1/ LAN, but nowhere mentioned?

brctl show
bridge name bridge id STP enabled interfaces
br0 8000.4c60de2b5929 no vlan1

route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.0.0.138 0.0.0.0 UG 0 0 0 eth1
10.0.0.0 * 255.255.255.0 U 0 0 0 eth1
10.0.144.0 * 255.255.255.0 U 0 0 0 br0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo

Console looks OK so far, but Routing table in GUI shows instead of br0 'LAN & WLAN'? (Standard text for br0??)

So I ended with eth1 not bridged and isolated, seems to work, but I'm not able to confirm that this is the correct way?
As written above: Any input highly appreciated!

GUI VLANs
GUI basic setup
GUI networking
GUI Wireless basic settings
GUI routing

Read up to now:
Separate LAN and WLAN
Switched Ports
VLAN config, Updated Guide: How to correctly configure
Default internal device network
VLan routing setup
Internal device network



4500.txt
 Description:
console: ifconfig, nvram, route, brctl.....

Download
 Filename:  4500.txt
 Filesize:  47.41 KB
 Downloaded:  785 Time(s)

Sponsor
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Sun Aug 18, 2019 15:18    Post subject: Reply with quote
I don't know why you are doing all this.

Set the Wireless Mode=Client.

It will now be the WAN port.
lfb
DD-WRT Novice


Joined: 13 Nov 2016
Posts: 16

PostPosted: Sun Aug 18, 2019 18:04    Post subject: Reply with quote
Tanks a lot for your answer! Configuring the router as Wirelless Client was in fact whatI did first (without reading the documentation for Client mode, of course) and it worked so far.

But after a while i found some signs that indicated that the WAN/WLAN was still not separated from the LAN. So I tried to understand how things work, began to read and things became less clear the more I read and checked...

For an Atheros based device (Buffalo WZR- HP-G300NH2) as wireless client things seem to be a little more consistent:
nvram show | grep vlan.*ports | sort
vlan0ports=1 2 3 4 5*
vlan1ports=0 5

nvram show | grep port.*vlans | sort
port0vlans=2
port1vlans=1
port2vlans=1
port3vlans=1
port4vlans=1
port5vlans=1 2 16

=> CPU port5, port1 to port4= VLAN1, port0= WAN seems understandable... (OK, vlan0/1 vs. vlan1/2)

Broadcom- Netgear WNDR4500- this leaves some question marks for the unexperienced....
nvram show | grep vlan.*ports | sort
vlan1ports=0 1 2 3 8*
vlan2ports=4 8

nvram show | grep port.*vlans | sort
port0vlans=18 19 21
port1vlans=1 18 19 21
port2vlans=1 18 19 21
port3vlans=1 18 19 21
port4vlans=1 18 19 21
port5vlans=1 16

(I still wonder how this router can work with this settings? These values don't seem to be relevant at all?)
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6870
Location: Romerike, Norway

PostPosted: Sun Aug 18, 2019 18:54    Post subject: Reply with quote
VLAN only applies to wired ports. As you are not using the wired WAN port, you can assign it to the LAN as a 5. port.

nvram set vlan1ports="0 1 2 3 4 8*"
nvram set vlan2ports="8"
nvram commit


To separate a wifi interface from the LAN, you unbridge it. It can then be given an ip address on a different sub-net.

PS. The vlan.*ports does not have an impact on Atheros.
Use SWCONFIG DEV SWITCH0 SHOW.
lfb
DD-WRT Novice


Joined: 13 Nov 2016
Posts: 16

PostPosted: Sun Aug 25, 2019 12:27    Post subject: Reply with quote
Thanks a lot for your answer- Sorry for posting so late!

I still don't understand the way DD-WRT works here- where are the settings 'really' and what is displayed?

- Almost every time this device (Netgear WNDR4500v1) in this configuration is soft bricked/ inaccessible after an update.

Configuring 2.4G WLAN as client should make it automatically make the WAN- port. In addition I configured this WLAN as 'unbridged' and 'net isolation enabled'.

- In 'switch config' the WLAN ist still assigned to bridge LAN?

- In 'networking' 'WAN Port Assignment' is still 'vlan2', not 'eth1' which is the 2.4G Wlan (nd could be chosen)?

- ifconfig shows
LAN- ip on br0
WAN- ip on eth1 (WLAN 2.4G)
VLAN2- no ip assigned.

brctl show has one (single ended?) bridge br0
bridge name bridge id STP enabled interfaces
br0 8000.4c60de2b5929 no vlan1

nvram shows
wan_default=vlan2
wan_gateway=10.0.0.138
wan_hwaddr=4C:60:DE:2B:59:2B
wan_hwname=
wan_iface=vlan2
wan_ifname2=vlan2
wan_ifname=vlan2
wan_ifnames=vlan2
wan_ipaddr=10.0.0.64
wan_lease=86400
wan_mtu=1500
wan_netmask=255.255.255.0
wan_primary=1
wan_priority=0
wan_proto=dhcp
wandevs=et0
wanup=1

So I'm still missing the place connecting vlan2 and eth1 since vlan2 ist still considered the WAN interface in GUI and NVRAM but uses the ip of eth1? As you told me vlans only apply to wired ports- so shouldn't be there a bridge device to connect vlan2 and eth1 (theoretically)?



4500_3.jpg
 Description:
 Filesize:  114.36 KB
 Viewed:  3500 Time(s)

4500_3.jpg



4500_1.jpg
 Description:
 Filesize:  118.66 KB
 Viewed:  3500 Time(s)

4500_1.jpg


Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum