View previous topic :: View next topic |
Author |
Message |
rsnfunky Tux's lil' helper
Joined: 30 Dec 2007 Posts: 108
|
Posted: Sat Jan 25, 2025 2:45 am Post subject: Fixed IP on Systemd profiles |
|
|
Hi,
How does one set a fixed IP on a systemd profile running KDE.
Where does one save the config file for setting up a fixed IP and not use DHCP.
Code: | # systemctl --type=service --state=running
UNIT LOAD ACTIVE SUB DESCRIPTION
bolt.service loaded active running Thunderbolt system service
containerd.service loaded active running containerd container runtime
dbus.service loaded active running D-Bus System Message Bus
distccd.service loaded active running Distccd: A Distributed Compilation Server
docker.service loaded active running Docker Application Container Engine
gpm.service loaded active running Console Mouse manager
NetworkManager.service loaded active running Network Manager
polkit.service loaded active running Authorization Manager
power-profiles-daemon.service loaded active running Power Profiles daemon
rtkit-daemon.service loaded active running RealtimeKit Scheduling Policy Service
sddm.service loaded active running Simple Desktop Display Manager
systemd-journald.service loaded active running Journal Service
systemd-logind.service loaded active running User Login Management
systemd-nsresourced.service loaded active running Namespace Resource Manager
systemd-resolved.service loaded active running Network Name Resolution
systemd-timesyncd.service loaded active running Network Time Synchronization
systemd-udevd.service loaded active running Rule-based Manager for Device Events and Files
systemd-userdbd.service loaded active running User Database Manager
udisks2.service loaded active running Disk Manager
upower.service loaded active running Daemon for power management
user@1000.service loaded active running User Manager for UID 1000
wpa_supplicant.service loaded active running WPA supplicant
Legend: LOAD → Reflects whether the unit definition was properly loaded.
ACTIVE → The high-level unit activation state, i.e. generalization of SUB.
SUB → The low-level unit activation state, values depend on unit type.
22 loaded units listed.
|
|
|
Back to top |
|
|
rab0171610 Guru
Joined: 24 Dec 2022 Posts: 457
|
Posted: Sat Jan 25, 2025 8:04 am Post subject: |
|
|
Personally, I set static IP address in the router and then the clients use DHCP to get their address, which will be the same static IP every time.
It looks like you are using NetworkManager. Unless you are using a NetworkManager client in the desktop, like I do in KDE, you can use the nmcli command line utility to set up a static vs dynamic IP address.
Code: | nmcli connection help |
An example command from a quick online search:
Code: | sudo nmcli connection modify "Wired connection 1" ipv4.method manual ipv4.addresses "192.168.1.10/24" ipv4.gateway "192.168.1.1" |
You would set the connection from auto to manual and specify the IP addresses. The files that get modified from that command are in /etc . . . my wired connection for example:
/etc/NetworkManager/system-connections/Wired connection 1.nmconnection
You may already know this but to be thorough:
Note that your router might also need to be configured to allow the static IP address assignment. |
|
Back to top |
|
|
rsnfunky Tux's lil' helper
Joined: 30 Dec 2007 Posts: 108
|
Posted: Sat Jan 25, 2025 11:59 am Post subject: |
|
|
Thanks a lot for the file location. Have edited the file as below.
Code: | [ipv4]
address1=192.168.1.106/24,192.168.1.1
dns=1.1.1.1;8.8.8.8;
method=manual
[ipv6]
addr-gen-mode=stable-privacy
method=disabled
[proxy]
|
|
|
Back to top |
|
|
|