Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When my server reboots, it does not bring up the network correctly.
Ubuntu 6.06 (I am running from Universe, and running dhcpd, apache2, mysql, named and postfix).
Symptoms:
After booting, none of the network interfaces are up and running.
I enter the desktop, go to the networking panel and the network is not active. When I activate it, only eth0 comes up. The lo is not functional.
So I run:
ifconfig lo 127.0.0.1
route add 127.0.0.1
route add localhost
Then I need to restart all my servers, so I run (I suppose there is a better way to do this?:
init 3
init 2
At this point, most things seem to be working. Except there is a weird problem for the DNS for my local domain. The DNS server is working and finds all of my other local DNS entries, but it will not resolve the local domain- even though the config files for that domain are just the same as the ones that work!
Any ideas? I can post config info, but I am not sre what to post.
I don't know Ubuntu for sure but do you know the command locate?
If so use it to find a ifcfg-eth0 file or a *eth0, * eth1
If not you 1st have to do an updatedb then you can use locate.
Otherwise please have a look in the file "interfaces" or in the
dir's if-up.d and if-post-down.d if their are any files.
- But I think you've to go back to the file we have been looking already at...
/etc/network have a look at that Line
# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
script grep
map wlan0 <------------- It seems like the device wlan0 will be loaded ONBOOT
So try to add or enter a similar line like "map eth0"
EDIT: I had previously listed the contents of /etc/network/interfaces, so I did not include it again.
As far as I can tell, the commands I am running manually after boot are being invoked at startup. I will try to list them here:
/etc/rcS.d/S08loopback ->../init.d/loopback
#!/bin/sh -e
#
# loopback - brings up the loopback (127.0.0.1) network device so that
# DHCP and other such things will work
#
# Check the package is still installed
[ -x /sbin/ifup ] || exit 0
# Get LSB functions
. /lib/lsb/init-functions
. /etc/default/rcS
case "$1" in
start)
[ -d /var/run/network ] || mkdir /var/run/network
log_begin_msg "Starting basic networking..."
if ifup -v --allow auto lo; then
log_end_msg 0
else
log_end_msg $?
fi
;;
stop)
log_begin_msg "Stopping basic networking..."
if ifdown lo; then
log_end_msg 0
else
log_end_msg $?
fi
;;
restart|force-reload)
exit 0
;;
*)
echo "Usage: /etc/init.d/loopback {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0
/etc/rcS.d/S40networking -> ../init.d/networking
#!/bin/sh -e
### BEGIN INIT INFO
# Provides: networking
# Required-Start: mountvirtfs ifupdown $local_fs
# Default-Start: S
# Default-Stop: 0 6
### END INIT INFO
case "$1" in
start)
log_action_begin_msg "Configuring network interfaces"
type usplash_write >/dev/null 2>/dev/null && usplash_write "TIMEOUT 120" || true
if [ "$VERBOSE" != no ]; then
if ifup -a; then
log_action_end_msg $?
else
log_action_end_msg $?
fi
else
if ifup -a >/dev/null 2>&1; then
log_action_end_msg $?
else
log_action_end_msg $?
fi
fi
type usplash_write >/dev/null 2>/dev/null && usplash_write "TIMEOUT 15" || true
;;
stop)
if sed -n 's/^[^ ]* \([^ ]*\) \([^ ]*\) .*$/\2/p' /proc/mounts |
grep -qE '^(nfs[1234]?|smbfs|ncp|ncpfs|coda|cifs)$'; then
log_warning_msg "not deconfiguring network interfaces: network shares still mounted."
exit 0
fi
log_action_begin_msg "Deconfiguring network interfaces"
if [ "$VERBOSE" != no ]; then
if ifdown -a --exclude=lo; then
log_action_end_msg $?
else
log_action_end_msg $?
fi
else
if ifdown -a --exclude=lo >/dev/null 2>/dev/null; then
log_action_end_msg $?
else
log_action_end_msg $?
fi
fi
;;
force-reload|restart)
log_action_begin_msg "Reconfiguring network interfaces"
ifdown -a --exclude=lo || true
if ifup -a --exclude=lo; then
log_action_end_msg $?
else
log_action_end_msg $?
fi
;;
Okay this is a fine output
but if I understand that correct you want that all your network devices including the loopback
should start when you boot an do all those start of services stuff right?
So have you checked the file "network"
/etc/network have a look at that Line
# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
script grep
map wlan0 <------------- It seems like the device wlan0 will be loaded ONBOOT So try to add or enter a similar line like "map eth0"
The sub-folders contain pre- and post- scripts, I assume for binding specific daemons when the interfaces go up and down. All of them just exit when used with 'lo'. There's nothing in them continaing "ONBOOT":
root# grep -R ONBOOT /etc
grep: /etc/alternatives/irssi: No such file or directory
grep: /etc/alternatives/irssi.1.gz: No such file or directory
Now, I did notice someone else adding the two commented out lines to /etc/network/interfaces:
auto lo
iface lo inet loopback
#address 127.0.0.1
#netmask 255.0.0.0
Those are the lines that are missing from the ifconfig output at boot. Is it possible that I need these? Or is it more likely that some other subsystem is messing with the lo when I boot up? (I can't try rebooting just now- I work remote from the server during the day.)
odcheck, here is someone else's /etc/interfaces file I found (looks like an older ubuntu install though:
Quote:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
script grep
map eth0
iface eth0 inet dhcp
subsystem.
mapping hotplug
script grep
map wlan0
iface wlan0 inet dhcp
wireless-essid linksys
auto wlan0
First, the lo specification has those two extra lines (which have never been in my version, even when it was working- and were not in my debian sarge version before I changed over). Then it also has that hotplug section.
I see a few options to try:
Just add the two lines.
Add the line 'map lo' after the lo secion.
Add a 'hotplug' section and add 'script grep' and 'map lo' to it.
Or is this just an older version of the interfaces file?
What do you think?
Do you know what the 'script grep' line does?
gv, Are you saying that samba might be the culprit? I checked it just now, without a reboot, and it doesn't mess anything up. I will check it tonight, disabling my fix, disabling samba and seeing if the problem persists.
Question: Why would smb reconfigure any of the interfaces?
I'm running Kubuntu 6.06 (at least right now..) and i find that networking only starts on boot 20% of the time. Restarting the networking in System Services restores the internet connection, but i've not yet discovered why this happens.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.