Can't get VLAN working

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
tneck
DD-WRT Novice


Joined: 21 Sep 2020
Posts: 17

PostPosted: Sat Sep 16, 2023 19:26    Post subject: Can't get VLAN working Reply with quote
I haven't even got as far as iptables rules yet since I can't get dhcp working.

Netgear R7000 (v3.0-r45493)
I'm trying to turn port 4 into a vlan

In Switch Config:
port 4 is set to vlan 4 (Bridge = None)

In Networking:
vlan4 is unbridged with an IP of 192.168.5.1/24.
Masquerade/NAT is enabled, everything else in vlan4 is disabled.

I added a DHCP1 and set it to vlan4.

Anything plugged into port 4 won't get an IP address and if I set it manually to 192.168.5.100, it can't ping 192.168.5.1.

Any ideas?
Sponsor
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 13883
Location: Texas, USA

PostPosted: Sat Sep 16, 2023 21:41    Post subject: Reply with quote
Upgrade First.

https://wiki.dd-wrt.com/wiki/index.php/Switched_Ports

https://download1.dd-wrt.com/dd-wrtv2/downloads/betas/2023/09-08-2023-r53469/netgear-r7000/

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
tneck
DD-WRT Novice


Joined: 21 Sep 2020
Posts: 17

PostPosted: Sat Sep 30, 2023 17:10    Post subject: Reply with quote
I upgraded to are: r53469. Unfortunately, I still can't get it up and running. I followed the directions posted above, port 4 doesn't seem to be working at all any more.

I'm trying to create vlan3 (192.168.3.XX) on port 4. The purpose is to have a device on vlan3 which can reach my main network (192.168.0.XX) and my wireless IoT network (192.168.10.XX). I know there's iptables commands I'll need to use to poke some holes in the firewall, but right now, I'd settle for a .3 network with DHCP and access to the internet.

when I plug my linux box into port 4, dhcp doesn't assign me an IP. If I manually set the IP to the main network or vlan3, I can't ping the router or IPs on the internet.

Here's what nvram looked like originally:

Code:
vlan1ports=1 2 3 4 5*
vlan2ports=0 5u
port0vlans=2 18000 19000 20000
port1vlans=1 18000 19000 20000
port2vlans=1 18000 19000 20000
port3vlans=1 18000 19000 20000
port4vlans=1 18000 19000 20000
port5vlans=1 2 16000 17000 18000 19000 20000 21000
vlan1hwname=et0
vlan2hwname=et0


and here's what it looks like after the change:
Code:
vlan1ports=1 2 3 5*
vlan2ports=0 5u
vlan3ports=4 5
port0vlans=2 18000 19000 20000
port1vlans=1 18000 19000 20000
port2vlans=1 18000 19000 20000
port3vlans=1 18000 19000 20000
port4vlans=3 18000 19000 20000
port5vlans=1 2 3 16000 17000 18000 19000 20000 21000
vlan1hwname=et0
vlan2hwname=et0
vlan3hwname=et0


In addition, I tried to create another DHCP and set vlan3 unbridged:


Any ideas on what to try next?
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2573
Location: Germany

PostPosted: Sat Sep 30, 2023 17:50    Post subject: Reply with quote
The whole NVRAM stuff is no longer necessary and you should reset your router and reset it to factory settings
You can now easily set all of this in the GUI...

see the link: https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1283408#1283408

However, your router only has one CPU port so you have to configure the switch differently/as shown in the picture

_________________
use Pi-Hole as simple DNS-Server with DD-WRT https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=331414
VLAN configuration via GUI - 2 CPU ports (R7800, EA8500 etc) https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=334342
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 13883
Location: Texas, USA

PostPosted: Sat Sep 30, 2023 19:04    Post subject: Reply with quote
ho1Aetoo wrote:
The whole NVRAM stuff is no longer necessary and you should reset your router and reset it to factory settings
You can now easily set all of this in the GUI...

see the link: https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1283408#1283408

However, your router only has one CPU port so you have to configure the switch differently/as shown in the picture

Yeah, sorry I was not more complete with my answer... but I was betting on someone being able to read and comprehend the obvious. Guess I need to link your posts and add content or somehow more obviously mark the switched ports wiki as OBSOLETE.
kernel-panic69 wrote:

https://wiki.dd-wrt.com/wiki/index.php/Switched_Ports

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
tneck
DD-WRT Novice


Joined: 21 Sep 2020
Posts: 17

PostPosted: Sat Sep 30, 2023 20:22    Post subject: Reply with quote
Thanks for the response. But I'm afraid that doesn't work for me. If I factory reset the router and go to Switch Config and click enable and reboot my router, it stops working and I need to factory reset it. I've tried adding the other vlan and assigning it to port 4, but the same thing happens.



I also don't see the cpu port column
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12468
Location: Netherlands

PostPosted: Sat Sep 30, 2023 20:43    Post subject: Reply with quote
Refresh your browser cache.

Make sure you have a recent build e.g. 53xxx

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
tneck
DD-WRT Novice


Joined: 21 Sep 2020
Posts: 17

PostPosted: Fri Oct 06, 2023 18:55    Post subject: Reply with quote
Thanks, that was the issue. after a couple of forced refreshes and reboots between steps, I was able to get the vlan3 up and running.
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2573
Location: Germany

PostPosted: Fri Oct 06, 2023 19:03    Post subject: Reply with quote
And now the CPU port is shown in the "switch config" tab?

I am quite sure that the CPU port is displayed because egc also has a r7000 Very Happy

_________________
use Pi-Hole as simple DNS-Server with DD-WRT https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=331414
VLAN configuration via GUI - 2 CPU ports (R7800, EA8500 etc) https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=334342
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking 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 cannot attach files in this forum
You cannot download files in this forum