# DHCP problem

## Faceless

I installed Gentoo, rebooted, and now I have no net connection  :Sad: 

I emerge dhcpcd which should have taken care of it right? At least that's what I understand from the handbook.

How can I fix this? If you need to see any config files please give me the full path to them  :Smile: 

Thanks

EDIT: Here is what I get on startup

```
*Starting eth0

*Bringing up eth0

*Configuration not set for eth0 - assuming dhcp

*dhcp

*eth0 does not exist
```

----------

## bkunlimited

it looks like the kernel module for your ethernet card was not loaded. If you compiled the driver as a module make sure you put it into /etc/modules.autoload.d/kernel-2.x

----------

## Faceless

 *bkunlimited wrote:*   

> it looks like the kernel module for your ethernet card was not loaded. If you compiled the driver as a module make sure you put it into /etc/modules.autoload.d/kernel-2.x

 

I looked in the kernel and my net card has a * next to it which means it's not a module, so that's not the problem right?

----------

## truc

and what about 

```
dhcpd eth1
```

 ?

Do you have firewire? I read it sometimes appear as eth0, am I right?

----------

## Faceless

 *truc wrote:*   

> and what about 
> 
> ```
> dhcpd eth1
> ```
> ...

 

I have no idea what you mean, sorry  :Sad:  I dont have firewire and are you saying I should type 'dhcpd eth1' ?

----------

## truc

hum, just give it a try, and see what happen. 

I cannot explain why, but, when trying the Ubuntu liveCD, my network card "was" eth1 and firewire (I think it was that since i read somewhere ieee1394) was on eth0.

But of course i couldn't do anything with that eth0  :Confused: , but dhcp eth1 gave me the right IP/netmask and so on..

It's just an idea, i can't explain anything  :Sad:  just try  :Wink:  

----------

## Naib

Yup the firewire thing sounds a very big possibility.

With the 2004.1 liveCD I had to unload my firewire drivers to then allow my NIC drivers to be useable - really messed things around

So try that

Also are you sure you have the right driver for your NIC?

----------

## Faceless

I typed 'dhcpcd eth1' and nothing happened.

I do have the right drivers installed.

Any other ideas?

----------

## truc

what does 

```
ifconfig
```

 give to you?

----------

## Faceless

 *truc wrote:*   

> what does 
> 
> ```
> ifconfig
> ```
> ...

 

```
lo   Link encap:Local Loopback

   inet addr:127.0.0.1 Mask:255.0.0.0

   UP LOOPBACKING RUNNING MTU:16436 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:0

   RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
```

That's what I got.

----------

## UberLord

ifconfig -a

----------

## Faceless

 *UberLord wrote:*   

> ifconfig -a

 

The output is identical to the above.

----------

## truc

did you try Manual Network Configuration 

especially the 

```
ifconfig eth0 ${IP_ADDR} broadcast ${BROADCAST} netmask ${NETMASK} up

route add default gw ${GATEWAY}

nano -w /etc/resolv.conf

```

substituting ${IP_ADDR} with your IP address, ${BROADCAST} with your broadcast address and ${NETMASK} with your netmask: 

----------

## bkunlimited

paste the output of dmesg and lspci -v 

It seems your device is not recognized which means you have a) the wrong drivers compiled into your kernel or b) hardware failure

@truc: manual configuration won't work as long the device itself is not recognized by the kernel

----------

## Faceless

 *bkunlimited wrote:*   

> paste the output of dmesg and lspci -v 
> 
> It seems your device is not recognized which means you have a) the wrong drivers compiled into your kernel or b) hardware failure
> 
> @truc: manual configuration won't work as long the device itself is not recognized by the kernel

 

There is too much output for me to type out. Which parts do you want?

EDIT: It worked for the installation CD so would this work if I used Stage 3 + genkernel?

----------

## bkunlimited

normally it should work. did you also emerge hotplug / coldplug? and start the corresponding services at boot time?

from dmesg you should see when the kernel tries to detect the network card and you should see if an error occurs then. lspci should show you the manufacturer of the network card so you could choose the appropriate driver in your kernel configuration

----------

## Faceless

 *bkunlimited wrote:*   

>  did you also emerge hotplug / coldplug? and start the corresponding services at boot time?
> 
> 

 

No, never did that. Which one should I emerge? hotplug or coldplug?

----------

## bkunlimited

to be honest i don't know which is the best for a genkernel created kernel since i build my kernels manually. just consult the handbook.

----------

## Faceless

 *bkunlimited wrote:*   

> to be honest i don't know which is the best for a genkernel created kernel since i build my kernels manually. just consult the handbook.

 

I didn't use genkernel.

----------

## bkunlimited

then use coldplug

----------

## Faceless

 *bkunlimited wrote:*   

> then use coldplug

 

I can't do that without access to the internet  :Razz: 

----------

## bkunlimited

use the livecd then  :Laughing: 

----------

## truc

 *bkunlimited wrote:*   

> paste the output of dmesg and lspci -v 
> 
> It seems your device is not recognized which means you have a) the wrong drivers compiled into your kernel or b) hardware failure
> 
> @truc: manual configuration won't work as long the device itself is not recognized by the kernel

 

ok, my apologies.. I though eth0 could be "down"

Do 

```
dmesg | grep -i ethernet

and 

lspci | grep -i ethernet

and 

lspci | grep -i firewire

```

It might help us.

 *Quote:*   

> lspci should show you the manufacturer of the network card so you could choose the appropriate driver in your kernel configuration 

 

Once you know which driver you need, check if it's compiled in the kernel or as a module. 

If not, then compile your kernel again, if it's compiled as a module don't forget:

 *bkunlimited wrote:*   

> it looks like the kernel module for your ethernet card was not loaded. If you compiled the driver as a module make sure you put it into /etc/modules.autoload.d/kernel-2.x 

 

Don't forget to mount /boot before copying anything in it

EDIT: if you have to right module in your kernel, then I agry coldplug may help you, but I would prefer to load manually the required modules at boot time using the /etc/modules.autoload.d/kernel-2.x

----------

## Faceless

ok I emerged coldplug and have it starting up at boot, and it doesnt help.

If I use genkernel everything works fine... but I don't like genkernel.

OK so I typed both "dmesg | grep -i ethernet" and "lspci | grep -i firewire" and didn't get any output at all.

However when I type "lspci | grep -i ethernet" I get:

```
0000:00:0a.0 Ethernet controller: Digital Equipment Corporation DECchip 21140 [FasterNet] (rev 20)
```

Strange, my NIC should be SiS 900 PCI Fast Ethernet Adapter, I can't find that DECchip card in the kernel.

----------

## m_sqrd

I don't think dmesg |grep -i ethernet is going to give you much

try 

dmesg |grep -i eth

also your drive should be under 

Ethernet (10 or 100Mbit) 

  Tulip family network device support 

     DECchip Tulip (dc2114x) PCI support

----------

## Faceless

 *m_sqrd wrote:*   

> I don't think dmesg |grep -i ethernet is going to give you much
> 
> try 
> 
> dmesg |grep -i eth
> ...

 

"dmesg |grep -i eth" gave me nothing either. However I am recompiling my kernel now, so hopefully everything will be fine when its done.

Just to make sure, once i have marked the correct driver in the kernel menuconfig with a *, i just type "make && make modules_install" and just reboot?

Thanks

----------

## m_sqrd

yes, that should do it.   :Very Happy: 

----------

## Faceless

 *m_sqrd wrote:*   

> yes, that should do it.  

 

It didn't do it, nothing has changed  :Sad: 

Any other ideas?

----------

## m_sqrd

Ok so you still get nothing with dmesg |grep -i eth ?

----------

## Faceless

 *m_sqrd wrote:*   

> Ok so you still get nothing with dmesg |grep -i eth ?

 

Nothing at all.

----------

## m_sqrd

ok try this zgrep -i tulip /proc/config.gz

----------

## Faceless

 *m_sqrd wrote:*   

> ok try this zgrep -i tulip /proc/config.gz

 

```
gzip: /proc/config.gz: No such file or directory
```

----------

## m_sqrd

well that suck's   :Very Happy: 

did you mount /boot and copy you kernel and system map to your /boot ?

and make sure lilo/grub config is pointing to the correct one ?

----------

## Faceless

 *m_sqrd wrote:*   

> well that suck's  
> 
> did you mount /boot and copy you kernel and system map to your /boot ?
> 
> and make sure lilo/grub config is pointing to the correct one ?

 

Yep, done all that.

----------

## Faceless

But, when I type "zgrep -i tulip /boot/config-2.6.12-gentoo-r10 I get:

```
#Tulip family network device support

#CONFIG_NET_TULIP is not set
```

----------

## m_sqrd

Ok that too strange ..

do this 

under make menuconfig 

General setup

[*]   Enable access to .config through /proc/config.gz 

then rebuild you kernel and modules again and mount /boot and copy the file etc. etc...

Note*

also I read that some of the older card use the de4x5 driver instead  so if you have too you could boot of the livecd and do dmesg |grep -i eth there a see for sure which one you need.

----------

## Faceless

 *m_sqrd wrote:*   

> Ok that too strange ..
> 
> do this 
> 
> under make menuconfig 
> ...

 

My kernel doesn't seem to have a "Enable access to .config through /proc/config.gz" :/

I'll try the liveCD thing now.

----------

## Faceless

```
eth0: Digital DS21140 Tulip rev 32 at c8bb2000, 00:03:FF:5F:E4:EF, IRQ 11.

eth0: Digital DS21140 Tulip rev 32 at c8bb2000, 00:03:FF:5F:E4:EF, IRQ 11.

eth0: Using EEPROM-set media 100baseTx-FDX.

eth0: Using EEPROM-set media 100baseTx-FDX.
```

That's what I get when I run dmesg from the liveCD... So what should I do?

----------

## m_sqrd

well that weird that the drive you set and you set it as built in 

did you see it post a message when booting about the driver it self being loaded ?

make sure you have this on also 

Generic Ethernet (10 or 100Mbit)

<*> Media Independent Interface device support

----------

## Faceless

 *m_sqrd wrote:*   

> well that weird that the drive you set and you set it as built in 
> 
> did you see it post a message when booting about the driver it self being loaded ?
> 
> make sure you have this on also 
> ...

 

Didn't see a thing, and in m kernel that particular option has --- next to it and I can't change that. Don't know what that means.

----------

## m_sqrd

too many thing are not make sence.

how did you start your kernel config did you copy and older .config in to the new /usr/src/linux/.config and what kernel source are you using gentoo-source-2.6.12 ?

----------

## Faceless

 *m_sqrd wrote:*   

> too many thing are not make sence.
> 
> how did you start your kernel config did you copy and older .config in to the new /usr/src/linux/.config and what kernel source are you using gentoo-source-2.6.12 ?

 

I followed the handbook exactly, I used stage3-pentium4. I didn't copy an old kernel config file. and yeah I'm using kernel 2.6.12-r10.

----------

## truc

 *Faceless wrote:*   

> 
> 
> Just to make sure, once i have marked the correct driver in the kernel menuconfig with a *, i just type "make && make modules_install" and just reboot?
> 
> Thanks

 

hum, just wana be sure, did u do all theses steps?

```

cd /usr/src/linux

make menuconfig (then saved of course...)

make && make modules_install

mount /boot

cp arch/i386/boot/bzImage /boot/kernel-2.6.X-gentoo-rY

cp System.map /boot/System.map-2.6.X-gentoo-rY

```

(don't forget to change /boot/grub/grub.conf if necessary...  :Wink: 

----------

## Faceless

 *truc wrote:*   

>  *Faceless wrote:*   
> 
> Just to make sure, once i have marked the correct driver in the kernel menuconfig with a *, i just type "make && make modules_install" and just reboot?
> 
> Thanks 
> ...

 

Yep did all that except 'mount /boot' cos is doesn't say that  :Smile:  My grub.conf file points to the right kernel obviously or it wouldn't boot.

----------

## truc

The problem is that, if you did exactly when the handbook says, /boot won't be mounted, you have to do it manually.

EDIT: you can check wether /boot ismounted or not by typing

```
mount 
```

----------

## Faceless

 *truc wrote:*   

> The problem is that, if you did exactly when the handbook says, /boot won't be mounted, you have to do it manually.
> 
> EDIT: you can check wether /boot ismounted or not by typing
> 
> ```
> ...

 

Yep, it says boot is mounted. /dev/hda1 on /boot

----------

## m_sqrd

Hmm what the output of 

```

egrep -i 'tulip|_mii|ikconfig' /usr/src/linux/.config

```

----------

## Faceless

 *m_sqrd wrote:*   

> Hmm what the output of 
> 
> ```
> 
> egrep -i 'tulip|_mii|ikconfig' /usr/src/linux/.config
> ...

 

Here's what I get:

```
# CONFIG_IKCONFIG is not set

CONFIG_MII=y

# Tulip family network device support

CONFIG_NET_TULIP=y

CONFIG_TULIP=y

CONFIG_TULIP_MWI=y

CONFIG_TULIP_MMIO=y

CONFIG_TULIP_NAPI=y

CONFIG_TULIP_NAPI_HW_MITIGATION=y
```

----------

## m_sqrd

I'd change this 

CONFIG_IKCONFIG=y

CONFIG_IKCONFIG_PROC=y

# Tulip family network device support

CONFIG_NET_TULIP=y

# Unset all of these >

CONFIG_TULIP=y

CONFIG_TULIP_MWI=y

CONFIG_TULIP_MMIO=y

CONFIG_TULIP_NAPI=y

CONFIG_TULIP_NAPI_HW_MITIGATION=y

# Unset all of these <

----------

## Faceless

 *m_sqrd wrote:*   

> I'd change this 
> 
> CONFIG_IKCONFIG=y
> 
> CONFIG_IKCONFIG_PROC=y
> ...

 

And how exactly do I do that?

----------

## truc

I let m_sqrd checking your .config and so on, I'll only check a few things with you, ok?

let's go  :Wink:  (just for fun, till you get this eth card working  :Wink:  )

Do you have several kernel in boot? (other than the genkernel one) (ls -l /boot  )

On which kernel are you booting? (cat /boot/grub/grub.conf and to know the running kernel uname -r  )

If u're absolutly sure this is ok, don'tanswer;)

----------

## Faceless

 *truc wrote:*   

> I let m_sqrd checking your .config and so on, I'll only check a few things with you, ok?
> 
> let's go  (just for fun, till you get this eth card working  )
> 
> Do you have several kernel in boot? (other than the genkernel one) (ls -l /boot  )
> ...

 

http://img220.imageshack.us/img220/5808/screen7jx.png

Could be relevent but it looks ok to my untrained eye.

----------

## m_sqrd

cd /usr/src/linux

make menuconfig 

Linux Kernel Configuration

General setup  --->     Pick this !

[*] Kernel .config support 

[*]   Enable access to .config through /proc/config.gz 

then exit once.

Linux Kernel Configuration

Device Drivers  --->  Pick this

Networking support  ---> then this

Ethernet (10 or 100Mbit)  --->  then this

<M>   Generic Media Independent Interface device support  This would be better as a built in but you say you cant change

Tulip family network device support  --->  then this

<*>   DECchip Tulip (dc2114x) PCI support  Only this  none of the sub options

[ ]     New bus configuration (EXPERIMENTAL) (NEW) 

[ ]     Use PCI shared mem for NIC registers (NEW)

[ ]     Use NAPI RX polling  (NEW)  

then exit 5 time and save.

then make && make modules_install

then mount /boot

and cp the system.map and bzimage file

----------

## Faceless

 *m_sqrd wrote:*   

> cd /usr/src/linux
> 
> make menuconfig 
> 
> Linux Kernel Configuration
> ...

 

It works now, thanks man I really appreciate the help. I owe ya one.

----------

## ecstasy

 *m_sqrd wrote:*   

> 
> 
> then make && make modules_install
> 
> then mount /boot
> ...

 

How do you do those steps?

The same problem i have too, with both, eth0 and eth1.

Maybe you will laugh but i'm quite new in Linux, it all started from curiosity, a week ago, and i started to install linux from stage 1, like they say is the best: compiling my kernel, etc.

I found what i'm intersted in, but i really don't know too much about commands. 

Sorry.

Hope i'll get some help in here.

----------

## ecstasy

 *Faceless wrote:*   

>  *m_sqrd wrote:*   cd /usr/src/linux
> 
> make menuconfig 
> 
> Linux Kernel Configuration
> ...

 

I've done what is written here, except that Generic Media Independent Interface device i cannot modify, there are just three lines: "---", just like that.

Anything else is done.

The kernel compilation took me just a few time, isn't that strange? 'cause i've followed the steps exactly.

Can someone help me!?

----------

## truc

 *Quote:*   

> then make && make modules_install
> 
> then mount /boot
> 
> and cp the system.map and bzimage file

 

If you read page 2, you would'nt ask that:

```

cd /usr/src/linux

make menuconfig (then save of course...)

make && make modules_install

mount /boot

cp arch/i386/boot/bzImage /boot/kernel-2.6.X-gentoo-rY

cp System.map /boot/System.map-2.6.X-gentoo-rY 
```

But please, change the X and the Y with the appropriate numbers.

----------

## ecstasy

 *truc wrote:*   

>  *Quote:*   then make && make modules_install
> 
> then mount /boot
> 
> and cp the system.map and bzimage file 
> ...

 

Sorry, it was late in the night. Read, did, still not working.

Maybe it would be helpful. My network cards are both:

D-link DFE-530TX PCI Fast Ethernet Adapter.

In this morning i've don everithnig written in this topic and still not working.

----------

## m_sqrd

ecstasy,

I thinks your NIC driver is

Linux Kernel Configuration 

Device Drivers  --->

Networking support  ---> 

Ethernet (10 or 100Mbit)  --->

< >   Sundance Alta support  <----- This one.

see /usr/src/linux/drivers/net/sundance.c   ----->: {"D-Link DFE-530TXS FAST Ethernet Adapter"}

----------

## ecstasy

 *m_sqrd wrote:*   

> ecstasy,
> 
> I thinks your NIC driver is
> 
> Linux Kernel Configuration 
> ...

 

I've done that.

It's still not working! Don't know why, don't know what so say.

It says that 

```
lspci 
```

 does not exists.

When i'm typing 

```
lsmod
```

 i have no modules loaded, none.

This is very strange, i have also an error reported, but i can't now to tell what error is, i will search for more.

----------

## m_sqrd

ecstasy,

emerge sys-apps/pciutils to get lspci

 *Quote:*   

> 
> 
> < > Sundance Alta support <----- This one.
> 
> 

 

did you make the driver a <M> module or as part of the kernel  <*> ?

if it is a module did you update the /etc/modules.autoload.d/kernel-2.{4 or 6} and run modules-update

if worst come to worst you can boot of the livecd again and see what driver it used for you NIC and rebuilt to use the same one.

----------

## ecstasy

 *m_sqrd wrote:*   

> ecstasy,
> 
> emerge sys-apps/pciutils to get lspci
> 
>  *Quote:*   
> ...

 

I setted up to be a part of the kernel.

I'll try to boot from livecd and see what it is using.

----------

