IP Addresses



IP Addressing.  In order for computers to send messages to each other over the internet there needs to be some way for them to locate each other.  The addresses associated with the IP - Internet Protocol are used to locate different machines from routers to computers on the internet.  IP Addressing are 32 bits as shown in the next figure.



Part of the IP address represents the network, part of it represents the host number for the device on this network. They are grouped into four groups of eight or octets as represented in the following diagram.



IP addressing defines five address classes: A, B, C, D and E.  Classes D and E are for specialized devices.  Class D is used for multicast groups, Class E is reserved for experimental use.  Classes A, B and C are used more commonly for network addresses.  The majority of networks are numbered using class B and C addresses.


Class Format Prefix Length Higher Order Bits Address Range Number of Hosts
(no subnets)
A N.H.H.H 8 bits 0 to (256)3 - 2 = 16,777,214
B N.N.H.H 16 bits 10 to (256)2 > 65,534
C N.N.N.H 24 bits 110 to 254


What the table attempts to imply is that Class A addresses are network and host portions are configured as illustrated in the following.


For class B the addresses are likely to look like.


For class C the addresses are of the following form.



So if you think about the proliferation of computers and LANs on the internet there is the very basic problem of just locating the LANs and all of their machines that are internet capable.  From the classes of addresses how many networks you can locate and how many machines.  The following table is theoretical numbers because some of the addresses are reserved for other purposes.



Theoretical Numbers
Class Number of Network Addresses Number of Computer Addresses
A 256 (256)3 - 2= 16,777,214
B (256)2 = 65,563 (256)2 - 2 = 65,561
C (256)3 = 16,777,216 256 - 2 = 254


For class A you could not have hardly any LANs on the network.  For class B you can have a few LANs, but nowhere near enough to give a fully functioning internet.  But even if you were satisfied with just locating/connecting around 65,000 different LANs, you wouldn't be happy with having IP addresses for only another 65,000 machines.  Finally, for class C addresses you could at least locate a healthy 16 million LANs, but this leaves only a very small number for other machines.

What these classes imply is that with a 32 bit addressing scheme you are going to need to use unique IP addresses for locating networks and then somehow use some sort of local addressing scheme to locate each of the machines on each LAN.  This is one of the main reasons that implementation of internal or private addressing on LANs has become so important.

Classless Addressing.  Using classes to develop addresses obviously results in problems for a global internet.  One solution that is emerging is called IPv6 which uses a 128 bit addressing space.  Another solution that has gained importance is called CIDR - Classless Interdomain Routing.

Classless addressing makes use of a designation appended to each IP address that specifies the number of bits used for the network portion of the address.  CIDR networks are sometimes called slash x networks because the IP address is separated from the suffix by a slash.  Thus a CIDR address is going to look something like

This implies that the far left 24 bits are used to designate the network, and the remaining eight bits are used to designate the host.  This particular /24 designation ends up being the same as a class C address where the first three octets designate the network.

The following table shows how class networks would be designated in a slash format.


CIDR Network Class Network
/8 Class A
/16 Class B
/24 Class C


But, in general, using CIDR notation is more efficient.  It also provides more options for the number of ways the network and host can be designated.  For example, other common CIDR networks are /12, /20, /21, /28 and so on.

CIDR also supports supernetting which is combining small contiguous blocks of network addresses into one larger one.

Subnetting uses a subnet mask that is longer than the address class's default mask.  Some bits come from the host's portion of the address and stay the same within a subnet.

  • might have these four subnets