lrwxrwxrwx 1 root root 0 Jan 6 00:49 br-lan -> ../../devices/virtual/net/br-lan
lrwxrwxrwx 1 root root 0 Jan 6 00:49 eth0 -> ../../devices/platform/10100000.ethernet/net/eth0
lrwxrwxrwx 1 root root 0 Jan 6 00:49 eth0.1 -> ../../devices/virtual/net/eth0.1
lrwxrwxrwx 1 root root 0 Jan 6 00:49 lo -> ../../devices/virtual/net/lo
lrwxrwxrwx 1 root root 0 Jan 6 00:49 wlan1 -> ../../devices/pci0000:00/0000:00:00.0/0000:01:00.0/net/wlan1
On a device without vlan capable swith and tagged VLANs following works perfect:
ip link add link eth0 name eth0.19 type vlan id 19
ifconfig eth0.19 172.16.1.9 netmask 255.255.255.0 up
ping 172.16.1.1
PING 172.16.1.1 (172.16.1.1): 56 data bytes
64 bytes from 172.16.1.1: seq=0 ttl=64 time=1.455 ms
64 bytes from 172.16.1.1: seq=1 ttl=64 time=0.868 ms
^C
However doing the same on WR902ac I don't get any ping replys, so VLAN19 is not working.
Default /etc/config/network is
No, the WR902AC does not have a switch at all. It has a single ethernet port.
That said, the device does support VLANs. It would be in the format eth0 (for the untagged network) and eth0.x for tagged networks where x is the VLAN ID.
What you've shown below is not the default /etc/config/network file for the WR902AC. I know this because...
There is no switch in the device, the switch and VLAN configurations don't do anything. Although it is moot, the (invalid) switch configuration doesn't even specify VLAN 19 in the first place.
You need to have a network interface that is bound to VLAN 19 in order to get a ping reply. That interface would be on eth0.19 and would need to have either a DHCP or static IP protocol configured and appropriate address for that subnet.
Where is VLAN19 coming from (or going to) in your network? Can you provide a network diagram, please?
No, the WR902AC does not have a switch at all. It has a single ethernet port.
Thats true. I thought there is this switch, because it has 2,4 und 5 GHz Wifi and switching between the 3.
I'm confused that WR902AC has this eth0.1 port by default, whereas CPE210 and WR802n don't have it.
What you've shown below is not the default /etc/config/network file for the WR902AC. I know this because...
Thats the configuration I got after firstboot && reboot
You need to have a network interface that is bound to VLAN 19 in order to get a ping reply. That interface would be on eth0.19 and would need to have either a DHCP or static IP protocol configured and appropriate address for that subnet.
Where is VLAN19 coming from (or going to) in your network? Can you provide a network diagram, please?
I have this device. To make it shorter, if I pull cable from WR902ac and plug it into WR802n and doint the steps from above everything works as expected, getting reply from 172.16.1.1
So I think I can save the time drawing a network diagram.
Usually the radios are bridged (not hardware switched), therefore not requiring a hardware switch chip to be included in the device. This is why the wireless devices are not actually present in the /etc/config/network file.
Are you positive? What version of OpenWrt are you using and what version of the hardware? I have a version 1 device, which uses just eth0.
I have no idea what you are trying to communicate here. The example you showed above about how you got ping responses does not necessarily indicate that the VLAN configuration was working -- there are many reasons that this could happen if you have any other network interfaces configured on that system.
Please make a drawing... it will be so much more clear.
I have no idea what you are trying to communicate here. The example you showed above about how you got ping responses does not necessarily indicate that the VLAN configuration was working -- there are many reasons that this could happen if you have any other network interfaces configured on that system.
I'm using this VLAN configuration for almost 2 years now, so I'm sure that it is working and the right device is replying. That's what I wanted to say. I'm 100% sure that the VLAN configuration is working, but currently not with WR902ac.
Thanks for your help.
Device should stay in network without VLAN tag and a new interface should be created for vlan 19.
Thats the configuration for CPE210
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'XXXXX'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0'
config interface 'lan'
option device 'br-lan'
option proto 'dhcp'
option delegate '0'
config interface 'vlan19'
option proto 'none'
option device 'br-vlan19'
option delegate '0'
config device
option type 'bridge'
option name 'br-vlan19'
list ports 'eth0.19'
option ipv6 '0'
I gave an example of how I think it would be done here. If you want to bridge that network so you can connect it with an SSID, you'd probably do it slightly differently:
EDIT: to be clear, the switch config stanza I showed above would still be required.
works perfectly. I misunderstood that this should replace the existing config switch_vlan section.
root@OpenWrt:/etc/config# ip link add link eth0 name eth0.19 type vlan id 19
root@OpenWrt:/etc/config# ifconfig eth0.19 172.16.1.9 netmask 255.255.255.0 up
root@OpenWrt:/etc/config# ping 172.16.1.1
PING 172.16.1.1 (172.16.1.1): 56 data bytes
64 bytes from 172.16.1.1: seq=0 ttl=64 time=1.191 ms
64 bytes from 172.16.1.1: seq=1 ttl=64 time=0.749 ms
The rest I'll figure out tomorrow.
Thank you very much for your fast replys and helpful support.