Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There must be at least 1 Vif as upstream. #1

Closed
lllibailll opened this issue Aug 25, 2021 · 20 comments
Closed

There must be at least 1 Vif as upstream. #1

lllibailll opened this issue Aug 25, 2021 · 20 comments
Labels
kind/bug Something isn't working

Comments

@lllibailll
Copy link

So I have the same problem as in fabianishere/udm-kernel-tools#22

UniFi OS UDM Pro 1.11.0-14

My setup:

GPON ONT -> WAN ethernet port of UDMP and PPPoE WAN.
LAN: 10.69.1.0/24
Both Internet and IPTV are on VLAN 24

My logs:

udm-iptv: Obtaining IP address for VLAN interface...
ip: RTNETLINK answers: File exists
run-parts: /etc/network/if-pre-up.d/vlan: exit status 2
udm-iptv: NATing IPTV network ranges (if necessary)...
udm-iptv: Setting up igmpproxy..
udm-iptv: Starting igmpproxy..
adding VIF, Ix 0 Fl 0x0 IP 0x0101450a br0, Threshold: 1, Ratelimit: 0
There must be at least 1 Vif as upstream.

My 15-iptv.sh:

IPTV_WAN_INTERFACE="eth8"
IPTV_WAN_RANGES="239.192.0.0/16"
IPTV_WAN_VLAN="24"
IPTV_WAN_DHCP_OPTIONS="-O staticroutes -V IPTV_RG"
IPTV_LAN_INTERFACES="br0"
IPTV_LAN_RANGES="10.69.1.0/24"

if podman container exists iptv; then
  podman rm -f iptv
fi
podman run --network=host --privileged \
    --name iptv -i -d --restart always \
    -e IPTV_WAN_INTERFACE="$IPTV_WAN_INTERFACE" \
    -e IPTV_WAN_RANGES="$IPTV_WAN_RANGES" \
    -e IPTV_WAN_VLAN="$IPTV_WAN_VLAN" \
    -e IPTV_WAN_DHCP_OPTIONS="$IPTV_WAN_DHCP_OPTIONS" \
    -e IPTV_LAN_INTERFACES="$IPTV_LAN_INTERFACES" \
    -e IPTV_LAN_RANGES="$IPTV_LAN_RANGES" \
    fabianishere/udm-iptv -d -v
@fabianishere fabianishere self-assigned this Aug 25, 2021
@fabianishere
Copy link
Owner

If both internet and IPTV are on VLAN 24, then the container probably does not need to setup a separate IPTV VLAN on the WAN side, since that's already done by the UniFi controller.

Could you check whether the following changes work?

- IPTV_WAN_INTERFACE="eth8"
+ IPTV_WAN_INTERFACE="eth8.24"
  IPTV_WAN_RANGES="239.192.0.0/16"
- IPTV_WAN_VLAN="24"
+ IPTV_WAN_VLAN="0"

@lllibailll
Copy link
Author

With those changes I get this:

# podman logs -f iptv
udm-iptv: NATing IPTV network ranges (if necessary)...
iptables: No chain/target/match by that name.
udm-iptv: Setting up igmpproxy..
udm-iptv: Starting igmpproxy..
adding VIF, Ix 0 Fl 0x0 IP 0x0101450a br0, Threshold: 1, Ratelimit: 0
There must be at least 1 Vif as upstream.
udm-iptv: NATing IPTV network ranges (if necessary)...
udm-iptv: Setting up igmpproxy..
udm-iptv: Starting igmpproxy..
adding VIF, Ix 0 Fl 0x0 IP 0x0101450a br0, Threshold: 1, Ratelimit: 0
There must be at least 1 Vif as upstream.
udm-iptv: NATing IPTV network ranges (if necessary)...
udm-iptv: Setting up igmpproxy..
udm-iptv: Starting igmpproxy..
adding VIF, Ix 0 Fl 0x0 IP 0x0101450a br0, Threshold: 1, Ratelimit: 0
There must be at least 1 Vif as upstream.
udm-iptv: NATing IPTV network ranges (if necessary)...
udm-iptv: Setting up igmpproxy..
udm-iptv: Starting igmpproxy..
adding VIF, Ix 0 Fl 0x0 IP 0x0101450a br0, Threshold: 1, Ratelimit: 0
There must be at least 1 Vif as upstream.

@fabianishere
Copy link
Owner

Could you perhaps share the output of

ip a

In this case, it seems that the WAN interface for your VLAN 24 does not exist.

@lllibailll
Copy link
Author

# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 26:5a:4c:53:36:ad 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 qlen 1000
    link/ether fa:32:a4:ec:00:19 brd ff:ff:ff:ff:ff:ff
3: eth9: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 10000
    link/ether 24:5a:4c:53:36:b6 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 24:5a:4c:53:36:b5 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::265a:4cff:fe53:36b5/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 24:5a:4c:53:36:b7 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 26:5a:4c:53:36:ae brd ff:ff:ff:ff:ff:ff
    inet6 fe80::245a:4cff:fe53:36ae/64 scope link
       valid_lft forever preferred_lft forever
7: gre0@NONE: <NOARP> mtu 1476 qdisc noop state DOWN group default qlen 1000
    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: erspan0@NONE: <BROADCAST,MULTICAST> mtu 1450 qdisc noop state DOWN group default qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
10: ip_vti0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/ipip 0.0.0.0 brd 0.0.0.0
11: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
12: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 26:5a:4c:53:36:ae brd ff:ff:ff:ff:ff:ff
    inet 10.69.1.1/24 scope global br0
       valid_lft forever preferred_lft forever
    inet6 fe80::245a:4cff:fe53:36ae/64 scope link
       valid_lft forever preferred_lft forever
13: eth0@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 24:5a:4c:53:36:ad brd ff:ff:ff:ff:ff:ff
    inet6 fe80::265a:4cff:fe53:36ad/64 scope link
       valid_lft forever preferred_lft forever
14: eth1@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 24:5a:4c:53:36:ae brd ff:ff:ff:ff:ff:ff
    inet6 fe80::265a:4cff:fe53:36ae/64 scope link
       valid_lft forever preferred_lft forever
15: eth2@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 24:5a:4c:53:36:af brd ff:ff:ff:ff:ff:ff
    inet6 fe80::265a:4cff:fe53:36af/64 scope link
       valid_lft forever preferred_lft forever
16: eth3@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 24:5a:4c:53:36:b0 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::265a:4cff:fe53:36b0/64 scope link
       valid_lft forever preferred_lft forever
17: eth4@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 24:5a:4c:53:36:b1 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::265a:4cff:fe53:36b1/64 scope link
       valid_lft forever preferred_lft forever
18: eth5@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 24:5a:4c:53:36:b2 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::265a:4cff:fe53:36b2/64 scope link
       valid_lft forever preferred_lft forever
19: eth6@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 24:5a:4c:53:36:b3 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::265a:4cff:fe53:36b3/64 scope link
       valid_lft forever preferred_lft forever
20: eth7@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 24:5a:4c:53:36:b4 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::265a:4cff:fe53:36b4/64 scope link
       valid_lft forever preferred_lft forever
21: ifb0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 32
    link/ether 86:ee:de:2f:a8:86 brd ff:ff:ff:ff:ff:ff
22: ifb1: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 32
    link/ether fa:b3:3f:79:05:9e brd ff:ff:ff:ff:ff:ff
23: eth8.24@eth8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 24:5a:4c:53:36:b5 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::265a:4cff:fe53:36b5/64 scope link
       valid_lft forever preferred_lft forever
24: switch0.1@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0 state UP group default qlen 1000
    link/ether 26:5a:4c:53:36:ae brd ff:ff:ff:ff:ff:ff
    inet6 fe80::245a:4cff:fe53:36ae/64 scope link
       valid_lft forever preferred_lft forever
25: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc pfifo_fast state UNKNOWN group default qlen 3
    link/ppp
    inet XXX.XX.XXX.193 peer YY.YYY.0.10/32 scope global ppp0
       valid_lft forever preferred_lft forever

@fabianishere
Copy link
Owner

You don't seem to have an IP address on eth8.24 or eth8. For igmpproxy to work, the WAN interface needs to have an IP address.

@lllibailll
Copy link
Author

How could I solve that with my current setup?

GPON ONT -> Dream Machine Pro

@fabianishere
Copy link
Owner

  1. Are you connecting the ONT to the RJ45 port (eth8) or to the SFP+ port (eth9)?
  2. How are you planning to obtain an IP address for your WAN interface (e.g., DHCP or static)? Right now, it seems like your device cannot talk to the internet.

@lllibailll
Copy link
Author

I have it connected to eth8. Everything except IPTV works fine using UDMP.

This is my WAN config:
WAN

@fabianishere
Copy link
Owner

Haven given it a second thought, I think you need to use ppp0 as the WAN interface:

- IPTV_WAN_INTERFACE="eth8.24"
+ IPTV_WAN_INTERFACE="ppp0"
  IPTV_WAN_RANGES="239.192.0.0/16"
  IPTV_WAN_VLAN="0"

@lllibailll
Copy link
Author

Now it starts, however I still can't watch IPTV.

I am seeing this error, does it matter or can it be ignored?
MRT_DEL_MFC; Errno(2): No such file or directory

@fabianishere
Copy link
Owner

If the container does not restart, then you should be fine.

Are you trying to setup IPTV with Vodafone Spain by any chance? It seems that the configuration is slightly different (IPTV does not run over PPPoE). See https://florianjensen.com/2020/04/03/vodafone-iptv-neba-on-tomato-firmware/

@lllibailll
Copy link
Author

Yes, that is my exact case. What interface should I bind to?

In the article you have linked they use vlan24 and I am guessing that would be my eth8.24

@lllibailll
Copy link
Author

lllibailll commented Aug 25, 2021

Setting an IP for eth8.24 manually solved the problem!

ip addr add 192.168.100.1 dev eth8.24

Thank you so much for the help @fabianishere!

@lllibailll
Copy link
Author

lllibailll commented Aug 25, 2021

Seems like after some time it loses the ip address that has been set with ip addr add. Any reason for this?

EDIT: Seems like it has something to do with modifying UniFi network. e.g. deleting a wifi. Maybe that makes the UDMP reload the wan adapter and it loses the IP?

EDIT2: Seems like if I access the web dashboard it loses the IP

@fabianishere
Copy link
Owner

Every time the UniFi controller re-provisions, the interface will lose its IP address

@lllibailll
Copy link
Author

lllibailll commented Aug 25, 2021

Is there a better alternative for the IGMP proxy? Or is there a way to persist the changes?

@fabianishere
Copy link
Owner

You could write a script that periodically checks whether the interface has an IP address and if not, assign one.

@amine197120
Copy link

  • [ ]

@fabianishere fabianishere transferred this issue from fabianishere/udm-kernel-tools Nov 11, 2021
@fabianishere fabianishere removed their assignment Nov 11, 2021
@fabianishere fabianishere added the kind/bug Something isn't working label Nov 11, 2021
@osterlitz
Copy link

This configuration is working for me on MagentaTV / DE on a BGN fiber connection with UDM (non-pro).

IPTV_WAN_INTERFACE="ppp0"
IPTV_WAN_RANGES="224.0.0.0/4 87.141.0.0/16 193.158.0.0/15"
IPTV_WAN_VLAN="0"
IPTV_WAN_DHCP_OPTIONS="-O staticroutes -V IPTV_RG"
IPTV_LAN_INTERFACES="br16 br42 br0 br8"
IPTV_IGMPPROXY_ARGS="-d -v"

Combinations with/without VLAN 7 and eth4 didn't work as that interface never receives an IP.
The proxy will only start once the ppp connection is up, this happens a while after the S15 boot execution.
I renamed the script to 95-iptv.sh and added these lines before the "podman run" line to trigger/delay the connection:

> sysctl net.ipv4.conf.all.force_igmp_version=3
> ping -w 5 google.de
> sleep 30

If the proxy comes up too early, you can restart the container manually, a good indicator.

With my (1.11) UDM I also needed to add firewall policies to allow inbound UDP and IGMP for the IPTV_WAN_RANGES on the "WAN in" firewall section. Of course IGMP snooping has to be enabled.
The " sysctl net.ipv4.conf.all.force_igmp_version=3" above is necessary for the MediaReceiver as it requires IGMPv3, the MagentaTV app doesn"t need this. I will crosspost this to the manual section as well.

@fabianishere
Copy link
Owner

Closing this issue for now, since it is related to the old version of udm-iptv. If it appears again, we can re-open it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants