about ping and Linux system driver

Rob Landley rob at landley.net
Fri Nov 18 06:52:04 UTC 2005


On Thursday 17 November 2005 23:39, stanliao at globalunichip.com wrote:
> Dear All,
>
> "ping" and "ifconfig" command are two of the functions compiled in the
> busybox at my computer. The linux kernel I use is v2.4.18 and the cross
> compilier is arm-linux-gcc v2.95.3. Whiling configuring Linux, TCP/IP
> system driver is also included. The followings are cut from the execution
> result:
>
> --------------------------------------------
> # ifconfig
> eth0      Link encap:Ethernet  HWaddr 12:03:84:05:06:48
>           inet addr:172.20.18.2  Bcast:172.20.255.255  Mask:255.255.0.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:26 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:100
>           RX bytes:2381 (2.3 KiB)  TX bytes:576 (576.0 B)
>           Interrupt:23 Base address:0x2000

You don't have loopback.

> # ifconfig
> eth0      Link encap:Ethernet  HWaddr 12:03:84:05:06:48
>           inet addr:172.20.18.2  Bcast:172.20.255.255  Mask:255.255.0.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:33 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:100
>           RX bytes:3350 (3.2 KiB)  TX bytes:576 (576.0 B)
>           Interrupt:23 Base address:0x2000

You still don't have loopback.

> # ping 172.20.18.73
> No response from 172.20.18.73

Does this system exist?

> # ping localhost
> ping: localhost: Resolver Error 0 (no error)

You continue not to have loopback, and presumably it's trying to do a dns 
lookup on the name.

> # ping 172.20.18.2
> ping: sendto: Invalid argument

I believe you need root access to ping, since you're sending raw ICMP 
datagrams.  (Normally it's installed suid.)

> # ping 127.0.0.1
> ping: sendto: Network is unreachable
> #
> --------------------------------------------
>
>
> Excuse me, could anyone tell me what next I shall check? Thank you very
> much.

Well, for startrs, ifconfig lo 127.0.0.1 if you want to use loopback.  What 
this has to do with busybox is anybody's guess.

> Best Regards,
> Stan Liao

Rob



More information about the busybox mailing list