udhcpc
/********************************************* * dhcpc * dhcpc是dhcp的客户端,在busybox中实现。今天正好了解一下。 * Tony, 2016-5-20, Shenzhen ********************************************/ udhcpc -b -i eth0 -p /var/run/udhcpc.pid -R & -b:后台运行 -i:指定接口 -p:pid文件 -R:关闭udhcpc时,可以向dhcpserver发送release取消租约 Usage: udhcpc [-Cfbnqtvo] [-c CID] [-V VCLS] [-H HOSTNAME] [-i INTERFACE] [-p pidfile] [-r IP] [-s script] [-O dhcp-option]... [-P N] -V CLASSID Vendor class identifier -i INTERFACE Interface to use (default: eth0) -H,-h HOSTNAME Client hostname -c CLIENTID Client identifier -C Suppress default client identifier -p file Create pidfile -r IP IP address to request -s file Run file at DHCP events (default /usr/share/udhcpc/default.script) -t N Send up to N request packets -T N Try to get a lease for N seconds (default 3) -A N Wait N seconds (default 20) after failure -O OPT Request DHCP option OPT (cumulative) -o Do not request any options (unless -O is also given) -f Run in foreground -b Background if lease is not immediately obtained -S Log to syslog too -n Exit with failure if lease is not immediately obtained -q Quit after obtaining lease -R Release IP on quit -P N Use port N instead of default 68 -a Use arping to validate offered address