# Cant solve my dhcp problem whatever I do.

## fishtail

I'm of course new in Gentoo and while gentoo works I love it, though it hasn't worked for a while now.

I have installed the genkernel and is 100% aware at which module I should use to get my PCI-netcard working, though it doesn't work when I boot the system.

On liveCD it works fine.

I know this is a problem many folks had, and I have read plenty forums, but I can't get it work anyway so I'm doing my own thread.

The error message I get while booting is:

```

* Bringing eth0 up via DHCP....           [!!]

* ERROR: Problem starting needed services.

               "netmount" was not started.

```

I have compiled the kernel with the network-driver as a module and then both tried to launch it manually and after that tried launch it in /etc/modules.aotoload.d/kernel-2.6, also I have tried to compile the kernel with the driver not as a module, it didn't work either.

I have tried changing some options in /etc/conf.d/net.

I have tried "dhcpcd eth0", and nearly all related commands.

I have done much thing  :Wink: 

My driver is via-rhine and it works on liveCD thats important information I believe.

Does it have anything to do with firewire-network to do? Though I have tried changing it and it doesn't work anyway.

Well simply: help me get this through step my step, even if I have done it before, please.

----------

## adaptr

What do you have in /etc/conf.d/net ?

----------

## fishtail

```
iface_eth0="dhcp"
```

nothing else.

----------

## cooljoe2003

i had the exact same problem, i tried and tried it just would not work.  I found a spare nic i had laying around, a linksys lne100tx, popped it in (after disabling the on-board lan) and booted it up and it worked perfectly after that.  My belief is that gentoo maybe has some incompatibilities with certain motherboard/nic combos perhaps, i dont really know, just that putting in another nic worked.

----------

## fishtail

Maybe I can change nic with some friend or something. But I think it's wierd that it wont work on the system but it work well when I use the liveCD.

----------

## adaptr

How did you boot the LiveCD? Any kernel options ?

----------

## troworld

I have the exact same problem. I'm using VIA Rhine II. I've been using genkernel to compile my kernel for about a year and never had a problem connecting. It would just work. DHCPCD detected everything OK all the time.

My machine's been working some time without reboots, though, and I've run emerge -u world quite a few times, so I might have emerged something that broke DHCPCD.

Netmount can't start:

```
Bringing eth0 up...

eth0 dhcp

ERROR:  Problem starting needed services.

        "netmount" was not started.
```

My /etc/conf.d/net had just one line:

```
ifconfig_eth0=( "dhcp" )
```

It's a new value, but I tried the old type of config and it didn't make a difference.

Running "dhcpcd" as root doesn't start the daemon and results in the following output to /var/log/messages:

```
Sep 22 22:29:17 oasis dhcpcd[8641]: dhcpStart: ioctl SIOCGIFHWADDR: No such device
```

Running "dhcpcd -HD eth0" does nothing. "ifconfig" doesn't see eth0.

Windows and LiveCD use my network device properly. I'm sure it was some recent change, because I've never had this problem.

[edit]LiveCD was booted (for me) without any kernel options.[/edit]

----------

## fishtail

 *adaptr wrote:*   

> How did you boot the LiveCD? Any kernel options ?

 

No, not any kernel options, just hitting enter. Well, I needed to do this:

```

# modprobe via-rhine

# net-setup eth0

```

To get the net working, but nothing more.

troworld:

What about the hardware, I'm using K8N NEO FSR - then gentoo is 64bit-based of course.

----------

## fishtail

Is there any log file I can read that will give me a better description of what went wrong?

I would really be glad to know what happened when the sign [!!] comes.

----------

## gnuageux

Why not just statically assign an address in the dhcp servers range, gw, netmask and call it a day? - Sounds easier than swapping nics with buddies, etc.

----------

## fishtail

 *gnuageux wrote:*   

> Why not just statically assign an address in the dhcp servers range, gw, netmask and call it a day? - Sounds easier than swapping nics with buddies, etc.

 

In the router or what? What to do?

----------

## gnuageux

Not on the router, for your local interface. You can edit /etc/conf.d/net, comment out the eth0 dhcp line, adjust the ip address, nm, and gw, then /etc/init.d/net.eth0 restart. Alternatively you can assign those values using ifconfig, except the gw, you can do that using route.

(if your router assigns ips in the 10.0.0.0/24 network then something like

ip: 10.0.0.253, 255.255.255.0, and gw would work)

----------

## fishtail

I assigned a static ip and rebooted. Nothing happened.

I did some rutin work - like:

```

# ping www.google.com

ping: unknown host

# dhcpcd eth1 // Well just tested this some times before, you never know

# ping www.google.com

PING www.google.akadns.net (66.102.9.99) 56(84) bytes of data.

64 bytes from 66.102.9.99 icmp_seq=1 ttl=237 time=57.2 ms

- || -

- || -

```

Well, I am new as I said, but everyone knows what this mean. Internet is up running!!

My problem know comes to this:

Did it even matter that I changed to static ip, when I did dhcpcd eth1, can it matter then?

How do I do to not have to print dhcpcd eth1 everytime I shall connect?

----------

## gnuageux

I dont think that i understand what youre asking. Are you asking if statically assigning an ip will hurt anything? If so, then no. When a client logs onto the network its the clients job to request an ip address if its been configured to use dhcp, the server simply responds. If you have a static ip assigned then the request will not be made and there shouldnt be a conflict is all.

----------

## fishtail

 *gnuageux wrote:*   

> I dont think that i understand what youre asking. Are you asking if statically assigning an ip will hurt anything? If so, then no. When a client logs onto the network its the clients job to request an ip address if its been configured to use dhcp, the server simply responds. If you have a static ip assigned then the request will not be made and there shouldnt be a conflict is all.

 

Is that the answer to my last questions? I am really confused then. Sorry.

eth0 maybe now have his static ip. But if it was eth1 that made me up running that has nothing to do witk eth0.

How to make eth1.... "default runlevel" is it?Last edited by fishtail on Thu Sep 23, 2004 1:59 pm; edited 1 time in total

----------

## gnuageux

Heh, if I read them right - then yeah. What are you asking again?

----------

## fishtail

Up.

----------

## gnuageux

Oh, gotcha. rc-update add net.eth1 default should do it. 

You can remove eth0 (if you want) by: rc-update del net.eth0 default

----------

## fishtail

Thanks alot!

----------

## fishtail

Shit.

```

# rc-update add net.eth1 default

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

```

----------

## gnuageux

Sorry 'bout the confusion there mate

----------

## fishtail

No prob. Though we arent finished it seems.

----------

## fishtail

Maybe I can type som file that run the "dhcpcd"-command during boot?

----------

## troworld

My problem was fixed by running

```
modprobe via-rhine
```

and restarting the interface. I've never had to do that before, so I assume this is a hotplug problem.

Hotplug is being started on boot, but it doesn't seem to detect via-rhine. Can I force hotplug to check for it?

fishtail: My motherboard is MSI KT4V, which is based on the VIA KT400 chipset.

[edit] Emerging coldplug solved the problem. [/edit]Last edited by troworld on Thu Sep 23, 2004 6:39 pm; edited 2 times in total

----------

## cooljoe2003

i believe your problem is that you have an integrated nic on the motherboard and an add on nic, the mobo nic is eth0 and the addon is eth1, if this is the case, then all you should have to do is disable the mobo nic in bios, and the addon will assume eth0, then you shouldnt have any problems.

----------

## DaveArb

 *fishtail wrote:*   

> Shit.
> 
> ```
> 
> # rc-update add net.eth1 default
> ...

 

```

# ln /etc/init.d/net.eth0 /etc/init.d/net.eth1

# rc-update add net.eth1 default

```

Dave

----------

## cooljoe2003

let us know how it goes

----------

## Rodent

I had this problem too.

Excutive Summary: I think it is caused by the kernel firewire ethernet driver being assigned eth0, and thus your nic gets eth1.  I think two ways to fix this are disable firewire (IE1394) network stuff in the kernel or change boot scripts to use eth1.  Heres the quick and dirty on the boot script, well its not so dirty.

Stop eth0 script from loading

```
# rc-update del net.eth0
```

Copy script for new name

```
# cp /etc/init.d/net.eth0 /etc/init.d/net.eth1
```

Edit/add the config

 *Quote:*   

> # nano /etc/conf.d/net
> 
> Change  iface_eth0="dhcp"  to iface_eth1="dhcp"

 

Add new script to boot

```
# rc-update add net.eth1 default
```

Well at least it worked for me.

----------

## gnuageux

What cooljoe2003 said is exactly what I went through. Thats the solution that I used in the end as well.

----------

## DaveArb

 *Rodent wrote:*   

> <snip>Heres the quick and dirty on the boot script, well its not so dirty.
> 
> Stop eth0 script from loading
> 
> ```
> ...

 

Rodent, it's better to link net.eth1 to net.eth0 than to copy it. If it is linked, and net.eth0 is updated for any reason later on, net.eth1 will automatically be updated also. With copy it will not update, and could be cause of a hard to find problem.

Dave

----------

