Beginning Mult-WAN setup

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3  Next
Author Message
resolv
DD-WRT Novice


Joined: 19 Apr 2021
Posts: 24

PostPosted: Fri May 28, 2021 8:12    Post subject: Reply with quote
For anyone else searching for information about the port configuration of the Asus RT-AC88U, I found these posts:
https://en.techinfodepot.shoutwiki.com/wiki/ASUS_RT-AC88U
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=305027&sid=328686ec668327ea073f21940db84c4f

Summary for Asus RT-AC88U port configuration:
    Broadcom BCM4709C0 (Dual-Core CPU @ 1.4GHz with switch: LANs 1-4, WAN, port connected to Realtek switch, and CPU port)
    Realtek RTL8365MB (switch: LANs 5-8)

Code:
nvram show | grep vlan.*ports | sort
    vlan1ports=0 1 2 3 5 7*
    vlan2ports=4 7u

    vlan1ports: ports 0, 1, 2 and 3 on the Broadcom switch are LAN-4, LAN-3, LAN-2, and LAN-1, respectively ("swconfig dev switch0 help" verified)
    vlan1ports: port 5 on the Broadcom switch is connected to the Realtek switch (LANs 5-8); and port 7* on the Broadcom switch is the CPU
    vlan2ports: port 4 on the Broadcom switch is the WAN, and port 7u on the Broadcom switch is the CPU
Sponsor
resolv
DD-WRT Novice


Joined: 19 Apr 2021
Posts: 24

PostPosted: Sun May 30, 2021 7:30    Post subject: Reply with quote
Hello kernel-panic69,
From https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1237992#1237992

Quote:
The wiki you linked is no longer relevant to any builds past 46446, like most of the wikis you linked in your other thread.


From https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1237427#1237427
Quote:
NOTE: builds past 46446 do not use this method of vlan configuration anymore. The router database is not necessarily your friend, either.


My mistake. "Per Yngve Berg" recommended I use a later version to find the port information. I mistakenly made the assumption that I should also stay with this later version for the Dual-WAN install. That was my error.

Quote:
Please keep discussion in ONE thread

Can the threads be merged?

Both issues are due to my mistakes.
I apologize. Thank you for your instruction.
resolv
DD-WRT Novice


Joined: 19 Apr 2021
Posts: 24

PostPosted: Sun May 30, 2021 7:41    Post subject: Reply with quote
Hello Per Yngve Berg,
Quote:
Check the switch with swconfig.

You are running a new build that does not use the "vlan1ports" variable any more, but switched to swconfig.

You should be able to configure vlan with the GUI on this build.


Thank you for your suggestion.
I think I'm going to start with build 46446 or older (before swconf was added). When I get the older build working, then I'll try to upgrade to a new build as you suggested.

Thank you for your help.
Per Yngve Berg
DD-WRT Guru


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

PostPosted: Sun May 30, 2021 11:10    Post subject: Reply with quote
Not a good idea. You have to redo it after upgrade.

1) Create VLAN3 and add a port to it in the GUI

2) Run swconfig dev switch0 show

Yo will see something like this at the bottom:

LAN 1:
ports: 1 2 3 8t
VLAN 2:
ports: 0 8t
VLAN 3:
ports: 4 8t

3) In the Networking tab, set WAN to VLAN3.

The port will now work as the WAN.

4) Continue with the Wiki and use the wan switching scripts.



Skjermbilde fra Asus RT-AC66U Swconfig.png
 Description:
 Filesize:  37.37 KB
 Viewed:  3123 Time(s)

Skjermbilde fra Asus RT-AC66U Swconfig.png


kernel-panic69
DD-WRT Guru


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

PostPosted: Sun May 30, 2021 11:14    Post subject: Reply with quote
No, the threads can't be merged by any moderator; I don't even think they can be merged by the admins. This is actually where I can say that the nvram variables *are* actually used by swconfig to some degree. You're going to have to proceed with post-swconfig at some point, stay where you're at. Otherwise, this thread has no purpose to help anyone else or contribute to updating the wikis.
_________________
"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
resolv
DD-WRT Novice


Joined: 19 Apr 2021
Posts: 24

PostPosted: Tue Jun 01, 2021 12:52    Post subject: Reply with quote
From: https://wiki.dd-wrt.com/wiki/index.php/Dual%2C_Triple_%28and_probably_quad%29_WAN_with_multiple_active_WAN_links_and_source_routing
Quote:
Verify that all WAN interfaces are up and have PUBLIC IP addresses


The Web-GUI only provides this information for wan, but not for wan2 (Status->WAN).
The CLI commands "route", "ip a", and "ifconfig -a" show vlans, but not wans.
What CLI command(s) will provide the public IP addresses for wan and wan2?
Per Yngve Berg
DD-WRT Guru


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

PostPosted: Tue Jun 01, 2021 16:56    Post subject: Reply with quote
Use ifconfig.

The interfaces will be vlan2 and vlan3.
resolv
DD-WRT Novice


Joined: 19 Apr 2021
Posts: 24

PostPosted: Tue Jun 01, 2021 19:58    Post subject: Reply with quote
Hello Per Yngve Berg,
Thank you for response.
ifconfig -a is what I'd concluded. Thank you for the confirmation.
resolv
DD-WRT Novice


Joined: 19 Apr 2021
Posts: 24

PostPosted: Tue Jun 01, 2021 22:35    Post subject: Reply with quote
Is there a software equivalent to the hardware "WPS Reset" which resets all nvram variables?

On newer ARM devices, 30-30-30 reset has been replaced by "WPS Reset": https://forum.dd-wrt.com/wiki/index.php/Hard_reset_or_30/30/30#Hard_Reset_on_ARM_and_other_newer_routers
I use "WPS Reset" to reset *ALL* the nvram variables before switching to a new build.
I'm searching for a software equivalent to the hardware "WPS Reset" which will reset *ALL* nvram variables: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=313399
I've tried:
Code:
  nvram erase           #erase RAM variables (erase before write-back on reboot in some builds)
  erase nvram && reboot #erase FLASH variables, then reboot (on reboot, some builds write-back RAM and some don't)

but these commands failed to reset the nvram variable "vlan1ports". "vlan1ports" retained its prior settings.
In contrast, "WPS Reset" does reset "vlan1ports".
So is there a software equivalent to the hardware "WPS Reset" which resets all nvram variables?
(NOTE: I did not try "mtd -r erase nvram" because it's not recommended -- could erase default values.)
kernel-panic69
DD-WRT Guru


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

PostPosted: Wed Jun 02, 2021 6:27    Post subject: Reply with quote
Is this on r46836 build? What is the current output of:

nvram show | grep vlan.*ports | sort
nvram show | grep port.*vlans | sort
nvram show | grep vlan.*hwname | sort

_________________
"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
resolv
DD-WRT Novice


Joined: 19 Apr 2021
Posts: 24

PostPosted: Thu Jun 03, 2021 8:23    Post subject: Reply with quote
I discovered this "vlan1ports" persistence while switching back and forth between builds r46466 and r46733.

As per your request, I ran a test case using "nvram erase" and "erase nvram && reboot" for "vlan1ports" on build r46836.

* WPS reset

* Show default nvram "vlan1ports" setting ("0 1 2 3 5 7*"). Then change it ("0 1 2 5 7*") and reboot.
Code:
root@DD-WRT:~# nvram show | grep os_version
size: 40263 bytes (90809 left)
os_version=46836
root@DD-WRT:~# nvram show | grep vlan.*ports | sort
size: 40263 bytes (90809 left)
vlan1ports=0 1 2 3 5 7*
vlan2ports=4 7u
root@DD-WRT:~# nvram set vlan1ports="0 1 2 5 7*"
root@DD-WRT:~# nvram show | grep vlan.*ports | sort
size: 40261 bytes (90811 left)
vlan1ports=0 1 2 5 7*
vlan2ports=4 7u
root@DD-WRT:~# reboot

* Show changed nvram "vlan1ports" setting ("0 1 2 5 7*") persists after reboot. Then execute "nvram erase", "erase nvram" and reboot.
Code:
root@DD-WRT:~# nvram show | grep os_version
size: 40261 bytes (90811 left)
os_version=46836
root@DD-WRT:~# nvram show | grep vlan.*ports | sort
size: 40261 bytes (90811 left)
vlan1ports=0 1 2 5 7*
vlan2ports=4 7u
root@DD-WRT:~# nvram erase
root@DD-WRT:~# erase nvram && reboot

* Show that "nvram erase" and "erase nvram && reboot" did *NOT* restore default nvram "vlan1ports". Changed setting still persists ("0 1 2 5 7*").
Code:
root@DD-WRT:~# nvram show | grep os_version
size: 40247 bytes (90825 left)
os_version=46836
root@DD-WRT:~# nvram show | grep vlan.*ports | sort
size: 40247 bytes (90825 left)
vlan1ports=0 1 2 5 7*
vlan2ports=4 7u

* WPS reset

* Show that "WPS reset" restored default nvram "vlan1ports" setting ("0 1 2 3 5 7*").
Code:
root@DD-WRT:~# nvram show | grep os_version
size: 40258 bytes (90814 left)
os_version=46836
root@DD-WRT:~# nvram show | grep vlan.*ports | sort
size: 40258 bytes (90814 left)
vlan1ports=0 1 2 3 5 7*
vlan2ports=4 7u

So a "WPS reset" restores the default nvram "vlan1ports" setting, while "nvram erase" and "erase nvram && reboot" does not.
Hence, my question: Is there a software equivalent to the hardware "WPS Reset" which resets all nvram variables?


Last edited by resolv on Thu Jun 03, 2021 12:42; edited 1 time in total
resolv
DD-WRT Novice


Joined: 19 Apr 2021
Posts: 24

PostPosted: Thu Jun 03, 2021 10:33    Post subject: Reply with quote
Hardware and firmware:
Asus RT-AC88U
os_version: 46836

In build 46836, the following swconfig commands are not persistent.
On reboot, they reset to defaults.
Code:
swconfig dev switch0 vlan 1 set ports "0 1 2 5 7t"
swconfig dev switch0 vlan 3 set ports "3 7t"
swconfig dev switch0 set apply
reboot


Below is the cut/paste output from the Asus RT-AC88U router:

* WPS reset

* Show defaults swconfig settings. Then change settings and show changes.
Code:
root@DD-WRT:~# swconfig dev switch0 show
...
VLAN 1:
        ports: 0 1 2 3 5 7t
VLAN 2:
        ports: 4 7
root@DD-WRT:~# swconfig dev switch0 vlan 1 set ports "0 1 2 5 7t"
root@DD-WRT:~# swconfig dev switch0 vlan 3 set ports "3 7t"
root@DD-WRT:~# swconfig dev switch0        set apply
root@DD-WRT:~# swconfig dev switch0 show
...
VLAN 1:
        ports: 0 1 2 5 7t
VLAN 2:
        ports: 4 7
VLAN 3:
        ports: 3 7t
root@DD-WRT:~# reboot

* Show that changed swconfig settings were not persistent after reboot.
Code:
root@DD-WRT:~# swconfig dev switch0 show
...
VLAN 1:
        ports: 0 1 2 3 5 7t
VLAN 2:
        ports: 4 7
root@DD-WRT:~#

What am I doing wrong?
Per Yngve Berg
DD-WRT Guru


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

PostPosted: Thu Jun 03, 2021 12:32    Post subject: Reply with quote
swconfig is not persistent.

Put them into the startup script to execute them on startup.
resolv
DD-WRT Novice


Joined: 19 Apr 2021
Posts: 24

PostPosted: Thu Jun 03, 2021 17:05    Post subject: Reply with quote
Per Yngve Berg, thank you for the information.

Quote:
swconfig is not persistent

Is the lack of "swconfig" persistence intentional, or will "swconfig" persistence be added to a future build?
Where is the dd-wrt "swconfig" documentation located, along with future build intentions?
kernel-panic69
DD-WRT Guru


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

PostPosted: Thu Jun 03, 2021 18:00    Post subject: Reply with quote
The last couple of releases should be able to persist this via the webUI switch config page. Please test this.

Also, https://wiki.dd-wrt.com/wiki/index.php/Hard_reset_or_30/30/30

Do the commands properly; the mtd erase nvram / mtd -r erase nvram is to be used with caution, but that will definitely wipe out the entire nvram partition and the router will have to rebuild all the variables on boot, etc.

_________________
"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
Goto page Previous  1, 2, 3  Next Display posts from previous:    Page 2 of 3
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