Configuration for network with the same VLAN for internet and VoIP

I'm trying to configure a fiber internet connection that uses VLAN 12 for internet, VoIP and IPTV (the ISP is Meo, Portugal).

I want to have my OpenWRT router connected to the ONT and handling the internet, and then I need to connect the ISP router to OpenWRT router to handle VoIP (I'm not using IPTV).
This setup should be possible, as I used to have it working on another router.

To get the internet working, I used the following configuration:

config device
        option vid '12'
        option type '8021q'
        option name 'eth2.12'
        option ifname 'eth2'

config interface 'wan'
        option proto 'dhcp'
        option broadcast '1'
        option peerdns '0'
        option delegate '0'
        option device 'eth2.12'

I was also able to make the VoIP (and ISP router) work, by following the instructions from this post.

That is, I added the following interface:

config interface 'iptv'
        option proto 'none'
        option ifname 'lan4.12'

And then I ran the following commands:

ip link add name iptvbridge type bridge
ip link set iptvbridge  up
ip link set eth2.12 master iptvbridge
ip link set lan4.12 master iptvbridge

lan4 is the port I'm using to connect the ISP router.

This allows me to get VoIP working. However, after this I loose the internet on the OpenWRT router.

Based on this other discussion, I assume that the issue is that I cannot have eth2.12 being used by wan interface and iptvbridge at the same time. But I could not figure out I to solve that.

In my latest attempt, I used the following configuration:

config interface 'wan'
	option proto 'dhcp'
	option broadcast '1'
	option peerdns '0'
	option delegate '0'
	list dns '1.1.1.1'
	list dns '1.0.0.1'
	option device 'br-iptv.12'

config device
	option vid '12'
	option type '8021q'
	option name 'eth2.12'
	option ifname 'eth2'

config device
	option type 'bridge'
	option name 'br-lan'
	list ports 'lan0'
	list ports 'lan1'
	list ports 'lan2'
	list ports 'lan3'

config device
	list ports 'eth2'
	list ports 'lan4'
	option type 'bridge'
	option name 'br-iptv'
	option bridge_empty '1'

config bridge-vlan
	option device 'br-iptv'
	option vlan '12'
	list ports 'eth2:t'
	list ports 'lan4'

In this setup the OpenWRT internet works, but the VoIP (and ISP router) do not work.

Anybody can given some pointer about how to properly configure my network?
Thanks in advance!

Likely voip is stuffed in some VLAN that needs to be forwarded to CPE2

Remove this :point_up_2: and enable vlan tagging for VID 12 on lan4.

config bridge-vlan
	option device 'br-iptv'
	option vlan '12'
	list ports 'eth2:t'
	list ports 'lan4:t'

EDIT: Actually the suggested configuration started working after a reboot. Thanks!


I tried these changes with no success. The VoIP and ISP router still get no connection.

Do I need to add some interface for the ISP router?

I noticed that when I add an unmanaged interface for lan4.12, the ISP router sees a connection, but it is stuck in the DHCP trying to obtain the IP.

On the OpenWrt router logs I'm seeing multiple messages like this:

DHCP packet received on lan4.12 which has no address

For future reference, this is the final working configuration:

config interface 'wan'
	option proto 'dhcp'
	option peerdns '0'
	option delegate '0'
	option device 'br-iptv.12'

config device
	option type 'bridge'
	option name 'br-lan'
	list ports 'lan0'
	list ports 'lan1'
	list ports 'lan2'
	list ports 'lan3'

config device
	list ports 'eth2'
	list ports 'lan4'
	option type 'bridge'
	option name 'br-iptv'
	option bridge_empty '1'

config bridge-vlan
	option device 'br-iptv'
	option vlan '12'
	list ports 'eth2:t'
	list ports 'lan4:t'

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