1.光猫设置单线复用,与海纳思一致
2.armbian中分离网络
sudo ip link add link end0 name end0.102 type vlan id 102 sudo ip addr add 169.254.0.1/32 dev end0.102 sudo ip link set end0.102 up
自启动脚本
sudo tee /etc/systemd/system/vlan102.service <<'EOF' [Unit] Description=VLAN 102 for IPTV After=network-pre.target Before=network.target [Service] Type=oneshot RemainAfterExit=yes ExecStart=/sbin/ip link add link end0 name end0.102 type vlan id 102 ExecStart=/sbin/ip addr add 169.254.0.1/32 dev end0.102 ExecStart=/sbin/ip link set end0.102 up [Install] WantedBy=multi-user.target EOF sudo systemctl enable vlan102.service
3.装 igmpproxy 并写配置
sudo apt install igmpproxy -y
sudo tee /etc/igmpproxy.conf <<'EOF' quickleave phyint end0.102 upstream ratelimit 0 threshold 1 altnet 0.0.0.0/0 phyint lo downstream ratelimit 0 threshold 1 EOF sudo systemctl enable --now igmpproxy
4.启动 udpxy 指向 VLAN 102
sudo udpxy -m end0.102 -p 4022 -a 192.168.x.x -B 2M -c 100