Static IP configuration on Latest Sabayon Image

Issues Related to Networking (Wired and Wireless)

Moderator: Moderators

Static IP configuration on Latest Sabayon Image

Postby arnaud » Wed Jul 30, 2014 18:13

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.
arnaud
Young Hen
 
Posts: 20
Joined: Fri Jul 25, 2014 23:08

Re: Static IP configuration on Latest Sabayon Image

Postby Stupot » Thu Jul 31, 2014 3:13

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
Stupot
Sagely Hen
 
Posts: 1546
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: Static IP configuration on Latest Sabayon Image

Postby arnaud » Thu Jul 31, 2014 17:38

Ok. That other user was also me by the way. I was trying to evaluate all alternatives - if any... Thank you.
arnaud
Young Hen
 
Posts: 20
Joined: Fri Jul 25, 2014 23:08

Re: Static IP configuration on Latest Sabayon Image

Postby albfneto » Thu Jul 31, 2014 21:45

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.
ALBERTO FEDERMAN NETO
albfneto
[email protected]
Favorite Distros: Sabayon, Gentoo, Mageia and OpenSUSE
User avatar
albfneto
Sagely Hen
 
Posts: 1711
Joined: Fri Nov 16, 2007 1:15
Location: Ribeirão Preto City, São Paulo State, Brazil

Re: Static IP configuration on Latest Sabayon Image

Postby icorbett » Fri Aug 01, 2014 16:48

How would one do this on a 'server' without x11 installed?
icorbett
Baby Hen
 
Posts: 1
Joined: Fri Aug 01, 2014 16:23

Re: Static IP configuration on Latest Sabayon Image

Postby Fitzcarraldo » Fri Aug 01, 2014 23:16

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
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Static IP configuration on Latest Sabayon Image

Postby dan.kasak » Tue Mar 29, 2016 4:50

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
dan.kasak
Baby Hen
 
Posts: 7
Joined: Tue Nov 15, 2011 7:09


Return to Networking and Wireless

Who is online

Users browsing this forum: No registered users and 1 guest