IPTV troubles with OpenWRT: cannot get live streams to work

tshark (text mode wireshark) may have better decoders than tcpdump.
Somtimes installable as tsharkm, or it is deliverd with wireshark or available as wireshark-cli package.

Wireshark is pretty neat. Couldn’t get tshark on the router, but I did a tcpdump capture and loaded that into Wireshark instead. Got a capture on the RPi running VLC and on the router for wan.4 during a stream. Looks like all packets make it, in order and with the data intact.
I’m pretty sure now that igmpproxy is working just fine. Perhaps garbage in = garbage out?

To sum up, there’s just something about the UDP HD+ stream that’s off:

  • It makes up only about half to two-thirds of the bandwidth over Draytek/OpenWRT setup; compared to the ~12 Mbit/s over the Fritz.
  • It causes the STB to start trying to ‘repair’ the stream; VLC won’t play it beyond the first frame or two.
  • It prevents normal WAN traffic, causing major latency, timeouts (and perhaps packet loss).

I’m not going to be able to play with it this week, probably back into it next weekend. Thanks so far, everyone.

Dit topic is 24 uur na het laatste antwoord automatisch gesloten. Nieuwe antwoorden zijn niet meer toegestaan.

This thread was automatically closed and resolved, when it obviously was not.

A follow up to my attempts to get IPTV to work:

It definitely was the modem. The Draytek 167 apparently could not handle the UDP traffic. I’m now running a Zyxel VGM4005-B50A and without any tweaking or any changes to the router (or even the default settings of the modem), everything just works.

HD+ stream runs just fine, smooth and consistent. STB works, nor poblem. Ping stays fine and the WAN connection itself is rock solid.

So anyone that recognizes the issues I had, make sure your modem is work OK!

@ Freedom community admins: it might be a good idea to allow some way for people to reopen a thread, or at least the OP. This way people looking for solutions won’t be able to and it generates unnecessary extra threads…

This is very surprising to me. But your experiments make it clear. Thanks for pursuing the the whole of this. For completeness, could you sum up your OpenWRT config that now functions correctly for IPTV?

Surprised me too, so I’m glad I tried it anyway.

Here’s the minimal config that I can confirm it working with:

/etc/config/network

config globals 'globals'
    option packet_steering '1'

config interface 'wan'
    option proto 'pppoe'
    option device 'wan.6'
    option username 'fake@freedom.nl'
    option password '1234'
    option ipv6 '0'
    option sourcefilter '0'
    option delegate '0'
    option mtu '1500'

config interface 'wan_tv'
    option proto 'dhcp'
    option device 'wan.4'
    option type 'bridge'
    option defaultroute '0'
    option hostname '*'
    option gateway '0'
    option peerdns '0'
    option ipv6 '0'
    option delegate '0'

config interface 'lan_tv'
    option proto 'static'
    option ipaddr '192.168.4.1'
    option netmask '255.255.255.0'
    option igmp_snooping '1'
    option ipv6 '0'
    option delegate '0'
    option device 'lan3'

config device
    option name 'wan'
    option ipv6 '0'
    option mtu '1508'

config device
    option type '8021q'
    option ifname 'wan'
    option vid '4'
    option name 'wan.4'
    option ipv6 '0'

config device
    option type '8021q'
    option ifname 'wan'
    option vid '6'
    option name 'wan.6'
    option ipv6 '0'

config device
    option name 'lan3'

config device
    option type '8021q'
    option ifname 'wan'
    option vid '2'
    option name 'wan.2'

/etc/config/firewall

config defaults
    option input 'REJECT'
    option output 'ACCEPT'
    option forward 'REJECT'
    option synflood_protect '1'
    option drop_invalid '1'

config zone
    option name 'lan_tv'
    option input 'ACCEPT'
    option output 'ACCEPT'
    option forward 'REJECT'
    option masq_allow_invalid '1'
    option log '1'
    list network 'lan_tv'

config zone
    option name 'wan'
    option input 'REJECT'
    option output 'ACCEPT'
    option forward 'REJECT'
    option mtu_fix '1'
    option masq '1'
    option log '1'
    list network 'wan'

config zone
    option name 'iptv'
    option input 'REJECT'
    option output 'ACCEPT'
    option forward 'REJECT'
    option masq_allow_invalid '1'
    option log '1'
    option mtu_fix '1'
    option masq '1'
    list network 'wan_tv'

config forwarding
    option src 'lan_tv'
    option dest 'iptv'

config forwarding
    option src 'lan_tv'
    option dest 'wan'

config rule
    option name 'IPTV-Allow-Multicast'
    list proto 'udp'
    option src 'iptv'
    option dest 'lan_tv'
    list dest_ip '224.0.0.0/8'
    option target 'ACCEPT'

config rule
    option name 'IPTV-Allow-Multicast-Stream'
    option src 'iptv'
    option target 'ACCEPT'
    list proto 'udp'
    list src_ip '217.166.0.0/16'
    list dest_ip '224.0.0.0/16'

config rule
    option name 'IPTV-Allow-IGMP'
    list proto 'igmp'
    option src 'iptv'
    option dest 'lan_tv'
    option target 'ACCEPT'

config rule
    option name 'ISAKMP-IPTV'
    list proto 'udp'
    option src 'iptv'
    option dest 'lan_tv'
    option target 'ACCEPT'
    option dest_port '500'
    option enabled '0'

config rule
    option name 'IPSEC-IPTV'
    list proto 'esp'
    option src 'iptv'
    option dest 'lan_tv'
    option target 'ACCEPT'
    option enabled '0'

config rule
    option name 'LanTV-Allow-DNS'
    option src 'lan_tv'
    option dest_port '53'
    option target 'ACCEPT'

config rule
    option name 'LanTV-DHCP'
    option src 'lan_tv'
    option dest_port '67'
    option target 'ACCEPT'
    list proto 'tcp'
    list proto 'udp'

config rule
    option name 'LanTV-Allow-Internet'
    list proto 'all'
    option src 'lan_tv'
    option dest 'wan'
    option target 'ACCEPT'

/etc/config/igmpproxy

config igmpproxy
    option quickleave 1

config phyint
    option network wan_tv
    option zone iptv
    option direction upstream
    list altnet 217.166.0.0/16
    list altnet 185.24.172.0/24         # probably not needed
    list altnet 185.24.175.0/24         # probably not needed
    list altnet 185.41.48.0/24          # probably not needed

config phyint
    option network lan_tv
    option zone lan_tv
    option direction downstream
    list altnet 192.168.4.1/24

Note that I disabled IPv6 just to rule it out at some point, though I doubt that this makes any difference for IPTV.

1 like

Option quickleave 1 is something you don’t want if you have multiple listeners (eg multiple STBs) in your network.

Because now your IGMP proxy immediately stops forwarding multicast traffic to a downstream interface when it receives an IGMP leave message from one listener. If you have multiple listeners in your network watching the same show, and one decides to watch something else, then the remaining listener(s) will actually complain :wink:

And the prefixes with the comment “# probably not needed”; are really not to be found via the IPTV-VLAN. Hence they are really not needed indeed.

I also believe that you don’t need 217.166.0.0/16 there, but you may need that for your firewall or so. It is the source prefix for the multicast traffic but you won’t be able to route traffic back to this prefix over the IPTV-VLAN.

Check, thanks for the info.

  • Only have one STB here, so quickleave is fine for my usecase.
  • 0.0.0.0/0 works, but making it more specific just felt sensible – I know some igmpproxy setups do not work right without at least one more specific altnet, but it should work with OpenWRT.

Dit topic is 24 uur na het laatste antwoord automatisch gesloten. Nieuwe antwoorden zijn niet meer toegestaan.