networking with busybox

Waldemar Brodkorb wbx at openadk.org
Sat Apr 24 16:28:36 UTC 2010


Hi,
brandlk at Mathematik.Uni-Marburg.de wrote,

> Hello,
> 
> I would like to use busybox in a custom initramfs environment, where some
> networking tasks need to be done. This includes:
> - requesting an ip address from a dhcp server
> - resolving some hostnames (not necessarily through a nameserver - could
> be statically via a hosts file)
> - run some services
> All should run within a xen domU.
> 
> Can this be achieved with the busybox tools?
> As far, I have built a complete busybox binary (statically linked) and got
> an ash running within the initramfs. I can assign a static address to my
> eth0 interface, 

Can you then ping your DHCP server, after assigning a static IP?

If yes, you might forgotten to configure your kernel with 
CONFIG_PACKET=y, which is needed to get DHCP working on your client.

> but udhcpc doesn't get any ip address from the dhcp
> server. Do I have to load some kernel module to get the card working? Atm,
> there are no additional modules loaded...
> In the busybox FAQ I read something about libc nss modules, do I need them?

When you successfully get an ip address and later have problems with
DNS, you might need libnss_* libraries, if your busybox program is
linked against glibc. You might considering building your busybox
library against uClibc to avoid this.
 
> Would be great, if someone could help me out with some ideas.

have fun,
        Waldemar


More information about the busybox mailing list