Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Recently I saw an incorrectly typed telnet command, and I saw that "regular" numbers were interpreted to IP addresses. I tried this myself in Windows and the same behavior is shown there, so obviously this is an acceptable way of typing IP addresses. I'm just wondering if someone can explain how this works, and if there are any real world applications for it (i.e. when would this way be better/simpler?).

I seem to see a pattern here but I still can't quite figure out why you would ever type addresses this way:

>ping 255
Pinging with 32 bytes of data:
PING: transmit failed. General failure.

>ping 256
Pinging with 32 bytes of data:
PING: transmit failed. General failure.

>ping 257
Pinging with 32 bytes of data:
PING: transmit failed. General failure.

>ping 16581375
Pinging with 32 bytes of data:

>ping 1658137511
Pinging with 32 bytes of data:
Reply from bytes=32 time=170ms TTL=47
share|improve this question

marked as duplicate by grawity, JdeBP, Tog, Heptite, Kevin Panko Feb 19 '14 at 4:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Since IP adresses are represented as "normal" numbers inside the computer it's quite normal to be able to represent it as a "normal" number in the input.

In IPv4 an address consists of 32 bits which limits the address space to 4294967296 (232) possible unique addresses. IPv4 reserves some addresses for special purposes such as private networks (~18 million addresses) or multicast addresses (~270 million addresses).

IPv4 addresses are canonically represented in dot-decimal notation, which consists of four decimal numbers, each ranging from 0 to 255, separated by dots, e.g., Each part represents a group of 8 bits (octet) of the address. In some cases of technical writing, IPv4 addresses may be presented in various hexadecimal, octal, or binary representations.

Use cases for this would probably mainly be if you got an unformatted output of an IP adress from some software.

share|improve this answer
All right, so typing is just another way of typing 3 * 256 + 255, and the fact that we type IP-addresses the way we do is just "canonical", it could be written any way we want really? – pzkpfw Feb 17 '14 at 14:42
Exactly! It's a really smart way of helping us remember the number. It organizes it into small chunks that are easy to remember and it sets up easy to remember bounds like 192.168.x.x – Zalastax Feb 17 '14 at 14:46
Though the dot notation does increase the number of characters by a staggering ~150%. Imagine all the wasted bandwidth and storage space :) – Roger Dahl Feb 17 '14 at 18:37
@RogerDahl, when they are used on the wire they are in the 32 bit integer form. Many applications store them in the 32 bit integer form. – Zoredache Feb 17 '14 at 19:25

Not the answer you're looking for? Browse other questions tagged .