# How do you disabling eth0 when no network available

## jondkent

Hi,

This is an annoying issue for me.  I've got Gentoo running fine on my portable, occasionally it is connected to my network via the inbuilt eth0 but mostly I use my wireless network, which is eth1, which works fine.

However, on boot up Gentoo, of course, tries to enable eth0 with dhcp which seems to take an age to timeout.  I've tried setting a lower timeout within the init script but this seems to make no differance.  Basically I wondering if there is a way to check if eth0 is connected to a network and if it is then run dhcp against it, else give up and move on.  Any ideas?

Thanks

Jon

----------

## Sgaduuw

it looks like net.eth0 is started at boot-time

do 'rc-update del net.eth0'

that will disable the startup of eth0 at boot-time

if you choose to use the eth0 device, just do '/etc/init.d/net.eth0 start'

----------

## amasidlover

I've managed to change the timeout on DHCP by using the -t flag, is that how you are trying to do it?

----------

## jondkent

I been using -t as well, set it to 30 (seconds?), but seems to take alot longer than that

----------

## amasidlover

-t 10 in the DHCP options gave me good results, it was plenty long enough to get an address when my laptop was actually on the network.

----------

## pilla

I use -t 5 and never had problem getting an IP when there was a server

 *amasidlover wrote:*   

> -t 10 in the DHCP options gave me good results, it was plenty long enough to get an address when my laptop was actually on the network.

 

----------

