Need Swconfig / Nvram VLAN help WRT3200ACM

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


Joined: 16 Dec 2016
Posts: 14

PostPosted: Wed Aug 16, 2017 5:46    Post subject: Reply with quote
Does your router lock up when you run:
Code:
swconfig dev switch0 set apply


I get the VLAN to show up but you have to run set apply for it to actually work right?
Sponsor
Gigabitten
DD-WRT Novice


Joined: 02 Jun 2017
Posts: 43

PostPosted: Sun Aug 20, 2017 17:13    Post subject: Reply with quote
naps1saps wrote:
Not to hijack your thread but I'm trying to get the WAN port on my wrt1200ac to use vlan 201 with tagging and I'm having a heck of a time. Do any of you have any suggestions on how to do that since we have similar hardware? The code I'm trying to run just causes the router to lock up.

I'm getting confused with the difference between switch0 and eth0. eth0 is WAN I thought but port 4 is WAN, I am so lost.

Code:
swconfig dev eth0 set reset
swconfig dev eth0 set enable_vlan1
swconfig dev eth0 vlan 1 set vid 201
swconfig dev eth0 vlan 1 set ports '0 4t'
swconfig dev eth0 set apply


Suggestions? Yes. I've experienced the same router lock up with the 3200acm when trying to run the "swconfig dev apply command" in terminal in the router when its already up an running. It might be a Marvell chipset thing.

Try putting your Swconfig commands in a startup script. That's the only way I could get past the router lockup problem. But as my thread indicates, I still could not get ethernet connections to the router with ANY swconfig set-up (though my wireless worked fine). I ended up having more success configuring the router/ switch through NVram though I am still having problems getting the Vlan ethernets connections to be in the subnets they are assigned.
Gigabitten
DD-WRT Novice


Joined: 02 Jun 2017
Posts: 43

PostPosted: Sun Aug 20, 2017 19:48    Post subject: Reply with quote
Resources

In response to an email, I decided to post some resources to help some other noobs like myself get started with Vlanning. I bolded keywords/concepts:

https://www.dd-wrt.com/wiki/index.php/Multiple_WLANs
(for segmenting wireless. Starters read this one before others. Teaches how to setup virtual interfaces, create bridges, assign interfaces to bridges then put DHCP servers on bridges. Theoretically much of the same steps here should apply to VLANing. Though this guide was made for routers with broadcom chipsets, this guide will fully get wireless Segment/vlan working on Marvell chipset 3200acm, despite currently remaining problems with ethernet ports. This guide also contains instruction for using DNSmasq as DHCP server by using the additional options box under DNSmasq instead of normal GUI method. DNSmasq for DHCP instructions worked worse for me than normal GUI DHCP server instruction. See the below links in my comment for more on DNSmasq/DHCP )


http://www.ciscopress.com/articles/article.asp?p=1730493
(A good dd-wrt VLANing guide, but as you find out you can’t do the step on page two that calls for Separating the LAN ports because there is currently not a “VLAN” tab in the GUI for the WRT3200acm. This means you should have to manually separate the ports using the terminal and a utility like NVRAM or Swconfig. )


https://www.dd-wrt.com/wiki/index.php/VLAN_Detached_Networks_-_Linksys_E2500
(Shows the potential discrepancy between DD-WRT Port number Labeling and Hardware/GUI/external labeling of the ports . As I write this I forget what numeric labels swconfig or NVRAM assigns to the ports for the 3200acm and what layout there is but I think I mention it in a comment somewhere on this post. )


https://www.dd-wrt.com/wiki/index.php/Switched_Ports
(essential for understanding how to use NVRAM utility for VLANING and separating LAN ports into different subnets. Also contains the two different potential port layouts. I believe I determined that for NVRAm the port layout that has the WAN=0 port is the correct configuration for the WRt 3200acm.).

http://www.vspecialist.co.uk/2011/07/creating-vlans-in-dd-wrt-part-1/
(This will give you more of a broad introduction to the full operation of NVRAM utility separate LAN ports and assign the ports to VLANS. )

http://en.faq.buffalo-global.com/app/answers/detail/a_id/14954/p/1,2
(for those who want to try using the Swconfig utility to to configure the switch this contains instructions on a start up script. Also contains a nice conceptual diagram of general relationship between VLANS and ports and interfaces though not necessarily the 3200acms. )

https://dd-wrt.com/wiki/index.php/Default_internal_device_network
(This diagram shows the general layout of a WRT series router. At the moment I forget which one of the two mentioned layouts I concluded the WRT3200acm has though I think it is implied in one of my comments somewhere else in my thread. )


https://www.dd-wrt.com/phpBB2/viewtopic.php?p=431294
(see blanchae comment for a very a good diagram and explanation of a generic WRT layout of
router, a 6 port switch and a wireless ports.
Again not necessarily specific to WRT3200acm)


https://www.dd-wrt.com/wiki/index.php/VLAN_Detached_Networks_each_with_Wireless_and_Internet
( contains instructions for using DNSmasq as a DHCP server. I’ve suspected my remaining problem is some sort of assignment of DHCP server problem. I’ve tried this to assign DHCP servers to bridges with my VLANs in them instead of using the normal GUI method for the assignment Less success with this than the GUI can’t connect to router at all when I try this operation. )


https://www.dd-wrt.com/wiki/index.php/VLAN_Detached_Networks_(Separate_Networks_With_Internet)
(see this under “old procedure” for more information on trying to use box for additional options under DNSMasq in the services tab of the GUI to configure DHCP servers for bridges. Again same problem as mentioned before less success with this than normal GUI method of assigning DHCP servers under the networking tab. )

_________________
Linksys WRT3200ACM
Build: B.S.'s DD-WRT v3.0-r32597 std (07/08/17)

Help me with my VLANING problem:
https://www.dd-wrt.com/phpBB2/viewtopic.php?t=309654
SurprisedItWorks
DD-WRT Guru


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

PostPosted: Tue Oct 23, 2018 20:22    Post subject: Reply with quote
I have VLANs working now on the WRT1900ACSv2, which per your "swconfig dev switch0 show" output seems to have the same switch configuration as your router. See https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=317199 for details.

And note that this was very much a key forum thread in helping me get there. Sorry about resurrecting a year-old thread, but in case Gigabitten or others are still watching...
calgarywifi
DD-WRT Novice


Joined: 24 Aug 2012
Posts: 23

PostPosted: Tue Aug 09, 2022 18:58    Post subject: Reply with quote
Hi there,
Im currently using Firmware: DD-WRT v3.0-r49671 (08/09/22) WRT3200ACM

Im using a single cable to PORT 4 (the actual port number)

To get a WAN ip address I have to tag port 4 as VLAN2
On single CPU routers like the n66u ac68 etc i just check that off in switch config.
I also need VLAN2 passthrough on port 1-4

I read through hours and hours and could not figure out what 6t 0t, 1 ,2 ,3 4 applies to what port.

This is what i came up to no avail...

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 "6t 5 4 3 2 1"
swconfig dev switch0 set apply

vconfig set_name_type VLAN_PLUS_VID_NO_PAD

vconfig add eth1 1
vconfig add eth1 2

ifconfig vlan1 up
ifconfig vlan2 up

brctl addif br1 vlan1
brctl addif br2 vlan2

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


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

PostPosted: Wed Aug 10, 2022 22:28    Post subject: Reply with quote
Resurrecting ancient threads is generally discouraged, but since we are here...

The LAN ports on the router numbered 1 2 3 4 are represented in the swconfig world by 3 2 1 0, so the order is reversed. Looks like you had that figured out.

The WAN/Internet port in swconfig is port 4, IIRC. But swconfig ports 5 and 6 are the internal ports that connect to the two CPUs. I have one router that has labeled LAN port 4 (swconfig port 0) split off to a new vlan3. The other three LAN ports remain on vlan1 where they are in the default setup. In dd-wrt vlan1 should already be in br0 in the bridging table in the Setup/Networking tab. I believe I had to use the GUI to create a new br1 (before the brctl at the end below runs for the first time) to hold the new single-port vlan3. I think in theory it need not be bridged, but some weirdness about the boot order made a bridge necessary. And I'm afraid I have zero idea what you mean by "vlan2 passthrough" for the other three LAN ports. Pass through to where exactly?

Here is the code for my example:
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 1 2 3"
    swconfig dev switch0 vlan 2 set ports "5 4"
  #a new vlan 3 interface will handle any remaining ports
    swconfig dev switch0 vlan 3 set ports "6t 0"
  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

I don't think this note adds anything at all to what's in that referenced thread I started back in 2018 or whenever, but truly I'm going to be of no real help beyond that and this one example, because I did all this way back then and haven't looked at it since. The brain rust lies thick!

I'm not quite sure what you mean about needing a tag on port 4, but that may be because tagging of any type is so far outside my networking world that I'm zero help on the topic anyway. I'm not a networking engineer by any means. Just an amateur muddling through. (So if anyone else has other clues here, do jump in!)

_________________
2x Netgear XR500 and 3x Linksys WRT1900ACSv2 on 53544: VLANs, VAPs, NAS, station mode, OpenVPN client (AirVPN), wireguard server (AirVPN port forward) and clients (AzireVPN, AirVPN, private), 3 DNSCrypt providers via VPN.
calgarywifi
DD-WRT Novice


Joined: 24 Aug 2012
Posts: 23

PostPosted: Thu Aug 11, 2022 22:43    Post subject: Reply with quote
Thanks I used your example code ... to no avail.

with static programmed IP on the wifi interface client computer couldn't reach it.


Code:

#split the LAN on the port 6 cpu into eth1 (untagged) and vlan2 (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 "6t 0 1 2 3"
    swconfig dev switch0 vlan 2 set ports "6 5 4"
  #a new vlan 3 interface will handle any remaining ports
   ##swconfig dev switch0 vlan 3 set ports "6t 0"
  swconfig dev switch0 set apply
  vconfig set_name_type VLAN_PLUS_VID_NO_PAD
  vconfig add eth1 2
  vconfig add eth0 1
ifconfig vlan1 up
ifconfig vlan2 up
brctl addif br1 vlan2

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

Goto page Previous  1, 2 Display posts from previous:    Page 2 of 2
Post new topic   Reply to topic    DD-WRT 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