Removing netplan.io
causes no immediate effects (network still works), but the next time the server is restarted, there is no network. That means netplan.io
is responsible for some aspect of configuration (obviously), and the OS is able to use the network, if it's properly configured.
I have tried these steps to attempt to manually bring up the network without netplan.io
:
ifconfig eth0 up
brings some semblence of IPv6 up, but no IPv4. No network access.dhclient eth0
(after #1) hangs forever, i.e. does nothing.- The
ifup
command does not exist. - The
/etc/network/interfaces
file does not exist.
Here is the configuration I am able to extract from netplan get
while it is installed:
network:
version: 2
ethernets:
eth0:
addresses:
- "<censored>/24"
gateway4: <censored>
It looks extremely basic but I somehow can't find out how to apply it without netplan.io
.
My end goal is to get network working without netplan.io
installed, and automatically on system startup. I cannot find any packages to try installing in order to facilitate this. I can only find guides on how to edit /etc/network/interfaces
, but that isn't applicable here. On top of that, apt-file
cannot find any package that contains that file, so I can't even make it applicable.
How do I keep ethernet working without netplan.io
?
EDIT: I finally found a sequence of commands that properly configures the network:
ifconfig eth0 <address> netmask 255.255.255.0
route add default gw <gateway4> eth0
ifconfig eth0 up
DNS name resolution even works too! Now just to find a way to perform this automatically on boot... maybe an @reboot
cron job, but that feels hacky...