* [Buildroot] udhcpc when link is up
@ 2012-04-04 15:33 Charles Krinke
2012-04-04 19:18 ` Peter Korsgaard
0 siblings, 1 reply; 4+ messages in thread
From: Charles Krinke @ 2012-04-04 15:33 UTC (permalink / raw)
To: buildroot
I have another noob question concerning dhcp this time.
I observer with our MPC8323 system that if the system is booted with
the network cable disconnected and after boot the cable is connected,
I get the proper "Link is Up" message, but dhcp does not request a
lease.
If I run "udhcpc", the network is then setup properly, but I would
like "Link is Up:" to trigger udhcpc. I do not see a script in
/etc/udhcpc/default.script.
Can someone point this "noob for the day" in an appropriate direction
to understand how to cause "Link is Up" to properly obtain a lease,
please?
--
Charles Krinke
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] udhcpc when link is up
2012-04-04 15:33 [Buildroot] udhcpc when link is up Charles Krinke
@ 2012-04-04 19:18 ` Peter Korsgaard
2012-04-05 20:23 ` Charles Krinke
0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2012-04-04 19:18 UTC (permalink / raw)
To: buildroot
>>>>> "Charles" == Charles Krinke <charles.krinke@gmail.com> writes:
Charles> I have another noob question concerning dhcp this time.
Charles> I observer with our MPC8323 system that if the system is booted with
Charles> the network cable disconnected and after boot the cable is connected,
Charles> I get the proper "Link is Up" message, but dhcp does not request a
Charles> lease.
Charles> If I run "udhcpc", the network is then setup properly, but I would
Charles> like "Link is Up:" to trigger udhcpc. I do not see a script in
Charles> /etc/udhcpc/default.script.
Charles> Can someone point this "noob for the day" in an appropriate direction
Charles> to understand how to cause "Link is Up" to properly obtain a lease,
Charles> please?
Have a look at ifplugd (either the standalone version or the busybox
applet). It monitors the network interface and runs ifup on link.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] udhcpc when link is up
2012-04-04 19:18 ` Peter Korsgaard
@ 2012-04-05 20:23 ` Charles Krinke
2012-04-05 21:10 ` Peter Korsgaard
0 siblings, 1 reply; 4+ messages in thread
From: Charles Krinke @ 2012-04-05 20:23 UTC (permalink / raw)
To: buildroot
I guess my "noobness hat" must be worn a second day in that I look at
ifplugd and dont quite see the issue. Admiteddly the "noobness hat" is
worn because I spend most of my time in u-boot and the kernel, but
that is only an excuse.
From the target:
# ifplugd -h //runs, displays help, leads me to /etc/ifplugd/ifplugd.conf
# cat /etc/ifplugd/ifplugd.conf
ARGS="-fI -u0 -d10"
INTERFACES="eth0"
If eth0 is plugged in when the system is started with
/etc/network/interfaces specifying "dhcp", I see the "sending
discover" and get a ipAddress, netmask, gateway and DNS.
If eth0 is "not" plugged in when the system is started and I plug in
the cable after the system gets to a bash prompt, I can see the "Link
is up" message, but, no "sending discover" and hence the eth0
interface is not configured.
I can trigger dhcp with
# udhcpc
and everything works fine, but somehow, ifplugd (or something else) is
not able to key off the "Link is Up" and get me to the next stage.
So, I am asking for a bit more advice, up to and including
"http://ifplugdForDummies.biz" or "http://ReadThisManualDummy.uggh"
Charles Krinke
On Wed, Apr 4, 2012 at 12:18 PM, Peter Korsgaard <jacmet@uclibc.org> wrote:
>>>>>> "Charles" == Charles Krinke <charles.krinke@gmail.com> writes:
>
> ?Charles> I have another noob question concerning dhcp this time.
> ?Charles> I observer with our MPC8323 system that if the system is booted with
> ?Charles> the network cable disconnected and after boot the cable is connected,
> ?Charles> I get the proper "Link is Up" message, but dhcp does not request a
> ?Charles> lease.
>
> ?Charles> If I run "udhcpc", the network is then setup properly, but I would
> ?Charles> like "Link is Up:" to trigger udhcpc. I do not see a script in
> ?Charles> /etc/udhcpc/default.script.
>
> ?Charles> Can someone point this "noob for the day" in an appropriate direction
> ?Charles> to understand how to cause "Link is Up" to properly obtain a lease,
> ?Charles> please?
>
> Have a look at ifplugd (either the standalone version or the busybox
> applet). It monitors the network interface and runs ifup on link.
>
> --
> Bye, Peter Korsgaard
--
Charles Krinke
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] udhcpc when link is up
2012-04-05 20:23 ` Charles Krinke
@ 2012-04-05 21:10 ` Peter Korsgaard
0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2012-04-05 21:10 UTC (permalink / raw)
To: buildroot
>>>>> "Charles" == Charles Krinke <charles.krinke@gmail.com> writes:
Charles> I guess my "noobness hat" must be worn a second day in that I look at
Charles> ifplugd and dont quite see the issue. Admiteddly the "noobness hat" is
Charles> worn because I spend most of my time in u-boot and the kernel, but
Charles> that is only an excuse.
Have you read http://0pointer.de/lennart/projects/ifplugd/ ?
There isn't much to it. You have to remove the 'auto eth0' line from
/etc/network/interfaces so /etc/init.d/S40network doesn't try to run
udhcpc at bootup. With ifplugd running it will execute
/etc/ifplugd/ifplugd.action <iface> <up|down> whenever it detects a link
change. By default this script will simply call ifup <iface> / ifdown
<iface>.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-05 21:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-04 15:33 [Buildroot] udhcpc when link is up Charles Krinke
2012-04-04 19:18 ` Peter Korsgaard
2012-04-05 20:23 ` Charles Krinke
2012-04-05 21:10 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox