Please Whitelist This Site?

I know everyone hates ads. But please understand that I am providing premium content for free that takes hundreds of hours of time to research and write. I don't want to go to a pay-only model like some sites, but when more and more people block ads, I end up working for free. And I have a family to support, just like you. :)

If you like The TCP/IP Guide, please consider the download version. It's priced very economically and you can read all of it in a convenient format without ads.

If you want to use this site for free, I'd be grateful if you could add the site to the whitelist for Adblock. To do so, just open the Adblock menu and select "Disable on tcpipguide.com". Or go to the Tools menu and select "Adblock Plus Preferences...". Then click "Add Filter..." at the bottom, and add this string: "@@||tcpipguide.com^$document". Then just click OK.

Thanks for your understanding!

Sincerely, Charles Kozierok
Author and Publisher, The TCP/IP Guide


NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.

The Book is Here... and Now On Sale!

Get The TCP/IP Guide for your own computer.
The TCP/IP Guide

Custom Search







Table Of Contents  The TCP/IP Guide
 9  TCP/IP Lower-Layer (Interface, Internet and Transport) Protocols (OSI Layers 2, 3 and 4)
      9  TCP/IP Internet Layer (OSI Network Layer) Protocols
           9  Internet Protocol (IP/IPv4, IPng/IPv6) and IP-Related Protocols (IP NAT, IPSec, Mobile IP)
                9  Internet Protocol Version 4 (IP, IPv4)
                     9  IP Addressing
                          9  IP "Classful" (Conventional) Addressing

Previous Topic/Section
IP "Classful" Addressing Overview and Address Classes
Previous Page
Pages in Current Topic/Section
1
2
3
Next Page
IP Address Class A, B and C Network and Host Capacities
Next Topic/Section

IP "Classful" Addressing Network and Host Identification and Address Ranges
(Page 2 of 3)

Determining Address Class From the First Octet Bit Pattern

As humans, of course, we generally work with addresses in dotted decimal notation and not in binary, but it's pretty easy to see the ranges that correspond to the classes. For example, consider class B. The first two bits of the first octet are “10”. The remaining bits can be any combination of ones and zeroes. This is normally represented as “10xx xxxx” (shown as two groups of four for readability.) Thus, the binary range for the first octet can be from “1000 0000” to “1011 1111”. This is 128 to 191 in decimal. So, in the “classful” scheme, any IP address whose first octet is from 128 to 191 (inclusive) is a class B address.

In Table 44 I have shown the bit patterns of each of the five classes, and the way that the first octet ranges can be calculated. In the first column is the format for the first octet of the IP address, where the “x”s can be either a zero or a one. Then I show the lowest and highest value for each class in binary (the “fixed” few bits are highlighted so you can see that they do not change while the others do.) I then also show the corresponding range for the first octet in decimal.


Table 44: IP Address Class Bit Patterns, First-Octet Ranges and Address Ranges

IP Address Class

First Octet of IP Address

Lowest Value of First Octet (binary)

Highest Value of First Octet (binary)

Range of First Octet Values (decimal)

Octets in Network ID / Host ID

Theoretical IP Address Range

Class A

0xxx xxxx

0000 0001

0111 1110

1 to 126

1 / 3

1.0.0.0 to 126.255.255.255

Class B

10xx xxxx

1000 0000

1011 1111

128 to 191

2 / 2

128.0.0.0 to 191.255.255.255

Class C

110x xxxx

1100 0000

1101 1111

192 to 223

3 / 1

192.0.0.0 to 223.255.255.255

Class D

1110 xxxx

1110 0000

1110 1111

224 to 239

224.0.0.0 to 239.255.255.255

Class E

1111 xxxx

1111 0000

1111 1111

240 to 255

240.0.0.0 to 255.255.255.255


Key Concept: In the “classful” IP addressing scheme, the class of an IP address is identified by looking at the first one, two, three or four bits of the address. This can be done both by humans working with these addresses and routers making routing decisions. The use of these bit patterns means that IP addresses in different classes fall into particular address ranges that allow an address’s class to be determined by looking at the first byte of its dotted-decimal address.



Previous Topic/Section
IP "Classful" Addressing Overview and Address Classes
Previous Page
Pages in Current Topic/Section
1
2
3
Next Page
IP Address Class A, B and C Network and Host Capacities
Next Topic/Section

If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



Home - Table Of Contents - Contact Us

The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005

© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.