So you're living back about 12 years ago.Code:
allow-hotplug eth0 iface eth0 inet static address 192.168.1.XXX/24 netmask 255.255.255.0 gateway 192.168.1.1
The modern way is with NetworkManager (if you must do it that way) or by programming your internet router (DHCP server) to always hand out the same address to the same MAC address.
Using a command like
nmcli con mod "Wired connection 1" \
ipv4.addresses "192.168.xxx.yyy/24" \
ipv4.gateway "192.168.xxx.zzz" \
ipv4.dns "8.8.8.8/8.8.4.4" \
ipv4.method "manual" (With suitable addresses.)
Is a better, more modern, supported method of setting IP addresses using network manager.
Statistics: Posted by DougieLawson — Wed Dec 04, 2024 2:31 pm