I am not bad with networks, however, I am doing badly in IP addressing. It is affecting me very much. For example, while working on access lists on a Cisco router, I had to assign a serial port the IP address and a subnet I thought the corresponding subnet would be, because is a Class A IP address.

How may I improve my IP addressing skills?


When you are using a custom subnet you are using classless ip addressing. This allows a large block of IP addresses, like those in a class a network to be sliced up into smaller networks. You do this for a variety of reasons. Do a Google search for Subnetting Tutorial and you will find a ton of resources. Cisco's site has some very good games on how to perform subnetting as well.

  • 3
    Why not just provide @user56454 a link to SF's very own hit question: How does Subnetting Work?
    – jscott
    Oct 7 '10 at 19:21
  • 1
    Oooh. That is quite good. I actually did not know about it. Stored for future use. Oct 7 '10 at 20:03
1 is an example of a variable length subnet mask, which is used with CIDR, or classless inter-domain routing. CIDR is a way to split Class-A/B/C networks into smaller subnetworks where you don't need say, a full 254 addresses (or 16 million, in the case of a Class-A).

In this case, is a mask for a network of 14 hosts. A tool like whatmask is very helpful here:

$ whatmask

IP Entered = ..................:
CIDR = ........................: /28
Netmask = .....................:
Netmask (hex) = ...............: 0xfffffff0
Wildcard Bits = ...............:
Network Address = .............:
Broadcast Address = ...........:
Usable IP Addresses = .........: 14
First Usable IP Address = .....:
Last Usable IP Address = ......:

CIDR is useful in cases where you don't need a full Class-C network (254 addresses) (or something even larger). If you only have a network of a dozen or so hosts it's a more efficient use of IP address space.

Hope that helps.


Here is a section from a Cisco class I am taking (note the bolded text near the end).

Historic Network Classes

Historically, RFC1700 grouped the unicast ranges into specific sizes called class A, class B, and class C addresses. It also defined class D (multicast) and class E (experimental) addresses, as previously presented.

The unicast address classes A, B, and C defined specifically-sized networks as well as specific address blocks for these networks, as shown in the figure. A company or organization was assigned an entire class A, class B, or class C address block. This use of address space is referred to as classful addressing.

Class A Blocks

A class A address block was designed to support extremely large networks with more than 16 million host addresses. Class A IPv4 addresses used a fixed /8 prefix with the first octet to indicate the network address. The remaining three octets were used for host addresses.

To reserve address space for the remaining address classes, all class A addresses required that the most significant bit of the high-order octet be a zero. This meant that there were only 128 possible class A networks, /8 to /8, before taking out the reserved address blocks. Even though the class A addresses reserved one-half of the address space, because of their limit of 128 networks, they could only be allocated to approximately 120 companies or organizations.

Class B Blocks

Class B address space was designed to support the needs of moderate to large size networks with more than 65,000 hosts. A class B IP address used the two high-order octets to indicate the network address. The other two octets specified host addresses. As with class A, address space for the remaining address classes needed to be reserved.

For class B addresses, the most significant two bits of the high-order octet were 10. This restricted the address block for class B to /16 to /16. Class B had slightly more efficient allocation of addresses than class A because it equally divided 25% of the total IPv4 address space among approximately 16,000 networks.

Class C Blocks

The class C address space was the most commonly available of the historic address classes. This address space was intended to provide addresses for small networks with a maximum of 254 hosts.

Class C address blocks used a /24 prefix. This meant that a class C network used only the last octet as host addresses with the three high-order octets used to indicate the network address.

Class C address blocks set aside address space for class D (multicast) and class E (experimental) by using a fixed value of 110 for the three most significant bits of the high-order octet. This restricted the address block for class C to /16 to /16. Although it occupied only 12.5% of the total IPv4 address space, it could provide addresses to 2 million networks.

Limits to the Class-based System

Not all organizations' requirements fit well into one of these three classes. Classful allocation of address space often wasted many addresses, which exhausted the availability of IPv4 addresses. For example, a company that had a network with 260 hosts would need to be given a class B address with more than 65,000 addresses.

Even though this classful system was all but abandoned in the late 1990s, you will see remnants of it in networks today. For example, when you assign an IPv4 address to a computer, the operating system examines the address being assigned to determine if this address is a class A, class B, or class C. The operating system then assumes the prefix used by that class and makes the appropriate subnet mask assignment.

Another example is the assumption of the mask by some routing protocols. When some routing protocols receive an advertised route, it may assume the prefix length based on the class of the address.

Classless Addressing

The system that we currently use is referred to as classless addressing. With the classless system, address blocks appropriate to the number of hosts are assigned to companies or organizations without regard to the unicast class.


The notion of class is similar to subnets. The difference is that a class block is assigned to a particular company or person. In that case the ip block 24.x.x.x were given to a company that decided to divide it in multiple parts. Maybe the company sold a little part of their IP address space. The class notation is not really used in our days.

Instead we use netmask. Netmask helps a router to separate the subnet-part and the host-part. How? It's simple all bits set to 1 is part of the subnet address and the ones set to zero is the host address. The router just has to perform a bitwise and with the netmask and the IP address to retrieve the subnet address. Another way to write the netmask is by appending a /x to a base subnet address i.e.

A subnet is a group of hosts in the same network as in there is no routers that has to be contact to establish a connection between two hosts in the same subnet. So you want to assign the same subnet address to those hosts. There is two addresses that are taking when yo form a subnet the first on and the last one. The first address is to designate the subnet itself, it is not an usable address and anything sent to that address will be discarded. The last address of a subnet is the broadcast address is something is sent to that address it will be received by all the host on the subnet.

If we take an subnet like (or netmask we can have host from to so we can set 254 ip addresses. We used to designate the subnet and would be the broadcast address.

If we look at the possible subnet we have:

/32 ( Only one usable ip address (you don't have a subnet address nor a broadcast). It is used in point-to-point connection.

/31 ( Is quite a bit not useful because most of the routers sets a subnet address and a broadcast so you don't have any other host. But if your router follows the exception to that rule you have two IP possible.

/32 ( Is more useful if you have one subnet address, two host IP and the broadcast.

/x: You can continue to calculate what it would give as number of hosts possible on a network with the rule: 2^(32-x)-2

/0 ( Is not possible because you need a subnet part.

If we apply these rules to the internet itself we can think of some weird things.

The IP would designate the subnet of all subnet so the whole internet. In fact it points to nothing just like the first address of a subnet.

The IP would designate the broadcast for all internet hosts but in fact it is reduce to the local subnet (for obvious security reason). Host use it when configuring their IP with the DHCP protocol.

So in ending I will explain your own example: is your IP address. your netmask (so it's a /28) We have 16 possible IP addresses, so if we remove the 2 reserved we have 14 possible host. Then is the subnet address. And the broadcast address. Range is usable hosts addresses.

Hope it was interesting and useful.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.