fabianishere / udm-kernel-tools

Tools for bootstrapping custom kernels on the UniFi Dream Machine
GNU General Public License v2.0
330 stars 23 forks source link

KPN IPTV not working #11

Closed kuhlivisj closed 3 years ago

kuhlivisj commented 3 years ago

I followed your manual about iptv but I can't get it to work.

I have a UDMP with firmware 1.9.3 and kernel 4.1.37-edge2. I connected the NTU to eth8 (WAN1). Setting up the internet connection on VLAN6 is working fine. eth8.6 is created and I have internet.

After creating the 2 scripts and making them executable I run /mnt/data/on_boot.d/10-iptv.sh and get the following output.

udhcpc: started, v1.31.1 
udhcpc: sending discover
udhcpc: sendto: Network is down
udhcpc: read error: Network is down, reopening socket
udhcpc: sending discover
udhcpc: sendto: Network is down
udhcpc: read error: Network is down, reopening socket
udhcpc: sending discover
udhcpc: sendto: Network is down
udhcpc: read error: Network is down, reopening socket
udhcpc: read error: Network is down, reopening socket
udhcpc: read error: Network is down, reopening socket
udhcpc: read error: Network is down, reopening socket

if I look at all the interfaces with ifconfig then I don't see eth8.4. Only eth8 and eth8.6

What can I do to make it work?

fabianishere commented 3 years ago

What does ip a report? Is there an eth8.4 interface there at all?

What is weird is that it should be there after executing the script. What if you create the VLAN interface manually beforehand?

ip link add link eth8 name eth8.4 type vlan id 4
kuhlivisj commented 3 years ago

ip a reports the following:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 76:ac:b9:ee:03:3d brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default 
    link/ether ca:c8:6f:3f:1f:e2 brd ff:ff:ff:ff:ff:ff
3: eth9: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc htb state DOWN group default qlen 10000
    link/ether 74:ac:b9:ee:03:46 brd ff:ff:ff:ff:ff:ff
4: eth8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 74:ac:b9:ee:03:45 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::76ac:b9ff:feee:345/64 scope link 
       valid_lft forever preferred_lft forever
5: eth10: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq master br0 state DOWN group default qlen 10000
    link/ether 74:ac:b9:ee:03:47 brd ff:ff:ff:ff:ff:ff
6: switch0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 76:ac:b9:ee:03:3e brd ff:ff:ff:ff:ff:ff
    inet6 fe80::74ac:b9ff:feee:33e/64 scope link 
       valid_lft forever preferred_lft forever
7: gre0@NONE: <NOARP> mtu 1476 qdisc noop state DOWN group default 
    link/gre 0.0.0.0 brd 0.0.0.0
8: gretap0@NONE: <BROADCAST,MULTICAST> mtu 1462 qdisc noop state DOWN group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
9: ip_vti0@NONE: <NOARP> mtu 1428 qdisc noop state DOWN group default 
    link/ipip 0.0.0.0 brd 0.0.0.0
10: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default 
    link/sit 0.0.0.0 brd 0.0.0.0
11: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 76:ac:b9:ee:03:3e brd ff:ff:ff:ff:ff:ff
    inet 10.0.1.1/24 scope global br0
       valid_lft forever preferred_lft forever
    inet6 fe80::76ac:b9ff:feee:347/64 scope link 
       valid_lft forever preferred_lft forever
12: eth0@switch0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 74:ac:b9:ee:03:3d brd ff:ff:ff:ff:ff:ff
13: eth1@switch0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 74:ac:b9:ee:03:3e brd ff:ff:ff:ff:ff:ff
14: eth2@switch0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 74:ac:b9:ee:03:3f brd ff:ff:ff:ff:ff:ff
15: eth3@switch0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 74:ac:b9:ee:03:40 brd ff:ff:ff:ff:ff:ff
16: eth4@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 74:ac:b9:ee:03:41 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::76ac:b9ff:feee:341/64 scope link 
       valid_lft forever preferred_lft forever
17: eth5@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 74:ac:b9:ee:03:42 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::76ac:b9ff:feee:342/64 scope link 
       valid_lft forever preferred_lft forever
18: eth6@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 74:ac:b9:ee:03:43 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::76ac:b9ff:feee:343/64 scope link 
       valid_lft forever preferred_lft forever
19: eth7@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 74:ac:b9:ee:03:44 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::76ac:b9ff:feee:344/64 scope link 
       valid_lft forever preferred_lft forever
20: ifb0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 32
    link/ether 4e:fb:a0:58:da:ef brd ff:ff:ff:ff:ff:ff
21: ifb1: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 32
    link/ether 2e:ab:f4:d7:19:aa brd ff:ff:ff:ff:ff:ff
22: eth10.10@eth10: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br10 state LOWERLAYERDOWN group default 
    link/ether 74:ac:b9:ee:03:47 brd ff:ff:ff:ff:ff:ff
23: eth10.2@eth10: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br2 state LOWERLAYERDOWN group default 
    link/ether 74:ac:b9:ee:03:47 brd ff:ff:ff:ff:ff:ff
24: eth10.20@eth10: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br20 state LOWERLAYERDOWN group default 
    link/ether 74:ac:b9:ee:03:47 brd ff:ff:ff:ff:ff:ff
25: eth10.200@eth10: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br200 state LOWERLAYERDOWN group default 
    link/ether 74:ac:b9:ee:03:47 brd ff:ff:ff:ff:ff:ff
26: eth10.3@eth10: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br3 state LOWERLAYERDOWN group default 
    link/ether 74:ac:b9:ee:03:47 brd ff:ff:ff:ff:ff:ff
27: eth10.4@eth10: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br4 state LOWERLAYERDOWN group default 
    link/ether 74:ac:b9:ee:03:47 brd ff:ff:ff:ff:ff:ff
28: eth8.6@eth8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 74:ac:b9:ee:03:45 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::76ac:b9ff:feee:345/64 scope link 
       valid_lft forever preferred_lft forever
29: switch0.1@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0 state UP group default 
    link/ether 76:ac:b9:ee:03:3e brd ff:ff:ff:ff:ff:ff
    inet6 fe80::74ac:b9ff:feee:33e/64 scope link 
       valid_lft forever preferred_lft forever
30: switch0.10@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br10 state UP group default 
    link/ether 76:ac:b9:ee:03:3e brd ff:ff:ff:ff:ff:ff
    inet6 fe80::74ac:b9ff:feee:33e/64 scope link 
       valid_lft forever preferred_lft forever
31: switch0.2@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br2 state UP group default 
    link/ether 76:ac:b9:ee:03:3e brd ff:ff:ff:ff:ff:ff
    inet6 fe80::74ac:b9ff:feee:33e/64 scope link 
       valid_lft forever preferred_lft forever
32: switch0.20@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br20 state UP group default 
    link/ether 76:ac:b9:ee:03:3e brd ff:ff:ff:ff:ff:ff
    inet6 fe80::74ac:b9ff:feee:33e/64 scope link 
       valid_lft forever preferred_lft forever
33: switch0.200@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br200 state UP group default 
    link/ether 76:ac:b9:ee:03:3e brd ff:ff:ff:ff:ff:ff
    inet6 fe80::74ac:b9ff:feee:33e/64 scope link 
       valid_lft forever preferred_lft forever
34: switch0.3@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br3 state UP group default 
    link/ether 76:ac:b9:ee:03:3e brd ff:ff:ff:ff:ff:ff
    inet6 fe80::74ac:b9ff:feee:33e/64 scope link 
       valid_lft forever preferred_lft forever
35: switch0.4@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br4 state UP group default 
    link/ether 76:ac:b9:ee:03:3e brd ff:ff:ff:ff:ff:ff
    inet6 fe80::74ac:b9ff:feee:33e/64 scope link 
       valid_lft forever preferred_lft forever
36: br10: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 74:ac:b9:ee:03:47 brd ff:ff:ff:ff:ff:ff
    inet 10.0.10.1/24 scope global br10
       valid_lft forever preferred_lft forever
    inet6 fe80::6:2eff:fe3c:b833/64 scope link 
       valid_lft forever preferred_lft forever
37: br2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 74:ac:b9:ee:03:47 brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.1/24 scope global br2
       valid_lft forever preferred_lft forever
    inet6 fe80::24fa:1fff:fef1:fc61/64 scope link 
       valid_lft forever preferred_lft forever
38: br20: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 74:ac:b9:ee:03:47 brd ff:ff:ff:ff:ff:ff
    inet 10.0.20.1/24 scope global br20
       valid_lft forever preferred_lft forever
    inet6 fe80::b016:2dff:fea2:11a0/64 scope link 
       valid_lft forever preferred_lft forever
39: br200: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 74:ac:b9:ee:03:47 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.1/24 scope global br200
       valid_lft forever preferred_lft forever
    inet6 fe80::686d:28ff:fecb:5dc7/64 scope link 
       valid_lft forever preferred_lft forever
40: br3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 74:ac:b9:ee:03:47 brd ff:ff:ff:ff:ff:ff
    inet 10.0.3.1/24 scope global br3
       valid_lft forever preferred_lft forever
    inet6 fe80::e4c9:a3ff:fe29:1e55/64 scope link 
       valid_lft forever preferred_lft forever
41: br4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 74:ac:b9:ee:03:47 brd ff:ff:ff:ff:ff:ff
    inet 10.0.4.1/24 scope global br4
       valid_lft forever preferred_lft forever
    inet6 fe80::486e:bbff:fe8c:2040/64 scope link 
       valid_lft forever preferred_lft forever
42: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc pfifo_fast state UNKNOWN group default qlen 3
    link/ppp 
    inet 86.85.17.78 peer 195.190.228.111/32 scope global ppp0
       valid_lft forever preferred_lft forever
43: br10.mac@br10: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default 
    link/ether 26:41:b7:7d:40:7d brd ff:ff:ff:ff:ff:ff
    inet 10.0.10.1/24 scope global noprefixroute br10.mac
       valid_lft forever preferred_lft forever
    inet6 fe80::2441:b7ff:fe7d:407d/64 scope link 
       valid_lft forever preferred_lft forever
44: dnsfilter: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 7e:ef:3d:6d:d3:07 brd ff:ff:ff:ff:ff:ff
    inet 203.0.113.1/24 scope global dnsfilter
       valid_lft forever preferred_lft forever
    inet6 2001:db8:1000::1/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::f4ed:e9ff:feb6:36a0/64 scope link 
       valid_lft forever preferred_lft forever
46: dnsfilter-0@if45: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master dnsfilter state UP group default qlen 1000
    link/ether 7e:ef:3d:6d:d3:07 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fe80::7cef:3dff:fe6d:d307/64 scope link 
       valid_lft forever preferred_lft forever
49: eth8.4@eth8: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default 
    link/ether 74:ac:b9:ee:03:45 brd ff:ff:ff:ff:ff:ff

If I try to create the VLAN manually now I get the following error:

RTNETLINK answers: File exists

If I delete the VLAN and then manually add it again the output of the script is the same.

fabianishere commented 3 years ago

Does it work if you bring up the interface manually?

ip link set dev eth8.4 up
kuhlivisj commented 3 years ago

If I then run the script I get:

RTNETLINK answers: File exists
udhcpc: started, v1.31.1
udhcpc: sending discover
sh: /usr/share/udhcpc/decline.script: not found
udhcpc: sending select for 10.222.41.188
udhcpc: lease of 10.222.41.188 obtained, lease time 3600

If I try ip -4 addr show dev eth8.4 after that it doesn't output anything

kuhlivisj commented 3 years ago

I think I got it working. I tried udhcpc from the command line without the script parameter and that did work. So it seemed that the script wasn't working. I added some echos in the script and they never got printed when I run udhcpc with the script. After some testing I changed the first line of the script from #!/bin/bash to #!/bin/sh and after that the script worked fine, eth8.4 got an IP and the routes where added.

fabianishere commented 3 years ago

Glad to hear that you got it to work! I’ll update the documentation accordingly.