awa
January 7, 2024, 2:16pm
1
Hi
I have the latest version of openwrt running but I just can't get to work my AC Pro. I want to have the WAN interface working with a VLAN 50 on a /30 netmask.
See below my config.
cat /etc/config/network
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 'fd77:1e4f:4abb::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0.1'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config switch_vlan
option device 'switch0'
option vlan '1'
option vid '3 0t'
config switch_vlan
option device 'switch0'
option vlan '50'
option ports '2 0t'
config interface 'WAN'
option proto 'static'
option device 'eth0.50'
option ipaddr '10.0.5.2'
option netmask '255.255.255.252'
option gateway '10.0.5.1'
Any help would be highly appreciated.
Thanks
mk24
January 7, 2024, 2:23pm
2
For packets to enter and leave the physical port with tags (50) intact for the VLAN aware device on the other end of the cable, the switch config needs to be option ports '2t 0t'
. A port number 2 without the t configures the switch to remove the VLAN tag as the packet leaves the switch. This is the "untagged" setting in the GUI.
awa
January 7, 2024, 2:55pm
3
Thank you for your support.
Updated my config with your observation. It didn't work
Changed the vlan 1 to vlan 50 ports. Didn't work.
I don't understand why it's so complicated. It's a simple setup.
Thanks
awa
January 7, 2024, 2:55pm
4
See my latest config
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 'fd77:1e4f:4abb::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0.1'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config switch_vlan
option device 'switch0'
option vlan '1'
option vid '2 0t'
config switch_vlan
option device 'switch0'
option vlan '50'
option ports '3t 0t'
config interface 'WAN'
option proto 'static'
option device 'eth0.50'
option ipaddr '10.0.5.2'
option netmask '255.255.255.252'
option gateway '10.0.5.1'
config route
option interface 'WAN'
option target '0.0.0.0/0'
option gateway '10.0.5.1'
awa
January 7, 2024, 2:58pm
5
On the other side I have a Mikrotik with a VLAN 50/trunk
mk24
January 7, 2024, 3:00pm
6
This is unnecessary as option gateway
within the wan section installs a 0.0.0.0 route.
The wan interface should be named 'wan' not 'WAN' as the lowercase name is already defined in the default firewall.
When you say "it doesn't work" you need to be more specific. For example try pinging 10.0.5.1.
awa
January 7, 2024, 3:28pm
7
I try piiinging 10.0.5.1 and it doesnt respond. Tried both physical ethernet ports, switched the ports 2,3 on the config also. Still nothing.
See the wan interface packets RX 0
**Device:** eth0.50
**Uptime:** 0h 0m 45s
**MAC:** F4:92:BF:CC:FA:43
**RX:** 0 B (0 Pkts.)
**TX:** 2.69 KB (50 Pkts.)
**IPv4:** 10.0.5.2/30
bmork
January 7, 2024, 4:18pm
8
Why did you change to port 3? That's the "LAN"/secondary port of the AC Pro. The primary port with power input is 2.
Please run
swconfig dev switch0 show
to verify that the switch is configured as expected and that you have link on the right port(s).
awa
January 7, 2024, 4:40pm
9
Restored the AP to openwrt defaults. Start from scratch and it's working.
On this device the step#1 is to look at the default vlan 1 config at /etc/config/networks it will clarify the ethernet interfaces setup ( main and secondary).
Thank you