Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo User (http://www.linux-archive.org/gentoo-user/)
-   -   how to forbid dhcp for eth0 (http://www.linux-archive.org/gentoo-user/476357-how-forbid-dhcp-eth0.html)

doherty pete 01-14-2011 04:33 AM

how to forbid dhcp for eth0
 
when*i*start*the*kernel,*it*wait*long*time*to*dhcp *for*eth0:eth0:dhcped*4.0.15*startingeth0:waiting* for*carrier
i*want*to*forbid*dhcp,how*can*i*do?

--
pete_doherty

Dale 01-14-2011 05:03 AM

how to forbid dhcp for eth0
 
doherty pete wrote:

when i start the kernel, it wait long time to dhcp for eth0:
eth0:dhcped 4.0.15 starting
eth0:waiting for carrier

i want to forbid dhcp,how can i do?

--
pete_doherty


I'm not sure but would this help?

# Some people want a finer grain over hotplug/coldplug. RC_PLUG_SERVICES
is a

# list of services that are matched in order, either allowing or not. By
# default we allow services through as RC_COLDPLUG/RC_HOTPLUG has to be yes
# anyway.
# Example - RC_PLUG_SERVICES="net.wlan !net.*"
# This allows net.wlan and any service not matching net.* to be plugged.

RC_PLUG_SERVICES=""

That's in /etc/conf.d/rc.

Dale

:-) :-)

"James L" 01-14-2011 05:11 AM

how to forbid dhcp for eth0
 
> when i start the kernel, it wait long time to dhcp for eth0:
> eth0:dhcped 4.0.15 starting
> eth0:waiting for carrier
>
> i want to forbid dhcp,how can i do?
>
> --
> pete_doherty
>

Look at /etc/conf.d/net.example and set a static IP for eth0 or remove
/etc/init.d/net.eth0 (to not start the interface).

Vortex 3 01-14-2011 08:49 AM

how to forbid dhcp for eth0
 
If your eth0 is a wired interface, you could use ifplugd[1] (on portage's sys-apps)*as mentioned on chapter 6 of the gentoo linux x86 handbook [2]. Basically, it keep the interface down while the cable is unplugged, so you won't wait dhcp at startup. Additionally, it will bring it up when you plug the cable (and you could execute other actions like, for example, stop the wireless when you plug the cable). Very easy to use. *

You can found some examples on*/etc/conf.d/net.example
Another useful references could be [3] and [4].


[1]*http://0pointer.de/lennart/projects/ifplugd/[2]*http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=6#doc_chap2
[3]*http://www.gentoo-wiki.info/HOWTO_Wireless_Configuration_and_Startup[4]*http://www.gentoo-wiki.info/Ifplugd



2011/1/14 James L <bjlockie@lockie.ca>

> when i start the kernel, it wait long time to dhcp for eth0:

> eth0:dhcped 4.0.15 starting

> eth0:waiting for carrier

>

> i want to forbid dhcp,how can i do?

>

> --

> pete_doherty

>



Look at /etc/conf.d/net.example and set a static IP for eth0 or remove

/etc/init.d/net.eth0 (to not start the interface).

Norman Rieß 01-14-2011 09:41 AM

how to forbid dhcp for eth0
 
Am 01/14/11 06:33, schrieb doherty pete:
> when i start the kernel, it wait long time to dhcp for eth0:
> eth0:dhcped 4.0.15 starting
> eth0:waiting for carrier
>
> i want to forbid dhcp,how can i do?
>

Hi,

configure a static IP or bring up the interface without configuration
with config_eth0=( "null" )

If you do not want dhcp at all, unmerge dhcpcd.

Regards,
Norman

"Kostya Sha." 01-14-2011 02:39 PM

how to forbid dhcp for eth0
 
On 14.01.2011, at 12:41, Norman Rieß wrote:

> Am 01/14/11 06:33, schrieb doherty pete:
>> when i start the kernel, it wait long time to dhcp for eth0:
>> eth0:dhcped 4.0.15 starting
>> eth0:waiting for carrier
>>
>> i want to forbid dhcp,how can i do?
>>
>
> Hi,
>
> configure a static IP or bring up the interface without configuration
> with config_eth0=( "null" )
>
> If you do not want dhcp at all, unmerge dhcpcd.
>
> Regards,
> Norman
>
lol,
1) What baselayout do you use?
if the second then go to /usr/share/doc/openrc-*/net.example
2) no need to unmerge, you could disable by modules_eth0="!dhcp" (check net.example i'm writing from head)

Valmor de Almeida 01-16-2011 07:22 PM

how to forbid dhcp for eth0
 
On 01/14/2011 10:39 AM, Kostya Sha. wrote:
>
> On 14.01.2011, at 12:41, Norman Rieß wrote:
>
>> Am 01/14/11 06:33, schrieb doherty pete:
>>> when i start the kernel, it wait long time to dhcp for eth0:
>>> eth0:dhcped 4.0.15 starting
>>> eth0:waiting for carrier
>>>
>>> i want to forbid dhcp,how can i do?
>>>
>>
>> Hi,
>>
>> configure a static IP or bring up the interface without configuration
>> with config_eth0=( "null" )
>>
>> If you do not want dhcp at all, unmerge dhcpcd.
>>
>> Regards,
>> Norman
>>
> lol,
> 1) What baselayout do you use?
> if the second then go to /usr/share/doc/openrc-*/net.example
> 2) no need to unmerge, you could disable by modules_eth0="!dhcp" (check net.example i'm writing from head)

As it has been suggested in this list before. Dump all the
/etc/conf.d/net configuration stuff (including removing the
/etc/init.d/net.eth0 and net.wlan0 files) and just use wicd. It will
know when your machine is wired or not and will boot your system without
waiting for eth0.

--
Valmor


All times are GMT. The time now is 09:39 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.