I need a way to assign a secondary and third ipv4 to the interface eth0 which is robust against reboots.
Background: I want to use both SAT>IP DVB-C tuners of a DVB-C cable repeater (AVM DVB-C) with tvheadend. For this I have to bind two separate IPs of the OSMC device to the tuner adapter since the AVM DVB-C restricts the assignement of a DVB-C tuner to one external IP, only.
Unfortunately the old network manager solution which simply creates an appropriate file /etc/network/interfaces does not work anymore with the connman solution in place.
I’m successful to manually add the IPs using i.e.
then enable it with sudo systemctl enable ip-alias.service and reboot. The sleep 2 is unfortunately a bit arbitrary but some delay was required before it would reliably work at system startup.
I assume that the iproute2 package will be installed during the upgrade to stretch (though you can do it now, if you want) and instead of using ifconfig you’d run something like:
/bin/ip addr add 192.168.178.18/24 dev eth0
/bin/ip addr add 192.168.178.19/24 dev eth0
Running ip addr will show you if it worked, though interestingly I see that ifconfig won’t show the new addresses that were added using ip.
Can confirm that both methods ifconfig and ip of the iproute2 package works fine in this ip-alias service.
Thx for all your help!
Best would be to find an easy way with the connman stack but it looks to me that ‘additional ip addresses on same interface’ is something the connman developer(s) are not aware of or neglect since the Connection Manager’s target systems/users do not need such feature.
Not quite. We’ll still keep using ConnMan, but some tools such as ifconfig are deprecated, and being replaced by the ip command. You can get ifconfig back; but the output of the commands on Debian Stretch are a little different than what you might be used to. It seems to just behave as a wrapper to ip -a.
ConnMan indeed seems to be designed with a ‘one technology at a time’ concept. For example, it’s not possible to boot with WiFi and Ethernet connected if there’s an Ethernet connection at the time when ConnMan is started.