Page 1 of 1

Static IP configuration on Latest Sabayon Image

Posted: Wed Jul 30, 2014 18:13
by arnaud
Hello,
I just upgraded our sabayon image to the latest upstream image. So now all the networking setup is done by default via Systemd + NetworkManager for DHCP configuration only. My main goal is to set up static IPs and NetworkManager doesn't support static IP configuration. At this point is there a way to set up static IPs by relying only on Systemd and the original Gentoo networking scripts in /etc/conf.d/net (please keep in mind i don't want to have to create systemd unit files for static IP configuration)?

Thanks.

Re: Static IP configuration on Latest Sabayon Image

Posted: Thu Jul 31, 2014 3:13
by Stupot
Unfortunately, old init scripts just won't work with systemd. And there's reasons for it, because systemd actually keeps tracks of daemon's status unlike how the old system used to work.

Another user just ran into this issue and solved the problem with systemd services files, if it helps.
viewtopic.php?f=52&t=31923

Re: Static IP configuration on Latest Sabayon Image

Posted: Thu Jul 31, 2014 17:38
by arnaud
Ok. That other user was also me by the way. I was trying to evaluate all alternatives - if any... Thank you.

Re: Static IP configuration on Latest Sabayon Image

Posted: Thu Jul 31, 2014 21:45
by albfneto
In the University wich i works, the net uses Static IP and pure Systemd Sabayon.
i simply configured it in the NetworkManager gaphical configurator, in my case is Knetworkmanager

i operated as this:

see in the notification area, the KnetworkManager Icon, click in it.

make "new cabled connection",
disable ipv6, click on "ipv4 adress", mark on "ipv4 required for this connection", Mark "Basic Settings",
Method, use "Manual".

Set your values for "IP", "Subnet mask" and "Gateway". They are generally static in static IPs.
Add you DNS Servers. They are also Static in my Net.

If needed for your net, disable DHCP. If the net settings are overwrited, when you reboot, you also try to "uninstall", remove all the dhcp support, in order that DHCP no more works. Execute this command, with option nodeps:

Code: Select all

# equo rm -av --nodeps --configfiles dhcpcd dhcp
if necessary, disable the services of DHCP in Systemd:

Code: Select all

# systemctl status dhcp. service
# systemctl status dhcpcd.service
# systemctl disable dhcp.service
# systemctl disable dhcpcd.service
Then reboot the computer

Operating in this manner, at least in my computer in the University (Static IP) this works fo me. In fact, i still writing this in this comp.

Re: Static IP configuration on Latest Sabayon Image

Posted: Fri Aug 01, 2014 16:48
by icorbett
How would one do this on a 'server' without x11 installed?

Re: Static IP configuration on Latest Sabayon Image

Posted: Fri Aug 01, 2014 23:16
by Fitzcarraldo
icorbett wrote:How would one do this on a 'server' without x11 installed?
I have not set up a static IP in a systemd system without X-Windows, but, according to the following blog post, it should be relatively straightforward:

http://clamoringinthedesert.wordpress.c ... h-systemd/
This is a solution that cuts [out] the middleman, be it ifupdown, netcfg, NetworkManager or wicd and uses systemd to do it.
EDIT: Here's a similar approach in a Gentoo installation:

http://www.gossamer-threads.com/lists/g ... 185#275185

Re: Static IP configuration on Latest Sabayon Image

Posted: Tue Mar 29, 2016 4:50
by dan.kasak
Systemd can manage network devices without using NetworkManager. Google for 'systemd-networkd'.

Example ... Create a new file /etc/systemd/network/wired.network:

Code: Select all

[Match]
Name=eno49

[Network]
Address=192.168.0.254
Gateway=192.168.0.2
( The 'eno49' part above is the name of one of my network devices ).

Disable NetworkManager:

Code: Select all

systemctl disable NetworkManager
Enable systemd-networkd:

Code: Select all

systemctl enable systemd-networkd
Then either reboot, or manually stop + stop things:

Code: Select all

systemctl stop NetworkManager
systemctl start systemd-networkd