Unifi AP AC LR - 2 Physical NICs?

So, I have a Unifi AP AC LR which has 2 physical NICs on it, one MAIN and on SECONDARY.

I have configured the main port as a trunk which is working well. However I want to configure the second NIC to be on a particular VLAN, (not sure if this has to be tagged or untagged but can play around with that when I get the hardware working).

The issue is I don't see any hardware for the second NIC. ifconfig only shows eth0 and manually creating a eth1 the device just remains offline.

Now I have very little knowledge working with switches in OpenWRT, but this device has a SWITCH configured. In the swtich I can see eth0 (cpu), LAN1 and LAN2.

Under the swtich, I tried to add the VLAN tagging for LAN2 for the desired VLAN i want to access but that didnt work, not matter what I do, I cannot see anything under hardware or interfaces for say eth1?

Not sure if this is configured as a bridged port, or do I need to delete the switch in order for the hardware on LAN2 to show as eth1 in devices.

Thanks

The LR only has one Ethernet port. Might you be talking about the Pro?

Meanwhile, post your config files for review:

Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

cat /etc/config/network
cat /etc/config/wireless

Sorry yea it is the PRO. Definitely has the two ports and remember now it is the pro.

Will get you config asap.

Ok here are the details:

System
Hostname	OpenWRT
Model	Ubiquiti UniFi AC Pro
Architecture	Qualcomm Atheros QCA956X ver 1 rev 0
Target Platform	ath79/generic
Firmware Version	OpenWrt 22.03.2 r19803-9a599fee93 / LuCI openwrt-22.03 branch git-22.288.45147-96ec0cd
Kernel Version	5.10.146
Local Time	2023-01-17 16:41:38
Uptime	2d 17h 4m 40s
Load Average	0.08, 0.02, 0.01

Network 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 'fd8f:2c9f:6b14::/48'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config device
	option name 'eth0'
	option ipv6 '0'

config interface 'vlan102'
	option device 'br-vlan102'
	option proto 'none'

config device
	option name 'eth0.102'
	option type '8021q'
	option ifname 'eth0'
	option vid '102'
	option mtu '1500'
	option ipv6 '0'

config device
	option type 'bridge'
	option name 'br-vlan102'
	list ports 'eth0.102'
	option mtu '1500'
	option ipv6 '0'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '0t 2t'
	option vid '102'
	option description 'vlan102'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option vid '101'
	option description 'vlan101'
	option ports '0t 2t 3t'

config device
	option type 'bridge'
	option name 'br-vlan101'
	option mtu '1500'
	option ipv6 '0'
	list ports 'eth0.101'
	list ports 'eth1'

config device
	option name 'eth0.101'
	option type '8021q'
	option ifname 'eth0'
	option vid '101'
	option mtu '1500'
	option ipv6 '0'

config interface 'vlan101'
	option device 'br-vlan101'
	option proto 'none'

config switch_vlan
	option device 'switch0'
	option vlan '3'
	option ports '0t 2t'
	option vid '103'
	option description 'vlan103'

config device
	option name 'eth0.103'
	option type '8021q'
	option ifname 'eth0'
	option vid '103'
	option mtu '1500'
	option ipv6 '0'

config device
	option type 'bridge'
	option name 'br-vlan103'
	list ports 'eth0.103'
	option mtu '1500'
	option ipv6 '0'

config interface 'vlan103'
	option proto 'static'
	option device 'br-vlan103'
	option ipaddr 'REMOVED'
	option netmask 'REMOVED'

config device
	option name 'eth1'
	option mtu '1500'
	option ipv6 '0'
	option macaddr 'REMOVED'

I just want to include the secondary eth port on vlan101, something like eth1?

Thanks

If you can define exactly what you want to happen with each port, that will help

Inside your device is effectively a 3 port switch, as you've sort of referenced already. There is the CPU (eth0) and then each of the ethernet ports... these are not individually routed ports -- they both go through the switch.

the only error I'm seeing at the moment is the eth1 below (which doesn't exist, AFAIK)... it should be removed.

Otherwise, what you've got now looks fine insofar as the switch_vlan statements.

I'm guessing the CPU is logical port 0, and that the main and secondary ethernet ports are logical ports 2 and 3 respectively.

That means that you have the following:

  • CPU - all VLANs (101, 102, 103) tagged

  • Main port: VLAN 101 (tagged), VLAN 102 (tagged), VLAN 103 (tagged)

  • Secondary Port: VLAN 101 (tagged)

  • All 3 VLANs are associated with bridges, so they can all be associated with wifi SSIDs

  • The AP has an address only on VLAN 103 (btw, it is not necessrry to redact RFC1918 addresses and the netmask)

  • VLANs 101 and 102 have proto none (unmanaged) so they are just simply bridging wired to wireless connectivity.

Do you want something different?

Not really, I want the secondary port on the device (the eth1) port to go out via VLAN101 and for the main port to remain as a trunk or to tag on vlans 101,102,103, as it is currently setup and doing

I just want to add the eth1 port to vlan 101.

It does not seem to be working?

Thanks

If you want the secondary ethernet port to be untagged VLAN 101, the solution is simple...

change the '3t' below to just '3'

so the line should look like this:
option ports '0t 2t 3'

that's all you need to do.

Although this might be a bit of nit-picking, the secondary port is not eth1. It is a physical port on a 3-port switch... the connections on that switch are as follows:

  • 0: the CPU (eth0)
  • 2: Main (external ethernet port)
  • 3: Secondary (external ethernet port).

eth0 refers to the connection with the CPU only (logical port 0 on the switch) and the physical ports themselves are just logical ports 2 and 3 on the switch. So your connection is eth0.101 --> 0t (tagged on the CPU), 2t (tased on the main port), 3 (untagged on the secondary port).

Sorry i got it to go actually by rather untagging rather then tagging on that interface.

Guess the tagging happens on lan1 or eth0 so tagging is not required.

Thanks anyway all looks good

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.