VLAN Detached Networks on R9000

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Goto page Previous  1, 2, 3 ... 8, 9, 10, 11  Next
Author Message
Per Yngve Berg
DD-WRT Guru


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

PostPosted: Sat Oct 08, 2022 7:52    Post subject: Reply with quote
switch1 is connected to switch0 with two ports. Switch1 is mot directly connected to the CPU.
Sponsor
DWCruiser
DD-WRT User


Joined: 15 Aug 2016
Posts: 223
Location: Melbourne, Australia

PostPosted: Sat Oct 08, 2022 9:13    Post subject: Reply with quote
You're right, Per Yngve Berg.

According to the attached picture i downloaded from the Net sometime ago (can't remember source, sorry), Switch0 is directly connected to the CPU.

And for completeness:
eth0 = SFP+ port

---------------------
eth1 = edited out to avoid confusion.
eth2 = Same as above.
(sorry)
----------
Lastly, it seems to me that Netgear engineers used a less-than-logical numbering scheme making it a bit confusing to reverse engineering the R9000's internal logic. So to speak.

IMO, Netgear does have a good name with their hardware products such as routers but their s/ware, for some reason, remains a fair bit ...dated.

AFAICS, DD-WRT makes their hardware more appealing, at least, to the advanced consumer segment, i.e. IT geeks. It can only benefit Netgear more with more sales. Not less.

_________________
Life is a journey; travel alone makes it less enjoyable and lonely.


Last edited by DWCruiser on Sat Oct 08, 2022 10:03; edited 1 time in total
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3002
Location: Germany

PostPosted: Sat Oct 08, 2022 9:27    Post subject: Reply with quote
This is from the OpenWRT forum, I had posted the diagram here before too

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1260435#1260435

And no that's not true.

ethX is not a switch

ethX is an ethernet interface

these are the CPU network ports

1x port as WAN
1x port as LAN
1x port SFP+

The CPU ports (eth1 + eth2) are only connected to the switch.


Last edited by ho1Aetoo on Sat Oct 08, 2022 9:55; edited 1 time in total
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5700

PostPosted: Sat Oct 08, 2022 9:29    Post subject: Reply with quote
Good thing you found a diagram, looked at sysinit-alpine.c, sysinit.c, network.c, interface.c head nearly exploded.

https://svn.dd-wrt.com/browser/src/router/qca-ssdk-shell/tools/enet.sh?order=name#L1 <-- see here sigh relief.
icepeek
DD-WRT Novice


Joined: 03 Oct 2022
Posts: 5

PostPosted: Sat Oct 08, 2022 17:13    Post subject: Reply with quote
After following the instructions from DwCruiser for connecting to Giganet with a WAN VLAN Tagging requirement of 911 with PPPOE, I still don't get an IP address from the ISP. R9000 internet works fine using stock firmware by just VLAN Group tag 911. I have lost so much time trying to get this working... At this stage, I just want to be able to connect to the internet the same way I do with the stock firmware.

This are the instructions that I follow:

1- Install dd-wrt latest firmware
2- Do a router Hard Reset
3- Also clear out your web browser cache.
3- Configure Setup to use PPPOE with username and password provided by the ISP
4- I dont need wireless as I will use Linksys velop for the Wireless
5- Add the following script to startup:

---(for Startup)

sleep 6
# Setup VLANS
# Switch0 Config
swconfig dev switch0 set enable_vlan 1
swconfig dev switch0 vlan 1 set ports "0t 1 2 4t 6t"
swconfig dev switch0 vlan 911 set ports "3t 5t"
swconfig dev switch0 set apply
# Assign WAN to VLAN911 and up
vconfig add eth2 911
ifconfig vlan911 up

--- Save Startup

6- Add the following line to Firewall:

iptables -t nat -I POSTROUTING -o `get_wanface` -j MASQUERADE

--- Save Firewall

Router Reboots

7- Do another reboot and wait until it comes back
8- Go to goto Setup/Networking under interface and add eth2 and tag 911

9- I had to restart the router for the eth2.911 to appear
10- Next goto Port Setup, for WAN port assignment, select eth2.911
11- Save settings
12- Then do a reboot.

I tried a few times but with no sucess. I know back to stock firmware as family needs internet...


Any help would be much appreciated.

Thank you in advance.


Last edited by icepeek on Mon Oct 10, 2022 20:07; edited 1 time in total
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3002
Location: Germany

PostPosted: Sat Oct 08, 2022 17:30    Post subject: Reply with quote
icepeek wrote:
1- Install dd-wrt latest firmware


counter question what is the latest firmware?

current it is build r50357

https://download1.dd-wrt.com/dd-wrtv2/downloads/betas/2022/10-05-2022-r50357/netgear-r9000/

you definitely need a build newer than r49872

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

because there the PPPoE VLAN tagging stuff was fixed


Last edited by ho1Aetoo on Sun Oct 09, 2022 7:22; edited 1 time in total
Per Yngve Berg
DD-WRT Guru


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

PostPosted: Sat Oct 08, 2022 17:40    Post subject: Reply with quote
swconfig dev switch0 vlan 2 set ports "3t 5"
swconfig dev switch0 vlan 2 set vid 911

By untagging the CPU Port (5), the wan will be un the default eth interface.
icepeek
DD-WRT Novice


Joined: 03 Oct 2022
Posts: 5

PostPosted: Mon Oct 10, 2022 20:23    Post subject: Reply with quote
I'm running https://ftp.dd-wrt.com/dd-wrtv2/downloads/betas/2022/10-01-2022-r50308/netgear-r9000/

@Per

What do you mean by:

Quote:


swconfig dev switch0 vlan 2 set ports "3t 5"
swconfig dev switch0 vlan 2 set vid 911

By untagging the CPU Port (5), the wan will be un the default eth interface.



Do you mean running these two command after the steps I took or just replace them above?
DWCruiser
DD-WRT User


Joined: 15 Aug 2016
Posts: 223
Location: Melbourne, Australia

PostPosted: Thu Oct 13, 2022 7:59    Post subject: Reply with quote
@icepeek,

I presume you got it working and no longer need help.

Cheers

_________________
Life is a journey; travel alone makes it less enjoyable and lonely.
icepeek
DD-WRT Novice


Joined: 03 Oct 2022
Posts: 5

PostPosted: Thu Oct 13, 2022 21:25    Post subject: Reply with quote
Hi DwCruiser,

Unfortunatly not... Any help would be much appreciated.

Thank you.
DWCruiser
DD-WRT User


Joined: 15 Aug 2016
Posts: 223
Location: Melbourne, Australia

PostPosted: Thu Oct 13, 2022 22:56    Post subject: Reply with quote
icepeek wrote:
Hi DwCruiser,

Unfortunatly not... Any help would be much appreciated.

Thank you.


As i still have a R9000 on loan from a good friend, i applied and ran Per Yngve Berg's suggestion and found that it does work. Well, after several hours of testing, on and off, during last couple of days. Very Happy

Some explanation is necessary. I think.

My educated guess is possibly due to some intended 'functional space saving' (?) by BS, fewer than 911 VLANS were made readily available as is on R9000 under DDWRT. It kinda explains why VLAN20 works, but VLAN911 does not. After all, there should be 4,096 VLANS. In theory, that is.

Luckily, Per Yngve Berg's approach works by masking VLAN with a different label 911 to accommodate the required tagging by your ISP.

In steps (cumbersome, i know, but is needed to minimize potential variations in troubleshooting):


__________________________________________________
Tested in r50500
Note: all Reboots are done by /Administration/Management/Reboot Router
__________________________________________________


1. Reset router
2- Also clear out your web browser cache.
3- Configure Setup to use PPPOE with username and password provided by the ISP
4- Setup wireless (for backdoor in, if desired)
5- Add the following script:


--->Startup CLI:

sleep 6
# Set up VLAN ports and id
swconfig dev switch0 set enable_vlan 1
swconfig dev switch0 vlan 2 set ports "3t 5t"
swconfig dev switch0 vlan 2 set vid 911
swconfig dev switch0 set apply


Save settings


--- Firewall

iptables -t nat -I POSTROUTING -o `get_wanface` -j MASQUERADE


After router comes back (wait till the first four light indicators from left are lit up as normal).

Do another reboot
Go to Setup/Networking, under Interface, add eth2 and tag 911
Reboot router (for eth2.911 to be available)
Next, goto Port Setup, for WAN port assignment, select eth2.911
Save settings
Now, do a final reboot.

You should, hopefully, have PPPoE connection with WAN tagged at 911 working now. If stuck, see note below for further info.

Let me know how you go so others can benefit from our discussion.

Good luck.
______________________


P.S. In my specific setup, the test R9000 (R2) is placed behind my main router (R1), and in a separate VLAN of its own (as configured on R1). R1 is, in turn, placed behind my ISP modem. So i actually had to disable/re-enabled/refresh my laptop's LAN connection for R2 to finally get the correct designated WAN IP from R1 as per my configuration.

These on/off steps were used in my setup as a workaround, but may not be needed elsewhere. But just in case you need since i do not use a PPPoE connection for testing. Cheers

_________________
Life is a journey; travel alone makes it less enjoyable and lonely.


Last edited by DWCruiser on Fri Oct 14, 2022 21:42; edited 1 time in total
Per Yngve Berg
DD-WRT Guru


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

PostPosted: Fri Oct 14, 2022 4:33    Post subject: Reply with quote
The switch can only hold 512 vlans, but can use all 4096 vids.
DWCruiser
DD-WRT User


Joined: 15 Aug 2016
Posts: 223
Location: Melbourne, Australia

PostPosted: Fri Oct 14, 2022 21:47    Post subject: Reply with quote
Per Yngve Berg wrote:
The switch can only hold 512 vlans, but can use all 4096 vids.


If you can be so kind. Is there a quick way, like a command, to find out the actual number of VLANS on a switch?

Thanks.

_________________
Life is a journey; travel alone makes it less enjoyable and lonely.
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5700

PostPosted: Fri Oct 14, 2022 23:45    Post subject: Reply with quote
https://deviwiki.com/wiki/Netgear_R9000

https://github.com/Deoptim/atheros/raw/master/QCA8337N_Data_Sheet_MKG-17793_v1.0.pdf
DWCruiser
DD-WRT User


Joined: 15 Aug 2016
Posts: 223
Location: Melbourne, Australia

PostPosted: Sat Oct 15, 2022 1:57    Post subject: Reply with quote
blkt wrote:
https://deviwiki.com/wiki/Netgear_R9000

https://github.com/Deoptim/atheros/raw/master/QCA8337N_Data_Sheet_MKG-17793_v1.0.pdf


Thanks for your reply.

I had a quick read, but nowhere in your two linked documents above, does it say QCA8337N only holds 512 VLANS (as alluded to in Per Yngve Berg's post that prompted my follow-up query to him).

Care to point out where i missed it? Thks.

_________________
Life is a journey; travel alone makes it less enjoyable and lonely.
Goto page Previous  1, 2, 3 ... 8, 9, 10, 11  Next Display posts from previous:    Page 9 of 11
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