maybe a stupid issue: net.eth0 did not keep the config

Issues Related to Networking (Wired and Wireless)

Moderator: Moderators

Re: maybe a stupid issue: net.eth0 did not keep the config

Postby AlmaFuerte » Mon May 25, 2009 0:58

I've the same problem Dottor Pike. In a previous thread http://forum.sabayonlinux.org/viewtopic.php?f=56&t=17052 i discovered the buggy issues of networkmanager, particularly with static ips. Like you, i've a wired connection with static ip and static dns, no dhcp. I took the decision of uninstall network manager and configure my network parameters like old school fashion. Everything works fine, but when i reboot o restart the service

Code: Select all
#\etc\init.d\net.eth0 restart


the interface lost all the parameters, i mean, ip address, netmask, gateway, etc. The configuration files contain the right information, so i conclude that the init script net.eth0 is not reading it. I've the intuition that ifplugd are doing this mess...

Could be?
Any ideas in how to fix it?
Imagination is more important than knowledge. Albert Einstein.
AlmaFuerte
Simple Hen
 
Posts: 51
Joined: Fri Sep 28, 2007 2:35

Re: maybe a stupid issue: net.eth0 did not keep the config

Postby AlmaFuerte » Mon May 25, 2009 21:28

For anyone who has this problem, here is a temporary trick to get the network working after each reboot:

1. In the first place disable NetworkManger following http://wiki.sabayonlinux.org/index.php?title=HOWTO:_Creating_a_STATIC_IP. Skip the part of net-setup, editing the net file and executing the rc-update command.

2. Edit the file /etc/conf.d/local. My choose was nano, but use your favorite editor.

Code: Select all
# nano /etc/conf.d/local


3. Add the following lines in the local_start() function:

Code: Select all
ifconfig eth0 inet your_ip_address netmask your_netmask broadcast your_broadcast_dir up
route add default gw your_gateway eth0
echo "nameserver your_dns_address" > /etc/resolv.conf


I assume the interface you are using is eth0. Change it if not.

4. Reboot.

I'm still searching the buggy init script that can't load the network configuration at boot time.
Imagination is more important than knowledge. Albert Einstein.
AlmaFuerte
Simple Hen
 
Posts: 51
Joined: Fri Sep 28, 2007 2:35

Re: maybe a stupid issue: net.eth0 did not keep the config

Postby tomv » Tue May 26, 2009 23:03

Per the Gentoo Handbook (http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=1) I believe your /etc/conf.d/net should look something like the following:
Code: Select all
# Contents of /etc/conf.d/net:
config_eth0=( "10.0.0.101 netmask 255.255.255.0" )
routes_eth0=( "default via 10.0.0.2" )

Could you post your /etc/conf.d/net file so that we could look for typos?
tomv
Baby Hen
 
Posts: 11
Joined: Sat Jun 09, 2007 9:47

Re: maybe a stupid issue: net.eth0 did not keep the config

Postby Fitzcarraldo » Tue May 26, 2009 23:13

Actually that's the old, pre Baselayout-2/OpenRC format. The new format is (see Baselayout and OpenRC Migration Guide):

Code: Select all
config_eth0="192.168.1.37 netmask 255.255.255.0 brd 192.168.1.255"
routes_eth0="default via 192.168.1.100"


See /usr/share/doc/openrc/net.example file.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: maybe a stupid issue: net.eth0 did not keep the config

Postby tomv » Wed May 27, 2009 0:10

Perhaps the Gentoo Handbook hasn't been updated yet because baselayout-2 is still in ~arch? Anyway, I stand corrected - clearly your post cites the current/correct format whereas the information I provided is out of date.
tomv
Baby Hen
 
Posts: 11
Joined: Sat Jun 09, 2007 9:47

Re: maybe a stupid issue: net.eth0 did not keep the config

Postby AlmaFuerte » Wed May 27, 2009 2:40

The content of /etc/conf.d/net is fine. The problem is that the init scrip net.lo can't load that information at boot time. I don't know if is the init scrip itself or ifplugd daemon, or something else.
Imagination is more important than knowledge. Albert Einstein.
AlmaFuerte
Simple Hen
 
Posts: 51
Joined: Fri Sep 28, 2007 2:35

Re: maybe a stupid issue: net.eth0 did not keep the config

Postby DontPanic » Sun Jun 14, 2009 16:24

This is how I set up a static IP on my SL 4.1K installation.

Please give me feedback if you are trying to achieve something different from this.

As a general rule, I create backups of all the config files I mangle.

First, I removed NetworkManager and dhcdbd from the rc init list:
Code: Select all
# rc-update del dhcdbd default
# rc-update del NetworkManager default


Then I edited /etc/rc.conf to start eth0 (by default, we let NetworkManager do that).
Code: Select all
# rc_hotplug is a list of services that we allow to be hotplugged.
# By default we do not allow hotplugging.
# A hotplugged service is one started by a dynamic dev manager when a matching
# hardware device is found.
# This service is intrinsically included in the boot runlevel.
# To disable services, prefix with a !
# Example - rc_hotplug="net.wlan !net.*"
# This allows net.wlan and any service not matching net.* to be plugged.
# Example - rc_hotplug="*"
# This allows all services to be hotplugged
# rc_hotplug="!net.*"
rc_hotplug="net.eth0"


Then I edited /etc/conf.d/net (where 192.168.0.1 would be my gateway).
Code: Select all
config_eth0="192.168.0.114 netmask 255.255.255.0 brd 192.168.0.255"
routes_eth0="default via 192.168.0.1"
dns_domain_eth0="localdomain"
nis_domain_eth0="localdomain"


Then I also had to roll my own /etc/resolv.conf (which is usually automatically generated by the dhcp client process).
Code: Select all
nameserver 208.67.222.222
nameserver 212.216.112.112
nameserver 195.130.224.18
search localdomain

You might want to substitute your internet provider's dns servers, but I think these are public dns servers that would work.

Let me know if you are trying to get at something different.
Gigabyte GA-P35-DS3L - Intel(R) Core(TM)2 Duo CPU E6750@ 2.66GHz
nVidia GeForce 7600 GS
2 GB RAM
DontPanic
Old Dear Hen
 
Posts: 742
Joined: Mon Jul 09, 2007 20:29
Location: Mobile, AL, USA

Re: maybe a stupid issue: net.eth0 did not keep the config

Postby marshalleq » Fri Jun 19, 2009 22:50

It still doesn't work for me. The only part I actually had to change was the hotplug config. I'll have a poke around again and see if there's something obvious, but to be honest, this should be fixed in the repositories NOT manually. Unless of course it's an upstream KDE 4 issue? My bet is it's the installer system or a combination of both.

Q
marshalleq
Baby Hen
 
Posts: 7
Joined: Mon Jan 12, 2009 23:09

Re: maybe a stupid issue: net.eth0 did not keep the config

Postby Fitzcarraldo » Sun Aug 02, 2009 13:23

For those who are still having problems setting up a static IP address, have a look at the recent thread Static IP: Sabayon 4.2 KDE [Solved] which may solve your problem.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Previous

Return to Networking and Wireless

Who is online

Users browsing this forum: No registered users and 1 guest