Setting up Tweak IPTV - SOLVED

Hello,

I finally decided to open up a help question on here.
My internet provides me with high speed fiber and IPTV (as wel as VOIP, but I don’t use that)
They alow, and even encourage to use your own hardware, and as such most settings are available online.
Now I have gotten a lot of it working already, but I do need some help with the last few things… so let’s kick it off:

My provider uses VLANs to provide Internet and IPTV.

  • Internet is on VLAN 34
  • IPTV is on VLAN 4

On both VLANs DHCP needs to be enabled
The default route can NEVER go over VLAN 4
NAT has to be used on VLAN 4
A static route has to be set on VLAN 4 to 185.6.48.0/26 over the gateway IP received on VLAN 4
The settop boxes (Sparql boxes) have to be placed in the normal LAN
IGMP Snooping or IGMP proxying has to be enabled on VLAN 4

The Sparql boxes have to be able to join the multicast streams that are in VLAN 4 whilst they are in the LAN themselves.

So now, how far have I gotten…
Currently the Sparql boxes work… half… they get their tvguide information, they even get an IP (in the normal LAN)
However they do not show any TV streams, so I suspect there’s something wrong with the IGMP snooping or joining the multicast streams.

I have made two VLANs on interface eth1, they are ofcourse: eth1.34 and eth1.4 (P.S. I also tried eth1.04)
the eth1.34 interface is bridged to the lan network on eth2, the eth1.4 interface has a seperate configuration called IPTV
Next I disabled defaultroute on IPTV, enabled masquerading and used SSH to enable igmp_snooping
I alsop configured the static route which I think is correct, when I had the wrong gateway IP I didn’t receive the TVGuide, which works now, so I think the static route is correct.

As I said above, the only thing I can’t seem to figure out is this IGMP snooping thing…
I followed the following guide as much as I could, but for me it apparently doesn’t work correctly, might be because it’s 3 years old.

For the dutch people on here, this is the official blog by my provider: https://blog.tweak.nl/hardware/vlan-configuratie-bij-gebruik-eigen-apparatuur/

I would appreciate any and all help in the matter :slight_smile:

Am I allowed to bump my question?

Hi,

could you post print screen of your interfaces tab in LuCi?

I posted an album with the (relevant) pages here:

I’m not sure if I understand it right but I try to explain how I get it:

  • on WAN side you got TRUNK from your ISP with VLAN4 and 34 (maybe also other but you/we don’t care)
  • Both VLAN will have virtual interfaces with DHCP client (I don’t understand why NAT is required only for VLAN4 and not also for VLAN34)
  • You are describing config where TO will route all LAN communication into those two VLANs according to default and static route

So this part working, right? you can connect to the internet from LAN and IPTV box is getting guide so the static route seems to be also working. It seems that you “just” need to focus on IGMP

Do you have everything for IGMP proxy installed, configured and running? - https://wiki.openwrt.org/doc/howto/udp_multicast

I think you completly understand the situation correctly
NAT is required on both VLANs.

It seems indeed only the IGMPproxy/snooping doesn’t work
As far as I understond IGMP Snooping is a feature that should by defalt be in the router.
But as per your URL it seems this requires some extra config, I will attempt to use the tutorial provided and see what I can manage

I am on KPN Fiber connection, and experienced the same problems. Currently i am away from my router, but if i remember correctly it had something to do with a dhcp static route being advertised by the DHCP on the iptv vlan interface instead of defining it manually.

Tomorrow i could take a look, if you want?

Yes please!
Any and all tips are welcome and appreciated!

Tried the suggestion in the link you posted, sadly it didn’t work

This is a part of my configuration. Hope it helps.
If you have any more questions i am happy to assist.

/etc/config/igmpproxy - Complete config

config igmpproxy
        option quickleave 1

config phyint wan
        option network iptv
        option direction upstream
        list altnet 213.75.0.0/16

config phyint lan
        option network lan
        option direction downstream

It’s possible you need to define a other altnet, because i am on KPN. Check your /var/log/messages if it still won’t work.

/etc/config/firewall - Only relevant rule

config rule
        option name 'Allow-IGMP-Proxy'
        option proto 'udp'
        option family 'ipv4'
        option target 'ACCEPT'
        option dest_ip '224.0.0.0/4'
        option dest 'lan'
        option src 'iptv'

/etc/config/network - Only relevant rule

config interface 'iptv'
        option proto 'dhcp'
        option vendorid 'IPTV_RG'
        option ifname 'eth1.4'
        option type 'bridge'
        option peerdns '0'
        option defaultroute '0'
        option macaddr '<REDACTED>'
        option broadcast '1'
        option reqopts 'staticroutes msstaticroutes'

Notice the specified vendorid and the reqopts.
These request options specify that you want to store the advertised static routes from the IPTV network.
For me this was necessary because KPN kept changing routes on me, and everytime i had to manually change the static route. And the interface needed to be a bridge, else it wouldn’t work.

Oh, i forgot. I also had some troubles with rebooting breaking the iptv igmp-proxy.
So i wrote a little script, that i execute every start-up, that restarts the iptv interface and starts the igmp-proxy:

#!/bin/sh

ifdown iptv                     # Stop interface
sleep 5                         # Wait for it to stop completely
ifup iptv                       # Turn it back on
sleep 20                        # Wait for it to start & dhcp lease
/etc/init.d/igmpproxy start     # Start igmp-proxy.
1 Like

Even with your above instructions and the script, my tv still doesn’t work.
TV Guide still work, streams still don’t

Could you check if igmpproxy is running properly: ps | grep igmp
And check your /var/log/messages for any messages from igmpproxy: cat /var/log/messages | grep igmp
Maybe check your routing table to make sure the static-route is set: route

Those should shed some light onto the issues your having.

I checked if igmp proxy is running, it think it is:
3245 root 744 S /usr/sbin/igmpproxy /var/etc/igmpproxy.conf
29720 root 1076 S grep igmp

Then the route, looks fine as far as I can tell:
185.6.48.0 10.10.56.1 255.255.255.192 UG 0 0 0 br-iptv

And now for the var log messages:
root@turris:~# cat /var/log/messages | grep igmp
2016-12-31T12:04:29+01:00 warning igmpproxy[3245]: The origin for route 239.255.255.250 changed from 192.168.1.10 to 192.168.1.195
2016-12-31T12:21:37+01:00 warning igmpproxy[3245]: The origin for route 239.255.255.250 changed from 192.168.1.195 to 192.168.1.166
2016-12-31T12:46:16+01:00 warning igmpproxy[3245]: The origin for route 239.2.0.252 changed from 192.168.1.209 to 192.168.1.222
2016-12-31T12:46:16+01:00 warning igmpproxy[3245]: The origin for route 239.2.0.252 changed from 192.168.1.222 to 192.168.1.209
2016-12-31T12:46:38+01:00 warning igmpproxy[3245]: The origin for route 239.2.0.252 changed from 192.168.1.209 to 192.168.1.222
2016-12-31T12:53:20+01:00 warning igmpproxy[3245]: The origin for route 239.255.255.250 changed from 192.168.1.166 to 192.168.1.209
2017-01-01T20:39:11+01:00 warning igmpproxy[3245]: The origin for route 239.255.255.250 changed from 192.168.1.222 to 192.168.1.209
2017-01-02T13:25:03+01:00 warning igmpproxy[3245]: The origin for route 239.255.255.250 changed from 192.168.1.209 to 192.168.1.132

Which I can’t make heads or tails from, so if you could help me with it/explain it to me or even get me some kind of tutorial type of thing, that would be greatly appreciated!

I do know 192.168.1.10 is my pc
192.168.1.132 is my notebook
192.168.1.209 is my android phone
192.168.1.222 is an nvidia shield tv
192.168.1.195 is an android tablet
166 might have been an old lease for one of the above devices as it’s currently unused
So none of these are “connected” to my iptv box

Seems all correct to me.
Those log entries are just UPnP devices announcing their services via Avahi/Zeroconf, nothing to be concerned about.

What i just remembered was that forcing the igmp version to v2 (https://wiki.openwrt.org/doc/howto/udp_multicast#force_igmp_version) did make iptv traffic more stable overall and more responsive.
Maybe that does the trick?

Forcing the IGMP version had no effect either

:open_mouth: I found a thing!

/var/etc/igmpproxy.conf is not correct…
evern though /etc/config/igmpproxy has the correct config!

/etc/config/igmpproxy :
config igmpproxy
option quickleave 1

config phyint
option network iptv
option direction upstream
list altnet 0.0.0.0/0

config phyint
option network lan
option direction downstream

/var/etc/igmpproxy.conf:
quickleave

phyint eth1.4 upstream ratelimit 0 threshold 1
altnet 192.168.1.0/24

phyint br-lan downstream ratelimit 0 threshold 1

When I overwrite it with the correct config it changes right back after a restart of igmpproxy, or a reboot of the router.
Where is it getting this config?

Yes, that is the normal OpenWRT way. When you start a service its startup script will rewrite the “real” configuration file based on the UCI configuration in /etc/config directory.

Ok apparently I found something more!
Apparently the config I used was not correct…
So I adapted the config it was overwriting it with to make a hopefully valid config:

quickleave

phyint eth1.4 upstream ratelimit 0 threshold 1
altnet 192.168.1.0/24

phyint br-lan downstream ratelimit 0 threshold 1

That should work…
Now I get a lot of output in the igmp log
Including subscriptions and such… so it seems something is doing something… it’s not working yet tho.

I got an output with debugging on:

http://pastebin.com/HHft8tFb

Anyonw who has any idea how to interpret this?