EntertainTV with Turris Omnia [update]

My new provider Telekom offers TV via multicast (IPTV). They call it Entertain or EntertainTV (which is the newer version). Here is how I got it to work with my Turris Omnia which is attached to a DrayTek Vigor130 VDSL2-Modem. So no provider-supplied hardware involved here. Also, I was not willing to pay a monthly fee for a suitable receiver but I want to watch TV via VLC on my computer. By the way, this guide should work on mostly every OpenWRT-based router. Interface names might be different though.

Here are some prerequisites/a summary:

  • Watching TV via multicast within my LAN (e.g. by using VLC), not just from a dedicated Ethernet port on the Turris Omnia (as in some other guides)
  • PPPoE via VLAN7
  • Entertain / EntertainTV via VLAN8
  • eth1 is the WAN-Port

In the advanced administration webinterface (or as we normally call it: LuCI) we add a new network interface (go to Network --> Interfaces --> Add new interface...) to our router.

As shown in the screenshot above, I called it entertain, configured it for DHCP client and, most importantly, configured it to cover VLAN8 on the WAN port (eth1.8).

Next on our list is the firewall. Go to Network --> Firewall and add a new zone.

Basically, the settings are the same as for the WAN zone. Obvious difference here is the name (entertain) and the covered network, which is our entertain network interface we just created. For all other zone-related settings, especially within the category Inter-Zone Forwarding, keep the defaults.

As a last step within LuCI, we need to configure some Traffic Rules for our new firewall zone (go to Network --> Firewall --> Traffic Rules).

As you can see, I allowed DHCP, ICMP echo-requests, IGMP and multicast traffic. You should be able to add these rules with the data visible in the screenshot above. Always be sure to select entertain as source zone and Device (input) as destination zone (at least for the first three rules). The fourth rule has lan as destination zone and the network 224.0.0.0/4 as destination address. As Entertain seems to be IPv4-only at the moment (is it really?) I left out the IPv6 counterparts of the rules shown.

Next, install igmpproxy via System --> Software. Don't forget to enable it in System --> Startup.

Of course, all things done until now could also be done via SSH. To not mess up the configuration, I try to use LuCI as long as it gives me all options necessary to accomplish what I want to do. For the next steps, connect via SSH to your router.

igmpproxy is configured via the files /etc/config/igmpproxy:

config igmpproxy
        option quickleave 1

config phyint entertain
        option network entertain
        option direction upstream
        list altnet 239.0.0.0/8
        list altnet 217.0.119.194/16
        list altnet 193.158.35.0/24
        list altnet 87.141.128.0/17
        list altnet <your LAN network>

config phyint lan
        option network lan
        option direction downstream
        list altnet <your LAN network>

Here, we defined an upstream (our entertain interface) and a downstream (our lan interface) network. Several networks are valid sources for IGMP or multicast packets, including our own LAN network (replace with your IPv4 network you use within your LAN, e.g. 192.168.0.0/24).

In a guide from the guys at IPFire I read that it is recommended to explicitly exclude other interfaces in the igmpproxy configuration. As this seems not to be possible via /etc/config/igmpproxy, I added the following lines at the end of the igmp_header() function in /etc/init.d/igmpproxy:

echo "phyint lo disabled" >> /var/etc/igmpproxy.conf
echo "phyint pppoe-wan disabled" >> /var/etc/igmpproxy.conf
echo "phyint eth1.7 disabled" >> /var/etc/igmpproxy.conf
echo "phyint eth1 disabled" >> /var/etc/igmpproxy.conf
echo "phyint ifb4pppoe-wan disabled" >> /var/etc/igmpproxy.conf

Here you have to see which interfaces are present in your system. Please note that this will probably be overwritten by an update. Do not forget to start igmpproxy afterwards...

Last but not least I enabled igmp_snooping for the lan interface via /etc/config/network. This makes the bridge (br-lan) mutlicast-aware so that packets are not send as broadcasts to your network.

config interface 'lan'
    ...
    option igmp_snooping '1'
    ...

With this configuration I could watch (multicast) TV via VLC with the playlists provided here from my LAN.

My guide is loosely based on this and this and probably some others.

[update]
For multicast to work via WiFi I had to remove the low rates from supported_rates and basic_rate in /etc/config/wireless. I simply removed the lines with the rates 6000, 9000 and 12000 (bit/s it is) for both radios. This should only be a problem if your WiFi links are very bad.

Otherwise, streams were stuttering.