VLAN Settings Lost on Reboot

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


Joined: 11 Apr 2010
Posts: 311
Location: San Francisco Bay Area

PostPosted: Sun May 08, 2022 19:45    Post subject: VLAN Settings Lost on Reboot Reply with quote
I am running a Netgear R7000 with DD-WRT v3.0-r46885 std (06/05/21). I have configured an extra VLAN making a total of 3. I have used these commands to set up the VLAN config:

swconfig dev switch0 vlan 1 set ports "1 2 3 4t 5t"
swconfig dev switch0 vlan 2 set ports "0 5"
swconfig dev switch0 vlan 3 set ports "4t 5t"
swconfig dev switch0 set apply
swconfig dev switch0 set enable_vlan 1

Here is the bottom of the swconfig dev switch0 show command:

disable: ???
pvid: 0
link: port:8 link:do
VLAN 1:
ports: 1 2 3 4t 5t
VLAN 2:
ports: 0 5
VLAN 3:
ports: 4t 5t

Things work fine as long as I do not reboot. When I reboot the VLAN configuration changes to:

disable: ???
pvid: 0
link: port:8 link:down
VLAN 2:
ports: 0 5t

How can I get the VLAN settings to persist across reboots?
Sponsor
kernel-panic69
DD-WRT Guru


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

PostPosted: Sun May 08, 2022 21:30    Post subject: Reply with quote
Are you using those in your startup script?
_________________
"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
mache
DD-WRT User


Joined: 11 Apr 2010
Posts: 311
Location: San Francisco Bay Area

PostPosted: Sun May 08, 2022 23:57    Post subject: Reply with quote
I was under the impression (assuming wrongly) that the swconfig way of setting up VLANs in the CLI was a one time occurance just like it was earlier with:

nvram set vlan<vlan_number>ports="<port_number_list>"
nvram set port<port_number>vlans="<vlan_number_list>"
nvram set vlan<vlan_number>hwname="et0"
nvram commit

I guess you are saying that a swconfig VLAN config dies with a reboot and the configuration code has to be placed in startup for it to be persistant.
kernel-panic69
DD-WRT Guru


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

PostPosted: Mon May 09, 2022 0:56    Post subject: Reply with quote
Bingo.
_________________
"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
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Mon May 09, 2022 6:07    Post subject: Reply with quote
To be fully persistent save as Firewall, since when you click apply or services restart if the router is already running startups commands do not apply.
_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Fri May 20, 2022 14:34    Post subject: Reply with quote
Regrading vlan ports, I'm not sure if the R7000 and R8000 are identified the same way inside DD-WRT, haven't checked but there is a R8000 commit for vlan ports.

https://svn.dd-wrt.com/changeset/48944

Anyway just checked seems their vlan ports are handled separately nm.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
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