Egress Only Hardware VLAN Tagging on OpenWrt One

I'm trying to connect my OpenWRT One router to my ONT. The problem is that the ONT sends out untagged PPPoE frames, but expects back tagged frames.

The router does not seem to support DSA in the current release, so I can't use it for tagging. I dont' want to use any software based solutions as I understand that this incuurs a performance penalty. (Correct me if I'm wrong on this.)

How do I set up OpenWRT so that outgoing PPPoE frames get tagged with a VLAN, but incoming unatgged PPPoE frames are still handled by pppd?

Why do you assume the One is not on DSA? I'm pretty sure the filogic target is on DSA.

1 Like

This would be really unusual. How did you determine this?

Please connect to your OpenWrt device using ssh and 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:

ubus call system board
cat /etc/config/network

From the DSA guide here https://openwrt.org/docs/guide-user/network/dsa/dsa-mini-tutorial:

To check your device for DSA you may use a simple search via SSH (note: might not work on all devices):

if grep -sq DEVTYPE=dsa /sys/class/net/*/uevent; then 
  echo "You have DSA"
fi

Running on the OpenWrt One running snapshot:

➜  ~ cat /sys/class/net/eth0/uevent
OF_NAME=mac
OF_FULLNAME=/soc/ethernet@15100000/mac@0
OF_COMPATIBLE_0=mediatek,eth-mac
OF_COMPATIBLE_N=1
INTERFACE=eth0
IFINDEX=2
➜  ~ cat /sys/class/net/eth1/uevent
OF_NAME=mac
OF_FULLNAME=/soc/ethernet@15100000/mac@1
OF_COMPATIBLE_0=mediatek,eth-mac
OF_COMPATIBLE_N=1
OF_ALIAS_0=ethernet0
INTERFACE=eth1
IFINDEX=3

There is no DEVTYPE=dsa entry. Correct me if I'm wrong or if there is another way to check for DSA.

I'm kinda surprised myself too that the OpenWrt One doesn't support it.

Thing is - DSA is for switches, and the One has no internal switch. It just comes with two physical separate network interfaces, which are labeled as WAN and LAN. Look at it like a desktop having two network cards inside.

So you don't have (or need) DSA here.

Not sure how you can tag only egress though, hopefully someone else can help you with that.

Edit: I modified your topic title a bit since DSA is not involved here. And mentioning the One hopefully gets you some more attention :slightly_smiling_face:.

1 Like

When I first tried setting up the OpenWrt One with my ONT, it did not connect even with the VLAN ID as supplied by the ISP. So I examined the packets that were being transmitted by the ISP's router. They were being tagged infact to ID 0. Running PPPoE on VLAN 0 didn't work either.

I replayed the PADI packet packet sent by my ISP's router which had VLAN ID 0 from the OpenWrt One to my ONT. I got a PADO packet in response. However with no 802.1Q header.

With help from ChatGPT, I tried sending a minimal PADI packet. I found that it needed to meet the following criteria in order to get a PADO packet in response:

  • VLAN ID: 0
  • VLAN priority: 7
  • Zero-length service name tag
  • Ethernet frame padded to the minimum length of 64 bytes

I know it makes no sense for the PADI to be tagged and the PADO reply to be untagged, but it seems to be the want the ISP handles things. If anybody could shed light as to why this is the behaviour, it would be much appreciated.

➜  ~ ubus call system board
{
	"kernel": "6.6.67",
	"hostname": "OpenWrt",
	"system": "ARMv8 Processor rev 4",
	"model": "OpenWrt One",
	"board_name": "openwrt,one",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "SNAPSHOT",
		"revision": "r28369-33e23e8922",
		"target": "mediatek/filogic",
		"description": "OpenWrt SNAPSHOT r28369-33e23e8922",
		"builddate": "1734864058"
	}
}
➜  ~ 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 'fd94:42e:2d13::/48'

config interface 'lan'
	option proto 'dhcp'

config interface 'wan0'
	option device 'eth0'
	option proto 'none'

config interface 'wan1'
	option device 'eth1'
	option proto 'none'

The protocol for eth0 and eth1 are set to none as I was experimenting with the raw ethernet frames.

Vlan id 0 is invalid.

If this is the advice you are getting from ChatGPT, this should serve as proof that using ai for network configuration advice is a very bad idea.

This most certainly won’t work.

Have you asked your isp about the connection requirements?

1 Like

VLAN id 0 is reserved not invalid:

The reserved value 0x000 indicates that the frame does not carry a VLAN ID; in this case, the 802.1Q tag specifies only a priority (in PCP and DEI fields) and is referred to as a priority tag

2 Likes

Fair enough, but I am willing to wager that the device in question does not use tagged VLAN 0 and a priority tag... this would be very uncommon for residential CPE devices.

1 Like