Netgear R7800. Place all wired Ethernet port to vlan2 (WAN)

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
r7000-2
DD-WRT User


Joined: 23 May 2022
Posts: 61

PostPosted: Fri Jul 22, 2022 21:40    Post subject: Netgear R7800. Place all wired Ethernet port to vlan2 (WAN) Reply with quote
Gentlemen,

I'm looking for a way to convert all 5 wired Ethernet ports to WAN ports on Netgear R7800 (vlan 2). Settings in "Setup\Switch config" are not working.

Thank you in advance.

--r7000-2

_________________
Several NetGears with Broadcom and with Atheros
Mode: RIP2 Router, 2G/5G radios are active, Routed WiFi multiple SSID's/separated by IP subnets.
Remote Syslog, NTP, IPv6 management, WireGuard routed Site-2-Site VPNs
Sponsor
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6409
Location: UK, London, just across the river..

PostPosted: Sat Jul 23, 2022 6:18    Post subject: Reply with quote
nope those are not working...and do not use Switch config page
on any non Broadcom device...
in general on R7800 i always use start up commands using swconfig command..the most useful thread about setting vlans is
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=313472&postdays=0&postorder=asc&start=0

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55179 WAP
TP-Link WR1043NDv2 -DD-WRT 55303 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55460 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55460 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55363 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Per Yngve Berg
DD-WRT Guru


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

PostPosted: Sat Jul 23, 2022 9:15    Post subject: Reply with quote
What is your initial configuration (vary with different builds)?

swconfig dev switch0 show
r7000-2
DD-WRT User


Joined: 23 May 2022
Posts: 61

PostPosted: Sat Jul 23, 2022 21:26    Post subject: Reply with quote
Per Yngve Berg wrote:
What is your initial configuration (vary with different builds)?

swconfig dev switch0 show


-------
root@r9:~# swconfig dev switch0 show

Global attributes:
enable_vlan: 1
enable_mirror_rx: 0
enable_mirror_tx: 0
mirror_monitor_port: 0
mirror_source_port: 0
disable_all_leds: ???
arl_age_time: 300
arl_table: address resolution table
Port 0: MAC <removed>
Port 5: MAC <removed>
Port 5: MAC <removed>
Port 5: MAC <removed>
Port 5: MAC <removed>
Port 5: MAC <removed>
Port 5: MAC <removed>
Port 5: MAC <removed>
Port 5: MAC <removed>

igmp_snooping: 0
igmp_v3: 1

Port 0:
mib: ???
enable_eee: ???
igmp_snooping: 0
vlan_prio: 0
pvid: 0
link: port:0 link:up speed:1000baseT full-duplex

Port 1:
mib: ???
enable_eee: 0
igmp_snooping: 0
vlan_prio: 0
pvid: 0
link: port:1 link:down

Port 2:
mib: ???
enable_eee: 0
igmp_snooping: 0
vlan_prio: 0
pvid: 0
link: port:2 link:down

Port 3:
mib: ???
enable_eee: 0
igmp_snooping: 0
vlan_prio: 0
pvid: 0
link: port:3 link:down

Port 4:
mib: ???
enable_eee: 0
igmp_snooping: 0
vlan_prio: 0
pvid: 2
link: port:4 link:down

Port 5:
mib: ???
enable_eee: 0
igmp_snooping: 0
vlan_prio: 0
pvid: 2
link: port:5 link:up speed:1000baseT full-duplex txflow rxflow auto

Port 6:
mib: ???
enable_eee: ???
igmp_snooping: 0
vlan_prio: 0
pvid: 0
link: port:6 link:up speed:1000baseT full-duplex

VLAN 2:
vid: 2
ports: 0t 5

_________________
Several NetGears with Broadcom and with Atheros
Mode: RIP2 Router, 2G/5G radios are active, Routed WiFi multiple SSID's/separated by IP subnets.
Remote Syslog, NTP, IPv6 management, WireGuard routed Site-2-Site VPNs
Per Yngve Berg
DD-WRT Guru


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

PostPosted: Sat Jul 23, 2022 23:19    Post subject: Reply with quote
swconfig dev switch0 vlan 2 set ports "0t 1 2 3 4 5"
swconfig dev switch0 set apply
r7000-2
DD-WRT User


Joined: 23 May 2022
Posts: 61

PostPosted: Sun Jul 24, 2022 23:16    Post subject: Reply with quote
Per Yngve Berg wrote:
swconfig dev switch0 vlan 2 set ports "0t 1 2 3 4 5"
swconfig dev switch0 set apply



It's working.

Thank you.

_________________
Several NetGears with Broadcom and with Atheros
Mode: RIP2 Router, 2G/5G radios are active, Routed WiFi multiple SSID's/separated by IP subnets.
Remote Syslog, NTP, IPv6 management, WireGuard routed Site-2-Site VPNs
sumbuddie
DD-WRT User


Joined: 28 Mar 2009
Posts: 74

PostPosted: Mon Jul 25, 2022 0:01    Post subject: Reply with quote
Another alternative:

I preferred to use nvram set commands via SSH (or Telnet) instead of startup script commands. Note: this was for a Linksys EA8500 - your Netgear R7800 might need a different assignment - namely the cpu port (port 5 on the EA8500 can be port 8 on other devices).

nvram set vlan0hwname=et0
nvram set vlan1hwname=et0
nvram set vlan0ports="5"
nvram set vlan1ports="0 1 2 3 4 5*"
nvram set port0vlans="1 18000 19000 20000"
nvram set port1vlans="1 18000 19000 20000"
nvram set port2vlans="1 18000 19000 20000"
nvram set port3vlans="1 18000 19000 20000"
nvram set port4vlans="1 18000 19000 20000"
nvram set port5vlans="1 16000"
nvram commit

This was with the help of: https://wiki.dd-wrt.com/wiki/index.php/Switched_Ports

Of course, always a good idea to note the current settings before performing any changes and the commit.

Also, be sure to set the WAN Connection Type to "Disabled" on the Setup>Basic Setup page.
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1899

PostPosted: Mon Jul 25, 2022 0:45    Post subject: Reply with quote
Somehow, I don't think you quite read things clearly enough, "sumbuddie". That wiki is for Broadcom, R7800 and EA8500 are Atheros.

Switched Ports - DD-WRT Wiki wrote:
NOTE: This Wiki applies to DD-WRT versions prior to r46604. DD-WRT r46604 and newer use swconfig on Broadcom.

This page explains proper command line configuration of VLANs on the router's internal switch (internal and external ports), usually after using the GUI (DD-WRT Setup->Switch Config (formerly VLANs) tab.

These instructions are necessary:

Only for Broadcom-based routers

_________________
"The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost

"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
sumbuddie
DD-WRT User


Joined: 28 Mar 2009
Posts: 74

PostPosted: Tue Jul 26, 2022 3:58    Post subject: Reply with quote
dale_gribble39 wrote:
Somehow, I don't think you quite read things clearly enough, "sumbuddie". That wiki is for Broadcom, R7800 and EA8500 are Atheros.

Switched Ports - DD-WRT Wiki wrote:
NOTE: This Wiki applies to DD-WRT versions prior to r46604. DD-WRT r46604 and newer use swconfig on Broadcom.

This page explains proper command line configuration of VLANs on the router's internal switch (internal and external ports), usually after using the GUI (DD-WRT Setup->Switch Config (formerly VLANs) tab.

These instructions are necessary:

Only for Broadcom-based routers


Thanks. The same nvram variables are still present on the EA8500 (and my DLink DIR-862L) and setting them works for me. I prefer the nvram variables as those should be set when the router boots and loads its configuration, whereas SWConfig merely reconfigures/changes the existing settings that were loaded from nvram temporarily (i.e needs to be part of the startup script to reconfigure each time). I'd rather have the correct setting in nvram to begin with.

What I don't like is how nvram variables have the WAN port as 0 and internal/cpu as 5 while SWConfig has the WAN port as 5 and the internal/cpu as 0 - can lead to confusion.
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6409
Location: UK, London, just across the river..

PostPosted: Tue Jul 26, 2022 6:51    Post subject: Reply with quote


on recent builds Broadcom and Atheros both use swconfig commands, despite they are totally different on switch level......
as well nvram set from wiki are depreciated and those are strictly for Broadcom....i ve no idea how those work and if those work at all on Atheros units...although you can use nvram set for lots of things...

but those are for Broadcom only
nvram set port1vlans="1 18000 19000 20000"
nvram set port2vlans="1 18000 19000 20000"
nvram set port3vlans="1 18000 19000 20000"
nvram set port4vlans="1 18000 19000 20000"
nvram set port5vlans="1 16000"

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55179 WAP
TP-Link WR1043NDv2 -DD-WRT 55303 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55460 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55460 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55363 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
kernel-panic69
DD-WRT Guru


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

PostPosted: Tue Jul 26, 2022 12:36    Post subject: Reply with quote
Using the nvram variables on any non-Broadcom device probably only manipulates what is in the webUI switch config page at most. Plenty of people have tried using them on non-Broadcom devices to setup VLANs and failed because those variables are not read and used like they are / were on Broadcom. If the variables do now translate properly in a sense, then that means things have changed post swconfig adoption in Broadcom devices, but I'm not going to test that theory. As they say in certain circles, "pictures, or it didn't happen", meaning prove to us that using nvram variables on non-Broadcom devices now works.
_________________
"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
sumbuddie
DD-WRT User


Joined: 28 Mar 2009
Posts: 74

PostPosted: Thu Jul 28, 2022 22:32    Post subject: Reply with quote
I'll heed everyone's suggestions and reconfigure using SWConfig.

However, it is working on my end using the NVRam variables as stated. I'm not running any complicated VLAN configurations however - simply have two DD-WRT routers: Linksys EA8500 as an AP/router and older D-Link DIR-862L as a router only. I need all ports on both so WAN has been assigned to VLAN1 on both units.

I do need IGMP Snooping enabled (IPTV on the network) - this seems to be an option to enable via SWConfig, but I'm not convinced it works when enabled there. Seems to work fine enabled on bridge br0.

I'm not sure on the 'tagging' option - currently this is enabled on the cpu port and I believe this is correct - anyone care to enlighten me?
kernel-panic69
DD-WRT Guru


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

PostPosted: Thu Jul 28, 2022 22:55    Post subject: Reply with quote
Disabling WAN should automatically place vlan2 (WAN port) on br0 - same goes for other certain wireless interface modes. There should be no further steps required other than manually assigning vlan2 to br0 on the networking tab if that is not the case. If the nvram variable method works on your Linksys EA8500 & D-Link DIR-862L (Atheros) devices, awesome. There is also this thread where @lexridge set up VLANs only using webUI on an R7800:

How to set up VLANs on a R7800 using only the GUI

Maybe unknown progress has been made in fixing things and making things the same across all platforms, maybe not. There are always going to be conflicts of opinion on things like this until everything has been tested and proof of concept given to dispel speculation and conjecture. Happy router-ing.

_________________
"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
sumbuddie
DD-WRT User


Joined: 28 Mar 2009
Posts: 74

PostPosted: Thu Jul 28, 2022 23:13    Post subject: Reply with quote
kernel-panic69 wrote:
Disabling WAN should automatically place vlan2 (WAN port) on br0 - same goes for other certain wireless interface modes.


Thanks - could be that disabling the WAN alone is what makes it all work - but I do remember having issues with the D-link where the WAN port simply wouldn't move. The D-link also doesn't show any VLANs in the GUI - only Eth0 and Eth1 (same as in the other thread for the WNDR3700v1). Confused
kernel-panic69
DD-WRT Guru


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

PostPosted: Thu Jul 28, 2022 23:24    Post subject: Reply with quote
There are some devices that do not have vlan functionality enabled by default. That may most likely be the case as to why vlan interfaces are non-existent.
_________________
"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
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC 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 cannot attach files in this forum
You cannot download files in this forum