You are not logged in.

#1 2012-08-07 16:44:37

MALDATA
Member
Registered: 2012-08-06
Posts: 7

[SOLVED] dhcpcd does not run automatically

I just did a fresh installation of Arch on a machine with two NICs. One is connected to a network and has a static IP address, the other just goes to a router for internet access. So, in my rc.conf, I have the following:

DAEMONS=(mdadm syslog-ng dbus network crond sshd gdm)

# Network
#
interface=eth0
address=
netmask=
gateway=

interface=eth1
address=10.42.0.13
netmask=255.255.255.0
gateway=10.42.0.1

eth0 goes to the router, so I want it to use dhcpcd to get an IP address. eth1 goes to the other network, and has a static IP. When I boot the machine, eth1 is already set up just fine. However, eth0 does not have an IP address. I have to log in as root every time and run "dhcpcd eth0." That works fine, I just want it to do it automatically.

My understanding is that the network daemon should run dhcpcd for me on each ethX device specified in rc.conf. Is that not true? is there some other setup step that I've missed?

Thanks!

Last edited by MALDATA (2012-08-07 17:22:13)

Offline

#2 2012-08-07 16:48:22

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] dhcpcd does not run automatically

you can only configure one interface in rc.conf, use netcfg instead.

Offline

#3 2012-08-07 16:53:47

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: [SOLVED] dhcpcd does not run automatically

MALDATA wrote:

My understanding is that the network daemon should run dhcpcd for me on each ethX device specified in rc.conf. Is that not true? is there some other setup step that I've missed?

65kid is right. We source /etc/rc.conf, so if you set a variable (such as 'interface') more than once, only the last one will be used. The network functionality that comes with initscripts is intentionally very rudimentary, and for anything but the extremely simple cases you should use something more proper.

Offline

#4 2012-08-07 17:20:15

MALDATA
Member
Registered: 2012-08-06
Posts: 7

Re: [SOLVED] dhcpcd does not run automatically

Oh, I thought rc.conf was parsed somehow, rather than just sourced. That'll do it. Thanks for the help!

Offline

Board footer

Powered by FluxBB