You are not logged in.

#1 2010-09-23 13:58:48

mw007
Member
From: USA
Registered: 2010-09-23
Posts: 22

Networking fails to start at boot

Just switched from Gentoo and getting accustomed to rc vs init scripts. The issue I'm having is networking fails to start on boot. I'm assuming that dhcpcd is unable to get an address? Not sure where to look in the logs for more info. I think my config is setup correctly.

Note that once I login and run sudo dhcpcd eth0, my networking is up and running. I never have issues once I am logged in.

Thoughts on where to look in the logs / config?

Offline

#2 2010-09-23 14:11:12

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Networking fails to start at boot

Are you following the wiki?
Post your /etc/rc.conf and the output of 'ifconfig -a'.

Offline

#3 2010-09-23 14:30:17

mw007
Member
From: USA
Registered: 2010-09-23
Posts: 22

Re: Networking fails to start at boot

I tried searching the wiki to no avail for my specific problem. I did try setting the mtu based on the Jumbo Frames wiki article. This did not solve the problem.

Here is my rc.conf: http://pastebin.com/J6BZLnXQ

$ ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:21:9B:21:DB:5D  
          inet addr:192.168.50.171  Bcast:192.168.50.255  Mask:255.255.255.0
          inet6 addr: fe80::221:9bff:fe21:db5d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:4000  Metric:1
          RX packets:121292 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19816 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:20814235 (19.8 Mb)  TX bytes:4406200 (4.2 Mb)
          Interrupt:44 Base address:0xc000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:80 errors:0 dropped:0 overruns:0 frame:0
          TX packets:80 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:4040 (3.9 Kb)  TX bytes:4040 (3.9 Kb)

Last edited by mw007 (2010-09-23 14:31:49)

Offline

#4 2010-09-23 14:33:06

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Networking fails to start at boot

Your network seems fine, can you run 'ifconfig -a' when it's down?

Try disabling IPv6 in /etc/modprobe.d/modprobe.conf

# disable autoload of ipv6
alias net-pf-10 off

Change FILES line in /etc/mkinitcpio.conf to:

FILES="... /etc/modprobe.d/modprobe.conf"

where '...' means all the other things you already have there, if any.
Regenerate your initramfs using "mkinitcpio -p kernel26"

I think you don't add things like the MTU settings to the rc.conf - use rc.local for that, but first, try disabling IPv6.
I know nothing about jumbo frames, I use MTU:1500.

Last edited by karol (2010-09-23 15:11:17)

Offline

#5 2010-09-23 15:20:24

mw007
Member
From: USA
Registered: 2010-09-23
Posts: 22

Re: Networking fails to start at boot

Disabling IPv6 did not fix the issue.

I did enable -d in the DHCPCD_ARGS variable of /etc/conf.d/dhcpcd and found that dhcpcd is indeed timing out when trying to request an address. In rc.conf, are the services listed in the DAEMONS variable supposed to be listed in the order of which we want them executed? Minus any dependencies, of course.

Last edited by mw007 (2010-09-23 15:21:17)

Offline

#6 2010-09-23 15:32:45

mw007
Member
From: USA
Registered: 2010-09-23
Posts: 22

Re: Networking fails to start at boot

I followed this post, and things are working now. Seems like a hack, though.

The fix is to add the following to /etc/rc.local

dhcpcd -k eth0
dhcpcd -nd eth0

Last edited by mw007 (2010-09-23 15:33:23)

Offline

#7 2010-09-23 18:02:34

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: Networking fails to start at boot

How do you acquire the IP address? From a router?
It seems like an issue with dhcpcd/router, rather that initscripts (I have a static IP setup from rc.conf/network and everything works):

eth0="eth0 xxx.xx.xxx.xx netmask 255.255.255.0 broadcast xxx.xx.xxx.255"
INTERFACES=(eth0)
gateway="default gw xxx.xx.xxx.254"
ROUTES=(gateway)
DAEMONS=(syslog-ng irqbalance hal microcode alsa iptables fcrond network sshd postfix openntpd cups smartd !fam)

Quite generically, unless you NEED a static IP (for instance within a company's network), you should use netcfg, which is a more robust and flexible solution. In this case, make sure to replace network with net-profiles in DAEMONS and set NETWORKS=(eth).

edit: and btw, INTERFACES should be empty

Last edited by Leonid.I (2010-09-23 18:05:31)


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#8 2010-09-23 18:27:06

mw007
Member
From: USA
Registered: 2010-09-23
Posts: 22

Re: Networking fails to start at boot

IP address is coming from a router.

Just installed Arch after having Gentoo on the box. Gentoo had other issues, but not this. Also, I the network starts on boot now that I've added the lines mentioned above to rc.local.

I'm assuming it has something to do with hal not being ready or something. I'm not sure. Kinda odd that it doesn't work when the rc-script executes, but about 0.5 seconds later, the lines I added to rc.local are executed, and it works fine.

I'm not sure, but it works now.

Offline

#9 2010-09-23 19:17:06

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: Networking fails to start at boot

mw007 wrote:

IP address is coming from a router.

Just installed Arch after having Gentoo on the box. Gentoo had other issues, but not this. Also, I the network starts on boot now that I've added the lines mentioned above to rc.local.

I'm assuming it has something to do with hal not being ready or something. I'm not sure. Kinda odd that it doesn't work when the rc-script executes, but about 0.5 seconds later, the lines I added to rc.local are executed, and it works fine.

I'm not sure, but it works now.

First, dbus should not be in your DAEMONS, because it is automatically started by HAL. Then, if you suspect HAL, move "network netfs" after "microcode".

EDIT: Why do you even need netfs? And have you removed that MTU line?

Also, what if you don't put anything in rc.local, don't bring up interfaces in rc.conf, but simply run ifconfig eth0 up && dhcpcd eth0. Does it work?

The reason why I am asking is that /etc/rc.d/network is doing simply this:

  /sbin/ifconfig $ifname up

  wi_up $1 || return 1

  if [ "$ifcfg" = "dhcp" ]; then
    # remove the .pid file if it exists
    /bin/rm -f /var/run/dhcpcd-${1}.pid >/dev/null 2>&1
    /bin/rm -f /var/run/dhcpcd-${1}.cache >/dev/null 2>&1
    /sbin/dhcpcd $DHCPCD_ARGS ${1}
  else
    /sbin/ifconfig $ifcfg
  fi
  return $?

So, it would indicate a bug if you say it doesn't work... I don't understand why you have to do dhcpcd -k on a clean startup. Also, /var/log/daemons.log, created by default system (empty rc.local) would be useful...

Last edited by Leonid.I (2010-09-23 19:21:14)


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#10 2010-09-23 19:30:10

mw007
Member
From: USA
Registered: 2010-09-23
Posts: 22

Re: Networking fails to start at boot

Yes, disabling interfaces, clearing rc.local then bringing things up manually works.

sudo ifconfig eth0 up && sudo dhcpcd eth0
dhcpcd[2051]: version 5.2.7 starting
dhcpcd[2051]: eth0: rebinding lease of 192.168.50.171
dhcpcd[2051]: eth0: acknowledged 192.168.50.171 from 192.168.50.23
dhcpcd[2051]: eth0: checking for 192.168.50.171
dhcpcd[2051]: eth0: leased 192.168.50.171 for 1209600 seconds
dhcpcd[2051]: forked to background, child pid 2072

The mtu line has been removed. I also removed netfs and dbus from the DAEMONS variable.

Should I re-enable the INTERFACES, attempt to boot normally, then post the output of /var/log/daemon.log?

Offline

#11 2010-09-23 21:17:20

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: Networking fails to start at boot

mw007 wrote:

Should I re-enable the INTERFACES, attempt to boot normally, then post the output of /var/log/daemon.log?

Yes, please. If you could obtain IP manually, I don't see why it can't happen automatically from rc.conf hmm


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

Board footer

Powered by FluxBB