# dhcp problem?

## cabe

i've completed the gentoo install *applause* but when i went to emerge xorg-x11 i discovered that dhcp is aparrently not working.  i can ping localhost, however, i cannot ping anything else.  i run ifconfig and the address is the default localhost address (127.0.0.1) so i'm guessing that dhcp is not initialized.

i HAVE emerged dhcpcd (AND have my iface_eth0="dhcp") but when i went to 'rc-update add dhcpcd default' my dhcpcd, i got an error:

* /sbin/rc-update: /etc/init.d/dhcpd not found; aborting.

now maybe i'm not supposed to rc-update the dhcpcd at all, since the install manaul didn't tell me i should (i reasoned that i should, however, since i was rc-updating everything else that i was installing and wanted to initialize when the computer turned on)

anyway, any help is much appriciated, thanks guys!   :Smile: 

----------

## jakamaka

What happens when you do just 

```
dhcpcd
```

 ?

 /etc/init.d/ is just so those particular programs start at boot.[/quote]

----------

## gerard27

I have exactly the same problem.

Hope somebody can tell us what to do,please?

----------

## cabe

nothing happens when i do dhcpcd

----------

## COiN3D

Nothing? Your gen2 does really say nothing?

----------

## cabe

here is exactly what happens:

# dhcpcd

#

----------

## cabe

if it helps:

# ifconfig

   Link encap:Local Loopback

   inet addr:127.0.0.1 Mask:255.0.0.0

   UP LOOPBACK RUNNING MTU:16436 Metric:1

   RX packets:24 errors:0 dropped:0 overruns:0 frame:0

   TX packets:24 errors:0 dropped:0 overruns:0 carrier:0

   collisions:0 txqueuelen:0

   RX bytes:2016 (1.9 Kb) TX bytes:2016 (1.9 Kb)

once again, thanks for the help guys  :Smile: 

----------

## gerard27

@cabe

you should type dhcpd.

When I do that i get a message that /etc/dhcp/dhcpd.conf doesn´t exist.

I looked at it and cannot make head or tail of it.

I have installed Gentoo before and it never had /etc/dhcp/dhcpd conf!!

I am now in gentoo 2004.2 where internet works ok. and /etc/dhcp/dhcpd conf doesnot exist.

----------

## pjp

Moved from Installing Gentoo.

----------

## gerard27

@cabe

I am deeply sorry for causing misunderstandings!

Of course it should be dhcpcd.

I reread teh installation manual and must have misread it the first time.

What confused me is that you come across dhcpd in the /portage/net-misc files.

I unmerged dhcp and emerged dhcpc,however I still cannot connect to the internet.I get the following line from syslog-ng:

code:

dhcpStart:ioctl SIOCGIFHWADDR:No such device.

Can anyone tell me what is wrong?

----------

## gerard27

Well,I resolved the problem.

I had to edit /etc/modules-autoload to install the module for my ethernet card.

I have used kernel 2.6 before,manually configured to load modules automatically,but this time (2.6.9) apparently it doesnnot work.

Anyway I am now able to continue with the rest of the 2004.3 install.

Again,sorry about the mixup.

----------

## philcooper23

yeah when i upgraded to 2.6.9 it did the same thing. I would boot and net.eth0 wouldn't start, and it didn't give me an error either. when i did dhcpcd it didn't output anything, and when i did ifconfig, it would only print the "lo" information 127.blahblah... 

i'll try modprobe. if it worked for you hopefully it'll work for me too.

----------

## cabe

im kind of a n00b, can you explain a little more how to do this? i've made my way to /etc/modules.autoload.d/ (a directory) and ls: kernel-2.4 kernel-2.6 but do not know what to edit.  this is a laptop btw, with the network adapter in the pcmcia slot.

----------

## gerard27

If you don´t know what kernel you have put it in both.

There should be no problem because the system only uses one.

Do you know the name of the module? You need the name to put in /etc/modules-autoload.

----------

## cabe

i'm using the 2.6.9-gentoo-r6 kernel, and i have no /etc/modules-autoload, however, i do have an /etc/modules.autoload.d directory.  in that directory are two files, named kernel-2.4 and kernel-2.6.  i have no idea what the name of the module is i need to load for my card (i'm guessing this is the problem) so how can i find that out? it's a pcmcia ethernet card if that helps.. (in that case, do i need a pcmcia module rather than an ethernet card one, and doesnt the 2.6 kernel have pcmcia support built in?)

----------

## Flakeygator

Hi Cabe  just wondering if you have emerged pcmcia-cs ?

a good link  would be http://pcmcia-cs.sourceforge.net/

----------

## cabe

when i tried to emerge pcmcia-cs it said it could not determine my kernel version, but then when i read the manual it looked like 2.6.9 already has support for pcmcia without needing an external module? if i still do need to emerge pcmcia-cs i guess i could go back onto the live cd and try to emerge it again, but when i had originally tried it did not work.. (or maybe i have more serious problems?)

----------

## cabe

update:

i booted back with the live cd, mounted everything, chrooted back in, tried to emerge pcmcia-cs, and here is what i got:

Could not determine your kernel version.

Make sure that you have /usr/src/linux symlink.

And that said kernel has been configured.

You can also simply run the following command

in the kernel referenced by /usr/src/linux:

make include/linux/version.h

so, i do:

# ls /usr/src/linux

linux-2.6.9-gentoo-r6

looks like the symlink is there! so then, i...

#make include/linux/version.h

CHK include/linux/version.h

and then try to emerge again, but get the same error message   :Confused: 

----------

## cabe

i've been told pcmcia is enabled in the device drivers section of menuconfig of 2.6.9, yet i can't seem to find it...

----------

## cabe

update:

figured out my problem.  pcmcia was blatently staring me in the face in the menuconfig, yet i didn't enable it   :Mad:   time to reconfigure and recompile!

----------

## maverickmage

Damn....

I dhcp problem too and it's not being fixed properly.

I have no module to add that is crucial.  (coded those in directly to the kernel)  I only seem to have a problem when it comes time to start up eth0.  Then I end up with a netmount error.

(not a labtop so pcmica won't work -i think)

----------

## cabe

well my pcmcia STILL does not work.  i configured the kernel for built in support yet it still does not work.  i just unmerged the 2.6.9 and am now emerging gentoo-sources. oh well   :Confused:   guess i'll have to wait till some later date to get 2.6 working.

----------

## shade266

```
dhcp eth0
```

 is the proper command line entry. I am using the current dev-source kernel (2.6.9) as well and have been experiencing this issue. the code listed brought my eth device up. 

*Edit* forgot to mention you may have to be root when you issue the above code.

----------

## Flakeygator

Just me again asking more questions ; what card ? is it supported ? do you have to load a module driver ? what laptop are you using ? 

does it scream like a yeti !?  hehehe 

oh no thaz my boxen  

 :Twisted Evil: 

----------

## shade266

for the record.. i have had success involving this dhcp/cd issue. Booting fromthe livecd and following the mount and chroot commands.. 

```
emerge dhcpcd
```

i gave misinformation..  i apologize... dhcp still is causing problems editing conf.d file didn't work either. Still searching...

----------

## cabe

 *Flakeygator wrote:*   

> Just me again asking more questions ; what card ? is it supported ? do you have to load a module driver ? what laptop are you using ? 
> 
> does it scream like a yeti !?  hehehe 
> 
> oh no thaz my boxen  
> ...

 it is a xircom cardbus. it does work with the live CD and with knoppix, so i'd imagine that it's supported. as far as loading a module driver, i have no clue. the laptop is a dell latitude cpx.

most recent update is that i decided to load the automatically configured kernel.  reason i did this is because it was stated that it's similar to the live cd (and the live cd works with the pcmcia ethernet adapter, so i figured...) however, it does not work. it's able to bring up eth0 now, however (using static IP, i decided to reconfigure my router a bit so now it's static IP). although, it's unable to ping anything. "connect: Network is unreachable"

----------

## Flakeygator

yeah one would think that it would run just like the live cd .

 ya have hotplug running? and the modules are loaded right.

don`t have the eth0 booting  and 

in /etc/conf.d/net

try passing the iface_eth{your card number} ="-R"   option if ya think it is dhcp.

that worked for me gl.

----------

## Maqueo

 *Flakeygator wrote:*   

> yeah one would think that it would run just like the live cd .
> 
> don`t have the eth0 booting  and 
> 
> in /etc/conf.d/net
> ...

 

Hey man, Im trying to solve a similar problem... could you eleborate on not booting eth0? You mean removing it as in rc-update del net.eth0?

----------

## philcooper23

hey... I had the problem of net.eth0 not starting at all. It turns out that the 2.6.9 kernel didn't automatically find my ethernet card as 2.6.8 and lower did. What I had to do was lspci and then modprobe my ethernet card and net.eth0 started immediately.

----------

## Flakeygator

 *Quote:*   

> Hey man, Im trying to solve a similar problem... could you eleborate on not booting eth0? You mean removing it as in rc-update del net.eth0?

 

yeah man

----------

