This short article describes how to receive IPTV broadcasts from Telia without the ISP supplied wireless router. Specifically, in my case I am using an OpenWRT based integrated (wireless) router. This guide may also be applicable to other IPTV providers.
Telia uses a separate Layer 2 VLAN for their IPTV broadcasts. Another method that is apparently common is UDP multicast managed using IGMP as documented in the OpenWRT wiki. Some web searching referred me to a Sweclockers forum thread where the author wrote that Telia uses VLAN ID 845 for their IPTV broadcasts and untagged traffic for everything else. This article is based on information found in that forum thread.
I'm using a TP-Link TL-WDR4900 integrated wireless router. It was released in January 2013 (source) and had its latest and probably last firmware update in April 2013 after being supported for three whole months (source). I would certainly not recommend running the stock firmware on it, but that doesn't matter because already before buying it I was planning to run OpenWRT on it, and the hardware support for this model is excellent (see OpenWRT wiki page). It "only" supports 802.11b/g/n WiFi and not the newer ac standard, but I never cared much for wireless anyway (I love my TP cables).
The TL-WDR4900 is different from many other integrated wireless routers in that is has a riddiculously fast 800 MHz PowerPC based CPU which can do NAT in software at Gigabit speeds without any issue. The CPU also has hardware support for some fancy cryptographic operations, which may come in if I want to run a VPN. It also has 128 MB of RAM, which is plenty for OpenWRT. I like to over-dimension computer hardware in general so that it will last longer when my requirements change. Considering its fairly low price (around 800 SEK new) it was a given choice.
The following screenshot from OpenWRT's amazing web interface LuCI shows the router's integrated switch with no cables connected:
The switch apparently has 7 ports (0-6). Port 0 is connected internally to the CPU and port 1 is the WAN port. Ports 2-5 correspond to LAN ports 1-4 as marked on the router. Port 6 seems to be unused.
As the diagram shows there are two VLAN's. VID 1 for LAN traffic and VID 2 for WAN traffic. When data is flowing between these two networks the CPU is involved. The CPU differentiates from LAN and WAN traffic using the VID. The diagram also shows that all external traffic is untagged (no VLAN information is exposed).
The change that we need to make is to program the switch to receive WAN traffic tagged as VID 845 and forward this untagged to a dedicated port which is only connected to the TV set-top box. I'm happy to report that this can all be done in OpenWRT's web interface LuCI.
Internet traffic should still be untagged, so the WAN port will now handle both tagged and untagged traffic. This may sound a little bit weird and not all switches seem to support this. Also, some alternate firmwares such as Tomato seem to enforce in software that each port can only do either tagged or untagged traffic but not both at the same time.
In the following screenshot I have added VLAN ID 845 connected to the WAN port and the topmost LAN port (4 in software, 5 as labeled). I have also removed the topmost port from VLAN ID 1, as this port is now dedicated to the IPTV receiver box.
I have been using this setup for a few weeks now and it works very well. I hope that the background provided in this article can help someone else use their more secure open source router software also for IPTV!