找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 28958|回复: 41

(已解决)LEDE不能转发iptv组播进内网

  [复制链接]
本帖最后由 cayxxx 于 2018-2-27 06:13 编辑

IPTV是广东移动,光猫iptv口是桥接模式,机顶盒插上DHCP即可观看节目,尝试过用电脑连接iptv口,自动获取DHCP,可以直接用播放器收看“udp://”这样的地址,把电脑的IP胡乱更改也能正常收看。所以应该是无需验证的。

想实现同一网段下,利用双wan加静态路由,同时看直播和上网,插线拔线太麻烦,所以打算搭建一个模拟环境,先配置好路由器,到时再换上去就好。

有PC两台,用网线直连,PC1地址10.10.10.1,PC2地址192.168.3.1,均关闭了自带防火墙,PC1用VLC发送UDP串流视频,PC2能正常接收观看。
然后在两台PC之间加入路由器K3,刷了lean大的LEDE R7 3.2,路由器wan口接PC1地址192.168.88.1,lan口接PC2地址192.168.1.1,
安装igmpproxy,/etc/config/igmpproxy配置如下
  1. config igmpproxy
  2.         option quickleave 1
  3. #       option verbose [0-2]

  4. config phyint wan
  5.         option network wan
  6.         option direction upstream
  7.         list altnet 0.0.0.0/0

  8. config phyint lan
  9.         option network lan
  10.         option direction downstream
复制代码


/var/etc/igmpproxy.conf如下
  1. quickleave

  2. phyint eth0.2 upstream ratelimit 0 threshold 1
  3.         altnet 0.0.0.0/0

  4. phyint br-lan downstream ratelimit 0 threshold 1
复制代码



/etc/config/network的lan开启igmp snooping
  1. config interface 'lan'
  2.         option type 'bridge'
  3.         option ifname 'eth0.1'
  4.         option proto 'static'
  5.         option ipaddr '192.168.1.1'
  6.         option netmask '255.255.255.0'
  7.         option ip6assign '60'
  8.         option igmp_snooping '1'
复制代码


/etc/config/firewall 防火墙加入规则
  1. config rule
  2.         option proto 'igmp'
  3.         option src 'wan'
  4.         option target 'ACCEPT'

  5. config rule
  6.         option target 'ACCEPT'
  7.         option src 'wan'
  8.         option proto 'udp'
  9.         option dest_ip '224.0.0.0/4'
  10.         option family 'ipv4'
  11.         option dest 'lan'
复制代码


按理说现在应该可以在lan中收看PC1发出的组播了,但抓包发现并没有收到udp报文,路由器wan口确实是有流量的。


以下是一次尝试播放的igmpproxy的debug信息
  1. root@LEDE:~# igmpproxy -dv /var/etc/igmpproxy.conf
  2. adding VIF, Ix 0 Fl 0x0 IP 0x0101a8c0 br-lan, Threshold: 1, Ratelimit: 0
  3. adding VIF, Ix 1 Fl 0x0 IP 0x0158a8c0 eth0.2, Threshold: 1, Ratelimit: 0
  4. joinMcGroup: 224.0.0.2 on br-lan
  5. RECV Membership query   from 192.168.1.1     to 224.0.0.1
  6. RECV V2 member report   from 192.168.1.1     to 224.0.0.2
  7. The IGMP message was from myself. Ignoring.
  8. Inserted route table entry for 239.1.1.1 on VIF #-1
  9. RECV V2 member report   from 192.168.1.121   to 239.255.255.250
  10. Inserted route table entry for 239.255.255.250 on VIF #0
  11. joinMcGroup: 239.255.255.250 on eth0.2
  12. RECV V2 member report   from 192.168.88.1    to 239.255.255.250
  13. The IGMP message was from myself. Ignoring.
  14. Route activation request from 192.168.88.1 for 239.255.255.250 is from myself. Ignoring.
  15. RECV V2 member report   from 192.168.88.1    to 239.255.255.250
  16. The IGMP message was from myself. Ignoring.
  17. RECV V2 member report   from 192.168.1.121   to 239.1.1.1
  18. Updated route entry for 239.1.1.1 on VIF #0
  19. Adding MFC: 10.10.10.1 -> 239.1.1.1, InpVIf: 1
  20. joinMcGroup: 239.1.1.1 on eth0.2
  21. RECV V2 member report   from 192.168.88.1    to 239.1.1.1
  22. The IGMP message was from myself. Ignoring.
  23. Route activation request from 192.168.88.1 for 239.1.1.1 is from myself. Ignoring.
  24. RECV V2 member report   from 192.168.1.121   to 239.1.1.1
  25. Updated route entry for 239.1.1.1 on VIF #0
  26. Adding MFC: 10.10.10.1 -> 239.1.1.1, InpVIf: 1
  27. RECV V2 member report   from 192.168.88.1    to 239.255.255.250
  28. The IGMP message was from myself. Ignoring.
  29. RECV Leave message      from 192.168.1.121   to 224.0.0.2
  30. leaveMcGroup: 239.1.1.1 on eth0.2
  31. RECV Membership query   from 192.168.1.1     to 239.1.1.1
  32. RECV Membership query   from 192.168.1.1     to 239.1.1.1
  33. RECV Membership query   from 192.168.1.1     to 224.0.0.1
  34. Removing MFC: 10.10.10.1 -> 239.1.1.1, InpVIf: 1
  35. Inserted route table entry for 239.1.1.1 on VIF #-1
  36. RECV V2 member report   from 192.168.1.1     to 224.0.0.2
  37. The IGMP message was from myself. Ignoring.
  38. RECV V2 member report   from 192.168.1.121   to 239.255.255.250
  39. Updated route entry for 239.255.255.250 on VIF #0
  40. Adding MFC: 192.168.1.121 -> 239.255.255.250, InpVIf: 1
  41. ^Cselect() failure; Errno(4): Interrupted system call
  42. Got a interupt signal. Exiting.
  43. Removing MFC: 10.10.10.1 -> 239.1.1.1, InpVIf: 1
  44. MRT_DEL_MFC; Errno(2): No such file or directory
  45. Removing MFC: 192.168.1.121 -> 239.255.255.250, InpVIf: 1
  46. leaveMcGroup: 239.255.255.250 on eth0.2
  47. All routes removed. Routing table is empty.
  48. Shutdown complete....
复制代码



实在是想不出什么原因了。。甚至还换了一个同样刷lede的wr941n来代替,也是同样的问题。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
 楼主| | 显示全部楼层
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
顶起。。紫薯补丁
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
会不会是内核少了对组播转发的支持?不太懂这个。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

安装udpxy
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

我之前配好组播之后经过交换机就不行了,所以用了udpxy,播放器mpc
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
ligo_ 发表于 2018-2-26 05:06
我之前配好组播之后经过交换机就不行了,所以用了udpxy,播放器mpc

请教一下,也就是说直接接路由下能看udp流的直播吗?能否说说怎么配置的?

点评

几年前的AR9344用udpxy单用户看8Mbps直播流CPU占用率才30,而且手机看不了组播流  详情 回复 发表于 2018-2-27 21:01
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
whan 发表于 2018-2-25 23:14
安装udpxy

哎是不想用这个,不想加大路由cpu压力,只要能收到组播,终端自己搞定就好了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
问题已查清。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
本帖最后由 cayxxx 于 2018-2-27 06:38 编辑

原因已找到,组播路由转发igmpproxy需要kmod-bridge支持,而kmod-bridge在开发版的lede上尚未发布,只存在于稳定版,目前稳定版内核版本是4.4x,lean大的R7是基于开发版定制的,所以igmpproxy无法正常工作,导致不能正常转发组播数据。
所以要想使用igmpproxy,只能刷稳定版的lede了。

点评

你说的很对,我赞同你的说法。: 2.0
你说的很对,我赞同你的说法。: 2
  发表于 2020-12-19 23:33
感谢,被这个问题困扰很久了。  详情 回复 发表于 2019-10-30 10:33
感谢楼主,我也碰到这个问题折腾了好久!  详情 回复 发表于 2019-1-31 15:18
楼主你怎么追索到这个问题的?大亮,请展示下  详情 回复 发表于 2018-2-27 11:02
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

来自手机 | 显示全部楼层
标记谢谢哦
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

恭喜楼主自己解决,而且解决后分享了解决方法,为你点赞。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

来自手机 | 显示全部楼层
楼主厉害,这都找出问题了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

cayxxx 发表于 2018-2-27 06:11
原因已找到,组播路由转发igmpproxy需要kmod-bridge支持,而kmod-bridge在开发版的lede上尚未发布,只存在 ...

楼主你怎么追索到这个问题的?大亮,请展示下

点评

我对lede也不是很了解,随便说说,可能有疏漏的地方。 一开始以为是自己配置的问题,各种配置改来改去甚至让igmpproxy启动都不正常。 防火墙规则也是,翻来覆去地研究也没能得出结果。后来在防火墙状态里面注意到  详情 回复 发表于 2018-2-27 12:29
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
stoneh 发表于 2018-2-27 11:02
楼主你怎么追索到这个问题的?大亮,请展示下

我对lede也不是很了解,随便说说,可能有疏漏的地方。
一开始以为是自己配置的问题,各种配置改来改去甚至让igmpproxy启动都不正常。
防火墙规则也是,翻来覆去地研究也没能得出结果。后来在防火墙状态里面注意到流量的统计有点不正常。NAT表中能统计到接收到的组播流量,而到了filter中无论是input还是forward都没有统计到流量。一般来说,报文从nat表prerouting链中出来后路由会对它作出判断,到底是要输入input还是转发forward还是其它,根据是路由表。而两头都没有流量说明这中间的环节肯定是出了问题了。手动配置路由表也不能解决,我开始怀疑内核问题了。不断百度谷歌,看了不少成功的例子,无一例外都在一开始安装了kmod-bridge。
其实openwrt官方文档里面早已指出:Please note, that IGMP snooping is only available when kmod-bridge package is installed.
但因为我用的是开发版,在软件包里是没有kmod-bridge的,所以跳过了这一步,以为是小事,反正都没找到,殊不知这才是罪魁祸首啊。


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×

点评

我看了下,潘多拉的系统也看不到kmod-bridge,但igmpproxy是正常的。  详情 回复 发表于 2019-10-30 10:42
楼主思维还是缜密的,基础知识比我们小白扎实,受启发了, 看来读官方文档有好处,多谢分享!  详情 回复 发表于 2018-2-27 21:46
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-27 04:44

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表