i was pinging a host from a windows machine and made a typo which seemed harmless. the end result was it interpreted my input differently than what I had intended. thinking this was a m$ issue I quickly took the opportunity to poke fun at windows as the senior m$ admin was near by. "look at how brain dead this os is, it can't even do simple math!" He is now looking at my screen scratching his head….. "watch, i'll open a shell on os x and show you how it can add 0 +10" I open a shell on os x, same behavior as windows. " ok so apple is brain dead too, watch, it'll work on linux!" same deal… long story short, it does work as expected on all our hardware routing gear. still not sure what is happening here… osx-gwhynott:~ gwhynott$ ping 10.010.10.1 PING 10.010.10.1 (10.8.10.1): 56 data bytes gwhynott@ops:~$ ping 10.010.10.1 PING 10.010.10.1 (10.8.10.1) 56(84) bytes of data. CORE1>ping 10.010.10.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds: !!!!! anyone happen to know how the OS's are interpreting the 010? doesn't appear work out in base[2-10] (1010,101,22,20,14,13,12,11,10,A) thanks! greg -- This message and any attachments may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this message in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this message may not be that of the organization.
Prefixing the octet with 0 makes it interpret it as octal, not decimal. Pretty typical on a UNIX system. On 11/22/2010 2:52 PM, Greg Whynott wrote:
i was pinging a host from a windows machine and made a typo which seemed harmless. the end result was it interpreted my input differently than what I had intended. thinking this was a m$ issue I quickly took the opportunity to poke fun at windows as the senior m$ admin was near by.
"look at how brain dead this os is, it can't even do simple math!"
He is now looking at my screen scratching his head…..
"watch, i'll open a shell on os x and show you how it can add 0 +10"
I open a shell on os x, same behavior as windows.
" ok so apple is brain dead too, watch, it'll work on linux!"
same deal…
long story short, it does work as expected on all our hardware routing gear. still not sure what is happening here…
osx-gwhynott:~ gwhynott$ ping 10.010.10.1 PING 10.010.10.1 (10.8.10.1): 56 data bytes
gwhynott@ops:~$ ping 10.010.10.1 PING 10.010.10.1 (10.8.10.1) 56(84) bytes of data.
CORE1>ping 10.010.10.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds: !!!!!
anyone happen to know how the OS's are interpreting the 010? doesn't appear work out in base[2-10] (1010,101,22,20,14,13,12,11,10,A)
thanks!
greg
--
This message and any attachments may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this message in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this message may not be that of the organization.
'Octal' (Base-8) :) The leading '0' is telling the box to interpret it as octal instead of decimal or hex. Ken Matlock Network Analyst Exempla Healthcare (303) 467-4671 matlockk@exempla.org -----Original Message----- From: Greg Whynott [mailto:Greg.Whynott@oicr.on.ca] Sent: Monday, November 22, 2010 12:53 PM To: nanog list Subject: non operational question related to IP i was pinging a host from a windows machine and made a typo which seemed harmless. the end result was it interpreted my input differently than what I had intended. thinking this was a m$ issue I quickly took the opportunity to poke fun at windows as the senior m$ admin was near by. "look at how brain dead this os is, it can't even do simple math!" He is now looking at my screen scratching his head..... "watch, i'll open a shell on os x and show you how it can add 0 +10" I open a shell on os x, same behavior as windows. " ok so apple is brain dead too, watch, it'll work on linux!" same deal... long story short, it does work as expected on all our hardware routing gear. still not sure what is happening here... osx-gwhynott:~ gwhynott$ ping 10.010.10.1 PING 10.010.10.1 (10.8.10.1): 56 data bytes gwhynott@ops:~$ ping 10.010.10.1 PING 10.010.10.1 (10.8.10.1) 56(84) bytes of data. CORE1>ping 10.010.10.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds: !!!!! anyone happen to know how the OS's are interpreting the 010? doesn't appear work out in base[2-10] (1010,101,22,20,14,13,12,11,10,A) thanks! greg -- This message and any attachments may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this message in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this message may not be that of the organization.
thanks guys. I should of paid more attention in school. interesting cisco understands what we meant. 8) -g On Nov 22, 2010, at 2:56 PM, Matlock, Kenneth L wrote:
'Octal' (Base-8) :)
The leading '0' is telling the box to interpret it as octal instead of decimal or hex.
Ken Matlock Network Analyst Exempla Healthcare (303) 467-4671 matlockk@exempla.org
-----Original Message----- From: Greg Whynott [mailto:Greg.Whynott@oicr.on.ca] Sent: Monday, November 22, 2010 12:53 PM To: nanog list Subject: non operational question related to IP
i was pinging a host from a windows machine and made a typo which seemed harmless. the end result was it interpreted my input differently than what I had intended. thinking this was a m$ issue I quickly took the opportunity to poke fun at windows as the senior m$ admin was near by.
"look at how brain dead this os is, it can't even do simple math!"
He is now looking at my screen scratching his head.....
"watch, i'll open a shell on os x and show you how it can add 0 +10"
I open a shell on os x, same behavior as windows.
" ok so apple is brain dead too, watch, it'll work on linux!"
same deal...
long story short, it does work as expected on all our hardware routing gear. still not sure what is happening here...
osx-gwhynott:~ gwhynott$ ping 10.010.10.1 PING 10.010.10.1 (10.8.10.1): 56 data bytes
gwhynott@ops:~$ ping 10.010.10.1 PING 10.010.10.1 (10.8.10.1) 56(84) bytes of data.
CORE1>ping 10.010.10.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds: !!!!!
anyone happen to know how the OS's are interpreting the 010? doesn't appear work out in base[2-10] (1010,101,22,20,14,13,12,11,10,A)
thanks!
greg
--
This message and any attachments may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this message in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this message may not be that of the organization.
-- This message and any attachments may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this message in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this message may not be that of the organization.
On Mon, Nov 22, 2010 at 12:56:00PM -0700, Matlock, Kenneth L wrote:
'Octal' (Base-8) :)
The leading '0' is telling the box to interpret it as octal instead of decimal or hex.
My guess you're seeing an interface that uses inet_addr() instead of inet_pton(); the latter is used more nowadays at it supports both IPv4 and IPv6 addressing schemes. Whereas I've seen this behavior with a lot of vendors, I'm tempted to call it a bug: The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004 Edition http://www.opengroup.org/onlinepubs/009695399/functions/inet_ntop.html inet_pton(): If the af argument of inet_pton() is AF_INET, the src string shall be in the standard IPv4 dotted-decimal form: ddd.ddd.ddd.ddd where "ddd" is a one to three digit decimal number between 0 and 255 (see inet_addr()). No mention of dotted quad being anything other than 'decimal', much less getting cute about guessing the radix. The *BSD manpages for inet_pton() call out a similar constraint: http://www.freebsd.org/cgi/man.cgi?query=inet_aton&apropos=0&sektion=0&manpath=FreeBSD+8.1-RELEASE&format=html STANDARDS The inet_ntop() and inet_pton() functions conform to X/Open Networking Services Issue 5.2 (``XNS5.2''). Note that inet_pton() does not accept 1-, 2-, or 3-part dotted addresses; all four parts must be specified and are interpreted only as decimal values. This is a narrower input set than that accepted by inet_aton(). As does Linux(): http://www.kernel.org/doc/man-pages/online/pages/man3/inet_pton.3.html AF_INET src points to a character string containing an IPv4 network address in dotted-decimal format, "ddd.ddd.ddd.ddd", ... RFC 2553 also calls out the non-decimal interpretation as being 'non-standard': http://www.ietf.org/rfc/rfc2553.txt If the af argument is AF_INET, the function accepts a string in the standard IPv4 dotted-decimal form: ddd.ddd.ddd.ddd where ddd is a one to three digit decimal number between 0 and 255. Note that many implementations of the existing inet_addr() and inet_aton() functions accept nonstandard input: octal numbers, hexadecimal numbers, and fewer than four numbers. inet_pton() does not accept these formats. Etc. I've never been happy with inconsistencies in serializing data structures...
Ken Matlock Network Analyst Exempla Healthcare (303) 467-4671 matlockk@exempla.org
-- Brian Reichert <reichert@numachi.com> 55 Crystal Ave. #286 Derry NH 03038-1725 USA BSD admin/developer at large
On Nov 22, 2010, at 2:52 52PM, Greg Whynott wrote:
i was pinging a host from a windows machine and made a typo which seemed harmless. the end result was it interpreted my input differently than what I had intended. thinking this was a m$ issue I quickly took the opportunity to poke fun at windows as the senior m$ admin was near by.
"look at how brain dead this os is, it can't even do simple math!"
He is now looking at my screen scratching his head…..
"watch, i'll open a shell on os x and show you how it can add 0 +10"
I open a shell on os x, same behavior as windows.
" ok so apple is brain dead too, watch, it'll work on linux!"
same deal…
long story short, it does work as expected on all our hardware routing gear. still not sure what is happening here…
osx-gwhynott:~ gwhynott$ ping 10.010.10.1 PING 10.010.10.1 (10.8.10.1): 56 data bytes
gwhynott@ops:~$ ping 10.010.10.1 PING 10.010.10.1 (10.8.10.1) 56(84) bytes of data.
CORE1>ping 10.010.10.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds: !!!!!
anyone happen to know how the OS's are interpreting the 010? doesn't appear work out in base[2-10] (1010,101,22,20,14,13,12,11,10,A)
010 is how C represents an octal number. This one is known in decimal as 8. $ bc bc 1.06 Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. ibase=8 10 8 --Steve Bellovin, http://www.cs.columbia.edu/~smb
On 11/22/2010 02:58 PM, Steven Bellovin wrote:
010 is how C represents an octal number. This one is known in decimal as 8. Obviously, what Greg meant to type was: $ ping 012.0xA.10.1 PING 012.0xA.10.1 (10.10.10.1) 56(84) bytes of data.
M. -- Michael Brown | The true sysadmin does not adjust his behavior Systems Administrator | to fit the machine. He adjusts the machine michael@supermathie.net | until it behaves properly. With a hammer, | if necessary. - Brian
On Mon, Nov 22, 2010 at 3:09 PM, Michael Brown <michael@supermathie.net> wrote:
On 11/22/2010 02:58 PM, Steven Bellovin wrote:
010 is how C represents an octal number. This one is known in decimal as 8. Obviously, what Greg meant to type was: $ ping 012.0xA.10.1 PING 012.0xA.10.1 (10.10.10.1) 56(84) bytes of data.
He was on Windows, so he might have intended: C:\>ping 168430081 Pinging 10.10.10.1 with 32 bytes of data: -Bill -- William D. Herrin ................ herrin@dirtside.com bill@herrin.us 3005 Crane Dr. ...................... Web: <http://bill.herrin.us/> Falls Church, VA 22042-3004
0 as a leading digit on an integer indicate octal... 010 octal is 8 decimal. Owen On Nov 22, 2010, at 11:52 AM, Greg Whynott wrote:
i was pinging a host from a windows machine and made a typo which seemed harmless. the end result was it interpreted my input differently than what I had intended. thinking this was a m$ issue I quickly took the opportunity to poke fun at windows as the senior m$ admin was near by.
"look at how brain dead this os is, it can't even do simple math!"
He is now looking at my screen scratching his head…..
"watch, i'll open a shell on os x and show you how it can add 0 +10"
I open a shell on os x, same behavior as windows.
" ok so apple is brain dead too, watch, it'll work on linux!"
same deal…
long story short, it does work as expected on all our hardware routing gear. still not sure what is happening here…
osx-gwhynott:~ gwhynott$ ping 10.010.10.1 PING 10.010.10.1 (10.8.10.1): 56 data bytes
gwhynott@ops:~$ ping 10.010.10.1 PING 10.010.10.1 (10.8.10.1) 56(84) bytes of data.
CORE1>ping 10.010.10.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds: !!!!!
anyone happen to know how the OS's are interpreting the 010? doesn't appear work out in base[2-10] (1010,101,22,20,14,13,12,11,10,A)
thanks!
greg
--
This message and any attachments may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this message in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this message may not be that of the organization.
See man inet. All numbers supplied as ``parts'' in a `.' notation may be decimal, octal, or hexadecimal, as specified in the C language (i.e., a leading 0x or 0X implies hexadecimal; otherwise, a leading 0 implies octal; other- wise, the number is interpreted as decimal). Note: inet_pton is supposed to only take dotted decimal quad (no leading zeros). This was a design decision Paul and I made at the time. Some OS vendors have incorrectly extended it. Mark In message <0A3857A2-B215-4592-A288-A534D460CEE7@oicr.on.ca>, Greg Whynott writ es:
i was pinging a host from a windows machine and made a typo which seemed ha= rmless. the end result was it interpreted my input differently than what I= had intended. thinking this was a m$ issue I quickly took the opportunit= y to poke fun at windows as the senior m$ admin was near by.
"look at how brain dead this os is, it can't even do simple math!"
He is now looking at my screen scratching his head=85..
"watch, i'll open a shell on os x and show you how it can add 0 +10"
I open a shell on os x, same behavior as windows.
" ok so apple is brain dead too, watch, it'll work on linux!"
same deal=85
long story short, it does work as expected on all our hardware routing gea= r. still not sure what is happening here=85
osx-gwhynott:~ gwhynott$ ping 10.010.10.1 PING 10.010.10.1 (10.8.10.1): 56 data bytes
gwhynott@ops:~$ ping 10.010.10.1 PING 10.010.10.1 (10.8.10.1) 56(84) bytes of data.
CORE1>ping 10.010.10.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds: !!!!!
anyone happen to know how the OS's are interpreting the 010? doesn't appe= ar work out in base[2-10] (1010,101,22,20,14,13,12,11,10,A)
thanks!
greg
--
This message and any attachments may contain confidential and/or privileged= information for the sole use of the intended recipient. Any review or dist= ribution by anyone other than the person for whom it was originally intende= d is strictly prohibited. If you have received this message in error, pleas= e contact the sender and delete all copies. Opinions, conclusions or other = information contained in this message may not be that of the organization.
-- Mark Andrews, ISC 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: marka@isc.org
Mostly the input is done by a library implementing the Posix version of fprintf or fscanf. 10 = 10, 0xa, 012 010 = 8, 0x8, 010 0x10 = 16, 0x10, 020 and there are others. google( fscanf ) Mostly everything understands fscanf syntax. Cheers Peter Greg Whynott wrote:
i was pinging a host from a windows machine and made a typo which seemed harmless. the end result was it interpreted my input differently than what I had intended. thinking this was a m$ issue I quickly took the opportunity to poke fun at windows as the senior m$ admin was near by.
"look at how brain dead this os is, it can't even do simple math!"
He is now looking at my screen scratching his head…..
"watch, i'll open a shell on os x and show you how it can add 0 +10"
I open a shell on os x, same behavior as windows.
" ok so apple is brain dead too, watch, it'll work on linux!"
same deal…
long story short, it does work as expected on all our hardware routing gear. still not sure what is happening here…
osx-gwhynott:~ gwhynott$ ping 10.010.10.1 PING 10.010.10.1 (10.8.10.1): 56 data bytes
gwhynott@ops:~$ ping 10.010.10.1 PING 10.010.10.1 (10.8.10.1) 56(84) bytes of data.
CORE1>ping 10.010.10.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds: !!!!!
anyone happen to know how the OS's are interpreting the 010? doesn't appear work out in base[2-10] (1010,101,22,20,14,13,12,11,10,A)
thanks!
greg
--
This message and any attachments may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this message in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this message may not be that of the organization.
-- Peter and Karin Dambier Cesidian Root - Radice Cesidiana Rimbacher Strasse 16 D-69509 Moerlenbach-Bonsweiher +49(6209)795-816 (Telekom) +49(6252)750-308 (VoIP: sipgate.de) mail: peter@peter-dambier.de http://www.peter-dambier.de/ http://iason.site.voila.fr/ https://sourceforge.net/projects/iason/ ULA= fd80:4ce1:c66a::/48
On Mon, 22 Nov 2010, Greg Whynott wrote:
osx-gwhynott:~ gwhynott$ ping 10.010.10.1 PING 10.010.10.1 (10.8.10.1): 56 data bytes
You're entering land of weird, misdocumentation and bugs. http://seclists.org/nanog/2010/Feb/285 --------- typedef struct me_s { char name[] = { "Thomas Habets" }; char email[] = { "thomas@habets.pp.se" }; char kernel[] = { "Linux" }; char *pgpKey[] = { "http://www.habets.pp.se/pubkey.txt" }; char pgp[] = { "A8A3 D1DD 4AE0 8467 7FDE 0945 286A E90A AD48 E854" }; char coolcmd[] = { "echo '. ./_&. ./_'>_;. ./_" }; } me_t;
participants (12)
-
Brian Reichert
-
David Coulson
-
Greg Whynott
-
James Downs
-
Mark Andrews
-
Matlock, Kenneth L
-
Michael Brown
-
Owen DeLong
-
Peter Dambier
-
Steven Bellovin
-
Thomas Habets
-
William Herrin