[ale] static ip network configuration
Steve Litt
slitt at troubleshooters.com
Sat Jan 11 15:26:17 EST 2025
DJPfulio--- via Ale said on Wed, 8 Jan 2025 10:34:38 -0500
>Russell, Ubuntu hasn't used the "interface" file for over 5 yrs,
>perhaps since 2017. Ubuntu uses netplan.yaml files for non-GUI
>setups. Humans modifying YAML pretty much sucks, but that's Ubuntu
>thinking they need to change things that aren't broke yet again.
This is a response to the OP, not DJPfulio...
Or you can probably do it with the following very short minimal
shellscript run from /etc/rc.local or whatever systemd runs after
bringing up all services:
===============================================================
ip link set dev lo up
ip link set dev enp3s6 down
ip addr add 192.168.100.87/24 dev enp3s6
ip link set dev enp3s6 up
ip route add default via 192.168.100.96
===============================================================
The preceding shellscript does the job quite well, on pretty much any
distro, but it gives all sorts of warnings if it has to undo networking
done previously.
If you want something a lot more robust, portable and universal, that
works in spite of an earlier partial or complete or erroneous network
setup,
read https://www.troubleshooters.com/linux/qemu/nobs.htm#hostnetworking .
As Russell said earlier in this thread, it's point and clickism that
got you into this "I can't remember" mess in the first place.
SteveT
Steve Litt
http://444domains.com
More information about the Ale
mailing list