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
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