[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ping: invalid argument



--- Jonas Meurer <jonas@freesources.org> wrote:

> On 05/02/2007 Max Hyre wrote:
> >    Dear Debianists:
> > 
> >    Between two successive calls to ping, it
> crapped out.
> > (Tried twice in a row because I had a flaky DSL
> connection,
> > and wanted to see whether it had decided to join
> the party.)
> > 
> > ==============================
> > root@elmore:~# ifup eth0
> >     <snip>
> > DHCPACK from 192.168.0.1
> > bound to 192.168.1.64 -- renewal in 14 seconds.
> > root@elmore:~# ping -n 1 www.debian.org
> > ping: unknown host www.debian.org
> > root@elmore:~# ping -n 1 www.debian.org
> > connect: Invalid argument
> > ==============================
> 
> I guess that the problem is '-n 1'. According to the
> ping manpage, the
> option '-n' takes no argument:
> 
>   -n	Numeric output only.  No attempt will be made
> to
>   	lookup symbolic names for host addresses.
> 
> resivo:~# ping -n 1 www.debian.org
> connect: Invalid argument
> 
> resivo:~# ping -n www.debian.org
> PING www.debian.org (194.109.137.218) 56(84) bytes
> of data.
> 64 bytes from 194.109.137.218: icmp_seq=1 ttl=56
> time=27.9 ms
> 
> ...
>  jonas
> 

I believe you have confused between ping on windows
and ping on linux. Altough on both operating system
ping is used in, generally, the same purpose, but it
takes different parameters.

On windows :
===================================================
F:\Tools>ping /?

Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i
TTL] [-v TOS]
            [-r count] [-s count] [[-j host-list] |
[-k host-list]]
            [-w timeout] target_name

Options:
    -t             Ping the specified host until
stopped.
                   To see statistics and continue -
type Control-Break;
                   To stop - type Control-C.
    -a             Resolve addresses to hostnames.
    -n count       Number of echo requests to send.
    -l size        Send buffer size.
    -f             Set Don't Fragment flag in packet.
    -i TTL         Time To Live.
    -v TOS         Type Of Service.
    -r count       Record route for count hops.
    -s count       Timestamp for count hops.
    -j host-list   Loose source route along host-list.
    -k host-list   Strict source route along
host-list.
    -w timeout     Timeout in milliseconds to wait for
each reply.


F:\Tools>
=====================================================


On Linux : 
=================================================
brad_brock@leonhart:~$ ping -h
Usage: ping [-LRUbdfnqrvVaA] [-c count] [-i interval]
[-w deadline]
            [-p pattern] [-s packetsize] [-t ttl] [-I
interface or address]
            [-M mtu discovery hint] [-S sndbuf]
            [ -T timestamp option ] [ -Q tos ] [hop1
...] destination
=================================================

It is the output from Windows and Linux on ping.
Please remark on option -n on both output.

This is taken from manual ping on Linux about -n
option :
       -n     Numeric output only.  No attempt will be
made to lookup symbolic
              names for host addresses.



 
____________________________________________________________________________________
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121



Reply to: