You are not logged in.

#1 2011-06-21 12:39:11

Pawlerson
Member
Registered: 2010-09-01
Posts: 44

[SOLVED] rc.conf new syntax and dhcp

I connect using dhcp, but it's broken now. My rc.conf dhcp settings look like this:

interface=eth0
address=
netmask=
gateway=

I have to do 'ifcfg eth0 up' (some error appears) and 'dhcpcd' (another one about ifconfig being not find). However, connection works after this. What's wrong?

Last edited by Pawlerson (2011-06-21 16:45:24)

Offline

#2 2011-06-21 12:59:00

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] rc.conf new syntax and dhcp

Pawlerson wrote:

'ifcfg eth0 up' (some error appears) and 'dhcpcd' (another one about ifconfig being not find).

When asking for help, it's customary to provide full disclosure about what the inputs and outputs were.

Your syntax is correct. dhcpcd unfortunately has an unwritten dependency on net-tools (one of the hooks uses ifconfig to set the mtu). If you reinstall net-tools "another error" will go away. I don't know anything about "some error". ifcfg is a shell script included with iproute2 and the syntax you provided doesn't seem to mesh with it.

Last edited by falconindy (2011-06-21 12:59:16)

Offline

#3 2011-06-21 13:26:17

Pawlerson
Member
Registered: 2010-09-01
Posts: 44

Re: [SOLVED] rc.conf new syntax and dhcp

I didn't provide outputs, because mentioned commads were just a 'bonus'. There isn't any error related to rc.conf setup as far I can see.

ifcfg eth0 up

arping: unknown host up
Error: some host already uses address up on eth0

dhcpcd

/usr/lib/dhcpcd/dhcpcd-hooks/10-mtu :line 10:ifconfig:command not found
/usr/lib/dhcpcd/dhcpcd-hooks/30-hostname: line 9:hostname:command not found

Offline

#4 2011-06-21 13:40:35

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] rc.conf new syntax and dhcp

Right, so like I said, the syntax you're providing to ifcfg is just wrong, and the output from dhcpcd is what I expected.

I've opened tickets upstream with dhcpcd to remove the dependencies on the hostname and ifconfig binaries:

http://roy.marples.name/projects/dhcpcd/ticket/226
http://roy.marples.name/projects/dhcpcd/ticket/227

Offline

#5 2011-06-21 14:30:23

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: [SOLVED] rc.conf new syntax and dhcp

How about dhclient? I have not used it but does it depend on net-tools too. It seems more advanced compared to dhcpcd, especially when it comes to ipv6 support.


My new forum user/nick name is "the.ridikulus.rat" .

Offline

#6 2011-06-21 14:34:32

Pawlerson
Member
Registered: 2010-09-01
Posts: 44

Re: [SOLVED] rc.conf new syntax and dhcp

falconindy wrote:

Right, so like I said, the syntax you're providing to ifcfg is just wrong, and the output from dhcpcd is what I expected.

I've opened tickets upstream with dhcpcd to remove the dependencies on the hostname and ifconfig binaries:

http://roy.marples.name/projects/dhcpcd/ticket/226
http://roy.marples.name/projects/dhcpcd/ticket/227

Thanks. I would expect system should just connect using the rc.conf without touching the ifcfg. I did a net install, so maybe I'm missing some packages to make a new rc.conf dhcp option work? Is net-tools still needed?

PS. I installed yp-tools to make sure if this will make a difference, but it's still the same.

Offline

#7 2011-06-21 14:37:40

Pawlerson
Member
Registered: 2010-09-01
Posts: 44

Re: [SOLVED] rc.conf new syntax and dhcp

skodabenz wrote:

How about dhclient? I have not used it but does it depend on net-tools too. It seems more advanced compared to dhcpcd, especially when it comes to ipv6 support.

My main problem is probably related to eth0 being down from some reason - till I do ifcfg eth0 up (which isn't the right way, but works). I'd expect 'interface=eth0' (which means use dhcp) in rc.conf should bring it up automatically.

Offline

#8 2011-06-21 14:42:16

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [SOLVED] rc.conf new syntax and dhcp

I use a netcfg profile to start up my network and it works. Have you tried using netcfg? It could be an option because you are right, it would be tedious to have to start the network everytime.

I am not at my machine now, but I will try to start it via rc.conf later tonight and see if I get the same problem.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#9 2011-06-21 16:45:08

Pawlerson
Member
Registered: 2010-09-01
Posts: 44

Re: [SOLVED] rc.conf new syntax and dhcp

Inxsible wrote:

I use a netcfg profile to start up my network and it works. Have you tried using netcfg? It could be an option because you are right, it would be tedious to have to start the network everytime.

I am not at my machine now, but I will try to start it via rc.conf later tonight and see if I get the same problem.

I have reinstalled the system and now everything works as expected. There had to be some error with packages during the net install. Thank you all for the help and patience.

Offline

Board footer

Powered by FluxBB