Gentoo Archives: gentoo-user

From: Vortex 3 <vortex3@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] how to forbid dhcp for eth0
Date: Fri, 14 Jan 2011 09:51:42
Message-Id: AANLkTikNjEJZ49qNBpwRcdfONLUwkKwv2RM8V_aGafB2@mail.gmail.com
In Reply to: Re: [gentoo-user] how to forbid dhcp for eth0 by James L
1 If your eth0 is a wired interface, you could use ifplugd[1] (on portage's
2 sys-apps) as mentioned on chapter 6 of the gentoo linux x86 handbook [2].
3 Basically, it keep the interface down while the cable is unplugged, so you
4 won't wait dhcp at startup. Additionally, it will bring it up when you plug
5 the cable (and you could execute other actions like, for example, stop the
6 wireless when you plug the cable). Very easy to use.
7
8 You can found some examples on /etc/conf.d/net.example
9
10 Another useful references could be [3] and [4].
11
12 [1] http://0pointer.de/lennart/projects/ifplugd/
13 [2]
14 http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=6#doc_chap2
15 [3] http://www.gentoo-wiki.info/HOWTO_Wireless_Configuration_and_Startup
16 [4] http://www.gentoo-wiki.info/Ifplugd
17
18 <http://0pointer.de/lennart/projects/ifplugd/>
19
20 2011/1/14 James L <bjlockie@××××××.ca>
21
22 > > when i start the kernel, it wait long time to dhcp for eth0:
23 > > eth0:dhcped 4.0.15 starting
24 > > eth0:waiting for carrier
25 > >
26 > > i want to forbid dhcp,how can i do?
27 > >
28 > > --
29 > > pete_doherty
30 > >
31 >
32 > Look at /etc/conf.d/net.example and set a static IP for eth0 or remove
33 > /etc/init.d/net.eth0 (to not start the interface).
34 >
35 >
36 >
37 >