TP-Link C7 V2: VLAN Configuration

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware
Goto page 1, 2  Next
Author Message
Elysweyr
DD-WRT Novice


Joined: 02 Mar 2019
Posts: 14

PostPosted: Sun Mar 03, 2019 11:44    Post subject: TP-Link C7 V2: VLAN Configuration Reply with quote
Default config:
Code:
root@DD-WRT-2:~# nvram show | grep vlan.*ports | sort
  size: 25838 bytes (39698 left)
  vlan0ports=1 2 3 4 5*
  vlan1ports=0 5


root@DD-WRT-2:~# nvram show | grep port.*vlans | sort
  size: 25838 bytes (39698 left)
  port0vlans=1
  port1vlans=0
  port2vlans=0
  port3vlans=0
  port4vlans=0
  port5vlans=0 1 16


root@DD-WRT-2:~# nvram show | grep vlan.*hwname | sort
  size: 25838 bytes (39698 left)
  vlan0hwname=et0
  vlan1hwname=et0



My config:
Code:

/*
 * VLAN10 = Management
 * Two radios + 1 VAP:
 * ath0   => VLAN200
 * ath1   => VLAN136
 * ath1.1 => VLAN100
 */
 
nvram set port0vlans="1"
nvram set port1vlans="10 16 18 19 21 136 100 200"
nvram set port2vlans="0"
nvram set port3vlans="0"
nvram set port4vlans="0"
nvram set port5vlans="0 1 10 16 18 19 21 100 136 200"
 
nvram set vlan10hwname=et0
nvram set vlan100hwname=et0
nvram set vlan136hwname=et0
nvram set vlan200hwname=et0
 
 
nvram set vlan0ports="2 3 4 5*"
nvram set vlan1ports="0 5"
nvram set vlan10ports="1* 5"
nvram set vlan100ports="1 5"
nvram set vlan136ports="1 5"
nvram set vlan200ports="1 5"


root@DD-WRT-2:~# brctl show
bridge name     bridge id                         STP enabled     interfaces
br0                  8000.18d6xxxxxxxx         no                  ath1.1
                                                                                  eth0
                                                                                  eth1
br1                  8000.18d6xxxxxxxx         no                  ath1
                                                                                  eth0.136
br2                  8000.18d6xxxxxxxx         no



Hi,

I just introduced VLANs on my network and I'm using my C7 v2 primary as an AP (got a pfSense gateway on my network).
Until now I've read a lot of documentation on this topic and I've tagged the ports and set up a sample configuration for ath1 (which should obtain a 192.168.136.X IP from my DHCP-Server (pfSense).
In addition to that ath1 is set "unbridged" with the IP 192.168.136.2 and /24 CIDR-prefix.
If I am now logged into ath1 with my Windows PC and set the IP statically, then I cannot reach 192.168.136.2 which is quite weird.

I would appreciate it if someone could give me a hint, because my configuration is almost finished.

Dynamic VLANS would be awesome but I've read that they're still not supported on ath10k.

Greets,
Elysweyr
Sponsor
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 4777
Location: Akershus, Norway

PostPosted: Sun Mar 03, 2019 15:42    Post subject: Re: TP-Link C7 V2: VLAN Configuration Reply with quote
Elysweyr wrote:
nvram set port0vlans="1"
nvram set port1vlans="10 16 18 19 21 136 100 200"
nvram set port2vlans="0"
nvram set port3vlans="0"
nvram set port4vlans="0"
nvram set port5vlans="0 1 10 16 18 19 21 100 136 200"

nvram set vlan10hwname=et0
nvram set vlan100hwname=et0
nvram set vlan136hwname=et0
nvram set vlan200hwname=et0


nvram set vlan0ports="2 3 4 5*"
nvram set vlan1ports="0 5"
nvram set vlan10ports="1* 5"
nvram set vlan100ports="1 5"
nvram set vlan136ports="1 5"
nvram set vlan200ports="1 5"


These nvram variables are for Broadcom units and does not have any impact on Atheros. You have to run swconfig commands in the startup script.

Start by posting the output of "swconfig dev switch0 show"
Elysweyr
DD-WRT Novice


Joined: 02 Mar 2019
Posts: 14

PostPosted: Sat Mar 09, 2019 12:54    Post subject: Re: TP-Link C7 V2: VLAN Configuration Reply with quote
Per Yngve Berg wrote:

These nvram variables are for Broadcom units and does not have any impact on Atheros. You have to run swconfig commands in the startup script.

Start by posting the output of "swconfig dev switch0 show"



https://pastebin.com/tipQMJUc

That's the output - I bricked my router and was busy the last week but I got it up and running again.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 4777
Location: Akershus, Norway

PostPosted: Sat Mar 09, 2019 13:38    Post subject: Reply with quote
Add to command and save as startup:


swconfig dev switch0 set enable_vlan 1
swconfig dev switch0 vlan 1 set ports "0 1t 2 3 4 5"
swconfig dev switch0 vlan 1 set pvid=10
swconfig dev switch0 vlan 3 set ports "1t 6t"
swconfig dev switch0 vlan 3 set pvid=100
swconfig dev switch0 vlan 4 set ports "1t 6t"
swconfig dev switch0 vlan 4 set pvid=136
swconfig dev switch0 vlan 5 set ports "1t 6t"
swconfig dev switch0 vlan 5 set pvid=200
swconfig dev switch0 set apply
vconfig add eth0 3
vconfig add eth0 4
vconfig add eth0 5
Elysweyr
DD-WRT Novice


Joined: 02 Mar 2019
Posts: 14

PostPosted: Sat Mar 09, 2019 13:57    Post subject: Reply with quote
Thanks for your help!

It seems to create some errors on my specific device. :/

Code:

[...]
root@DD-WRT:~# swconfig dev switch0 vlan 1 set pvid=10
Unknown attribute "pvid=10"
[...]
root@DD-WRT:~# swconfig dev switch0 vlan 3 set pvid=100
Unknown attribute "pvid=100"
[...]
root@DD-WRT:~# swconfig dev switch0 vlan 4 set pvid=136
Unknown attribute "pvid=136"
[...]
root@DD-WRT:~# swconfig dev switch0 vlan 5 set pvid=200
Unknown attribute "pvid=200"
[...]


My wireless interfaces are currently bridged on the default br0.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 4777
Location: Akershus, Norway

PostPosted: Sat Mar 09, 2019 14:45    Post subject: Reply with quote
It should be "vid", not "pvid"

swconfig dev switch0 vlan 1 set vid=10
Elysweyr
DD-WRT Novice


Joined: 02 Mar 2019
Posts: 14

PostPosted: Sat Mar 09, 2019 14:59    Post subject: Reply with quote
Per Yngve Berg wrote:
It should be "vid", not "pvid"

swconfig dev switch0 vlan 1 set vid=10


Still the same problem :/
What about the interfaces ath0, ath1 and ath1.1? - How do they have to be configured? Atm they are still on br0


Code:

[...]
root@DD-WRT:~# swconfig dev switch0 vlan 1 set vid=10
Unknown attribute "vid=10"
[...]
root@DD-WRT:~# swconfig dev switch0 vlan 3 set vid=100
Unknown attribute "vid=100"
[...]
root@DD-WRT:~# swconfig dev switch0 vlan 4 set vid=136
Unknown attribute "vid=136"
[...]
root@DD-WRT:~# swconfig dev switch0 vlan 5 set vid=200
Unknown attribute "vid=200"
[...]
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 4777
Location: Akershus, Norway

PostPosted: Sat Mar 09, 2019 15:08    Post subject: Reply with quote
swconfig dev switch0 vlan 1 set vid 10
Elysweyr
DD-WRT Novice


Joined: 02 Mar 2019
Posts: 14

PostPosted: Sat Mar 09, 2019 15:43    Post subject: Reply with quote
That's working now.

What about the interfaces ath0, ath1 and ath1.1? - How do they have to be configured? Atm they are still on br0. Do I have to set up a bridge for every interface or how is this configured properly?
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 4777
Location: Akershus, Norway

PostPosted: Sat Mar 09, 2019 15:49    Post subject: Reply with quote
Create new bridges br1 and br2 and assign .i.e ath1.1 and eth0.5 to br1.
Elysweyr
DD-WRT Novice


Joined: 02 Mar 2019
Posts: 14

PostPosted: Sat Mar 09, 2019 17:24    Post subject: Reply with quote
Per Yngve Berg wrote:
Create new bridges br1 and br2 and assign .i.e ath1.1 and eth0.5 to br1.


Thanks again. I added the brctl addif commands to the startup script as well.

Now I configured the port (37) on the switch (10T, 100T, 136T, 200T).

I can't reach the router on 1/37 but I can reach it on 2/39 (39 is 10U) which is quite weird.


The router is set to Operating Mode: Router.
I got a pfSense firewall which is my network router and acts as a dhcp server on each VLAN.



Startup script:
Code:
swconfig dev switch0 set enable_vlan 1
swconfig dev switch0 vlan 1 set ports "0 1t 2 3 4 5"
swconfig dev switch0 vlan 1 set vid 10
swconfig dev switch0 vlan 3 set ports "1t 6t"
swconfig dev switch0 vlan 3 set vid 100
swconfig dev switch0 vlan 4 set ports "1t 6t"
swconfig dev switch0 vlan 4 set vid 136
swconfig dev switch0 vlan 5 set ports "1t 6t"
swconfig dev switch0 vlan 5 set vid 200
swconfig dev switch0 set apply
vconfig add eth0 3
vconfig add eth0 4
vconfig add eth0 5
brctl addif br1 eth0.5
brctl addif br2 eth0.4
brctl addif br3 eth0.3
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 4777
Location: Akershus, Norway

PostPosted: Sat Mar 09, 2019 17:41    Post subject: Reply with quote
eth1 is the WAN and shall not be bridged to br0.
Elysweyr
DD-WRT Novice


Joined: 02 Mar 2019
Posts: 14

PostPosted: Sat Mar 09, 2019 17:52    Post subject: Reply with quote
Per Yngve Berg wrote:
eth1 is the WAN and shall not be bridged to br0.


I unbridged eth1 and the router is unreachable ...
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 4777
Location: Akershus, Norway

PostPosted: Sat Mar 09, 2019 18:09    Post subject: Reply with quote
It should be reachable on VLAN 10. Is the IP address on the correct sub-net?
Elysweyr
DD-WRT Novice


Joined: 02 Mar 2019
Posts: 14

PostPosted: Sat Mar 09, 2019 18:39    Post subject: Reply with quote
Per Yngve Berg wrote:
It should be reachable on VLAN 10. Is the IP address on the correct sub-net?


Sure, it should be reachable but it is not.

The router's ip is 192.168.10.10.
It's connected on 2/39 - both are 10U.

This has worked before I unbridged eth1.
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum 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