Code Monkey home page Code Monkey logo

Comments (22)

rozhuk-im avatar rozhuk-im commented on June 2, 2024

No.
This is workaround that do IGMP LEAVE + IGMP JOIN (mld for ipv6).
In well configured environment OS periodically receive IGMP (mld) message that requires to confirm subscription to multicast groups.
If OS does not confirm subscription then nearest L2 switch with IGMP snooping threat this as IGMP lLEAVE and stop transmit multicast group to client port.

Check your firewall, it must allow IGMP traffic to 224/4, also it must allow IP OPTIONS.

This is FreeBSD PF rules that I use:

pass out quick inet proto udp to 224.0.0.0/4 no state allow-opts
pass out quick inet proto igmp to 224.0.0.0/4 no state allow-opts
pass out quick inet6 proto icmp6 no state allow-opts # mld (igmp6) also here
pass out quick inet6 proto udp to ff00::/8 no state allow-opts # Allow send multicast, DHCPv6 ff02::1:2 port 547

pass in quick inet proto udp to 224.0.0.0/4 no state allow-opts
pass in quick inet proto igmp to 224.0.0.0/4 no state allow-opts
pass in quick inet6 proto udp to ff00::/8 no state # Allow receive multicast, DHCPv6 ff02::1:2 port 547
pass in quick inet6 proto icmp6 no state allow-opts # mld (igmp6) also here

from msd_lite.

wanjiban avatar wanjiban commented on June 2, 2024

same qustion .
install to side router , no firewall issue .
and stop play at about every 4:20 .

from msd_lite.

rozhuk-im avatar rozhuk-im commented on June 2, 2024

Check msd_lite log for errors.
I suppose problem with IGMP in your network environment.

Some firewalls (FreeBSD PF) does not pass IP packets with options by default, so even if you have pass all rule, IGMP will not work.

Also make sure that router/host does not have routes to any 224/4 subnets in routing tables.

Use tcpdump to debug network issues, for example: tcpdump -n -e -vvvvvvv -i __NETWORK_INTERFACE_NAME__ ip and igmp.

from msd_lite.

CHDman avatar CHDman commented on June 2, 2024

No. This is workaround that do IGMP LEAVE + IGMP JOIN (mld for ipv6). In well configured environment OS periodically receive IGMP (mld) message that requires to confirm subscription to multicast groups. If OS does not confirm subscription then nearest L2 switch with IGMP snooping threat this as IGMP lLEAVE and stop transmit multicast group to client port.

Check your firewall, it must allow IGMP traffic to 224/4, also it must allow IP OPTIONS.

This is FreeBSD PF rules that I use:

pass out quick inet proto udp to 224.0.0.0/4 no state allow-opts
pass out quick inet proto igmp to 224.0.0.0/4 no state allow-opts
pass out quick inet6 proto icmp6 no state allow-opts # mld (igmp6) also here
pass out quick inet6 proto udp to ff00::/8 no state allow-opts # Allow send multicast, DHCPv6 ff02::1:2 port 547

pass in quick inet proto udp to 224.0.0.0/4 no state allow-opts
pass in quick inet proto igmp to 224.0.0.0/4 no state allow-opts
pass in quick inet6 proto udp to ff00::/8 no state # Allow receive multicast, DHCPv6 ff02::1:2 port 547
pass in quick inet6 proto icmp6 no state allow-opts # mld (igmp6) also here

Thanks for your reply, I used the option multicast subscription renew of udpxy to solve this problem, does msd_lite have option multicast subscription renew? If not, can you add this option? Thanks

from msd_lite.

rozhuk-im avatar rozhuk-im commented on June 2, 2024

No, msd_lite does not have renew/rejoin option.

Yes, I can add this work around.
Can you build and test it?

from msd_lite.

CHDman avatar CHDman commented on June 2, 2024

No, msd_lite does not have renew/rejoin option.

Yes, I can add this work around. Can you build and test it?

I use Openwrt OS. The Chinese New Year is coming soon, and I am a little busy, so I may not have time to build it. If you can build it, I will test it. Thanks a lot!^_^

from msd_lite.

CHDman avatar CHDman commented on June 2, 2024

No, msd_lite does not have renew/rejoin option.
Yes, I can add this work around. Can you build and test it?

I use Openwrt OS. The Chinese New Year is coming soon, and I am a little busy, so I may not have time to build it. If you can build it, I will test it. Thanks a lot!^_^

BTW:Openwrt X86

from msd_lite.

rwzsycwan avatar rwzsycwan commented on June 2, 2024

No, msd_lite does not have renew/rejoin option.

Yes, I can add this work around. Can you build and test it?

I need this, my iptv can only watch 2 minutes and 10 seconds, after this time Destroyed will appear in the log. I will build and test it。

from msd_lite.

rwzsycwan avatar rwzsycwan commented on June 2, 2024

No, msd_lite does not have renew/rejoin option.
Yes, I can add this work around. Can you build and test it?

I need this, my iptv can only watch 2 minutes and 10 seconds, after this time Destroyed will appear in the log. I will build and test it。

In UDPXY, if mcsub_renew '55' is not set, the channel can only play for 2 minutes and 10 seconds.

from msd_lite.

tangyl2000 avatar tangyl2000 commented on June 2, 2024

No, msd_lite does not have renew/rejoin option.

Yes, I can add this work around. Can you build and test it?

I met the same problem, my iptv streaming stopped every 4:20 minutes. But I set udpxy “option mcsub_renew” to 240, iptv streaning never stopped. No firewall problem.
If you can add this option code, I have enough time to build and test is.

from msd_lite.

rwzsycwan avatar rwzsycwan commented on June 2, 2024

This is translated with google:
In my city, the telecom operator's iptv multicast network has heartbeat verification, and if there is no report information for a period of time, the multicast data will be disconnected.
I use igmp proxy on the router. When I start to join the multicast, IGMP Proxy will send the Report from the Host Interface to the IGMP Querier. The IGMP Proxy sends the Query message to the member hosts on behalf of the IGMP Querier, and the IGMP Proxy will not feed back the Report message to the IGMP Querier.
After more than 2 minutes (the time may be different in different cities), because the IGMP Querier does not receive new report information, it will disconnect the multicast data. Since the live stream is disconnected, msd_lite will send a leave message to igmp proxy, and IGMP Proxy will notify the upstream IGMP Querier through the group leaving mechanism.
That's about it.

from msd_lite.

MageDelfador avatar MageDelfador commented on June 2, 2024

This is the firewall problem of home routers. Occurs when UDP input is allowed but igmp input is not allowed.
The problem is like this:

【Home router】                     【ISP】
                 igmp join->>
                <<-Multicast udp data
	            (After 1 minute)
	        <<-igmp query (Blocked by firewall, so no response)
	            (After 1 minute)
	        <stop sending udp data>

It is really not a good idea to use the renew function of udpxy. It will cause packet loss.pcherenkov/udpxy#28

from msd_lite.

rwzsycwan avatar rwzsycwan commented on June 2, 2024

这是家用路由器的防火墙问题。当允许 UDP 输入但不允许 igmp 输入时发生。 问题是这样的:

【Home router】                     【ISP】
                 igmp join->>
                <<-Multicast udp data
	            (After 1 minute)
	        <<-igmp query (Blocked by firewall, so no response)
	            (After 1 minute)
	        <stop sending udp data>

使用udpxy的renew功能确实不是什么好主意。会造成丢包。pcherenkov/udpxy#28

This is the firewall problem of home routers. Occurs when UDP input is allowed but igmp input is not allowed. The problem is like this:

【Home router】                     【ISP】
                 igmp join->>
                <<-Multicast udp data
	            (After 1 minute)
	        <<-igmp query (Blocked by firewall, so no response)
	            (After 1 minute)
	        <stop sending udp data>

It is really not a good idea to use the renew function of udpxy. It will cause packet loss.pcherenkov/udpxy#28

My routers are MikroTik Routers. I have enabled igmp and udp accept in the firewall. I used Packet sniffer to capture packets on the iptv port. I didn’t get any igmp query from ISP, only Membership Report / Join group ip for any sources or Membership Report / Leave group ip.

from msd_lite.

MageDelfador avatar MageDelfador commented on June 2, 2024

@rwzsycwan 看防火墙是不是允许igmp的输入(目标是本设备,不是转发)
不要启用igmp代理

from msd_lite.

rwzsycwan avatar rwzsycwan commented on June 2, 2024

@rwzsycwan 看防火墙是不是允许igmp的输入(目标是本设备,不是转发) 不要启用igmp代理

问题已经解决了,我的路由器的防火墙配置是正确的,换了原来电信的光猫,就好了,收到了来自ISP到224.0.0.1的Query。猫棒还是有问题,收不到来自ISP的Query,有空抓包看看猫棒为什么扔了这些数据。

from msd_lite.

rwzsycwan avatar rwzsycwan commented on June 2, 2024

@MageDelfador 我的iptv需要pppoe拨号,不开启igmp代理内网看不了。

from msd_lite.

MageDelfador avatar MageDelfador commented on June 2, 2024

@MageDelfador 我的iptv需要pppoe拨号,不开启igmp代理内网看不了。

正常不需要igmp代理,msd_lite接口配置成pppoe-iptv就可以了。

from msd_lite.

MageDelfador avatar MageDelfador commented on June 2, 2024

@CHDman @tangyl2000 @wanjiban
Is the problem solved?

from msd_lite.

rozhuk-im avatar rozhuk-im commented on June 2, 2024

https://github.com/rozhuk-im/msd_lite/tree/rejoin - branch to test rejoin feature.

<rejoinTime>0</rejoinTime> was added to config file.
Also rejoin_time=60 can be used as URL argument.
0 - off, non zero - interval in second to rejoin multicast group.

PS: I prefer to archive this project, it was free demo for https://github.com/rozhuk-im/msd, that now is open source and free.

from msd_lite.

rwzsycwan avatar rwzsycwan commented on June 2, 2024

@MageDelfador 我的iptv需要pppoe拨号,不开启igmp代理内网看不了。

正常不需要igmp代理,msd_lite接口配置成pppoe-iptv就可以了。

我路由器是MikroTik的rb450gx4,运行不了msd_lite,我是在内网里旁路由上运行的

from msd_lite.

CHDman avatar CHDman commented on June 2, 2024

https://github.com/rozhuk-im/msd_lite/tree/rejoin - branch to test rejoin feature.

<rejoinTime>0</rejoinTime> was added to config file. Also rejoin_time=60 can be used as URL argument. 0 - off, non zero - interval in second to rejoin multicast group.

PS: I prefer to archive this project, it was free demo for https://github.com/rozhuk-im/msd, that now is open source and free.

Thanks a lot, I will test it when I have time.

from msd_lite.

CHDman avatar CHDman commented on June 2, 2024

https://github.com/rozhuk-im/msd_lite/tree/rejoin - branch to test rejoin feature.

<rejoinTime>0</rejoinTime> was added to config file. Also rejoin_time=60 can be used as URL argument. 0 - off, non zero - interval in second to rejoin multicast group.

PS: I prefer to archive this project, it was free demo for https://github.com/rozhuk-im/msd, that now is open source and free.

It's worked, thanks~!

from msd_lite.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.