Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dhcpcd
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
optiluca
Guru
Guru


Joined: 16 Jan 2006
Posts: 551
Location: Rivergaro, Italy

PostPosted: Wed Feb 15, 2006 4:23 pm    Post subject: Dhcpcd Reply with quote

After having forgotten to install DHCPCD during the system installation process, I booted the CD, chrooted into my installed system, emerged dhcpcd, rebooted, but dhcpcd fails to start. A line appears saying something like "Starting DHCPCD [!!]". I have no idea about what to do.

I understand I haven't given much information, since I don't get big error messages, so if you need some more info could you tell me where to find it?

Thanks

Luca
Back to top
View user's profile Send private message
Albert_g
n00b
n00b


Joined: 02 Feb 2006
Posts: 60
Location: Somewhere over the ...

PostPosted: Wed Feb 15, 2006 5:25 pm    Post subject: Reply with quote

Hi

you can try looking at /var/log, and also the /etc/dhcp* files/directories

dhcpd shoyuld be configured prior to its use, man dhcpd may also help with it.

Albert
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Wed Feb 15, 2006 5:26 pm    Post subject: Reply with quote

If you forgot that then maybe you forgot to add net.eth0 to the default runlevel too? Try /etc/init.d/net.eth0 start and see what it does.
Back to top
View user's profile Send private message
optiluca
Guru
Guru


Joined: 16 Jan 2006
Posts: 551
Location: Rivergaro, Italy

PostPosted: Thu Feb 16, 2006 1:30 pm    Post subject: Reply with quote

/etc/init.d/net.eth0 start
* Starting eth0
* Configuration not set for eth0 - assuming DHCP
* Bringing up eth0
* dhcp
* Running dhcpcd ... [ !! ]
:-(
Back to top
View user's profile Send private message
Albert_g
n00b
n00b


Joined: 02 Feb 2006
Posts: 60
Location: Somewhere over the ...

PostPosted: Thu Feb 16, 2006 1:42 pm    Post subject: Reply with quote

Dear optiluca,

have you edited the /etc/dhcpcd.conf file ?

Albert
Back to top
View user's profile Send private message
specks
n00b
n00b


Joined: 01 Dec 2003
Posts: 18

PostPosted: Thu Feb 16, 2006 6:06 pm    Post subject: Reply with quote

I just installed gentoo on a Dell C840. The installation went great, I got X working and Gnome installed and working. I then did an emerge -uDva world and dispatch-conf. I thought I carefully went through all the config files correctly, but now I cannot get networking to work.

The error I get at boot or when I try to start it manually is this:
Code:

$ /etc/init.d/net.eth0 start
* Starting eth0
*   Bringing up eth0
*      dhcp
*          Running dhcpcd ...                                  [ !! ]


My /etc/conf.d/domainname:
Code:

# /etc/conf.d/domainname

# When setting up resolv.conf, what should take precedence?
# If you wish to always override DHCP/whatever, set this to 1.
OVERRIDE=1

# To have a proper FQDN, you need to setup /etc/hosts and /etc/resolv.conf
# properly (domain entry in /etc/resolv.conf, and FQDN in /etc/hosts).
#
#DNSDOMAIN=""
DNSDOMAIN="byu.edu"

# This only set what /bin/hostname returns.  If you need to setup NIS, meaning
# what /bin/domainname returns, please see:
#
#   http://www.linux-nis.org/nis-howto/HOWTO/
#
#NISDOMAIN=""


My /etc/conf.d/hostname:
Code:

# /etc/conf.d/hostname

# Set to the hostname of this machine
HOSTNAME="acostic"


My /etc/conf.d/net:
Code:

# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d.  To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
config_eth0=( "dhcp" )
dhcpcd_eth0="-h acostic -t 10"


My /etc/hosts:
Code:
# /etc/hosts
#
# This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem.  It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.  Just add the names, addresses
# and any aliases to this file...
#

127.0.0.1       localhost acostic


10.25.67.154 specks.byu.edu specks


# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


Any help would be greatly appreciated.


Edited to Add: Here is the output from the syslog:
Code:

Feb 16 11:15:16 [dhcpcd] dhcpStart: interface eth0 is not Ethernet or 802.2 Token Ring_
Back to top
View user's profile Send private message
CloudBolt
Apprentice
Apprentice


Joined: 04 Feb 2006
Posts: 192
Location: The Netherlands

PostPosted: Thu Feb 16, 2006 6:21 pm    Post subject: Reply with quote

try
Code:
# ifconfig eth0


and post the output here.

also try
Code:
# ifconfig eth1


and post the output
_________________
GNU/Linux is an operating system.
IBM OS/2 is half an operating system.
Windows is a shell.
DOS is a boot partition virus.
Back to top
View user's profile Send private message
optiluca
Guru
Guru


Joined: 16 Jan 2006
Posts: 551
Location: Rivergaro, Italy

PostPosted: Thu Feb 16, 2006 6:22 pm    Post subject: Reply with quote

Albert_g wrote:
Dear optiluca,

have you edited the /etc/dhcpcd.conf file ?

Albert


I copied the example one to it...

BTW Isn't it /etc/dhcp/dhcpcd.conf?
Back to top
View user's profile Send private message
Albert_g
n00b
n00b


Joined: 02 Feb 2006
Posts: 60
Location: Somewhere over the ...

PostPosted: Thu Feb 16, 2006 6:40 pm    Post subject: Reply with quote

Yup, it may be the file that you point

but copying the example isn't enough, you have to actively edit it to select the paramenters of the server, such as the range of served IPs, if there are some fixed IP/MAC pairs, and so on.

man dhcpd.conf

Albert
Back to top
View user's profile Send private message
specks
n00b
n00b


Joined: 01 Dec 2003
Posts: 18

PostPosted: Thu Feb 16, 2006 6:49 pm    Post subject: Reply with quote

cloudbolt:


Code:
# ifconfig eth0
eth0      Link encap:UNSPEC  HWaddr 34-4F-C0-00-34-0B-DC-21-00-00-00-00-00-00-00-00
             BROADCAST MULTICAST  MTU:1500  Metric:1
             RX packets:0 errors:0 dropped:0 overruns:0 frame:0
             TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
             RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


Code:
# ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:08:74:07:4E:C0
             BROADCAST MULTICAST  MTU:1500  Metric:1
             RX packets:0 errors:0 dropped:0 overruns:0 frame:0
             TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
             RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
             Interrupt:11 Base address:0xc00


Edited to add:

It looks like eth0 may have become the wireless card - which I'm not interested in using. Why would my network card move from eth0 to eth1?

I created a net.eth1 symlink in /etc/init.d to net.lo and started it up - it works. But this is just wierd.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Feb 16, 2006 7:16 pm    Post subject: Reply with quote

Try re-emerging dhcpcd
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
CloudBolt
Apprentice
Apprentice


Joined: 04 Feb 2006
Posts: 192
Location: The Netherlands

PostPosted: Thu Feb 16, 2006 7:41 pm    Post subject: Reply with quote

specks wrote:
cloudbolt:


Code:
# ifconfig eth0
eth0      Link encap:UNSPEC  HWaddr 34-4F-C0-00-34-0B-DC-21-00-00-00-00-00-00-00-00
             BROADCAST MULTICAST  MTU:1500  Metric:1
             RX packets:0 errors:0 dropped:0 overruns:0 frame:0
             TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
             RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


Code:
# ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:08:74:07:4E:C0
             BROADCAST MULTICAST  MTU:1500  Metric:1
             RX packets:0 errors:0 dropped:0 overruns:0 frame:0
             TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
             RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
             Interrupt:11 Base address:0xc00


Edited to add:

It looks like eth0 may have become the wireless card - which I'm not interested in using. Why would my network card move from eth0 to eth1?

I created a net.eth1 symlink in /etc/init.d to net.lo and started it up - it works. But this is just wierd.


I know, it's the same problem I had. when you finished emerging X, a window manager and all of its dependencies you probably typed etc-update and let it overwrite all configfiles, this is probably what caused eth0 to become eth1, as that is what I did.
_________________
GNU/Linux is an operating system.
IBM OS/2 is half an operating system.
Windows is a shell.
DOS is a boot partition virus.
Back to top
View user's profile Send private message
optiluca
Guru
Guru


Joined: 16 Jan 2006
Posts: 551
Location: Rivergaro, Italy

PostPosted: Fri Feb 17, 2006 3:52 pm    Post subject: Reply with quote

optipc luca # ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:13:D4:69:8F:23
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:177 Base address:0x4000


optipc luca # ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:60:4C:30:57:BD
UP BROADCAST RUNNING MULTICAST MTU:65535 Metric:1
RX packets:424 errors:0 dropped:0 overruns:0 frame:0
TX packets:423 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:119070 (116.2 Kb) TX bytes:46836 (45.7 Kb)
Back to top
View user's profile Send private message
CloudBolt
Apprentice
Apprentice


Joined: 04 Feb 2006
Posts: 192
Location: The Netherlands

PostPosted: Fri Feb 17, 2006 4:09 pm    Post subject: Reply with quote

optiluca wrote:
optipc luca # ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:13:D4:69:8F:23
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:177 Base address:0x4000


optipc luca # ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:60:4C:30:57:BD
UP BROADCAST RUNNING MULTICAST MTU:65535 Metric:1
RX packets:424 errors:0 dropped:0 overruns:0 frame:0
TX packets:423 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:119070 (116.2 Kb) TX bytes:46836 (45.7 Kb)


execute these commands in a terminal:
Code:
# cd /etc/init.d
# ln -s net.eth0 net.eth1
# rc-update add net.eth1 default
# rc-update del net.eth0 default


this copies your startup script for eth0 to start eth1 on boot, adds the startup script for eth1 to the default runlevel(which is the runlevel executed first when you boot your gentoo box), and deletes eth0 from the default runlevel(so that you don't get an error every time you boot)
_________________
GNU/Linux is an operating system.
IBM OS/2 is half an operating system.
Windows is a shell.
DOS is a boot partition virus.
Back to top
View user's profile Send private message
ewtrowbr
Apprentice
Apprentice


Joined: 08 May 2004
Posts: 153
Location: Columbus, OH

PostPosted: Fri Feb 17, 2006 4:41 pm    Post subject: Reply with quote

Dude... How you gonna serve DHCP out an interface without an IP address configured? Configure an Ip address on the eth1 interface. Then Make sure that /etc/cond.d/dhcp specifies that the eth1 interface is the one specified.

Hope this helps you

openwall conf.d # more dhcp
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcp.conf,v 1.6 2004/08/2
8 02:55:40 vapier Exp $

# Configure which interface or interfaces to for dhcp to listen on
# list all interfaces space separated.
IFACE="eth1"

# Insert any other options needed
DHCPD_OPTS="-q"

# If you wish to run dhcp in a chroot, run:
# ebuild /var/db/pkg/net-misc/<dhcp version>/<dhcp-version>.ebuild config
# and un-comment the following line.
# You can specify a different chroot directory but MAKE SURE it's empty.
#CHROOT="/chroot/dhcp"
openwall conf.d #


openwall conf.d # ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:11:11:30:D4:23
inet addr:192.168.1.254 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:97444007 errors:0 dropped:0 overruns:0 frame:0
TX packets:101823047 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1760818074 (1679.2 Mb) TX bytes:2353777575 (2244.7 Mb)

openwall conf.d #
Back to top
View user's profile Send private message
optiluca
Guru
Guru


Joined: 16 Jan 2006
Posts: 551
Location: Rivergaro, Italy

PostPosted: Fri Feb 17, 2006 4:53 pm    Post subject: Reply with quote

[quote="CloudBolt"]
optiluca wrote:

Code:
# cd /etc/init.d
# ln -s net.eth0 net.eth1
# rc-update add net.eth1 default
# rc-update del net.eth0 default


this copies your startup script for eth0 to start eth1 on boot, adds the startup script for eth1 to the default runlevel(which is the runlevel executed first when you boot your gentoo box), and deletes eth0 from the default runlevel(so that you don't get an error every time you boot)


At boot time I get a message saying that eth1 doesn't exist...

ewtrowbr wrote:
Dude... How you gonna serve DHCP out an interface without an IP address configured? Configure an Ip address on the eth1 interface. Then Make sure that /etc/cond.d/dhcp specifies that the eth1 interface is the one specified.


I haven't got a /etc/cond.d/dhcp...

BTW I'm using a Eagle-usb modem, and I followed these instructions:
http://gentoo-wiki.com/HARDWARE_Install_a_modem_that_uses_the_eagle-usb_software
Back to top
View user's profile Send private message
ewtrowbr
Apprentice
Apprentice


Joined: 08 May 2004
Posts: 153
Location: Columbus, OH

PostPosted: Fri Feb 17, 2006 5:12 pm    Post subject: Reply with quote

My bad. I'm the bozo. I thought we were trying to get a dhcp server running. My mistake.
Back to top
View user's profile Send private message
bertdevriese
n00b
n00b


Joined: 17 Feb 2006
Posts: 14

PostPosted: Fri Feb 17, 2006 9:07 pm    Post subject: Reply with quote

Well,

I've been having the same problem and I can confirm: when you compare to the liveCD, eth0 is now the wireless connection instead of the wired connection, and eth1 is the wired connection. This was pretty confusing to me in the beginning because on the bootcd the wired connection was the eth0 device.

Adding the symlink as described in the "Gentoo Handbook" works fine
Code:
# cd /etc/init.d
# ln -s net.eth0 net.eth1
# rc-update add net.eth1 default


That way, you can use eth1 as the wired connection. No more problems from that point.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum