[BusyBox] dhcp
ssaguiar at brturbo.com.br
ssaguiar at brturbo.com.br
Fri May 13 19:48:10 MDT 2005
Dear friends:
I am trying to make the busybox's dhcp client work but I am experimenting some problems.
The dhcp client picks the data for the resolv.conf file and creates it.
Even in this case, my Linux box can't find any address in internet. However it works for the ip.
If I try, by example, to ping www.google.com, I get the message :
# ping: www.google.com: Unknown host
This happens for all domains, but if I ping by the ip, it ok.
My configuration files are below.
As I could not find any tutorial or manual about this dhcp client, I am trying to have some help from you.
The file default.script, I found in the busybox list.
Thanks very much for any help.
File /etc/nsswith.conf :
passwd: files
shadow: files
group: files
hosts: files dns
protocols: files
rpc: files
services: files
File /etc/host.conf:
order hosts,bind
multi on
File /etc/resolv.conf (this file is generated on the fly by the dhcp client):
domain lan
nameserver 10.0.0.138
File /etc/init.d/rcS :
#! /bin/sh
/bin/mount -a
/bin/hostname My-Linux
/bin/mount -o remount,rw /
ifconfig eth0 0.0.0.0
/sbin/udhcpc -n -q -s /usr/share/udhcpc/default.script
ifconfig lo 127.0.0.1
inetd
File /usr/share/udhcpc/default.script:
#!/bin/sh
# Sample udhcpc renew script
RESOLV_CONF="/etc/resolv.conf"
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
[ -n "$subnet" ] && NETMASK="netmask $subnet"
/sbin/ifconfig $interface $ip $BROADCAST $NETMASK
if [ -n "$router" ]
then
echo "deleting routers"
while /sbin/route del default gw 0.0.0.0 dev $interface
do :
done
metric=0
for i in $router
do
/sbin/route add default gw $i dev $interface metric $((metric++))
done
fi
echo -n > $RESOLV_CONF
[ -n "$domain" ] && echo domain $domain >> $RESOLV_CONF
for i in $dns
do
echo adding dns $i
echo nameserver $i >> $RESOLV_CONF
done
More information about the busybox
mailing list