Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bad IP address on LAN (160.80.8.013 for ex)

Status
Not open for further replies.

CHM1

Technical User
Oct 27, 2000
81
FR
On my LAN I have a station with IP Address 160.80.8.13...
On a UNIX server in /etc/hosts I have a line :
ST01 160.80.8.013
When form this server I type
ping ST01
I get a message saying me "pinging 160.80.8.11" !

I thought that left zeros where not significant in dotted decimal IP addresses, but obviously when I type 013 the address is converted in pseudo octal form (1*8 + 3 = 11).
Could anybody give me the explanation (I can't find it the litterature about dotted decimal IP address)?

More curious : if the address typed is 160.80.8.019, I am trying to ping 160.80.8.17 (1*8+9 , so it's not really Octal because 9 is not an octal digit.

I get the same when I try to ping with DOS command, so I think this is always implemented the same on different UNIX or other OS.

Thanks
 
CHM1,

I thought this was rubbish :) - until I tried it !
On Win2000 machine edited the hosts files with same result as you.

I've got some heavy duty TCP/IP texts at home I'll look this up when get chance.

Very interesting........

Cheers
 
Hey guy's I have no idea on this one (that's why I left it alone) let me know what you find out, this will be an interesting one....

david e
*end users are just like computers, some you can work with...others just need a simple reBOOTing to fix their problems.*
 
Well I'm amazed by this, never had a clue but I'll store it away for a rainy day!
 
Hi Guys,
It works properly on OS/2.
Interprete properly and not like octal...
I guess its problem with NT... I don't know....
Its interesting
 
Wow....I've never heard of this before either. I tried it on my Win2k PC and pinged 127.0.0.013. It said pinging 127.0.0.11. That's funny.

You're right...we learn something new everyday. I'm passing this one around.
 
Thanks for all your posts !
I think the problem was not very important, but it was a little bit teasing me. And it took me an afternoon with my friend to see what was really happening : on his PC he typed 013 and on my PC I typed 13; never seeing the zero we determined erroneously his PC had a problem but which one ?...
PS : I don't know C Language, but i think i'd better learn it...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top