|
本帖最后由 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配置如下
- config igmpproxy
- option quickleave 1
- # option verbose [0-2]
- config phyint wan
- option network wan
- option direction upstream
- list altnet 0.0.0.0/0
- config phyint lan
- option network lan
- option direction downstream
复制代码
/var/etc/igmpproxy.conf如下
- quickleave
- phyint eth0.2 upstream ratelimit 0 threshold 1
- altnet 0.0.0.0/0
- phyint br-lan downstream ratelimit 0 threshold 1
复制代码
/etc/config/network的lan开启igmp snooping
- config interface 'lan'
- option type 'bridge'
- option ifname 'eth0.1'
- option proto 'static'
- option ipaddr '192.168.1.1'
- option netmask '255.255.255.0'
- option ip6assign '60'
- option igmp_snooping '1'
复制代码
/etc/config/firewall 防火墙加入规则
- config rule
- option proto 'igmp'
- option src 'wan'
- option target 'ACCEPT'
- config rule
- option target 'ACCEPT'
- option src 'wan'
- option proto 'udp'
- option dest_ip '224.0.0.0/4'
- option family 'ipv4'
- option dest 'lan'
复制代码
按理说现在应该可以在lan中收看PC1发出的组播了,但抓包发现并没有收到udp报文,路由器wan口确实是有流量的。
以下是一次尝试播放的igmpproxy的debug信息
- root@LEDE:~# igmpproxy -dv /var/etc/igmpproxy.conf
- adding VIF, Ix 0 Fl 0x0 IP 0x0101a8c0 br-lan, Threshold: 1, Ratelimit: 0
- adding VIF, Ix 1 Fl 0x0 IP 0x0158a8c0 eth0.2, Threshold: 1, Ratelimit: 0
- joinMcGroup: 224.0.0.2 on br-lan
- RECV Membership query from 192.168.1.1 to 224.0.0.1
- RECV V2 member report from 192.168.1.1 to 224.0.0.2
- The IGMP message was from myself. Ignoring.
- Inserted route table entry for 239.1.1.1 on VIF #-1
- RECV V2 member report from 192.168.1.121 to 239.255.255.250
- Inserted route table entry for 239.255.255.250 on VIF #0
- joinMcGroup: 239.255.255.250 on eth0.2
- RECV V2 member report from 192.168.88.1 to 239.255.255.250
- The IGMP message was from myself. Ignoring.
- Route activation request from 192.168.88.1 for 239.255.255.250 is from myself. Ignoring.
- RECV V2 member report from 192.168.88.1 to 239.255.255.250
- The IGMP message was from myself. Ignoring.
- RECV V2 member report from 192.168.1.121 to 239.1.1.1
- Updated route entry for 239.1.1.1 on VIF #0
- Adding MFC: 10.10.10.1 -> 239.1.1.1, InpVIf: 1
- joinMcGroup: 239.1.1.1 on eth0.2
- RECV V2 member report from 192.168.88.1 to 239.1.1.1
- The IGMP message was from myself. Ignoring.
- Route activation request from 192.168.88.1 for 239.1.1.1 is from myself. Ignoring.
- RECV V2 member report from 192.168.1.121 to 239.1.1.1
- Updated route entry for 239.1.1.1 on VIF #0
- Adding MFC: 10.10.10.1 -> 239.1.1.1, InpVIf: 1
- RECV V2 member report from 192.168.88.1 to 239.255.255.250
- The IGMP message was from myself. Ignoring.
- RECV Leave message from 192.168.1.121 to 224.0.0.2
- leaveMcGroup: 239.1.1.1 on eth0.2
- RECV Membership query from 192.168.1.1 to 239.1.1.1
- RECV Membership query from 192.168.1.1 to 239.1.1.1
- RECV Membership query from 192.168.1.1 to 224.0.0.1
- Removing MFC: 10.10.10.1 -> 239.1.1.1, InpVIf: 1
- Inserted route table entry for 239.1.1.1 on VIF #-1
- RECV V2 member report from 192.168.1.1 to 224.0.0.2
- The IGMP message was from myself. Ignoring.
- RECV V2 member report from 192.168.1.121 to 239.255.255.250
- Updated route entry for 239.255.255.250 on VIF #0
- Adding MFC: 192.168.1.121 -> 239.255.255.250, InpVIf: 1
- ^Cselect() failure; Errno(4): Interrupted system call
- Got a interupt signal. Exiting.
- Removing MFC: 10.10.10.1 -> 239.1.1.1, InpVIf: 1
- MRT_DEL_MFC; Errno(2): No such file or directory
- Removing MFC: 192.168.1.121 -> 239.255.255.250, InpVIf: 1
- leaveMcGroup: 239.255.255.250 on eth0.2
- All routes removed. Routing table is empty.
- Shutdown complete....
复制代码
实在是想不出什么原因了。。甚至还换了一个同样刷lede的wr941n来代替,也是同样的问题。
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|