udhcpc is failing

Denys Vlasenko vda.linux at googlemail.com
Tue Oct 21 12:53:07 UTC 2008


On Monday 20 October 2008 06:10:45 pm Renuka Pampana wrote:
> Hi All,
> 
> I have installed udhcpc in my system. After 7 or 8 reboot of my linux
> system the udhcpc fails,  showing "No lease failing" but when I reboot
> or plugin or plug out cable the dhcp works fine.
> What could be the issue. Is the issue with lease

The issue is that you use udhcpc with option -n.
When it fails to obtain the lease quick enough,
it exits:

$ busybox udhcpc --help
BusyBox v1.13.0.svn (2008-10-21 14:13:38 CEST) multi-call binary

Usage: udhcpc [-Cfbnqtvo] [-c CID] [-V VCLS] [-H HOSTNAME] [-i INTERFACE]
        [-p pidfile] [-r IP] [-s script] [-O dhcp-option]...

        -V,--vendorclass=CLASSID        Vendor class identifier
        -i,--interface=INTERFACE        Interface to use (default eth0)
        -H,-h,--hostname=HOSTNAME       Client hostname
        -c,--clientid=CLIENTID  Client identifier
        -C,--clientid-none      Suppress default client identifier
        -p,--pidfile=file       Create pidfile
        -r,--request=IP         IP address to request
        -s,--script=file        Run file at DHCP events (default /usr/share/udhcpc/default.script)
        -t,--retries=N          Send up to N request packets
        -T,--timeout=N          Try to get a lease for N seconds (default 3)
        -A,--tryagain=N         Wait N seconds (default 20) after failure
        -O,--request-option=OPT Request DHCP option OPT (cumulative)
        -o,--no-default-options Do not request any options (unless -O is also given)
        -f,--foreground Run in foreground
        -b,--background Background if lease is not immediately obtained
        -S,--syslog     Log to syslog too
        -n,--now        Exit with failure if lease is not immediately obtained
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        -q,--quit       Quit after obtaining lease
        -R,--release    Release IP on quit
        -a,--arping     Use arping to validate offered address

If you don't want this to happen, don't use -n.
--
vda



More information about the busybox mailing list