Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2005
    US: Pittsburg, KS

    Inconsistent behavior: Ping.

    I'm hoping there are some 'ping' guru's out there (if such a guru exists) because i've a questoin that has been annoying me for days now. Google doesn't seem to hold the answer, nor do the network admins/developers where i work.

    I made a network utility that pings several hundred addresses, some of which are fed to the utility with a leading zero. For instance:

    Why oh why would linux change to but leave as-is? I've worked around the problem already, but am still stumped as to exactly what it is i had to work around.

  2. #2


    can we see the script?

  3. #3
    Just Joined!
    Join Date
    May 2005
    US: Pittsburg, KS
    I don't think the script is relevant here since executing ping from the command line is how i first observed the funky behavior, but here's the relevant portion of the code:

    // $k is a four digit number, such as 2701 or 1101. These are the unit numbers for stores in a fast food chain that uses mnemonic IP's in its WAN
    $stip1 = substr($k,0,2);
    $stip2 = substr($k,2,2);
    settype($stip1, "integer");
    settype($stip2, "integer");
    exec("ping -c 2 -q 10.$stip1.$stip2.253",$bmtest);
    From the command line, typing:
    ping will return "unknown host"
    ping will return ping results.
    ping will return ping results as

    The strangest thing is that i came in this morning and now gets converted to when pinging it. Nothing has changed on our network since yesterday when i made my post. I guess it isn't too important since setting the script's ip strings to integer does the converting for Suse ES 9, but it had me stumped for days and I just can't let it go. heheh... call me OCD.

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts