I have to add the multicast route, that is needed when no default gateway is configured. Mono needs this in order to join multicast groups. The configuring is done in /etc/network/interfaces.d/eth0
Now the peculiar thing is:
If eth0
is configured with a static IP it works:
allow-hotplug eth0
iface eth0 inet static
address 192.168.0.200
netmask 255.255.255.0
up ip route add 224.0.0.0/4 dev eth0
If eth0
is configured to dhcp
, ip route
is not called:
allow-hotplug eth0
iface eth0 inet dhcp
up ip route add 224.0.0.0/4 dev eth0
I tried a shell script writing a timestamp into a file in the up
line but that does not get called either. So it seems to be the script not being called rather than the ip route
command failing or getting overridden.
The systems in question are debian
stretch
, buster
. This is running on embedded units with a readonly root partition.
Am I missing something here, why does it work with static config but not with dhcp?
To avoid the XY problem, is there a different method maybe to add said route at startup?