The IPv4 address (also referred to as IP address below for short) – also sometimes referred to in technical publications as the Internet address or, to differentiate it from IPv6, as IPv4 – is a processor address that is unique throughout the network. The 32-bit IP address consists of four fields in “dotted decimal notation”, i.e. each is separated by a dot (e.g., 164.13.58.63), and is split into
the network ID and
the host ID.
Bit 1 8 | 9 16 | 17 24 | 25 32 | Address type | |
0 | Network ID | Host ID | Class A | ||
10 | Network ID | Host ID | Class B | ||
110 | Network ID | Host ID | Class C | ||
1110 | Multicast address | Class D |
IPv4 address types
Address types
Depending on the type and size of the network, TCP/IP offers four different unicast address types with network IDs and host IDs which may sometimes be of different lengths. To provide routing support, bits 1-3 of the network ID define how the address is split into the network ID and host ID. This results in a maximum of 16 million addressable hosts for address type A, whereas 254 addressable hosts are available for type C. The multicast addressing for addressing a group of end systems uses address type D. This address type makes it possible to define logical processor groups by using the IGMP protocol.
Broadcast addressing
IP also permits broadcast addressing in order to address all the end systems. It is possible either to address all the IP computers (“Limited Broadcast”: 255.255.255.255), or to address all the IP computers within a given network (“Directed Net Broadcast”: e.g. 139.22.255.255).
Subnet mask
The host ID can be optionally split again to support the routing function in larger subnetworks. This division can have an organizational or geographic basis, for example. The host ID is subdivided into the subnet ID and host ID by specifying the IP subnetwork mask (see, for example, the command BCIN IPSNMASK – generating LAN nodes dynamically – or CREATE-NODE < >,IP-SUBNET-MASK=...). Specification of the subnetwork mask defines the implementation of subnetwork routing in this network, as well as providing information on the number of possible subnetworks and the computers they contain.
Bit 1 8 | 9 16 | 17 24 | 25 32 | Add. type | |
0 | Network ID | Subnet ID | Host ID | Class A | |
10 | Network ID | Subnet ID | Host ID | Class B | |
110 | Network ID | Subnet ID/Host ID | Class C | ||
1110 | Multicast address | Class D |
IPv4 address with specification of subnet ID in accordance with RFC 950
Since Ethernet addresses are used within a subnetwork, the TCP/IP protocols ARP (Address Resolution Protocol) and RARP (Reverse ARP) are available to assign IP addresses to Ethernet addresses and vice versa. Both these protocols periodically
update the Routing Information Base (RIB) with the appropriate address entries.
Predefined IPv4 addresses
IPv4 address | Meaning |
127.0.0.1 | Loopback address |
Supported input/output formats
You can enter the IPv4 addresses in “dotted decimal notation”.
IPv4 addresses are always output in “dotted decimal notation”.
Classless Inter-Domain Routing CIDR
The 32 bits of an IPv4 address are subdivided into the network and the host part. Originally eight bits were envisaged for the network part; this was sufficient to represent 256 networks, each with approx. 16 million hosts.
It soon became clear that a few networks containing a very large number of hosts could not meet the real requirements. Many networks which tended to have fewer hosts reflected the real situation better. As a result, the network part of the IP addresses was divided into three classes (A, B and C) which differ in the length of the network part and consequently in the number of addressable hosts. But this did not solve the dilemma of the lack of IP addresses; it merely shifted it to a new level.
As class C networks with 256 hosts are not suitable for most larger organizations, these organizations must be assigned a class B address space. The 16384 class B networks were then also quickly assigned.
Bit 1 8 | 9 16 | 17 24 | 25 32 | Address type | |
0 | Network ID | Host ID | Class A | ||
10 | Network ID | Host ID | Class B | ||
110 | Network ID | Host ID | Class C | ||
1110 | Multicast address | Class D |
IPv4 address types (Classful Routing)
The number of networks and hosts can be calculated using the formula 2**n, where n specifies the number of bits used. However, the number of networks and hosts are the highest figures which can theoretically be achieved. In fact certain bit combinations are not available to be used freely for special applications. For example, in a class A network the local host (loopback) addresses must be handled separately. Consequently this network must be deducted from the theoretical figure. In the case of the hosts, the network and broadcast addresses cannot be specified. In a class A network, for instance, only 126 networks and 16777214 hosts can therefore be specified freely.
Classless Inter-Domain Routing (CIDR) cancels this division into classes. A network is defined by the number of consecutive left-justified bit positions in an IP address. The term prefix length is consequently used. The notation is defined by appending /n to the IP address. 32 minus n bits are available for addressing hosts within a network. The address space which is derived from the prefix is referred to as a CIDR block. The reserved IP addresses mentioned above also apply within a CIDR block. Because of the exceptions the “approximate” values were taken as the number of networks and hosts.
Bit 1 | n | n+1 | Address type |
| Network ID | Host ID | Classless |
1110 | Multicast address |
|
IPv4 address types (Classless Inter-Domain Routing)
Let us take the address 192.168.200.5 as an example. This is an IP address of a class C network which contains a maximum of 254 hosts. This network can be further subdivided by means of a subnet mask. However, a class C network cannot contain more than 254 hosts.
The sample IP address would have the following notation in the CIDR: 192.168.200.5/24.
As specified by the definition of Classless Inter-Domain Routing, the division of the IP address space into network classes is canceled. The prefix length determines the network ID and consequently the number of host addresses available in the subnet.
When the prefix length is reduced, the number of hosts which can be assigned to a network increases. If the 254 hosts corresponding precisely to a prefix length of 24 are not enough, a reduced prefix length must be used. A prefix length of 23 results in double the number of hosts being assigned, a prefix length of 22 four times the number.
Classless network configuration must be executed in all network components, in particular the routers.
CIDR block, IPv4 prefix
The format of the CIDR block or IPv4 prefix can be defined as follows:
a.b.c.d/n (also <IPv4-address>/<IPv4-prefix-length>)
where:
a,b,c,d (0..255) and 0<=n<=32, in general n > 8
the IPv4 address notation is in dotted format
/n defines the prefix length
The groups of IPv4 addresses can be defined using this description.
An IPv4 address belongs to the same CIDR block if its IPv4 prefix matches the predefined IPv4 prefix, i.e. if the first n bits of the binary IPv4 address match.
The same strategy for IPv6 prefixes exists for IPv6 addresses.
As always, exceptions from the rule are possible. Information on which organizations these /8 CIDR blocks are assigned to is consequently provided in Related publications.