如果你没有继续使用联通给的iptv盒子的需求的话,没有必要装igmproxy,udpxy一个软件就够用了。
假设你VLAN设置正确,你openwrt需要至少设置两个网口,一个LAN,DHCP获取IP地址或者分配固定IP都行,然后记住这个IP,这个应该就是你说的br-lan,需不需要Vlan根据你上级设置决定;
另外一个是IPTV口,我看你起名叫WAN,叫啥其实无所谓,但如果你是从光猫就接一根线到openwrt,那你肯定要设置VLAN,记住iptv的vlan和光猫里设置的一致,协议DHCP。
然后你openwrt下cli里执行 ip a,查看一下 iptv 端口和lan口的ip,例如:
13: eth0.45@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether ef:ff:ff:ff:ff:fe brd ff:ff:ff:ff:ff:ff
inet 10.136.169.250/17 brd 10.136.255.255 scope global eth0.45
valid_lft forever preferred_lft forever
inet6 fe80::fe01:23ff:fe45:6789/64 scope link
valid_lft forever preferred_lft forever
这个是我的IPTV 端口,可以看到VLAN其实就是45,这个45你要根据你光猫设置的VLAN来填写。
11: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 1f:ff:ff:ff:ff:f1 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.1/24 brd 192.168.0.255 scope global br-lan
valid_lft forever preferred_lft forever
这是我lan口,可以看到IP是192.168.0.1
然后udpxy设置就很简单,命令行跑一下 udpxy就能看到提示:
udpxy 1.0-24.1 (prod) standard [Linux 5.4.77-flippy-49+o aarch64]
usage: udpxy [-vTS] [-a listenaddr] -p port [-m mcast_ifc_addr] [-c clients] [-l logfile] [-B sizeK] [-n nice_incr]
-v : enable verbose output [default = disabled]
-S : enable client statistics [default = disabled]
-T : do NOT run as a daemon [default = daemon if root]
-a : (IPv4) address/interface to listen on [default = 0.0.0.0]
-p : port to listen on
-m : (IPv4) address/interface of (multicast) source [default = 0.0.0.0]
-c : max clients to serve [default = 3, max = 5000]
-l : log output to file [default = stderr]
-B : buffer size (65536, 32Kb, 1Mb) for inbound (multicast) data [default = 2048 bytes]
-R : maximum messages to store in buffer (-1 = all) [default = 1]
-H : maximum time (sec) to hold data in buffer (-1 = unlimited) [default = 1]
-n : nice value increment [default = 0]
-M : periodically renew multicast subscription (skip if 0 sec) [default = 0 sec]
Examples:
udpxy -p 4022
listen for HTTP requests on port 4022, all network interfaces
udpxy -a lan0 -p 4022 -m lan1
listen for HTTP requests on interface lan0, port 4022;
subscribe to multicast groups on interface lan1
udpxy and udpxrec are Copyright (C) 2008-2018 Pavel V. Cherenkov and licensed under GNU GPLv3
Email: support@udpxy.com; Telegram: GigaX-discussions; Google+: udpxy community
你按照自己设置的端口,执行一下udpxy -a 网卡1(lan网卡) -p 代理端口号 -m 网卡2(iptv网卡) 看看有没报错能不能执行就ok了。有错的话按照错误修正。
不过老实说,没看到你这个ROS有什么用,如果你不知道ros有什么用,还把网络搞这么复杂,有啥意思呢?而且你openwrt和ros都从光猫接出来的,谁是DHCP服务器呢?网络拓扑在我看来是有点乱的。说话比较直,见谅。
--
FROM 124.126.11.*