VLAN success on WRT1900ACSv2, WRT3200ACM (and WRT1900ACv1?)

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.)
Goto page Previous  1, 2, 3
Author Message
TheDude1864
DD-WRT Novice


Joined: 26 Jan 2012
Posts: 3

PostPosted: Wed May 15, 2019 2:04    Post subject: updated my setup Reply with quote
I expanded on my idea for simplifying the WAN vlan, and i did the same thing on the LAN side. You can send tagged and untagged packets to a single port. If we apply this to the LAN cpu port you can continue to use eth1 for your main network.

My "swconfig dev switch0 show" now looks like this:
Code:

Global attributes:
   enable_vlan: 1
Port 0:
   mask: 0x0000: (0)
   qmode: 3
   pvid: 0
   link: port:0 link:up speed:1000baseT full-duplex
Port 1:
   mask: 0x0000: (1)
   qmode: 3
   pvid: 1
   link: port:1 link:up speed:1000baseT full-duplex
Port 2:
   mask: 0x0000: (2)
   qmode: 3
   pvid: 1
   link: port:2 link:up speed:100baseT full-duplex
Port 3:
   mask: 0x0000: (3)
   qmode: 3
   pvid: 1
   link: port:3 link:up speed:1000baseT full-duplex
Port 4:
   mask: 0x0000: (4)
   qmode: 3
   pvid: 2
   link: port:4 link:up speed:1000baseT full-duplex
Port 5:
   mask: 0x0000: (5)
   qmode: 3
   pvid: 2
   link: port:5 link:up speed:1000baseT full-duplex
Port 6:
   mask: 0x0000: (6)
   qmode: 3
   pvid: 1
   link: port:6 link:up speed:1000baseT full-duplex
VLAN 1:
   port_based: 0
   vid: 1
   ports: 0t 1 2 3 6
VLAN 2:
   port_based: 0
   vid: 2
   ports: 4 5
VLAN 3:
   port_based: 0
   vid: 3
   ports: 0t 6t
VLAN 4:
   port_based: 0
   vid: 4
   ports: 0t 6t


The main change here is with vlan1. Instead of sending tagged vlan1 packets to port 6, I send untagged. Untagged port 6 is eth1. Now, just like vlan2 with the WAN connection, vlan1 is not needed as an interface in the router. It's only needed in the switch to route traffic.

My bridge config now looks like this:

Bridge Name STP Interface
br0 no ath0 ath1 ath2 eth1
br1 no vlan3
br2 no vlan4

and my startup script:

Code:

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

vconfig set_name_type VLAN_PLUS_VID_NO_PAD

vconfig add eth1 3
vconfig add eth1 4

ifconfig vlan3 up
ifconfig vlan4 up

brctl addif br1 vlan3
brctl addif br2 vlan4

(stopservice wan;startservice wan) 2>&1 | logger -t startup[$$]


These changes made the startup script much simpler, and basically set most settings back to default. Also, port 0 is still my trunk port that carries traffic for multiple vlans.

Everything seems to be working.
Sponsor
SurprisedItWorks
DD-WRT User


Joined: 04 Aug 2018
Posts: 292
Location: Appalachian mountains, USA

PostPosted: Fri May 17, 2019 15:37    Post subject: Reply with quote
My last post incorporated TheDude1864's simpler approach to the WAN into my configuration. Here I go further and incorporate his simpler eth1 approach as well. The new editing steps for the Startup commands in Administration>Commands are

A. Change "6t 2 3" to "6 2 3" in the swconfig command.
B. Remove the vconfig and ifconfig lines for vlan 1.
C. Remove the brctl add line for vlan1
D. Remove the brctl del line for eth1

The changes from both posts leave the Startup code greatly simplified and looking like this:
Code:
#split the LAN on the port 6 cpu into eth1 (untagged) and vlan3 (tagged)
   swconfig dev switch0 set reset 1
   swconfig dev switch0 set enable_vlan 1
   #vlans 1 and 2 connect eth1 and eth0 to the correct ports
      swconfig dev switch0 vlan 1 set ports "6 2 3"
      swconfig dev switch0 vlan 2 set ports "5 4"
   #a new vlan 3 interface will handle the remaining ports
      swconfig dev switch0 vlan 3 set ports "6t 0 1"
   swconfig dev switch0 set apply
   vconfig set_name_type VLAN_PLUS_VID_NO_PAD
   vconfig add eth1 3
   ifconfig vlan3 up
   brctl addif br1 vlan3

Note that there is no need, at least on BS release 39144 for the WRT1900ACSv2, to restart the wan.

In Setup>Networking the WAN port is eth0, and the bridging table looks like this:

br0 no ath1 eth1
br1 no ath1.2 vlan3


Thanks again, TheDude1864, for the excellent upgrade to this thread's project!

_________________
Six of the Linksys WRT1900ACSv2 on r38159 and r40009.
On various: VLANs, client-mode travel router, two DNSCrypt servers (incl Quad9), multiple VAPs, USB/NAS, OpenVPN client/PBR (random NordVPN server).

VLANs on the WRT1900ACSv2 and other two-CPU Linksys/Marvell routers:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=317199

DNSCrypt for Quad9 DNS and/or multiple servers and/or missing DNSCrypt enable button: Sun Jan 06, 2019 post at
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318094

Restarting OpenVPN from the CLI or script or SES button:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1172761
delacosta456
DD-WRT Novice


Joined: 11 Mar 2010
Posts: 5

PostPosted: Wed Jul 03, 2019 12:55    Post subject: My physical port 4 on WRT3200 doesn' t receive ip from DHCP Reply with quote
hi
Very many thanks to all for their effort on work that have been done.

By the way after using @TheDude1864 simplified startup script i physical port4 doesn't receive ip from DHCP . Even when i set it manualy nothing happens, is that the expected behavior after the startup script..
SurprisedItWorks
DD-WRT User


Joined: 04 Aug 2018
Posts: 292
Location: Appalachian mountains, USA

PostPosted: Thu Jul 04, 2019 18:28    Post subject: Re: My physical port 4 on WRT3200 doesn' t receive ip from D Reply with quote
delacosta456 wrote:
hi
Very many thanks to all for their effort on work that have been done.

By the way after using @TheDude1864 simplified startup script i physical port4 doesn't receive ip from DHCP . Even when i set it manualy nothing happens, is that the expected behavior after the startup script..


See TheDude1864's original post in this thread, dated Mon May 13, 2019 10:38 for this:

TheDude1864 wrote:
Also, just a side note. I connect all of my vlans to bridges. The reason for this is the DHCP service. Much like how the WAN service has to be restarted after configuration, so does a DHCP service on a vlan that wont exist until after the start up script has run. By assigning my vlans to a bridge and then setting up DCHP on the bridge there is no need for any service restarts in the script. The DHCP service starts and attaches to the bridge, and you're good to go.


(I also have each multi-LAN-port vlan associated with a bridge.)

_________________
Six of the Linksys WRT1900ACSv2 on r38159 and r40009.
On various: VLANs, client-mode travel router, two DNSCrypt servers (incl Quad9), multiple VAPs, USB/NAS, OpenVPN client/PBR (random NordVPN server).

VLANs on the WRT1900ACSv2 and other two-CPU Linksys/Marvell routers:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=317199

DNSCrypt for Quad9 DNS and/or multiple servers and/or missing DNSCrypt enable button: Sun Jan 06, 2019 post at
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318094

Restarting OpenVPN from the CLI or script or SES button:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1172761
delacosta456
DD-WRT Novice


Joined: 11 Mar 2010
Posts: 5

PostPosted: Tue Jul 30, 2019 1:46    Post subject: About new Switch Config TAB Reply with quote
hi
i just upgrade my firmware to the latest release and there is now a "Switch Config" Tab to configure Vlan

However i don't know where to start from

Can some body help please ?

Thanks
Goto page Previous  1, 2, 3 Display posts from previous:    Page 3 of 3
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.) 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