IP addresses, Classful Addresses and CIDR
Understanding IP Addresses, Classful Addressing, and CIDR
1. What is an IP Address?
An IP address (Internet Protocol address) is a unique identifier assigned to a device on a network. It allows devices to locate and communicate with each other.
The most common format (IPv4) looks like this:
| Decimal | 192.168.1.10 |
| Binary | 11000000.10101000.00000001.00001010 |
This is a 32-bit number, divided into four 8-bit sections called octets. Each octet ranges from 0 to 255.
Two Key Parts of an IP Address
Every IP address consists of two parts:
- Network portion – identifies the network
- Host portion – identifies a device within that network
The key concept is that a device must be on the same network as another device to communicate with it directly.
For example, if a device is on the network 192.168.250.X, it can communicate directly with other devices on 192.168.250.X. However, it cannot directly communicate with devices on networks such as 192.168.251.X or 192.0.250.X.
The boundary between the network and host portions of an IP address is defined by the subnet mask.
2. Subnet Masks
A subnet mask determines which part of the IP address refers to the network and which part refers to the host.
Example:
Subnet Mask: 255.255.255.0
This means:
-
192.168.1→ Network -
.10→ Host
3. Classful Addressing
Before modern networking, IP addresses were divided into fixed classes. This is known as classful addressing.
The Main Classes
Class |
First Octet Range | Subnet Mask | Number of Hosts | Typical Use |
|---|---|---|---|---|
A |
1 – 126 | 255.0.0.0 (/8) | 16,777,216 | Very large networks |
B |
128 – 191 | 255.255.0.0 (/16) | 65,536 | Medium networks |
C |
192 – 223 | 255.255.255.0 (/24) | 256 | Small networks |
Class A Example
Mask: 255.0.0.0
- Network:
10 - Hosts:
0.0.1
Note that the first octet (10) is between 1-126.
Class B Example
Mask: 255.255.0.0
- Network:
172.16 - Hosts:
5.10
Note that the first octet (172) is between 128-191.
Class C Example
Mask: 255.255.255.0
- Network:
192.168.1 - Host:
.10
Note that the first octet (192) is between 192-223.
Limitations of Classful Addressing
Classful networking is simple but inefficient:
-
Wasted IP space
- A Class A network supports ~16 million hosts (far too large for most cases)
- A Class B network supports ~65 thousand hosts (still to large for most cases)
- A Class C network supports only 254 hosts (often too small)
-
No flexibility
- You couldn’t choose a subnet size between classes
4. CIDR (Classless Inter-Domain Routing)
Classful addressing only allows the network and host portions of an IP address to be defined in fixed 8-bit increments (i.e., by octet). This lack of flexibility often leads to inefficient use of IP address space.
To overcome these limitations, CIDR (Classless Inter-Domain Routing) was introduced.
CIDR removes the restriction of fixed class boundaries and allows networks to be defined using any number of bits for the network portion. Instead of being limited to 8, 16, or 24 bits, you can specify a network prefix of any length between 1 and 32 bits.
This enables much more efficient allocation of IP addresses, as subnet sizes can be tailored to match the exact requirements of a network.
CIDR Notation
CIDR uses a suffix like:
192.168.1.10/24
The /24 means:
- The first 24 bits are the network portion
- Equivalent subnet mask:
255.255.255.0
Common CIDR Examples
| CIDR | Subnet Mask | Number of Hosts |
|---|---|---|
| /8 | 255.0.0.0 | ~16 million |
| /20 | 255.255.240.0 | 4096 |
| /24 | 255.255.255.0 | 254 |
| /28 | 255.255.255.240 | 14 |
| /30 | 255.255.255.252 | 2 |
Example: Flexible Subnetting
Instead of being forced into classful subnet like Class C:

You can create more versatile subnets:


This is especially useful for:
5. Mask Compatibilty
In classful addressing, subnet masks were tied directly to the IP address class. For example:
- Class A →
/8(255.0.0.0) - Class B →
/16(255.255.0.0) - Class C →
/24(255.255.255.0)
CIDR
With CIDR, this restriction no longer applies.
Any IP address can use any subnet mask, regardless of its original class.
For example:
-
192.168.1.1/24→ traditional Class C-sized network -
192.168.1.1/28→ smaller subnet carved from the same range -
10.0.0.1/24→ Class A address using a Class C-sized subnet -
192.168.1.1/8→ Class C address using a Class A-sized subnet -
172.16.0.1/20→ Class B address using a custom subnet size
CIDR Compatibility
Support for CIDR can vary depending on the PLC platform.
- The NX and NJ series PLCs natively support CIDR, allowing flexible subnet masks to be configured directly.
- The CP1L-E does not support CIDR, and instead operates using classful addressing only.
- On the CS and CJ series CIDR is supported by EtherNet/IP Units or built-in EtherNet/IP ports with unit version 2.0 or later, except for the CS1W/CJ1W-EIP21S. The CJ1W-EIP21S and CS1W-EIP21S support the function from version 1.0. CIDR must be enabled manually on ETN21 cards. ETN11 cards do not support CIDR.