Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

IP address rules for each octet

Writer Emily Wong

This Wikipedia article on IPv4 addresses states the valid range for each octet is 0-255. However, when I enter a number that is deliberately out-of-range on my Windows 7 PC, the valid range is notified as 1-223 (not 0-255) for the 1st octet of my IP address:

IPv4 first octet error message

This applies to the first octet of IP address, Default gateway, Preferred DNS sever and Alternate DNS server, but not Subnet mask. All other octets allow 0-255. We have some Windows CE 6.0 machines on-site and these allow 0-255 for all octets.

  • Why does my Windows 7 machine report a valid range of 1-223 for the 1st octet only and why different to Windows CE?
  • What are the rules for IP address octets?
  • In writing a technical blog on IP settings, is it safe to assume a valid range of 0-255 (and ignore obscure restrictions) or should I be more subtle and cover some of the exceptions?

NB! I am not interested in whether the entered IP address will actually work...only the low-level rules for entering them in the first place!

Note: I asked our IT department. They did not know the answers and just directed me to Wikipedia!

2 Answers

An IPv4 address is just a 32-bit number, e.g. 00001010000010110000110000001101. The decimal octet notation is just to make it easier for humans to read. Each octet is 8 bits, e.g. 00001010.00001011.00001100.00001101, which is then converted to decimal numbers (10.11.12.13). Since 8 bits can represent the numbers from 0 to 255, each octet can on have a number in that range.

The is nothing special or magical about the octet boundaries; they are artificial. Thinking of IPv4 addresses in terms of the textual representation (decimal octets) can really get you into some convoluted thinking and lead to errors. The computer and the network equipment only ever see and use the binary number. Many networking students want to manipulate IPv4 addresses without converting to binary first, and that is a path to failure.

The valid unicast IPv4 addresses go up to 223.255.255.255. Addresses larger than that are multicast addresses (begin with 1110 as the first four bits of the address = 224.0.0.0 to 239.255.255.255) or reserved (begin with 1111 as the first four bits of the address = 240.0.0.0 to 255.255.255.255). The address 255.255.255.255 is the limited broadcast address.

RFC 5735, Special Use IPv4 Addresses has a summary of the IPv4 special use addresses.

2

1-223 covers Class A/B/C networks, which are what your PC will use.

224+ is for Class D (Multicasting) and Class E (not used) networks, neither of which are appropriate for a Windows PC.

Webopedia article on IP Addressing

5

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy