机顶盒网口 -> 电脑网口

打开 Wireshark,选电脑有线网卡,过滤器填:

udp.port == 67 || udp.port == 68

然后机顶盒断电重启。即使没有光猫,机顶盒也会发 DHCP Discover 广播包,你就能看到:

Option 12 Host Name
Option 60 Vendor class identifier
Option 61 Client identifier
机顶盒 MAC

这个方法不需要交换机。

udp port 67 or udp port 68
vim /etc/config/network  配置 或者执行命令配置
uci set network.iptv='interface' uci set network.iptv.proto='dhcp' uci set network.iptv.device='eth0' uci set network.iptv.macaddr='e8:ac:xx:xx:xx:xx' uci set network.iptv.hostname='xxxxxxxxxx' uci set network.iptv.vendorid='SCITV' uci delete network.iptv.clientid uci set network.iptv.broadcast='1' uci set network.iptv.defaultroute='0' uci set network.iptv.peerdns='0' uci commit network /etc/init.d/network reload ifup iptv 或者界面配置
安装
opkg update
opkg install udpxy luci-app-udpxy
uci -q get udpxy.@udpxy[0] >/dev/null || uci add udpxy udpxy
uci set udpxy.@udpxy[0].disabled='0'
uci set udpxy.@udpxy[0].bind='192.168.1.4'
uci set udpxy.@udpxy[0].port='4022'
uci set udpxy.@udpxy[0].source='eth0'
uci set udpxy.@udpxy[0].max_clients='10'
uci set udpxy.@udpxy[0].status='1'
uci commit udpxy

/etc/init.d/udpxy enable
/etc/init.d/udpxy restart

uci add firewall rule
uci set firewall.@rule[-1].name='Allow-IGMP-IPTV'
uci set firewall.@rule[-1].src='iptv'
uci set firewall.@rule[-1].proto='igmp'
uci set firewall.@rule[-1].target='ACCEPT'

uci add firewall rule
uci set firewall.@rule[-1].name='Allow-IPTV-Multicast'
uci set firewall.@rule[-1].src='iptv'
uci set firewall.@rule[-1].proto='udp'
uci set firewall.@rule[-1].dest_ip='224.0.0.0/4'
uci set firewall.@rule[-1].target='ACCEPT'

uci commit firewall
/etc/init.d/firewall restart
http://192.168.1.4:4022/status/
然后防火墙设置
https://iptv.zsdc.eu.org/udpxy/192.168.1.4:4022   节目单
网络配置地址文件 /etc/config/network  
重启
/etc/init.d/network reload
ifup iptv
udpxy配置文件   /etc/config/udpxy   
重启 /etc/init.d/udpxy restart
uci set udpxy.@udpxy[0].bind='192.168.1.10'
uci commit udpxy
/etc/init.d/udpxy restart