// Tutorial //
Understanding ip addresses, subnets, and cidr notation for networking.
- Linux Basics

By Justin Ellingwood


Introduction
Understanding networking is a fundamental part of configuring complex environments on the internet. This has implications when trying to communicate between servers efficiently, developing secure network policies, and keeping your nodes organized.
In a previous guide, we went over some basic networking terminology . You should look through that guide to make sure you are familiar with the concepts presented there.
In this article, we will discuss some more specific concepts that are involved with designing or interacting with networked computers. Specifically, we will be covering network classes, subnets, and CIDR notation for grouping IP addresses.
Understanding IP addresses
Every location or device on a network must be addressable . This means that it can be reached by referencing its designation under a predefined system of addresses. In the normal TCP/IP model of network layering, this is handled on a few different layers, but usually when we refer to an address on a network we are talking about an IP address.
IP addresses allow network resources to be reached through a network interface. If one computer wants to communicate with another computer, it can address the information to the remote computer’s IP address. Assuming that the two computers are on the same network, or that the different computers and devices in between can translate requests across networks, the computers should be able to reach each other and send information.
Each IP address must be unique on its own network. Networks can be isolated from one another, and they can be bridged and translated to provide access between distinct networks. A system called Network Address Translation , allows the addresses to be rewritten when packets traverse network borders to allow them to continue on to their correct destination. This allows the same IP address to be used on multiple, isolated networks while still allowing these to communicate with each other if configured correctly.
The difference between IPv4 and IPv6
There are two revisions of the IP protocol that are widely implemented on systems today: IPv4 and IPv6. IPv6 is slowly replacing IPv4 due to improvements in the protocol and the limitations of IPv4 address space. Simply put, the world now has too many internet-connected devices for the amount of addresses available through IPv4.
IPv4 addresses are 32-bit addresses. Each byte, or 8-bit segment of the address, is divided by a period and typically expressed as a number 0–255. Even though these numbers are typically expressed in decimal to aid in human comprehension, each segment is usually referred to as an octet to express the fact that it is a representation of 8 bits.
A typical IPv4 address looks something like this:
The lowest value in each octet is a 0, and the highest value is 255.
We can also express this in binary to get a better idea of how the four octets will look. We will separate each 4 bits by a space for readability and replace the dots with dashes:
Recognizing that these two formats represent the same number will be important for understanding concepts later on.
Although there are some other differences in the protocol and background functionality of IPv4 and IPv6, the most noticeable difference is the address space. IPv6 expresses addresses as an 128-bit number. To put that into perspective, this means that IPv6 has space for more than 7.9×10 28 times the amount of addresses as IPv4.
To express this extended address range, IPv6 is generally written out as eight segments of four hexadecimal digits. Hexadecimal numbers represent the numbers 0–15 by using the digits 0–9, as well as the numbers a–f to express the higher values. A typical IPv6 address might look something like this:
You may also see these addresses written in a compact format. The rules of IPv6 allow you to remove any leading zeros from each octet, and to replace a single range of zeroed groups with a double colon (::).
For instance, if you have one group in an IPv6 address that looks like this:
You could instead just type:
To demonstrate the second case, if you have a range in an IPv6 address with multiple groups as zeroes, like this:
You could compact this like so (also removing the leading zeros of the group like we did above):
You can do this only once per address, or else the full address will be unable to be reconstructed.
While IPv6 is becoming more common every day, in this guide, we will be exploring the remaining concepts using IPv4 addresses because it is easier to discuss with a smaller address space.
IPv4 Addresses Classes and Reserved Ranges
IP addresses are typically made of two separate components. The first part of the address is used to identify the network that the address is a part of. The part that comes afterwards is used to specify a specific host within that network.
Where the network specification ends and the host specification begins depends on how the network is configured. We will discuss this more thoroughly momentarily.
IPv4 addresses were traditionally divided into five different “classes”, named A through E, meant to differentiate segments of the available addressable IPv4 space. These are defined by the first four bits of each address. You can identify what class an IP address belongs to by looking at these bits.
Here is a translation table that defines the addresses based on their leading bits:
- 0--- : If the first bit of an IPv4 address is “0”, this means that the address is part of class A. This means that any address from 0.0.0.0 to 127.255.255.255 is in class A.
- 10-- : Class B includes any address from 128.0.0.0 to 191.255.255.255 . This represents the addresses that have a “1” for their first bit, but don’t have a “1” for their second bit.
- 110- : Class C is defined as the addresses ranging from 192.0.0.0 to 223.255.255.255 . This represents all of the addresses with a “1” for their first two bits, but without a “1” for their third bit.
- 1110 : This class includes addresses that have “111” as their first three bits, but a “0” for the next bit. This address range includes addresses from 224.0.0.0 to 239.255.255.255 .
- 1111 : This class defines addresses between 240.0.0.0 and 255.255.255.255 . Any address that begins with four “1” bits is included in this class.
Class D addresses are reserved for multi-casting protocols, which allow a packet to be sent to a group of hosts in one movement. Class E addresses are reserved for future and experimental use, and are largely not used.
Traditionally, each of the regular classes (A–C) divided the networking and host portions of the address differently to accommodate different sized networks. Class A addresses used the remainder of the first octet to represent the network and the rest of the address to define hosts. This was good for defining a few networks with a lot of hosts each.
The class B addresses used the first two octets (the remainder of the first, and the entire second) to define the network and the rest to define the hosts on each network. The class C addresses used the first three octets to define the network and the last octet to define hosts within that network.
The division of large portions of IP space into classes is now almost a legacy concept. Originally, this was implemented as a stop-gap for the problem of rapidly depleting IPv4 addresses (you can have multiple computers with the same host if they are in separate networks). This was replaced largely by later schemes that we will discuss below.
Reserved Private Ranges
There are also some portions of the IPv4 space that are reserved for specific uses.
One of the most useful reserved ranges is the loopback range specified by addresses from 127.0.0.0 to 127.255.255.255 . This range is used by each host to test networking to itself. Typically, this is expressed by the first address in this range: 127.0.0.1 .
Each of the normal classes also have a range within them that is used to designate private network addresses. For instance, for class A addresses, the addresses from 10.0.0.0 to 10.255.255.255 are reserved for private network assignment. For class B, this range is 172.16.0.0 to 172.31.255.255 . For class C, the range of 192.168.0.0 to 192.168.255.255 is reserved for private usage.
Any computer that is not hooked up to the internet directly (any computer that goes through a router or other NAT system) can use these addresses at will.
There are additional address ranges reserved for specific use-cases. You can find a summary of reserved addresses here.
Netmasks and Subnets
The process of dividing a network into smaller network sections is called subnetting . This can be useful for many different purposes and helps isolate groups of hosts from each other to deal with them more easily.
As we discussed above, each address space is divided into a network portion and a host portion. The amount of the address that each of these take up is dependent on the class that the address belongs to. For instance, for class C addresses, the first 3 octets are used to describe the network. For the address 192.168.0.15 , the 192.168.0 portion describes the network and the 15 describes the host.
By default, each network has only one subnet, which contains all of the host addresses defined within. A netmask is basically a specification of the amount of address bits that are used for the network portion. A subnet mask is another netmask within used to further divide the network.
Each bit of the address that is considered significant for describing the network should be represented as a “1” in the netmask.
For instance, the address we discussed above, 192.168.0.15 can be expressed like this, in binary:
As we described above, the network portion for class C addresses is the first 3 octets, or the first 24 bits. Since these are the significant bits that we want to preserve, the netmask would be:
This can be written in the normal IPv4 format as 255.255.255.0 . Any bit that is a “0” in the binary representation of the netmask is considered part of the host portion of the address and can be variable. The bits that are “1” are static, however, for the network or subnetwork that is being discussed.
We determine the network portion of the address by applying a bitwise AND operation to between the address and the netmask. A bitwise AND operation will save the networking portion of the address and discard the host portion. The result of this on our above example that represents our network is:
This can be expressed as 192.168.0.0 . The host specification is then the difference between these original value and the host portion. In our case, the host is 0000 1111 or 15 .
The idea of subnetting is to take a portion of the host space of an address, and use it as an additional networking specification to divide the address space again.
For instance, a netmask of 255.255.255.0 as we saw above leaves us with 254 hosts in the network (you cannot end in 0 or 255 because these are reserved). If we wanted to divide this into two subnetworks, we could use one bit of the conventional host portion of the address as the subnet mask.
So, continuing with our example, the networking portion is:
The host portion is:
We can use the first bit of our host to designate a subnetwork. We can do this by adjusting the subnet mask from this:
In traditional IPv4 notation, this would be expressed as 192.168.0.128 . What we have done here is to designate the first bit of the last octet as significant in addressing the network. This effectively produces two subnetworks. The first subnetwork is from 192.168.0.1 to 192.168.0.127 . The second subnetwork contains the hosts 192.168.0.129 to 192.168.0.255 . Traditionally, the subnet itself must not be used as an address.
If we use more bits out of the host space for networking, we can get more and more subnetworks.
CIDR Notation
A system called Classless Inter-Domain Routing , or CIDR, was developed as an alternative to traditional subnetting. The idea is that you can add a specification in the IP address itself as to the number of significant bits that make up the routing or networking portion.
For example, we could express the idea that the IP address 192.168.0.15 is associated with the netmask 255.255.255.0 by using the CIDR notation of 192.168.0.15/24 . This means that the first 24 bits of the IP address given are considered significant for the network routing.
This allows us some interesting possibilities. We can use these to reference “supernets”. In this case, we mean a more inclusive address range that is not possible with a traditional subnet mask. For instance, in a class C network, like above, we could not combine the addresses from the networks 192.168.0.0 and 192.168.1.0 because the netmask for class C addresses is 255.255.255.0 .
However, using CIDR notation, we can combine these blocks by referencing this chunk as 192.168.0.0/23 . This specifies that there are 23 bits used for the network portion that we are referring to.
So the first network ( 192.168.0.0 ) could be represented like this in binary:
While the second network ( 192.168.1.0 ) would be like this:
The CIDR address we specified indicates that the first 23 bits are used for the network block we are referencing. This is equivalent to a netmask of 255.255.254.0 , or:
As you can see, with this block the 24th bit can be either 0 or 1 and it will still match, because the network block only cares about the first 23 digits.
CIDR allows us more control over addressing continuous blocks of IP addresses. This is much more useful than the subnetting we talked about originally.
Hopefully by now, you should have a working understanding of some of the networking implications of the IP protocol. While dealing with this type of networking is not always intuitive, and may be difficult to work with at times, it is important to understand what is going on in order to configure your software and components correctly.
There are various calculators and tools online that will help you understand some of these concepts and get the correct addresses and ranges that you need by typing in certain information. CIDR.xyz provides a translation from decimal-based IP addresses to octets, and lets you visualize different CIDR netmasks.
Spin up a real linux environment on a hosted virtual machine in seconds with DigitalOcean Droplets! Simple enough for any user, powerful enough for fast-growing applications or businesses.
Learn more here
Still looking for an answer?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
It’s still very useful content for people who want to learn more about networking in general.
I don’t see any problem with this here - really I think it’s great that DigitalOcean is providing good resources for people new to the concepts behind server administration and networking.
Yes, agreed. I love learning new stuff, even if it isn’t directly applicable to my own work. I think having a basic concept of the internet is priceless for anyone interested in web development in any capacity.
Linux has security needs too and basic networking knowledge helps for a beginner.
So what you are trying to say is put /32 after your ip for the SPF ip CIDR notation configuration step. Got it!
Hi, I think this statement is wrong:
„you can have multiple computers with the same host if they are in separate networks“ as a reason for introducing classes.
At first only 8 Bits were used for network. The problem was, that only large networks could be assigned and those would not be fully used (256^3-2 hosts). So the network part was increased to be able to assign smaller networks. The reuse argument is wrong, I guess.
Very nice explanation. Thank you for such a great article!
Well it was great read. I did not know about significance of CIDR notation.
This is a very useful networking basics article - an IP addressing 201 so to speak. Thanks
Great article and useful. Thank you
Very nice explanation !!!

Popular Topics
- All tutorials
- Free Managed Hosting
Try DigitalOcean for free
Join the tech talk.
Please complete your information!

- IPv4 Traceroute
- IPv4 Decimal
- IPv4 Netmask
- IPv6 Traceroute
- IPv6 Decimal
- IPv4 to IPv6 Conversion
- IPv6 Compression & Expansion
- IPv6 Compatibility Test
- URL De-Obfuscator
- IP Geolocation
- Internet Speed Test
- Domain Name Lookup
- Video Tutorials
CIDR to IPv4 Conversion
CIDR is the short for Classless Inter-Domain Routing, an IP addressing scheme that replaces the older system based on classes A, B, and C. A single IP address can be used to designate many unique IP addresses with CIDR. A CIDR IP address looks like a normal IP address except that it ends with a slash followed by a number, called the IP network prefix. CIDR addresses reduce the size of routing tables and make more IP addresses available within organizations.
CIDR to IP Range
Ip range to cidr, add cidr widget to your website.
You can easily add the CIDR widget on your website by copying the following HTML code and place it on your web page

Others Tools
- Domain Name Lookup

2005-2023 © IPAddressGuide.com. All Rights Reserved.
IP2Location™ is a registered trademark of https://www.ip2location.com
- Privacy Policy
- Terms of Service
Create your address on the web.
Move your domain name to IONOS.
- Free Domain
Secure site traffic and build trust.
Protect your domain from threats.
Create your own website easily.
Our experts build your website.
Create your own online store.
Fast, scalable hosting for any website.
Deploy your site, app, or PHP project from GitHub.
Optimized for speed, reliablity and control.
Powerful Exchange email and Microsoft's trusted productivity suite.
Collaborate smarter with Google's cloud-powered tools.
Secure and share your data on the go.
Protect your data from viruses, ransomware, and loss.
Reach out with your own email address.
Safeguard your emails against loss.
Pay as you go with your own scalable private server.
Your fully virtualized private server.
Get enterprise hardware with unlimited traffic
Individually configurable, highly scalable IaaS cloud
- Website Checker
- Favicon Generator
- Business Name Generator
- Whois Lookup
- SSL Checker
- Logo Creator
- IP Address Check
- Domain Check
- Validation service
- Wie gefällt Ihnen der Artikel? 0 0 -->

CIDR: what is classless inter-domain routing?
The internet is huge, but even in this vast global network, there’s a lack of space. The system of IP addresses as we are currently using it (IPv4), has been long exhausted. All possible addresses (at least 4,294,967,296) have already been assigned. A solution had to be thought up a few decades ago to solve the problem. CIDR helps extend the amount of available addresses .
What was intended as a temporary solution has now been active for over 20 years. And since the widespread introduction of IPv6 is still a long time coming, CIDR will probably still be around for years to come. This is reason enough to learn more about class inter-domain routing .
Why was CIDR developed?
How does cidr work, the cidr notation, cidr blocks: explanation and table, supernetting.
$1 Domain Names
Register great TLDs for less than $1 for the first year.
Why wait? Grab your favorite domain name today!

As early on as 1993, it was clear that the internet was growing quicker than had initially been anticipated. So, a solution was needed, which meant abandoning the network classes . The IP addresses were originally divided into five classes. If a company wanted to be connected to the internet, it had to choose an IP address from the appropriate class. For each class, different numbers of octets (the four numerical blocks of IP addresses) were used to identify the networks. The remaining octets determined the number of hosts in a network.
For example, a class A network could accommodate over 16 million hosts, but only 128 (0-127) of these networks were available. In class B, on the other hand, slightly more than 16,000 networks were possible, but each network could contain 65,534 hosts. The networks in class C only had an octet left and could only accommodate 254 (1-254, since 0 and 255 are always reserved) hosts.
This shows that the classification just wasn’t practical in most cases. For many companies, a network with only 254 participants was far too small, but several thousands of hosts need the fewest networks. This ultimately led to a lot of waste, since companies inevitably had to collect unused addresses. To meet the needs of internet users better, it was decided to make the network sizes more flexible, to reduce the size of routing tables in internet routers, and to slow down the decrease in the number of available IP addresses.
Routing tables are located in a router and help find the way to the correct destination address. Data packets pass through many nodes from origin to destination. For routers to recognize what the optimal path through the network looks like, a corresponding table is fed with information. The size of the file grows exponentially when a path has to be introduced for every possible target. Since CIDR assembles addresses into blocks, it is no longer necessary to store so much information in the routing tables. This means that several addresses are combined into one route.
CIDR is based on the idea of subnet masks . A mask is placed over an IP address and creates a sub network: a network that is subordinate to the internet. The subnet mask signals to the router which part of the IP address is assigned to the hosts (the individual participants of the network) and which determines the network.
Instead of adding a subnet mask, a specification in the form of suffixes can also be integrated directly into the IP address using classless inter-domain routing. But this not only shortens the display: CIDR also makes it possible to create supernets in addition to subnets. This means that it is not only possible to subdivide a network more precisely, but also to combine several networks.
Supernets are important, for example, if a company has several locations but wants to deal with all computers in the same network. Supernets allow several networks to be combined into one route, which is why this technology is also called route aggregation (i.e. grouping of routes). This means that data packets are only sent to one destination – regardless of where the hosts are located.
VLSM is an important part of CIDR: the variable length subnet mask allows subnets to be realized with variable lengths and not only in size order of the network classes.
An IP address made it possible in the past to determine which class it belonged to. For example, the class C networks were located between the addresses 192.0.0.0 and 223.255.255.255. A subnet mask (e.g. 255.255.255.0) is like a mask on top of the IP address and specifies the hosts. In CIDR format, this information is stored as a suffix in the IP address itself. However, the basic principle remains the same: the suffix specifies which places (bits) of the IP address represent the network ID and therefore which bits automatically make up the range of the host ID. If you want to understand this in detail, it makes sense to look at a subnet mask in its binary form:
255.255.255.0 ≙ 11111111 11111111 11111111 00000000
In CIDR notation, this (class C) subnet mask would be /24, since the first 24 bits determine the network component of the IP address. It’s possible to not only to fill octets completely with ones or zeros, but also to create more flexible subnets using VLSM. For example, the mask /25 corresponds to the binary value 11111111 11111111 11111111 10000000, which in turn (in dot-decimal notation) corresponds to 255.255.255.128.
Even with CIDR and VLSM, bits in subnet masks must always be filled from left to right and must not be randomly set to 1 or 0.
An IPv4 address consists of 32 bits. This becomes clear when you convert the decimal notation into the binary equivalent : 201.105.7.34 corresponds to 11001001 01101001 00000111 00100010. The binary notation – and the calculation method with which computers operate – of an IP address consists of 32 digits, which can either be 1 or 0: hence 32 bits. So, the possible suffixes in CIDR notation range from 0 to 32.
Creating subnets is about creating commonalities . 201.105.7.34/24 is in the same network as 201.105.7.1/24. The suffix signals that only the first 24 bits of the network component are counted. To do this, they have to be the same, if both addresses are to belong to the same network. The remaining bits are reserved for the host part. The number of bits that you see right after the slash in CIDR format indicates the number of digits (from left to right) that belong to the power supply of the IP address. The following table shows which subnet masks are behind the CIDR notation and how many host addresses they allow.

However, not all networks can also provide hosts. Networks with /31 have only 2 possible IP addresses for hosts, which would then have to be used for the network address (only 0s in the host part) and the broadcast address (only 1s in the host part). Two addresses are always reserved in each network: the network address (only 0s in the host part), which serves to identify the network, and the broadcast address (only 1s in the host part), which is used for transmission to all network participants. So, not all networks have the possibility to provide hosts. A /31 network has only 2 possible IP addresses, which must then be used for broadcast and network addresses. When looking at the CIDR table, then, two addresses must always be subtracted from the total available addresses . In the /32 network, however, only one address is available, and does not allow either broadcast nor network addresses.
The /0 network includes the complete address space. This contains only a large network with all possible IP addresses (minus two) as hosts so this doesn’t really count as a subnet. The nets /1 to /7 are also not used for individual subnets. Since the possible number of hosts is too large, these networks are divided into further subnets.
Calculating CIDR: examples
The principle behind CIDR can be explained more clearly using examples. In the following, we will explain how it works in both subnetting as well as supernetting.
If you want to create subnets (especially flexible subnets), it is not enough to simply attach the same suffix to the IP address . It is important to understand what happens with binary conversion. 192.168.200.5/30 and 192.168.200.9/30 do not belong to the same network, for example. The reason for this can be seen when both addresses and the corresponding subnet mask are represented as binary numbers. A logical connective is then required. To do this, the two values are compared, which will only be transferred to the network address if there is a 1 at the same position. The combinations 0 ∧ 0 and 0 ∧ 1 result in zero.

Both addresses are therefore not in the same network. They would have been, however, if the second address had been 192.168.200.6/30.
To calculate which IP addresses are available to you in a subnet, you have to calculate the area. For example, a company has to accommodate 2.000 hosts in a network. The CIDR table tells us that we need a /21 network. Alternatively, this can also be calculated. To do this, you must create a logarithm: x=log 2 (2000). The result (≈10,666) is not a natural number, so you can round it up: 11. You can form a subnet with 2 11 hosts: 2,048 (two addresses for broadcast and network address need to be subtracted).
If you look at the table, you will see that the powers of 2 rise from (/32) to (/0). So, you could calculate 32-11 = 21 to get the required subnet suffix (/21).
The number assigned by this internet provider is (in our example) 210.105.44.170. We also transfer this information into binary notation and use the mask that has just been determined.

The first address – the network address that shouldn’t be used – is 210.105.40.0/21. You have 2,046 IP addresses available between this and the broadcast address. The highest IP address (broadcast) is 210.105.47.255/21. Why is that? 2,048 (the maximum number of addresses in the subnet) divided by 256 (the number of possibilities in one octet) results in 8. This means that in the third octet the eight values from 40 to 47, and in the fourth octet, all values from 0 to 255, must be covered.
You can also save yourself the arithmetic work: there are some good online computers that will give you the area for your host addresses. In most cases, however, you still have to determine the required subnet size yourself. But you can find it in the corresponding table.
Let’s assume that a company has three sites and three networks and their corresponding routers. It would make sense – also in the sense of the routing table – to turn it into a supernet. The three networks have the addresses 192.168.43.0, 192.168.44.0, and 192.168.45.0 (possible subnet masks next to the IP addresses of the networks are first relevant in this context). We first compare them in binary notation and only use the digits that all three addresses have in common – from left to right: From the first difference, all other digits are set to zero.

The network address of the supernet is therefore 192.168.40.0. To determine the corresponding subnet mask that belongs to this network, you count the places (bits) that led to the new IP address. In our example, these are 21 bits: 192.168.40.0/21.

When networking a computer system, protocols play an important role. An example is the Internet Protocol, which was published in a first specification in 1981, and is the indispensable basis for the smooth sending and receiving of data packets. But what is behind the RFC standard? And how does the internet protocol actually work?

When computer information is sent in TCP/IP networks, it is first decompressed into individual data frames. In this way, you can transfer data of nearly unlimited size. The frames also contain the target system’s MAC address, without which a transmission would not be possible. If the physical address is not known, the sender must first be determined using the ARP Address Resolution Protocol. Here,...

Dividing a corporate network into smaller subnets has some advantages in terms of speed, security, and logical organization. However, many people find it difficult to set up. Binary computational operations and long series of numbers are frightening, but the principle itself is not so complicated. We explain what subnetting is, how to calculate a subnetmask, and what you need subnets for, so that...

Without a MAC address, nothing in a network will work on your device. Just as your postman needs a valid address to reliably deliver the mail, the transmission of data packets in computer networks is only possible with the unique hardware address of the target device. When it comes to a MAC address, at least there is one address available on each network-compatible device. But what is the MAC...
Related Products
Web hosting for agencies.
Provide powerful and reliable service to your clients with a web hosting package from IONOS.
A high profit can be made with domain trading! We show you what aspects to consider when trying your hand at this...
An easy step-by-step guide to getting your dream address...
We show you how exactly to connect your custom email domain with iCloud...
Create your personal email address with your own email domain to demonstrate professionalism and credibility...
what does .io mean and why is the top-level domain so popular among IT companies and tech start-ups...
Wait! We’ve got something for you! Have a look at our great prices for different domain extensions.

- RIPE Database (Whois)
Add this page to your Bookmarks widget
- Regional Internet Registry
- RIPE NCC Service Region
- Coordination Function
- Internet Governance
- Transition to IPv6
- List of RIPE NCC Services
- Engagement with External Organisations
- RIPE NCC Staff
- Careers at the RIPE NCC
- Staff Policies
- Functions and Expectations
- Minutes from Executive Board Meetings
- Former Executive Board Members
- Current Charging Scheme
- Current Billing Procedure
- RIPE NCC Logos
- RIPE NCC in the News
- RIPE NCC Brand Guidelines
- Publications and Presentations
- Press Releases
- Press Quality Photos
- Corporate Governance
- Internet Number Resources
- Arbitration
- Other RIPE NCC Services
- Information for Law Enforcement Agencies
- RIPE NCC LIR account Agreement
- RIPE NCC Celebrates its 25th Anniversary
Understanding IP Addressing and CIDR Charts
Every device connected to the Internet needs to have an identifier. Internet Protocol (IP) addresses are the numerical addresses used to identify a particular piece of hardware connected to the Internet.
The two most common versions of IP in use today are Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6). Both IPv4 and IPv6 addresses come from finite pools of numbers.
For IPv4, this pool is 32-bits (2 32 ) in size and contains 4,294,967,296 IPv4 addresses. The IPv6 address space is 128-bits (2 128 ) in size, containing 340,282,366,920,938,463,463,374,607,431,768,211,456 IPv6 addresses.
A bit is a digit in the binary numeral system, the basic unit for storing information.
Not every IP address in the IPv4 or IPv6 pool can be assigned to the machines and devices used to access the Internet. Some IP addresses have been reserved for other uses, such as for use in private networks. This means that the total number of IP addresses available for allocation is less than the total number in the pool.
Network prefixes
IP addresses can be taken from the IPv4 or the IPv6 pool and are divided into two parts, a network section and a host section. The network section identifies the particular network and the host section identifies the particular node (for example, a certain computer) on the Local Area Network (LAN).
IP addresses are assigned to networks in different sized ‘blocks'. The size of the ‘block' assigned is written after an oblique (/), which shows the number of IP addresses contained in that block. For example, if an Internet Service Provider (ISP) is assigned a “/16”, they receive around 64,000 IPv4 addresses. A “/26” network provides 64 IPv4 addresses. The lower the number after the oblique, the more addresses contained in that “block”.
The size of the prefix, in bits, is written after the oblique. This is called “slash notation”. There is a total of 32 bits in IPv4 address space. For example, if a network has the address “192.0.2.0/24”, the number “24” refers to how many bits are contained in the network. From this, the number of bits left for address space can be calculated. As all IPv4 networks have 32 bits, and each “section” of the address denoted by the decimal points contains eight bits, “192.0.2.0/24” leaves eight bits to contain host addresses. This is enough space for 256 host addresses. These host addresses are the IP addresses that are necessary to connect your machine to the Internet.
A network numbered “10.0.0.0/8” (which is one of those reserved for private use) is a network with eight bits of network prefix, denoted by “/8” after the oblique. The “8” denotes that there are 24 bits left over in the network to contain IPv4 host addresses: 16,777,216 addresses to be exact.
Classless Inter-Domain Routing (CIDR) Chart
The Classless Inter-Domain Routing (CIDR) is commonly known as the CIDR chart and is used by those running networks and managing IP addresses. It enables them to see the number of IP addresses contained within each “slash notation” and the size of each “slash notation” in bits.

Download: IPv4 CIDR Chart (PDF)
IPv6 is similar to IPv4, but it is structured so that all LANs have 64 bits of network prefix as opposed to the variable length of network prefix 1 that IPv4 networks have. All IPv6 networks have space for 18,446,744,073,709,551,616 IPv6 addresses.

Download: IPv6 Chart (PDF)
Currently, most ISPs assign /48 network prefixes to subscribers' sites (the End Users' networks). Because all IPv6 networks have /64 prefixes, a /48 network prefix allows 65,536 LANs in an End User's site.
The current minimum IPv6 allocation made by the RIPE NCC is a /32 network prefix. If the LIR only made /48 assignments from this /32 network prefix, they would be able to make 65,536 /48 assignments. If they decided to only assign /56 network prefixes they would have 24 bits available to them, and so could make 16,777,216 /56 assignments.
For example, if a /24 IPv6 allocation is made to an LIR, it would be able to make 16,777,216 /48 assignments or 4,294,967,296 /56 assignments.
To give some perspective, it is worth noting that there are 4,294,967,296 IPv4 addresses in total, significantly less than the number of IPv6 addresses.
IPv6 Relative Network Sizes
1 RFC2526, Reserved IPv6 Subnet Anycast Addresses (Proposed Standard)
Related Items
- Create an Addressing Plan
Assigning prefixes to Amazon EC2 network interfaces
You can assign a private IPv4 or IPv6 CIDR range, either automatically or manually, to your network interfaces. By assigning prefixes, you scale and simplify the management of applications, including container and networking applications that require multiple IP addresses on an instance.
The following assignment options are available:
Automatic assignment — AWS chooses the prefix from your VPC subnet’s IPv4 or IPv6 CIDR block and assigns it to your network interface.
Manual Assignment — You specify the prefix from your VPC subnet’s IPv4 or IPv6 CIDR block, and AWS verifies that the prefix is not already assigned to other resources before assigning it to your network interface.
Assigning prefixes has the following benefits:
Increased IP addresses on a network interface — When you use a prefix, you assign a block of IP addresses as opposed to individual IP addresses. This increases the number of IP addresses for a network interface.
Simplified VPC management for containers — In container applications, each container requires a unique IP address. Assigning prefixes to your instance simplifies the management of your VPCs, as you can launch and terminate containers without having to call Amazon EC2 APIs for individual IP assignments.
Basics for assigning prefixes
Considerations and limits for prefixes.
- Work with prefixes
You can assign a prefix to new or existing network interfaces.
To use prefixes, you assign a prefix to your network interface, attach the network interface to your instance, and then configure your operating system.
When you choose the option to specify a prefix, the prefix must meet the following requirements:
The IPv4 prefix that you can specify is /28 .
The IPv6 prefix that you can specify is /80 .
The prefix is in the subnet CIDR of the network interface, and does not overlap with other prefixes or IP addresses assigned to existing resources in the subnet.
You can assign a prefix to the primary or secondary network interface.
You can assign an Elastic IP address to a network interface that has a prefix assigned to it.
You can also assign an Elastic IP address to the IP address part of the assigned prefix.
We resolve the private DNS host name of an instance to the primary private IPv4 address.
We assign each private IPv4 address for a network interface, including those from prefixes, using the following format:
us-east-1 Region
All other Regions
Take the following into consideration when you use prefixes:
Network interfaces with prefixes are supported with instances built on the Nitro System .
Prefixes for network interfaces are limited to IPv6 addresses and private IPv4 addresses.
The maximum number of IP addresses that you can assign to a network interface depends on the instance type. Each prefix that you assign to a network interface counts as one IP address. For example, a c5.large instance has a limit of 10 IPv4 addresses per network interface. Each network interface for this instance has a primary IPv4 address. If a network interface has no secondary IPv4 addresses, you can assign up to 9 prefixes to the network interface. For each additional IPv4 address that you assign to a network interface, you can assign one less prefix to the network interface. For more information, see IP addresses per network interface per instance type .
Prefixes are included in source/destination checks.

To use the Amazon Web Services Documentation, Javascript must be enabled. Please refer to your browser's Help pages for instructions.
Thanks for letting us know we're doing a good job!
If you've got a moment, please tell us what we did right so we can do more of it.
Thanks for letting us know this page needs work. We're sorry we let you down.
If you've got a moment, please tell us how we can make the documentation better.
IPv4 is an identifier with a fixed length of 32-bit (2 32 ), which can represent about 4.3 billion different values 1 :
The human readable and easily memorable dot-decimal notation, which is also used in technical environments, groups the address into four parts where each consists of an unsigned decimal number with 8 bit:
An unsigned 8-bit decimal number can reflect 256 (2 8 ) different values (0-255). Since an address has four parts using such a number, its total length corresponds to 32 bit:
Working with 8-bit parts were the basis for a classful network design which was the standard in the 1980s. It divided the space into 8-bit groups (8, 16, and 24 bit) which were called Class A, B and C. This lead to inefficient assignments because a /8 subnet already had 16 777 216 addresses, while a /16 only had 65 536 addresses.
2.0 CIDR Table / Calculator
The classful network design was already replaced in the 1990s with a classless network design, which is called Classless Inter-Domain Routing (CIDR). It divides the space using 1-bit steps, as seen in the chart below:
- IP Addresses
- /29s /28s /27s /26s /25s /24s /23s /22s /21s /20s /19s /18s /17s /16s /15s /14s /13s /12s /11s /10s /9s /8s
- Subnet Mask
- 255.255.255.255
- 255.255.255.254
- 255.255.255.252
- 255.255.255.248
- 255.255.255.240
- 255.255.255.224
- 255.255.255.192
- 255.255.255.128
- 255.255.255.0
- 255.255.254.0
- 255.255.252.0
- 255.255.248.0
- 255.255.240.0
- 255.255.224.0
- 255.255.192.0
- 255.255.128.0
- 255.255.0.0
- 255.254.0.0
- 255.252.0.0
- 255.248.0.0
- 255.240.0.0
- 255.224.0.0
- 255.192.0.0
- 255.128.0.0
- 134 217 728
- 268 435 456
- 536 870 912
- 1 073 741 824
- 2 147 483 648
- 4 294 967 296
3.0 Exhaustion
While the IPv4 address space theoretically has more than 4.3 billion IP addresses, only 3.7 billion are available for public use because the rest is reserved for special purposes (e.g. 224/4 for multicast) or future use (240/4) 4 .
Due to this scarcity companies started to lease or buy IPv4 addresses from Local Internet Registries (LIRs).
August 1990 – Based on statistics, it was feared that an exhaustion of the pool could happen in 1994–1998. 5
October 2002 – IANA had 73 /8 blocks left, which is equivalent to 1 224 736 768 (1.22 billion) IPv4 addresses. 6
August 2004 – The available pool at IANA increased to 77 /8 blocks, which is equivalent to 1 291 845 632 (1.29 billion) IPv4 addresses. 7 This is related to the blocks 173/8–187/8 which were previously allocated to Various Registries in 1993, but seems to be returned to IANA in April 2003.
May 2008 – IANA had 40 /8 blocks left, which is equivalent to 671 088 640 (671 million) IPv4 addresses. 8
February 2011 – IANA assigned the last five available /8 blocks equally to all five RIRs 9 . AFRINIC received 102/8, APNIC 103/8, ARIN 104/8, LACNIC 179/8 and RIPE NCC 185/8 10 .
April 2011 – APNIC reached the last /8 block (103/8). 11
March 2012 – RIPE NCC reached the last /8 block (185/8) and moved to an only one /22 per LIR policy. 12
May 2012 – The ICANN board ratified the Global Policy for Post Exhaustion IPv4 Allocation Mechanisms by the IANA which regulates the distribution of address space returned to IANA: […] its size is not expected to be so large but substantial enough to be able to consider an additional minimum allocation for APNIC members. 13
June 2014 – LACNIC reported its (relatively) exhaustion because they reached the last /10 block 14 , so the further allocation rate has been greatly reduced 15 . Since there is still space available which will probably last until May 2020 16 , new members were still eligible to receive their initial /24 or /22 allocation in 2019.
July 2015 – RIPE NCC changed its policy in order to block transfers of allocations made to members for a period of 24 months. The reason for that change was a proposal which stated that speculators had opened new LIR accounts only to sell the initial /22 allocation given according to the one /22 per LIR policy. 17
September 2015 – ARIN finally allocated all available IPv4 addresses. 18 Further requests can only be fulfilled by using recovered space (e.g. revoked space due to non-payments) and are handled through a waiting list . ARIN was the first RIR who became (absolutely) exhausted.
November 2015 – The RIPE NCC Executive Board decided to temporarily restrict the ability for members to create multiple LIR accounts because it was considered as not conform to the policy. 19
May 2016 – The members of the RIPE NCC General Meeting voted for a resolution which removed the previously applied restrictions which temporarily blocked members from creating multiple LIR accounts. 20 Prior to this, some organizations already circumvented the restrictions by simply creating new business entities. 21
January 2017 – AFRINIC entered IPv4 Exhaustion Phase 1/2. 22
April 2018 – RIPE NCC allocated the last addresses from the last 185/8 23 . Since then they have started to allocate from over nine million recovered IPv4 addresses (about a IPv4 /9).
July 2019 – AFRINIC had about 5.15 million addresses left 24 in 2019, which is equivalent to IPv4 /10 + /12 or 5 034 x IPv4 /22. AFRINIC is the RIR with the most IPv4 addresses left in 2019. 25
August 2019 – RIPE NCC announced that the available pool is nearing the end. 26
October 2019 – On 2nd October 2019 the RIPE NCC reported that they allocated the last contiguous /22 IPv4 address block and that they have reached a point where the number of LIRs waiting to be activated was larger than the number of /22 equivalents remaining. At this point, the available pool decreased to about 1.01 million addresses. 27 As a result new LIRs and some LIRs which were still waiting for their account activation wouldn't receive any space at all and so only be eligible to request a /24 via the waiting list. However, as long addresses in form of /22 equivalents were still left, existing (activated) members were still able to request their final subnet(s) as long they didn't already receive the final /22 equivalent before. 28
November 2019 – Exhaustion of the RIPE NCC. On 25th November 2019 they made the final /22 IPv4 allocation of the last remaining addresses. 29 The waiting list was introduced. Only LIRs which never received an IPv4 allocation before are eligible to receive one IPv4 /24 allocation through the waiting list.
January 2020 – Between 25th November 2019 and 12th January 2020, due to the exhaustion, the amount of LIRs in the waiting list queue – waiting for their one-time IPv4 /24 allocation – was greater than zero 30 . Between 12th January 2020 and 17th November 2021, new LIRs were able to receive their one-time IPv4 /24 allocation without delay, because the RIPE NCC was able to recover space. On 18th November 2021, all of the recovered space got allocated, so that new LIRs are going to be added to the waiting list again.
4.0 Current Distribution
4.1 reserved space.
According to the IANA IPv4 Special-Purpose Address Registry – as of 4th February 2021 – in total there were 24 allocations with 324 273 935 IPv4 addresses reserved for special purposes or future use.
Not included in this list is 224/4 which is reserved for multicasting. This increases the amount of total reserved IPv4 addresses to 592 709 391 which lefts an amount of 3 702 257 905 (3.7 billion) available IPv4 addresses.
- Address Block(s)
- Allocation Date
- "This network"
- "This host on this network"
- Private-Use
- 100.64.0.0/10
- Shared Address Space
- 127.0.0.0/8
- 169.254.0.0/16
- 172.16.0.0/12
- 192.0.0.0/24
- IETF Protocol Assignments
- 192.0.0.0/29
- IPv4 Service Continuity Prefix
- 192.0.0.8/32
- IPv4 dummy address
- 192.0.0.9/32
- Port Control Protocol Anycast
- 192.0.0.10/32
- Traversal Using Relays around NAT Anycast
- 192.0.0.170/32 192.0.0.171/32
- NAT64/DNS64 Discovery
- 192.0.2.0/24
- Documentation (TEST-NET-1)
- 192.31.196.0/24
- 192.52.193.0/24
- 192.88.99.0/24
- Deprecated (6to4 Relay Anycast)
- Jun 2001 31
- 192.168.0.0/16
- 192.175.48.0/24
- Direct Delegation AS112 Service
- 198.18.0.0/15
- Benchmarking
- 198.51.100.0/24
- Documentation (TEST-NET-2)
- 203.0.113.0/24
- Documentation (TEST-NET-3)
- 240.0.0.0/4
- 255.255.255.255/32
- Limited Broadcast
4.2 Allocated Space
According to the IANA IPv4 Address Space Registry – as of 4th February 2022 –, excluding reserved subnets such as 127/8 (loopback) or 240/4 (future use), there have been made 221 /8 allocations in total (excluding 0 /8s left for future allocations to RIRs). These allocations were made primarily to RIRs, but due to historical reasons also to a few companies. This is an amount of 3 707 764 736 (3.70 billion) total allocated IPv4 addresses.
However, from this amount deducted are 5 506 831 (5.5 million) reserved addresses which are part from reserved allocations smaller than /8, but still part of the allocated /8s (see Reserved Space ). For example, 100.64.0.0/10 and multiple /24s of 192.0.0.0/8 are reserved, while the larger blocks 100/8 and 192/8 are still allocated to ARIN.
- Designation / Allocations made
- Allocations / IPs
- IANA - Local Identification 1981
- 1 allocation 16 777 216 ≅ 0.39%
- APNIC 1993–2011
- 45 allocations 754 974 720 ≅ 17.58%
- 001/8 014/8 027/8 036/8 039/8 042/8 049/8 058/8 059/8 060/8 061/8 101/8 103/8 106/8 110/8 111/8 112/8 113/8 114/8 115/8 116/8 117/8 118/8 119/8 120/8 121/8 122/8 123/8 124/8 125/8 126/8 175/8 180/8 182/8 183/8 202/8 203/8 210/8 211/8 218/8 219/8 220/8 221/8 222/8 223/8
- RIPE NCC 1993–2011
- 35 allocations 587 202 560 ≅ 13.67%
- 002/8 005/8 031/8 037/8 046/8 062/8 077/8 078/8 079/8 080/8 081/8 082/8 083/8 084/8 085/8 086/8 087/8 088/8 089/8 090/8 091/8 092/8 093/8 094/8 095/8 109/8 176/8 178/8 185/8 193/8 194/8 195/8 212/8 213/8 217/8
- Administered by ARIN 1991–1995
- 58 allocations 973 078 528 ≅ 22.66%
- 003/8 004/8 007/8 008/8 009/8 013/8 015/8 016/8 018/8 020/8 032/8 034/8 035/8 040/8 044/8 045/8 047/8 052/8 054/8 056/8 128/8 129/8 130/8 131/8 132/8 134/8 135/8 136/8 137/8 138/8 139/8 140/8 142/8 143/8 144/8 146/8 147/8 148/8 149/8 152/8 155/8 156/8 157/8 158/8 159/8 160/8 161/8 162/8 164/8 165/8 166/8 167/8 168/8 169/8 170/8 172/8 192/8 198/8
- Army Information Systems Center 1994
- IANA - Private Use 1995
- DoD Intel Information Systems 1993
- AT&T Bell Laboratories 1995
- Apple Computer Inc. 1992
- Ford Motor Company 1995
- DDN-RVN 1991
- Defense Information Systems Agency 1991–1995
- 4 allocations 67 108 864 ≅ 1.56%
- 022/8 026/8 029/8 030/8
- ARIN 1993–2011
- 36 allocations 603 979 776 ≅ 14.06%
- 023/8 024/8 050/8 063/8 064/8 065/8 066/8 067/8 068/8 069/8 070/8 071/8 072/8 073/8 074/8 075/8 076/8 096/8 097/8 098/8 099/8 100/8 104/8 107/8 108/8 173/8 174/8 184/8 199/8 204/8 205/8 206/8 207/8 208/8 209/8 216/8
- Administered by RIPE NCC 1993–1995
- 7 allocations 117 440 512 ≅ 2.73%
- 025/8 051/8 057/8 141/8 145/8 151/8 188/8
- DSI-North 1992
- DLA Systems Automation Center 1991
- PSINet, Inc. 1994
- AFRINIC 2005–2011
- 041/8 102/8 105/8 197/8
- Administered by APNIC 1991–1997
- 6 allocations 100 663 296 ≅ 2.34%
- 043/8 133/8 150/8 153/8 163/8 171/8
- Prudential Securities Inc. 1995
- Daimler AG 1993
- DoD Network Information Center 1995
- IANA - Loopback 1981
- Administered by AFRINIC 1993
- 2 allocations 33 554 432 ≅ 0.78%
- 154/8 196/8
- LACNIC 1995–2011
- 9 allocations 150 994 944 ≅ 3.52%
- 177/8 179/8 181/8 186/8 187/8 189/8 190/8 200/8 201/8
- Administered by LACNIC 1993
- US-DOD 1998
- 214/8 215/8
- Multicast 1981
- 16 allocations 268 435 456 ≅ 6.25%
- 224/8 225/8 226/8 227/8 228/8 229/8 230/8 231/8 232/8 233/8 234/8 235/8 236/8 237/8 238/8 239/8
- Future use 1981
- 240/8 241/8 242/8 243/8 244/8 245/8 246/8 247/8 248/8 249/8 250/8 251/8 252/8 253/8 254/8 255/8
Subnet Cheat Sheet – 24 Subnet Mask, 30, 26, 27, 29, and other IP Address CIDR Network References
As a developer or network engineer, you may need to occasionally look up subnet mask values and figure out what they mean.
To make your life easier, the freeCodeCamp community has made this simple cheat sheet. Just scroll or use Ctrl/Cmd + f to find the value you're looking for.
Here are the charts, followed by some explanations of what they mean.
* /31 is a special case detailed in RFC 3021 where networks with this type of subnet mask can assign two IP addresses as a point-to-point link.
And here's a table of the decimal to binary conversions for subnet mask and wildcard octets:
Note that the wildcard is just the inverse of the subnet mask.
If you are new to network engineering, you can get a better idea of how computer networks work here .
Finally, this cheat sheet and the rest of the article is focused on IPv4 addresses, not the newer IPv6 protocol. If you'd like to learn more about IPv6, check out the article on computer networks above.
How Do IP Address Blocks Work?
IPv4 addresses like 192.168.0.1 are really just decimal representations of four binary blocks.
Each block is 8 bits, and represents numbers from 0-255. Because the blocks are groups of 8 bits, each block is known as an octet . And since there are four blocks of 8 bits, every IPv4 address is 32 bits.
For example, here's what the IP address 172.16.254.1 looks like in binary:

To convert an IP address between its decimal and binary forms, you can use this chart:
The chart above represents one 8 bit octive.
Now lets say you want to convert the IP address 168.210.225.206 . All you need to do is break the address into four blocks ( 168 , 210 , 225 , and 206 ), and convert each into binary using the chart above.
Remember that in binary, 1 is the equivalent to "on" and 0 is "off". So to convert the first block, 168 , into binary, just start from the beginning of the chart and place a 1 or 0 in that cell until you get a sum of 168 .
For example:
128 + 32 + 8 = 168, which in binary is 10101000 .
If you do this for the rest of the blocks, you'd get 10101000.11010010.11100001.11001110 .
What is Subnetting?
If you look at the table above, it can seem like the number of IP addresses is practically unlimited. After all, there are almost 4.2 billion possible IPv4 addresses available.
But if you think about how much the internet has grown, and how many more devices are connected these days, it might not surprise you to hear that there's already a shortage of IPv4 addresses .
Because the shortage was recognized years ago, developers came up with a way to split up an IP address into smaller networks called subnets.
This process, called subnetting, uses the host section of the IP address to break it down into those smaller networks or subnets.
Generally, an IP address is made up of network bits and host bits:

So generally, subnetting does two things: it gives us a way to break up networks into subnets, and allows devices to determine whether another device/IP address is on the same local network or not.
A good way to think about subnetting is to picture your wireless network at home.
Without subnetting, every internet connected device would need its own unique IP address.
But since you have a wireless router, you just need one IP address for your router. This public or external IP address is usually handled automatically, and is assigned by your internet service provider (ISP).
Then every device connected to that router has its own private or internal IP address:

Now if your device with the internal IP address 192.168.1.101 wants to communicate with another device, it'll use the IP address of the other device and the subnet mask.
The combination of the IP addresses and subnet mask allows the device at 192.168.1.101 to figure out if the other device is on the same network (like the device at 192.168.1.103 ), or on a completely different network somewhere else online.
Interestingly, the external IP address assigned to your router by your ISP is probably part of a subnet, which might include many other IP addresses for nearby homes or businesses. And just like internal IP addresses, it also needs a subnet mask to work.
How Subnet Masks Work
Subnet masks function as a sort of filter for an IP address. With a subnet mask, devices can look at an IP address, and figure out which parts are the network bits and which are the host bits.
Then using those things, it can figure out the best way for those devices to communicate.
If you've poked around the network settings on your router or computer, you've likely seen this number: 255.255.255.0 .
If so, you've seen a very common subnet mask for simple home networks.
Like IPv4 addresses, subnet masks are 32 bits. And just like converting an IP address into binary, you can do the same thing with a subnet mask.
For example, here's our chart from earlier:
Now let's convert the first octet, 255:
Pretty simple, right? So any octet that's 255 is just 11111111 in binary. This means that 255.255.255.0 is really 11111111.11111111.11111111.00000000 in binary.
Now let's look at a subnet mask and IP address together and calculate which parts of the IP address are the network bits and host bits.
Here are the two in both decimal and binary:
With the two laid out like this, it's easy to separate 192.168.0.101 into network bits and host bits.
Whenever a bit in a binary subnet mask is 1, then the same bit in a binary IP address is part of the network, not the host.
Since the octet 255 is 11111111 in binary, that whole octet in the IP address is part of the network. So the first three octets, 192.168.0 , is the network portion of the IP address, and 101 is the host portion.
In other words, if the device at 192.168.0.101 wants to communicate with another device, using the subnet mask it knows that anything with the IP address 192.168.0.xxx is on the same local network.
Another way to express this is with a network ID, which is just the network portion of the IP address. So the network ID of the address 192.168.0.101 with a subnet mask of 255.255.255.0 is 192.168.0.0 .
And it's the same for the other devices on the local network ( 192.168.0.102 , 192.168.0.103 , and so on).
What Does CIDR Mean and What is CIDR Notation?
CIDR stands for Classless Inter-Domain Routing, and is used in IPv4, and more recently, IPv6 routing.
CIDR was introduced in 1993 as a way to slow the usage of IPv4 addresses, which were quickly being exhausted under the older Classful IP addressing system that the internet was first built on.
CIDR encompasses a couple of major concepts.
The first is Variable Length Submasking (VLSM), which basically allowed network engineers to create subnets within subnets. And those subnets could be different sizes, so there would be fewer unused IP addresses.
The second major concept CIDR introduced is CIDR notation.
CIDR notation is really just shorthand for the subnet mask, and represents the number of bits available to the IP address. For instance, the /24 in 192.168.0.101/24 is equivalent to the IP address 192.168.0.101 and the subnet mask 255.255.255.0 .
How to Calculate CIDR Noation
To figure out the CIDR notation for a given subnet mask, all you need to do is convert the subnet mask into binary, then count the number of ones or "on" digits. For example:
Because there's three octets of ones, there are 24 "on" bits meaning that the CIDR notation is /24 .
You can write it either way, but I'm sure you'll agree that /24 is a whole lot easier to write than 255.255.255.0 .
This is usually done with an IP address, so let's take a look at the same subnet mask with an IP address:
The first three octets of the subnet mask are all "on" bits, so that means that the same three octets in the IP address are all network bits.
Let's take a look at the last forth octet in a bit more detail:
In this case, because all the bits for this octet in the subnet mask are "off", we can be certain that all of the corresponding bits for this octet in the IP address are part of the host.
When you write CIDR notation it's usually done with the network ID. So the CIDR notation of the IP address 192.168.0.101 with a subnet mask of 255.255.255.0 is 192.168.0.0/24 .
To see more examples of how to calculate the CIDR notation and network ID for a given IP address and subnet mask, check out this video:
Classful IP Addressing
Now that we've gone over some basic examples of subnetting and CIDR, let's zoom out and look at what's known as Classful IP addressing.
Back before subnetting was developed, all IP addresses fell into a particular class:

Note that there are class D and E IP addresses, but we'll go into these in more detail a bit later.
Classful IP addresses gave network engineers a way to provide different organizations with a range of valid IP addresses.
There were a lot of issues with this approach that eventually lead to subnetting. But before we get into those, let's take a closer look at the different classes.
Class A IP Addresses
For Class A IP addresses, the first octet (8 bits / 1 byte) represent the network ID, and the remaining three octets (24 bits / 3 bytes) are the host ID.
Class A IP addresses range from 1.0.0.0 to 127.255.255.255 , with a default mask of 255.0.0.0 (or /8 in CIDR).
This means that Class A addressing can have a total of 128 (2 7 ) networks and 16,777,214 (2 24 -2) usable addresses per network.
Also, note that the range 127.0.0.0 to 127.255.255.255 within the Class A range is reserved for host loopback address (see RFC5735 ).
Class B IP Addresses
For Class B IP addresses, the first two octets (16 bits / 2 bytes) represent the network ID and the remaining two octets (16 bits / 2 bytes) are the host ID.
Class B IP addresses range from 128.0.0.0 to 191.255.255.255 , with a default subnet mask of 255.255.0.0 (or /16 in CIDR).
Class B addressing can have 16,384 (2 14 ) network addresses and 65,534 (2 16 ) usable addresses per network.
Class C IP Addresses
For Class C IP addresses, the first three octets (24 bits / 3 bytes) represent the network ID and the last octet (8 bits / 1 bytes) is the host ID.
Class C IP Addresses range from 192.0.0.0 to 223.255.255.255 , with a default subnet mask of 255.255.255.0 (or /24 in CIDR).
Class C translates to 2,097,152 (2 21 ) networks and 254 (2 8 -2) usable addresses per network.
Class D and Class E IP Addresses
The last two classes are Class D and Class E.
Class D IP addresses are reserved for multicasts. They occupy the range from 224.0.0.0 through 239.255.255.255 .
Class E IP addresses are experimental, and are anything over 240.0.0.0 .
The Issue with Classful IP Addresses
The main issue with classful IP addresses is that it wasn't efficient, and could lead to a lot of wasted IP addresses.
For example, imagine that you're part of a large organization back then. Your company has 1,000 employees, meaning that it would fall into class B.
But if you look above, you'll see that a class B network can support up to 65,534 usable addresses. That's way more than your organization would likely need, even if each employee had multiple devices with a unique address.
And there was no way your organization could fall back to class C – there just wouldn't be enough usable IP addresses.
So while classful IP addresses were used around the time IPv4 addresses became widespread, it quickly became clear that a better system would be necessary to ensure we wouldn't use up all of the ~4.2 billion usable addresses.
Classful IP addresses haven't been used since they were replaced by CIDR in 1993, and are mostly studied to understand early internet architecture, and why subnetting is important.
I hope this cheat sheet has been a helpful reference for you
If you found this helpful, please share it with your friends so more people can benefit from it.
Also, feel free to reach out on Twitter and let me know what you think.
Read more posts .
If you read this far, tweet to the author to show them you care. Tweet a thanks
Learn to code for free. freeCodeCamp's open source curriculum has helped more than 40,000 people get jobs as developers. Get started

IPv4 Address CIDR Range Reference and Calculator
As a network engineer, administrator, or Site Reliability Engineer (SRE) you probably have run across CIDR notation for defining IPv4 address spaces for both networks and subnets. CIDR notation is used a lot in the IT infrastructure configuration world. The following is a description of what CIDR notation is, in case you’re not that familiar, as well as a helpful CIDR range calculator and reference table. I hope these resources prove useful for you when defining CIDR ranges for your networks and subnets.
What is CIDR IPv4 Address Range Notation?
CIDR stands for “Classless Inter-Domain Routing”, and is the method used for assigning IP addresses and routing Internet traffic. IPv4 CIDR notation, specifically, is a way of representing a range of IP addresses in a concise and standardized format. CIDR notation is commonly used by network engineers, administrators, and Site Reliability Engineers (SRE) to manage IP addresses and create subnets.
CIDR notation is a flexible and efficient allocation of IP addresses by allowing the use of variable-length subnet masks. The network portion and the host portion of an IP address are not fixed, but can be specified by a number known as the CIDR prefix.
The CIDR prefix is written as a slash followed by a number between 0 (zero) and 32 . The number represents the number of network bits in the subnet mask, and is used to determine the range of IP addresses that belong to the network. For example, the CIDR prefix of /24 indicates that the first 24 bits of the IP address represent the network address, while the remaining 8 bits represents the host address.
To calculate the CIDR prefix for a given IP address range, you need to count the number of leading 1 bits in the binary representation of the subnet mask. For example, the subnet mask of 255.255.255.0 (in dotted decimal notation) has 24 leading 1 bits, so its CIDR prefix is /24 .
If this sounds a little difficult for you to calculate, then the following calculator and reference table for IPv4 CIDR notations should prove useful.
Calculate Start/End IPv4 Addresses for CIDR Range
When calculating the CIDR range of IPv4 IP addresses, it can be difficult to figure out the full range of IP Addresses that are included within the CIDR range. At least if you aren’t familiar with the binary math needed to calculate it. For this reason, I’ve included the following calculator that allows you to enter the CIDR range, click “Calculate”, then it will display the Starting IP Address and Ending IP Address of the CIDR range entered.
IPv4 Address CIDR Range Reference Table
Some times it can be difficult to remember how many IP addresses are in each of the CIDR ranges that can be defined. These range from a /0 with the entire IPv4 address space, down to a /32 that only includes a single IP address in the range.
The following table lists out all the CIDR ranges with the number of IPv4 address within that range:
Note: The IP address count column shows the total number of IP addresses within each CIDR range, including the network address and broadcast address.
Share this:
- Click to share on Twitter (Opens in new window)
- Click to share on Facebook (Opens in new window)
- Click to share on LinkedIn (Opens in new window)
- Click to email a link to a friend (Opens in new window)
- Click to share on Reddit (Opens in new window)
About the Author
Chris Pietschmann

Leave a Comment Cancel reply
This site uses Akismet to reduce spam. Learn how your comment data is processed .

Popular Articles

Related Articles
Latest articles.

- Future Students
- How to Apply
- Admitted Students
- Tuition, Costs and Aid
- Degrees and Programs
- Contact Admissions
- More Information
- Current Students
- Class Schedule
- Academic Calendar
- Academic Resources and Support
- Student Services and Resources
- Lifetime Membership
- Alumni Events
- Update Your information
- Awards and Recognitions
- Give to UHCL
- Faculty & Staff
- Faculty Highlights
- Administrative Offices
- Course Development
- Maps and Directions
- News and Events
- go.uhcl.edu
- UHCL at Pearland
- Health Alert
- Academic Resources and Offices
- First Year Seminar
- Centers and Institutes
- Extended and Professional Education
- Commencement
- Global Learning
- Military and Veteran Services

- Apply for Admission
- Visit Campus
- International
- Non-Degree Seeking
- Former Students

- Cost of Attendance
- Apply for Aid
- Types of Aid
- Scholarships
- Forms and Resources
- Frequently Asked Questions

- Student Affairs
- Orientation and New Student Programs
- Health and Wellness
- Student Involvement and Leadership
- Diversity, Equity and Inclusion
- Career Services
- Campus Community
- Arts and Culture

- Events Calendar
- Office of Special Events
- Emergency Communications

- Administrative Leadership
- Strategic Partnerships
- Facts and Statistics
- Map and Directions
- Administrative Offices and Resources
- Working at UHCL
- Accreditations
- Impact 2025 and Beyond

- Career Outcomes
- Student Success
- Institutional Success
- Notable Alumni

- Request Info
Network Fundamentals - Internet Protocol and IP Addressing
- Procedures and Forms
- Copyright Law
- Harassing, Abusive or Offensive Communications
- Computer or Device Compromised
- Information Exposed
- Identity Theft
- Phishing Scams
- Stolen or Lost Device
- Best Practices
- UHCL Events
What is Internet Protocol (IP) addressing?
When devices communicate with each other over a local area network, or "LAN", or across the internet, the message transmitted is ultimately directed to the target device's network hardware address that is programmed into the device by the manufacturer. This hardware address, or "MAC" address, is physically encoded very much like an automobile's VIN number that includes information about the manufacturer and when the device was created along with a sequential number.
Unfortunately, MAC addresses are not helpful for routing communication messages outside of a small number of locally interconnected devices because they are randomly scattered around the world, i.e., a device with a MAC address of 10:20:30:40:50:60 could be in New York and another with a MAC address of 10:20:30:40:50:61 could be in Beijing.
To enable devices to find each other easily no matter where they are in the world, the creators of the Internet came up with a logical addressing scheme that made it much easier for devices to find each other, no matter where they were on the Internet. These logical, Internet Protocol, addresses are commonly referred to as "IP addresses".
The form and organization of IP addresses
Note: for the purpose of this discussion, we will be describing IPv4 addresses, a four byte address format that has been in use for decades and continues to be used by a majority of Internet connected organizations. The latest IP addressing scheme, IPv6, uses a six byte address so that many more devices on the Internet can be addressed.
Each IPv4 address is four bytes in length and is expressed in the form: "nnn.nnn.nnn.nnn", where each "nnn" is a number from 0 through 255, the largest value of that can be expressed in eight binary bits. For example, the string 192.168.252.199 would be a syntactically correct expression of an IPv4 address.
Each IP address string is made up of two components:
- A network identifying component which is the leftmost part of the address, and
- A device identifying component which is the rightmost part of the address
The network identifying component is used by network routing devices or "routers" to determine the best way to send a communication message to take it closer to its final destination, the target device itself. The device identifying component of the IP address is only of significance to the target device and any other devices sharing the same local area network (LAN).
The length of the network and device identifying components may vary based upon the number of devices that an organization needs to address, but the total number of bytes used for the address will always be four for IPv4 addresses.
Classful Routing
Message routing devices or "routers" that transfer messages from one organization to another use a highly structured method of IP addressing called "classful routing", where IP address ranges are grouped into five classes. Because of its structured nature, routers using classful routing are far more efficient than other methods that will be described later in this discussion.
The following table describes the fundamental IP address network classes including how the addresses are defined, the number of device IP addresses the network class can support, and examples of device IP address that would be included in the network. The last column in the table shows the first byte values for networks in each class that are set by convention.
- The network identifying component each device IP address example is displayed in bold.
- There are also class D addresses (first byte value from 224 through 239) used for multi-casting, and class E addresses (first byte value from 240 through 255) that are used for Internet Engineering Task Force (IETF) testing. These two classes are not part of this discussion.
Classless Inter-Domain Routing (CIDR)
The number of class "A", "B" and "C" IP address ranges is severely limited, so when an organization obtains an IP address range, they usually obtain a number of class "C" ranges, or, if they are lucky, a class "B". Obtaining a class "A" address range is highly unlikely.
If all we had was classful addressing and an organization obtained a class "B" IP address range, all the devices would need to be on the same local area network which could result in extremely poor performance and a lack of network design flexibility. Fortunately, the development of the Classless Inter-Domain Routing (CIDR) method of IP addressing and routing gave organizations the opportunity to easily segregate any of their classful IP address ranges or "networks" into a number of sub-ranges or "subnets" through the use of "subnet masks".
Note: For the purpose of the remainder of this discussion, the term "network" will be used to refer to either a network or a subnet.
Subnet masks
Each Internet router that uses classful routing knows that any IP address starting with 0 through 127 is a class "A" address with a network identifying component one byte in length. Any IP address beginning with 128 through 191 is a class "B" address, so the network identifying component is two bytes in length, etc.
But when an organization needs to break up its class "A" or class "B" network into a number of class "C"- or other smaller-sized subnets, its routers cannot rely on the initial byte of the IP address to tell it anything about the length of the network identifying component of the subnetted address.
To provide the routers with this information when using classless routing, you must specify the length of the network identifying component of the subnet's IP addresses through the use of a "subnet mask". The subnet mask for each subnet is formatted just like an IP address, i.e., "nnn.nnn.nnn.nnn", but the meaning of the byte values is very different. In a subnet mask, all of the bits from the left that are to be included in the network identifying component of the IP address have a value of one, and all the bits from the right that identify the device within the range have a value of zero.
So, if you need to carve out a class "C"-sized subnet from a class "A" or class "B" network, you would specify a subnet mask with a decimal value of 255.255.255.0 or a binary value of 11111111 11111111 11111111 00000000.
With classless routing, you are not limited to subnet sizes based upon the three fundamental class sizes. You may need to have a subnet with more than 254 devices or less. Some subnets only involve two devices, so creating a class "C"-sized subnet for that purpose would waste addresses. Fortunately, subnet masks provide enough flexibility to allow us to set the boundary between the IP address' network identifying component and its device identifying component at virtually any bit in the four byte IP address string.
If an organization has obtained a class "B" network and needs to create a subnet within the network that can handle twice the number of device addresses as a traditional class "C" range, we could define a subnet that indicates we are using the first 23 bits of each IP address for our network identifying component and the last 9 bits to address up to 510 devices in the subnet (2 to the 9th power minus two reserved addresses). In this case, the subnet mask would have a decimal value of 255.255.254.0 or a binary value of 11111111 11111111 11111110 00000000.
If an organization has a class "B" or a class "C" network and needs to create a subnet that can handle half the number of devices as a traditional class "C" range, we could define a subnet that indicates we are using the first 25 bits of each IP address in the subnet for our network identifying component, and the last 7 bits to address up to 126 devices in the subnet (2 to the 7th power minus two reserved addresses). In this case, the subnet mask would have a decimal value of 255.255.255.128 or a binary value of 11111111 11111111 11111111 10000000.
CIDR notation – the easier way
Since many of us are not very efficient binary calculators, CIDR notation provides a simpler method of expressing the mask merely by indicating the network address (i.e. the first address in the IP address range) followed by a slash and the number of bits that are in the network identifying component of the IP address.
Note: The sample ranges and maximum device counts have been adjusted to reflect the fact that IP addressing reserves the first address in the range to identify the network and the last address in the range to broadcast to all devices in the network, so they cannot be assigned to individual devices.
Routable address vs. Non-routable addresses
Were we to give every device in the world its own unique IP address, we would have run out of addresses a long time ago. So, the Internet Engineering Task Force (IETF) decided that, since most devices only need to be accessed within their organization and never need to be accessed remotely, they would reserve ranges of addresses that every organization can use for their internal device-to-internal device communication traffic. These addresses are called "non-routable" addresses (or "RFC 1918" addresses since the recommendation was the 1918th accepted through the IETF's "Request for comment (RFC)" process).
The IP address ranges that are reserved by RFC 1918 are:
- 10.0.0.0 through 10.255.255.255
- 172.16.0.0 through 172.31.255.255
- 192.168.0.0 through 192.168.255.255
Because all Internet-based routers are configured to ignore any message packet destined for an IP address in any of the above ranges, there is no concern about millions of organizations using exactly the same numbers as other organizations to address their devices. However, routers that are used to exchange information among devices within an organization are configured to treat these IP addresses as any other IP routable address.
Can a device with a non-routable IP address ever receive a message from the Internet?
Yes – but only if a mechanism called "Network Address Translation (NAT)" is set up on one of the routing devices. What NAT does is to reserve an alias IP address for the device that is in a routable range. When a message arrives destined for the alias IP address, the router changes the destination IP address to the target device's actual non-routable IP address before sending it to the target device.
When a device that has a non-routable address needs to send a communication message outbound to a device on the Internet, one of two NAT methods could be employed:
- If the router is configured to perform "one-to-one address translation", it will replace the sending device's non-routable IP address in the outbound message with its associated routable IP address that has been configured in the router's NAT table.
- If the router is configured to perform many-to-one address translation, each sending device's non-routable IP address will be replaced with the address of the router itself. In this case, since all exiting communication traffic from multiple sending devices will leave the campus with the same IP address and each is probably expecting a response, the router will need to know which response is supposed to go to which target internal device. To accomplish this, other data elements in the message header, such as the "session ID" are used to identify the appropriate internal device.
For further information about message routing
Please see the Network Communications – Routers and Switches section.
Support Center
Bayou 2300 2700 Bay Area Blvd. Houston, TX 77058-100 Phone: 281-283-2828 [email protected]
Monday-Thursday: 8 a.m. - 7:30 p.m. Friday: 8 a.m. - 5:30 p.m. Saturday: 8 a.m. - 3 p.m.

What is CIDR?

Introduction to CIDR
Classless inter-domain routing (CIDR) is a method for allocating IP addresses and IP routing. A collection of Internet Protocol (IP) standards is used to create unique identifiers for networks and individual devices. The IP addresses allow the transmission of unique packets of information to specific computers.
CIDR is mainly used to use IP addresses and solve the routing table explosion efficiently. It is defined in RFC (Request for comments) 1518 and RFC 4632. It is an address block allocation. There are five different classes in the IPV4 addressing system. The IP address classes are used for Internet IP addresses assignment.
Start Your Free Software Development Course
Web development, programming languages, Software testing & others
They are Class A address, Class B address, Class C address, Class D address, Class E address.

Class A address: In Class A, the first bit is considered. It is always set to zero. It can take the IP address from 1.X.X.X to 126.X.X.X.
Class B address: In Class B, the first two bits are considered. It can take the IP address from 128.0.X.X to 191.255.X.X.
Class C address: In Class C, the first three bits are considered. It can take the IP address from 192.0.0.X to 223.255.255.X.
Class D address: In-Class D first four bits are considered. It can take the IP address from 224.0.0.0 to 239.255.255.255. This Class is used for multicasting.
Class E address: The IP addresses in Class E are reserved for Research and Development. It can take the IP address from 240.0.0.0 to 255.255.255.254.
So based on the requirement, we can choose the IP addresses.
For host addresses, we use the IP addresses of Class A/ Class B/ Class C.
Today the networking address ranges are using classless Interdomain Routing. By using CIDR, the old way of using the IP address for class A, class B, class C is replaced. In the older method, if we take the example of Class B as it is mostly used. If any institute or any organization requires hosts, they will be provided with the hosts, but in most of the cases, all the allocated hosts are not getting used, and it even leads to the routing table to the explosion.
In CIDR, the person who requires the IP addresses has to purchase the IP address allocator from the service provider; it can be any size that the purchaser requires. Whenever it is enabled based on the address prefix, it allows different routers at different levels to route on prefixes of different lengths. The CIDR is used for IPV4. IPV4 is 32 bits, and the most commonly used network are/8, /16, /24 and /32.
How does CIDR Works?
CIDR is an alternative to traditional subnetting. It is also called classless Addressing. It consists of CIDR blocks; by this, it dynamically allocates the IP addresses on the requirement of the users based on certain rules. Internet Assigned Number Authority (IANA) handles the assignment of CIDR blocks.
This block contains IP addresses. This block consists of 3 basic rules.
The 3 basic rules mentioned below:
Rule 1: In the CIDR block, the IP addresses which are allocated to the hosts should be continuous.
Rule 2: The size of the block should be of power 2 and should be equal to the total number of IP addresses.
Rule 3: The size of the block must be divisible by the first IP address of the block.
CIDR Notation
A CIDR IP address representation is the same as the IP address; it ends with a backward slash followed by a number. The n represents the number of network bits. It is called as IP network prefix.
The general way of representation of the CIDR IP address is
a.b.c.d / n
If we are given the CIDR representation, we can find the range of IP addresses.
We can see this with examples.
The CIDR representation is 21.19.35.40/24. Find the IP addresses of the CIDR block?
24 represents the number of bits used for the identification of the network.
The 5 bits are used for the identification of hosts.
The CIDR address is 21.19.35.40/24.
The first IP address is 21.19.35.0
The last IP address is 21.19.35.255
The total cost is 256.
Netmask is 255.255.255.0.
The representation is 255.255.255.255/31. Find the IP addresses of the CIDR block?
31 represents the number of bits used for the identification of the network.
The 1 bit is used for the identification of hosts.
The CIDR address is 255.255.255.255/31.
The first IP address is 255.255.255.254
The last IP address is 255.255.255.255
The total cost is 2.
Netmask is 255.255.255.254.
We can find the CIDR block from the block of IP addresses.
The IP addresses range is from 21.19.35.64 and 21.19.35.127. Find the CIDR block?
The IP address ranges are from 21.19.35.64 and 21.19.35.127.
Before preceding further, the CIDR block rules, which are mentioned above, should be checked if they are satisfied, then it is a CIDR block.
So the size of the block is 2 6. (i.e., 127 – 64 + 1 = 64)
Number of bits = 32 – 6 = 26.
CIDR block is 21.19.35.64/26.
The IP addresses range is from 255.255.255.32 and 255.255.255.63. Find the CIDR block?
The IP address ranges are from 255.255.255.32 and 255.255.255.63.
So the size of the block is 2 5. (i.e., 63 – 32 + 1 = 64)
Number of bits = 32 – 5 = 27.
CIDR block is 255.255.255.32/27.
Recommended Articles
This is a guide to What is CIDR. Here we discuss how does CIDR Works and examples to find the range of the IP addresses. You may also have a look at the following articles to learn more –
- What is Amazon VPC?
- What is DHCP?
- Socket Programming in PHP
- Overloading and Overriding in C++

Related Courses

*Please provide your correct email id. Login details for this Free course will be emailed to you
By signing up, you agree to our Terms of Use and Privacy Policy .
Forgot Password?
This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Explore 1000+ varieties of Mock tests View more
Submit Next Question

Instructions/Notes
This tool will convert an IPv4 address range into CIDR format. CIDR (Classless Inter-Domain Routing) format is a compact format of expression an IP address along with it routing information. A CIDR notation of 4.4.4.0/24 is a representation of IPv4 addresses with the range of 4.4.4.0 to 4.4.4.255. To use this tool, enter two IPv4 addresses below in dotted format (e.g., 4.4.4.0)
More About IP Address
IP - An IP (Internet Protocol) address is a unique identifier used in network communication. Network devices, such as a computer, a network printers and a router, all have a unique IP within their own network to enable you to print your document to your network, connect to a website, or play online games. An IP address is analogous to a phone number.
Special IP Address Blocks
These special addresses are IPs that are reserved for network testing and troubleshooting and are not assigned to devices.
- 0.0.0.0/8 - Reserved for self-identification.
- 127.0.0.0/8 - Reserved for loopback, testing and troubleshooting.
- 169.254.0.0/16 - Reserved for link local.
- 192.88.99.0/24 - Reserved for 6to4 Relay Anycast.
- 198.18.0.0/15 - Reserved for network interconnect device benchmark testing.
- 224.0.0.0/8 - Reserved for mulitcast addresses, which is an address which has multiple destinations.
- 240.0.0.0/8 - Reserved for future use.
- 255.255.255.255 - This is the last IPv4 address and is represents 'all' host. It is reserved as a limited broadcast destination address.
Reserved Private IP Address Block
The Internet Assigned Numbers Authority (IANA) has reserved the following three blocks of IP address space for private networks. These private IP addresses are typically used in local networks and cannot be accessed directly from a public network such as the Internet.
- 10.0.0.0 - 10.255.255.255 (10/8 prefix)
- 172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
- 192.168.0.0 - 192.168.255.255 (192.168/16 prefix
Result & Lookup History (10 Maximum)
Number Resources
We are responsible for global coordination of the Internet Protocol addressing systems, as well as the Autonomous System Numbers used for routing Internet traffic.
Currently there are two types of Internet Protocol (IP) addresses in active use: IP version 4 (IPv4) and IP version 6 (IPv6). IPv4 was initially deployed on 1 January 1983 and is still the most commonly used version. IPv4 addresses are 32-bit numbers often expressed as 4 octets in “dotted decimal” notation (for example, 192.0.2.53 ). Deployment of the IPv6 protocol began in 1999. IPv6 addresses are 128-bit numbers and are conventionally expressed using hexadecimal strings (for example, 2001:0db8:582:ae33::29 ).
Both IPv4 and IPv6 addresses are generally assigned in a hierarchical manner. Users are assigned IP addresses by Internet service providers (ISPs). ISPs obtain allocations of IP addresses from a local Internet registry (LIR) or National Internet Registry (NIR), or from their appropriate Regional Internet Registry (RIR):
Our primary role for IP addresses is to allocate pools of unallocated addresses to the RIRs according to their needs as described by global policy and to document protocol assignments made by the IETF . When an RIR requires more IP addresses for allocation or assignment within its region, we make an additional allocation to the RIR. We do not make allocations directly to ISPs or end users except in specific circumstances, such as allocations of multicast addresses or other protocol specific needs.
IP Address Allocations
Internet protocol version 4 (ipv4).
- IPv4 Address Space
- IPv4 Multicast Address Assignments
- IPv4 Special Purpose Address Registry
- IPv4 Recovered Address Space Registry
- Bootstrap Service Registry for IPv4 Address Space
Internet Protocol Version 6 (IPv6)
- IPv6 Address Space
- IPv6 Global Unicast Allocations
- IPv6 Parameters (Parameters described for IPv6, including header types, action codes, etc.)
- IPv6 Anycast Address Allocations
- IPv6 Multicast Address Allocations
- IPv6 Sub-TLA Assignments (DEPRECATED)
- IANA IPv6 Special Registry
- Bootstrap Service Registry for IPv6 Address Space
- Announcement of Worldwide Deployment of IPv6 (14 July 1999)
- RIR Comparative Policy Overview
Autonomous System Number Allocations
- Autonomous System Numbers
- Special-Purpose AS Number Assignments
- Bootstrap Service Registry for AS Number Space
- Internet Number Resource Request Procedure
Regional Internet Registry Creation
- Criteria for Establishment of New Regional Internet Registries (ICP-2) (4 June 2001)
- IANA Report on Recognition of LACNIC as a Regional Internet Registry (7 November 2002)
- IANA Report on Recognition of AfriNIC as a Regional Internet Registry (8 April 2005)
Technical Documentation
- RFC 4632 — Classless Inter-domain Routing (CIDR): The Internet Address Assignment and Aggregation Plan
- RFC 1918 — Address Allocation for Private Internets
- RFC 5737 — IPv4 Address Blocks Reserved for Documentation
- RFC 4291 — Internet Protocol Version 6 (IPv6) Addressing Architecture
- RFC 3587 — IPv6 Global Unicast Address Format
- RFC 6177 — IPv6 Address Assignment to End Sites
- RFC 6890 — Special-Purpose IP Address Registries
- RFC 7020 — The Internet Numbers Registry System
- RFC 7249 — Internet Numbers Registries
- Locally Served DNS Zones
- Network Infrastructure
CIDR (Classless Inter-Domain Routing or supernetting)

- John Burke, Nemertes Research
What is CIDR (Classless Inter-Domain Routing or supernetting)?
CIDR (Classless Inter-Domain Routing or supernetting) is a method of assigning IP addresses that improves the efficiency of address distribution and replaces the previous system based on Class A, Class B and Class C networks.
The initial goal of CIDR was to slow the increase of routing tables on routers across the internet and decrease the rapid exhaustion of IPv4 addresses. As a result, the number of available internet addresses has greatly increased.
The original classful network design of the internet included inefficiencies that drained the pool of unassigned IPv4 addresses faster than necessary. The classful design included the following:
- Class A, with over 16 million identifiers
- Class B, with 65,535 identifiers
- Class C, with 254 host identifiers
If an organization needed more than 254 host machines, it would be switched into Class B. However, this could potentially waste over 60,000 hosts if the business didn't need to use them, thus unnecessarily decreasing the availability of IPv4 addresses. The Internet Engineering Task Force introduced CIDR in 1993 to fix this problem.
CIDR is based on variable-length subnet masking ( VLSM ), which enables network engineers to divide an IP address space into a hierarchy of subnets of different sizes. This makes it possible to create subnetworks with different host counts without wasting large numbers of addresses.
CIDR addresses are made up of two sets of numbers:
- Prefix. The prefix is the binary representation of the network address -- similar to what would be seen in a normal IP address.
- Suffix. The suffix declares the total number of bits in the entire address.
For example, CIDR notation might look like: 192.168.129.23/17 -- with 17 being the number of bits in the address. IPv4 addresses support a maximum of 32 bits.
The same CIDR notation can be applied to IPv6 addresses. The only difference is IPv6 addresses can contain up to 128 bits.

CIDR blocks
CIDR blocks are groups of addresses that share the same prefix and contain the same number of bits. Supernetting is the combination of multiple connecting CIDR blocks into a larger whole, all of which share a common network prefix.
The length of a prefix determines the size of CIDR blocks. A short prefix supports more addresses -- and, therefore, forms a bigger block -- while a longer prefix indicates fewer addresses and a smaller block.
The Internet Assigned Numbers Authority (IANA) initially handles CIDR blocks. IANA is responsible for distributing large blocks of IP addresses to Regional Internet Registries (RIRs). These blocks are used for large geographical areas, such as North America, Africa and Europe.
Once an RIR receives its block, it must create smaller blocks to assign to Local Internet Registries (LIRs). Blocks might continue to be divided further until they reach the end user. The size of the block assigned to an end user is dependent on the number of individual addresses that the user requires.
Most end users are assigned blocks by their internet service provider (ISP). However, organizations that use multiple ISPs must receive provider-independent blocks directly from an RIR or LIR.
CIDR notation
IP sets aside some addresses for specific purposes. For example, several ranges -- such as the Class B 192.168.0.0 -- are set aside as nonroutable and are used to define a private network. Most home broadband routers assign addresses from the 192.168 network for systems inside the home. IP doesn't enable host identifiers of all zeros and reserves the all-ones identifier to serve as a broadcast address -- packets sent to that address go to all hosts on the network.
Originally, IP addresses were assigned in four major address classes: A through C. Each class allocated one portion of a 32-bit IP address to identify the gateway router for that network -- the first 8 bits for Class A, the first 16 for Class B, the first 24 for Class C. Bits not used for the network identifier were available for specifying host identifiers for systems on that network.
It helps to think of the binary representation of the network addresses. For IPv4, the 32-bit address is broken into four groups of 8 bits each -- called a dotted quad of numbers. A dotted quad looks like this in decimal form: 192.168.0.0. In binary form, it looks like this: 11000000.10101000.00000000.00000000.
An IP address can be parsed into its network identifier and host identifier by applying a network mask to the address -- another dot address, with ones wherever a bit is used to indicate the network portion of the address. For example, a classic Class B address is written as 255.255.0.0.
If a network is further broken up into subnets, we speak of the subnet mask , which adds bits to the network mask. If we break 192.168.0.0 into two subnets, the subnet mask gets one bit longer and could be indicated with 255.255.128.0.
CIDR notation compactly indicates the network mask for an address and adds on the total number of bits in the entire address using slash notation. For example, 192.168.129.23/17 indicates a 17-bit network mask. Internet users can refer to a /17 network to indicate the network's size without specifying an actual network mask.
How does CIDR work?
Routers using CIDR use a destination address to route a packet toward a gateway, which then further unpacks the address based on its understanding of the details of the supernetwork -- also called the supernet . If a router knows routes for different parts of the same supernet, then it uses the most specific one -- or the one with the longest network address.
In IPv6, a CIDR block always gets 64 bits for specifying network addresses.
Advantages of CIDR
CIDR reduced the problem of wasted IPv4 address space without causing an explosion in the number of entries in a routing table. CIDR also enables one routing table entry for a supernet to represent an aggregation of networks -- about which only a router closer to the destination actually needs to know the details.
CIDR is now the routing system on the internet's backbone network, and every ISP uses it. It is supported by the Border Gateway Protocol ( BGP ), the prevailing exterior (interdomain) gateway protocol and the Open Shortest Path First ( OSPF ) gateway protocol.
Older gateway protocols, such as Exterior Gateway Protocol and Routing Information Protocol, do not support CIDR.
When to use supernetting
An organization or service provider managing addressing for a large number of hosts or networks should use supernetting -- possibly in combination with network address translation (NAT) -- to partition out addresses and optimize traffic efficiency.
For example, the supernetting process might want to break an internal network into subnets for administrative purposes so each office could manage its own address space. Or it might need to cobble together address space from multiple CIDR blocks of different sizes from its ISP.
Supernetting example
Consider an ISP providing services to homes. It might create a /31 network for every home, each having only one assignable host identifier. It might create a /16 supernet of all the addresses, broken out further into regional /24 supernets.
Routers outside the ISP infrastructure use /16 to send packets in. The ISP uses the /24s to push packets toward the appropriate regional routers, which use the /31s to reach the home networks.
Continue Reading About CIDR (Classless Inter-Domain Routing or supernetting)
- Static IP vs. dynamic IP addresses: What's the difference?
- How AWS VPC Traffic Mirroring works
- Market price for IP address is predicted to rise 100%
Related Terms
Dig deeper on network infrastructure.

How to use Nmap to scan for open ports

Variable Length Subnet Mask (VLSM)

BGP (Border Gateway Protocol)

subnet (subnetwork)

More organizations are adopting ESG initiatives, and UC vendors have begun to offer new programs and capabilities in response. ...
The tech giant's $10 billion investment in OpenAI brings AI-supported updates to its basic Teams offering, on top of features ...
The new platform moves to the modern cloud infrastructure and offers a streamlined inbox, an AI-supported writing tool and ...
Configuration profiles make it easier to manage BYOD iPhones, but they're also associated with malware. Mobile security policies ...
User Enrollment creates a management profile for BYOD iPhones, but IT must remove that data in cases such as device loss or theft...
User Enrollment in iOS can separate work and personal data on BYOD devices. IT teams should learn how to enable it in Microsoft ...
Linux admins can use Cockpit to view Linux logs, monitor server performance and manage users. Use the tool to help admins manage ...
Hyperscale data centers can hold thousands of servers and process much more data than an enterprise facility. However, they can ...
Organizations that build 5G data centers may need to upgrade their infrastructure. These 5G providers offer products like virtual...
Software and services companies are adding personnel and expanding their offerings, as venture funds invest in tech startups with...
Businesses working with aging network architectures could use a tech refresh. While the easing of equipment backlogs works in ...
Industry studies underscore businesses' continuing struggle to obtain cloud computing benefits. A greater focus on strategy, ...
- Skip to content
- Skip to search
- Skip to footer
IP Addressing: IPv4 Addressing Configuration Guide, Cisco IOS XE Release 3S
Bias-free language.
The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
Configuring IPv4 Addresses
- IP Overlapping Address Pools
- IP Unnumbered Ethernet Polling Support
- Zero Touch Auto-IP

Chapter: Configuring IPv4 Addresses
Finding feature information, information about ip addresses, binary numbering, ip address structure, ip address classes, ip network subnetting, ip network address assignments, classless inter-domain routing, how to configure ip addresses, establishing ip connectivity to a network by assigning an ip address to an interface, troubleshooting tips, increasing the number of ip hosts that are supported on a network by using secondary ip addresses, what to do next, maximizing the number of available ip subnets by allowing the use of ip subnet zero, specifying the format of network masks, specifying the format in which netmasks appear for the current session, specifying the format in which netmasks appear for an individual line, using ip unnumbered interfaces on point-to-point wan interfaces to limit number of ip addresses required, ip unnumbered feature, using ip addresses with 31-bit prefixes on point-to-point wan interfaces to limit number of ip addresses required, configuration examples for ip addresses, example establishing ip connectivity to a network by assigning an ip address to an interface, example increasing the number of ip hosts that are supported on a network by using secondary ip addresses, example using ip unnumbered interfaces on point-to-point wan interfaces to limit number of ip addresses required, example using ip addresses with 31-bit prefixes on point-to-point wan interfaces to limit number of ip addresses required, example maximizing the number of available ip subnets by allowing the use of ip subnet zero, where to go next, additional references, feature information for ip addresses.
This chapter contains information about, and instructions for configuring IPv4 addresses on interfaces that are part of a networking device.
Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn . An account on Cisco.com is not required.
IP addresses are 32 bits long. The 32 bits are divided into four octets (8-bits). A basic understanding of binary numbering is very helpful if you are going to manage IP addresses in a network because changes in the values of the 32 bits indicate either a different IP network address or IP host address.
A value in binary is represented by the number (0 or 1) in each position multiplied by the number 2 to the power of the position of the number in sequence, starting with 0 and increasing to 7, working right to left. The figure below is an example of an 8-digit binary number.

The figure below provides binary to decimal number conversion for 0 through 134.

The figure below provides binary to decimal number conversion for 135 through 255.

An IP host address identifies a device to which IP packets can be sent. An IP network address identifies a specific network segment to which one or more hosts can be connected. The following are characteristics of IP addresses:
IP addresses are 32 bits long
IP addresses are divided into four sections of one byte (octet) each
IP addresses are typically written in a format known as dotted decimal
The table below shows some examples of IP addresses.
IP addresses are further subdivided into two sections known as network and host. The division is accomplished by arbitrarily ranges of IP addresses to classes. For more information see RFC 791 Internet Protocol at http://www.ietf.org/rfc/rfc0791.txt .
In order to provide some structure to the way IP addresses are assigned, IP addresses are grouped into classes. Each class has a range of IP addresses. The range of IP addresses in each class is determined by the number of bits allocated to the network section of the 32-bit IP address. The number of bits allocated to the network section is represented by a mask written in dotted decimal or with the abbreviation / n where n = the numbers of bits in the mask.
The table below lists ranges of IP addresses by class and the masks associated with each class. The digits in bold indicate the network section of the IP address for each class. The remaining digits are available for host IP addresses. For example, IP address 10.90.45.1 with a mask of 255.0.0.0 is broken down into a network IP address of 10.0.0.0 and a host IP address of 0.90.45.1.
When a digit that falls within the network mask changes from 1 to 0 or 0 to 1 the network address is changed. For example, if you change 10101100.00010000.01011001.00100010/16 to 10101100.00110000.01011001.00100010/16 you have changed the network address from 172.16.89.34/16 to 172.48.89.34/16.
When a digit that falls outside the network mask changes from 1 to 0 or 0 to 1 the host address is changed. For example, if you change 10101100.00010000.01011001.00100010/16 to 10101100.00010000.01011001.00100011/16 you have changed the host address from 172.16.89.34/16 to 172.16.89.35/16.
Each class of IP address supports a specific range of IP network addresses and IP host addresses. The range of IP network addresses available for each class is determined with the formula 2 to the power of the number of available bits. In the case of class A addresses, the value of the first bit in the 1st octet (as shown in the table above) is fixed at 0. This leaves 7 bits for creating additional network addresses. Therefore there are 128 IP network addresses available for class A (27 = 128).
The number of IP host addresses available for an IP address class is determined by the formula 2 to the power of the number of available bits minus 2. There are 24 bits available in a class A addresses for IP host addresses. Therefore there are 16,777,214 IP hosts addresses available for class A ((224) - 2 = 16,777,214)).
The table below shows the network and host addresses available for each class of IP address.
The arbitrary subdivision of network and host bits in IP address classes resulted in an inefficient allocation of IP space. For example, if your network has 16 separate physical segments you will need 16 IP network addresses. If you use 16 class B IP network addresses, you would be able to support 65,534 hosts on each of the physical segments. Your total number of supported host IP addresses is 1,048,544 (16 * 65,534 = 1,048,544). Very few network technologies can scale to having 65,534 hosts on a single network segment. Very few companies need 1,048,544 IP host addresses. This problem required the development of a new strategy that permitted the subdivision of IP network addresses into smaller groupings of IP subnetwork addresses. This strategy is known as subnetting.
If your network has 16 separate physical segments you will need 16 IP subnetwork addresses. This can be accomplished with one class B IP address. For example, start with the class B IP address of 172.16.0.0 you can reserve 4 bits from the third octet as subnet bits. This gives you 16 subnet IP addresses 24 = 16. The table below shows the IP subnets for 172.16.0.0/20.
When a digit that falls within the subnetwork (subnet) mask changes from 1 to 0 or 0 to 1 the subnetwork address is changed. For example, if you change 10101100.00010000.01011001.00100010/20 to 10101100.00010000.01111001.00100010/20 you have changed the network address from 172.16.89.34/20 to 172.16.121.34/20.
When a digit that falls outside the subnet mask changes from 1 to 0 or 0 to 1 the host address is changed. For example, if you change 10101100.00010000.01011001.00100010/20 to 10101100.00010000.01011001.00100011/20 you have changed the host address from 172.16.89.34/20 to 172.16.89.35/20.
Some people get confused about the terms network address and subnet or subnetwork addresses and when to use them. In the most general sense the term network address means “the IP address that routers use to route traffic to a specific network segment so that the intended destination IP host on that segment can receive it”. Therefore the term network address can apply to both non-subnetted and subnetted IP network addresses. When you are troubleshooting problems with forwarding traffic from a router to a specific IP network address that is actually a subnetted network address, it can help to be more specific by referring to the destination network address as a subnet network address because some routing protocols handle advertising subnet network routes differently from network routes. For example, the default behavior for RIP v2 is to automatically summarize the subnet network addresses that it is connected to their non-subnetted network addresses (172.16.32.0/24 is advertised by RIP v2 as 172.16.0.0/16) when sending routing updates to other routers. Therefore the other routers might have knowledge of the IP network addresses in the network, but not the subnetted network addresses of the IP network addresses.
Routers keep track of IP network addresses to understand the network IP topology (layer 3 of the OSI reference model) of the network to ensure that IP traffic can be routed properly. In order for the routers to understand the network layer (IP) topology, every individual physical network segment that is separated from any other physical network segment by a router must have a unique IP network address.
The figure below shows an example of a simple network with correctly configured IP network addresses. The routing table in R1 looks like the table below.

The figure below shows an example of a simple network with incorrectly configured IP network addresses. The routing table in R1 looks like the table below. If the PC with IP address 172.31.32.3 attempts to send IP traffic to the PC with IP address 172.31.32.54, router R1 cannot determine which interface that the PC with IP address 172.31.32.54 is connected to.

To help prevent mistakes as shown in the figure above, Cisco IOS-based networking devices will not allow you to configure the same IP network address on two or more interfaces in the router when IP routing is enabled.
The only way to prevent the mistake shown in the figure below, where 172.16.31.0/24 is used in R2 and R3, is to have very accurate network documentation that shows where you have assigned IP network addresses.

For a more thorough explanation of IP routing, see the "Related Documents" section for a list of documents related to IP routing.
Due to the continuing increase in internet use and the limitations on how IP addresses can be assigned using the class structure shown in the table above, a more flexible method for allocating IP addresses was required. The new method is documented in RFC 1519 Classless Inter-Domain Routing (CIDR): an Address Assignment and Aggregation Strategy . CIDR allows network administrators to apply arbitrary masks to IP addresses to create an IP addressing plan that meets the requirements of the networks that they administrate.
For more information on CIDR, refer to RFC 1519 at http://www.ietf.org/rfc/rfc1519.txt .
The term prefix is often used to refer to the number of bits of an IP network address that are of importance for building routing tables. If you are using only classful (strict adherence to A, B, and C network address boundaries) IP addresses, the prefixes are the same as the masks for the classes of addresses. For example, using classful IP addressing, a class C IP network address such as 192.168.10.0 uses a 24-bit mask (/24 or 255.255.255.0) and can also be said to have a 24-bit prefix.
If you are using CIDR, the prefixes are arbitrarily assigned to IP network addresses based on how you want to populate the routing tables in your network. For example, a group of class C IP addresses such as 192.168.10.0, 192.168.11.0, 192.168.12.0, 192.168.13.0 can be advertised as a single route to 192.168.0.0 with a 16-bit prefix (192.168.0.0/16). This results in a 4:1 reduction in the number of routes that the routers in your network need to manage.
Perform this task to configure an IP address on an interface.
1. enable
2. configure terminal
3. interface type number
4. no shutdown
5. ip address ip-address mask
The following commands can help troubleshoot IP addressing:
show ip interface --Displays the IP parameters for the interface.
show ip route connected --Displays the IP networks the networking device is connected to.
If you have a situation in which you need to connect more IP hosts to a network segment and you have used all of the available IP host addresses for the subnet to which you have assigned the segment, you can avoid having to readdress all of the hosts with a different subnet by adding a second IP network address to the network segment.
Perform this task to configure a secondary IP address on an interface.
6. ip address ip-address mask secondary
If your network has two or more routers and you have already configured a routing protocol, make certain that the other routers can reach the new IP network that you assigned. You might need to modify the configuration for the routing protocol on the router so that it advertises the new network. Consult the Cisco IOS IP Routing: Protocol-Independent Configuration Guide for information on configuring routing protocols.
If you using subnetting in your network and you are running out of network addresses, you can configure your networking device to allow the configuration of subnet zero. This adds one more usable network address for every subnet in your IP addressing scheme. The table above shows the IP subnets (including subnet 0) for 172.16.0.0/20.
Perform this task to enable the use of IP subnet zero on your networking device.
3. ip subnet-zero
4. interface type number
5. no shutdown
6. ip address ip-address mask
By default, show commands display an IP address and then its netmask in dotted decimal notation. For example, a subnet would be displayed as 131.108.11.55 255.255.255.0.
You might find it more convenient to display the network mask in hexadecimal format or bit count format instead. The hexadecimal format is commonly used on UNIX systems. The previous example would be displayed as 131.108.11.55 0XFFFFFF00.
The bit count format for displaying network masks is to append a slash (/) and the total number of bits in the netmask to the address itself. The previous example would be displayed as 131.108.11.55/24.
Perform this task to specify the format in which netmasks appear for the current session.
2. term ip netmask-format { bitcount | decimal | hexadecimal }
Perform this task to specify the format in which netmasks appear for an individual line.
3. line vty first last
4. term ip netmask-format { bitcount | decimal | hexadecimal }
If you have a limited number of IP network or subnet addresses and you have point-to-point WANs in your network, you can use the IP Unnumbered Interfaces feature to enable IP connectivity on the point-to-point WAN interfaces without actually assigning an IP address to them.
Perform this task to configure the IP Unnumbered Interfaces feature on a point-to-point WAN interface.
The IP Unnumbered Interfaces feature enables IP processing on a point-to-point WAN interface without assigning it an explicit IP address. The IP unnumbered point-to-point WAN interface uses the IP address of another interface to enable IP connectivity, which conserves network addresses.
6. interface type number
7. no shutdown
8. ip unnumbered type number
You can reduce the number of IP subnets used by networking devices to establish IP connectivity to point-to-point WANs that they are connected to by using IP Addresses with 31-bit Prefixes as defined in RFC 3021.
Perform this task to configure an IP address with a 31-bit prefix on a point-to-point WAN interface.
Prior to RFC 3021, Using 31-bit Prefixes on IPv4 Point-to-Point Links , many network administrators assigned IP address with a 30-bit subnet mask (255.255.255.252) to point-to-point interfaces to conserve IP address space. Although this practice does conserve IP address space compared to assigning IP addresses with shorter subnet masks such as 255.255.255.240, IP addresses with a 30-bit subnet mask still require four addresses per link: two host addresses (one for each host interface on the link), one all-zeros network address, and one all-ones broadcast network address.
The table below shows an example of the four IP addresses that are created when a 30-bit (otherwise known as 255.255.255.252 or /30) subnet mask is applied to the IP address 192.168.100.4. The bits that are used to specify the host IP addresses in bold.
Point-to-point links only have two endpoints (hosts) and do not require broadcast support because any packet that is transmitted by one host is always received by the other host. Therefore the all-ones broadcast IP address is not required for a point-to-point interface.
The simplest way to explain RFC 3021 is to say that the use of a 31-bit prefix (created by applying a 31-bit subnet mask to an IP address) allows the all-zeros and all-ones IP addresses to be assigned as host addresses on point-to-point networks. Prior to RFC 3021 the longest prefix in common use on point-to-point links was 30-bits, which meant that the all-zeros and all-ones IP addresses were wasted.
The table below shows an example of the two IP addresses that are created when a 31-bit (otherwise known as 255.255.255.254 or /31) subnet mask is applied to the IP address 192.168.100.4. The bit that is used to specify the host IP addresses in bold
The complete text for RFC 3021 is available at http://www.ietf.org/rfc/rfc3021.txt .
You must have classless IP addressing configured on your networking device before you configure an IP address with a 31-bit prefix on a point-to-point interface. Classless IP addressing is enabled by default in many versions of Cisco IOS software. If you are not certain that your networking device has IP classless addressing configured, enter the ip classless command in global configuration mode to enable it.
3. ip classless
Specifies a point-to-point WAN interface and enters interface configuration mode.
Enables the interface.
Configures the 31bit prefix IP address on the point-to-point WAN interface.
Exits the current configuration mode and returns to privileged EXEC mode.
The following example configures an IP address on three interfaces:
The following example configures secondary IP addresses on three interfaces:
The following example configures the unnumbered IP feature on three interfaces:
The following example configures 31-bit prefixes on two interfaces:
The following example enables subnet zero:
If your network has two or more routers and you have not already configured a routing protocol, consult the Cisco IOS IP Routing Protocols Configuration Guide , Release 12.4T, for information on configuring routing protocols.
Related Documents
Technical assistance.
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Contents Configuring IPv4 Addresses Finding Feature Information Information About IP Addresses Binary Numbering IP Address Structure IP Address Classes IP Network Subnetting IP Network Address Assignments Classless Inter-Domain Routing Prefixes How to Configure IP Addresses Establishing IP Connectivity to a Network by Assigning an IP Address to an Interface Troubleshooting Tips Increasing the Number of IP Hosts that Are Supported on a Network by Using Secondary IP Addresses Troubleshooting Tips What to Do Next Maximizing the Number of Available IP Subnets by Allowing the Use of IP Subnet Zero Troubleshooting Tips Specifying the Format of Network Masks Specifying the Format in Which Netmasks Appear for the Current Session Specifying the Format in Which Netmasks Appear for an Individual Line Using IP Unnumbered Interfaces on Point-to-Point WAN Interfaces to Limit Number of IP Addresses Required IP Unnumbered Feature Troubleshooting Tips Using IP addresses with 31-Bit Prefixes on Point-to-Point WAN Interfaces to Limit Number of IP Addresses Required RFC 3021 Troubleshooting Tips Configuration Examples for IP Addresses Example Establishing IP Connectivity to a Network by Assigning an IP Address to an Interface Example Increasing the Number of IP Hosts that are Supported on a Network by Using Secondary IP Addresses Example Using IP Unnumbered Interfaces on Point-to-Point WAN Interfaces to Limit Number of IP Addresses Required Example Using IP addresses with 31-Bit Prefixes on Point-to-Point WAN Interfaces to Limit Number of IP Addresses Required Example Maximizing the Number of Available IP Subnets by Allowing the Use of IP Subnet Zero Where to Go Next Additional References Feature Information for IP Addresses Configuring IPv4 Addresses This chapter contains information about, and instructions for configuring IPv4 addresses on interfaces that are part of a networking device. Note All further references to IPv4 addresses in this document use only IP in the text, not IPv4. Finding Feature Information Information About IP Addresses How to Configure IP Addresses Configuration Examples for IP Addresses Where to Go Next Additional References Feature Information for IP Addresses Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn . An account on Cisco.com is not required. Information About IP Addresses Binary Numbering IP Address Structure IP Address Classes IP Network Subnetting IP Network Address Assignments Classless Inter-Domain Routing Prefixes Binary Numbering IP addresses are 32 bits long. The 32 bits are divided into four octets (8-bits). A basic understanding of binary numbering is very helpful if you are going to manage IP addresses in a network because changes in the values of the 32 bits indicate either a different IP network address or IP host address. A value in binary is represented by the number (0 or 1) in each position multiplied by the number 2 to the power of the position of the number in sequence, starting with 0 and increasing to 7, working right to left. The figure below is an example of an 8-digit binary number. Figure 1. Example of an 8-digit Binary Number The figure below provides binary to decimal number conversion for 0 through 134. Figure 2. Binary to Decimal Number Conversion for 0 to 134 The figure below provides binary to decimal number conversion for 135 through 255. Figure 3. Binary to Decimal Number Conversion for 135 to 255 IP Address Structure An IP host address identifies a device to which IP packets can be sent. An IP network address identifies a specific network segment to which one or more hosts can be connected. The following are characteristics of IP addresses: IP addresses are 32 bits long IP addresses are divided into four sections of one byte (octet) each IP addresses are typically written in a format known as dotted decimal The table below shows some examples of IP addresses. Table 1 Examples of IP Addresses IP Addresses in Dotted Decimal IP Addresses in Binary 10.34.216.75 00001010.00100010.11011000.01001011 172.16.89.34 10101100.00010000.01011001.00100010 192.168.100.4 11000000.10101000.01100100.00000100 Note The IP addresses in the table above are from RFC 1918, Address Allocation for Private Internets . These IP addresses are not routable on the Internet. They are intended for use in private networks. For more information on RFC1918, see http://www.ietf.org/rfc/rfc1918.txt . IP addresses are further subdivided into two sections known as network and host. The division is accomplished by arbitrarily ranges of IP addresses to classes. For more information see RFC 791 Internet Protocol at http://www.ietf.org/rfc/rfc0791.txt . IP Address Classes In order to provide some structure to the way IP addresses are assigned, IP addresses are grouped into classes. Each class has a range of IP addresses. The range of IP addresses in each class is determined by the number of bits allocated to the network section of the 32-bit IP address. The number of bits allocated to the network section is represented by a mask written in dotted decimal or with the abbreviation / n where n = the numbers of bits in the mask. The table below lists ranges of IP addresses by class and the masks associated with each class. The digits in bold indicate the network section of the IP address for each class. The remaining digits are available for host IP addresses. For example, IP address 10.90.45.1 with a mask of 255.0.0.0 is broken down into a network IP address of 10.0.0.0 and a host IP address of 0.90.45.1. Table 2 IP Address Ranges by Class with Masks Class Range A (range/mask in dotted decimal) 0 .0.0.0 to 127.0.0.0/8 (255.0.0.0) A (range in binary) 00000000 .00000000.00000000.00000000 to 01111111 .00000000.00000000.00000000 A (mask in binary) 11111111.00000000.00000000.00000000/8 B (range/mask in dotted decimal) 128 .0.0.0 to 191 . 255 .0.0/16 (255.255.0.0) B (range in binary) 10000000 . 00000000 .00000000.00000000 to 10111111 . 11111111 .00000000.00000000 B (mask in binary) 11111111 . 11111111 .00000000.00000000/16 C (range/mask in dotted decimal) 192 . 0 . 0 .0 to 223 . 255 . 255 .0/24 (255.255.255.0) C (range in binary) 11000000 . 00000000 . 00000000 .00000000 to 11011111 . 11111111 . 11111111 .00000000 C (mask in binary) 11111111.11111111.11111111.0000000/24 D 1 (range/mask in dotted decimal) 224 . 0 . 0 . 0 to 239 . 255 . 255 . 255 /32 (255.255.255.255) D (range in binary) 11100000 . 00000000 . 00000000 . 00000000 to 11101111 . 11111111 . 11111111 . 11111111 D (mask in binary) 11111111.11111111.11111111.11111111/32 E 2 (range/mask in dotted decimal) 240 . 0 . 0 . 0 to 255 . 255 . 255 . 255 /32 (255.255.255.255) E (range in binary) 11110000 . 00000000 . 00000000 . 00000000 to 11111111 . 11111111 . 11111111 . 11111111 E (mask in binary) 11111111.11111111.11111111.11111111/32 1 Class D IP addresses are reserved for multicast applications. 2 Class E IP addresses are reserved for broadcast traffic. Note Some IP addresses in these ranges are reserved for special uses. For more information refer to RFC 3330, Special-Use IP Addresses , at http://www.ietf.org/rfc/rfc3330.txt . When a digit that falls within the network mask changes from 1 to 0 or 0 to 1 the network address is changed. For example, if you change 10101100.00010000.01011001.00100010/16 to 10101100.00110000.01011001.00100010/16 you have changed the network address from 172.16.89.34/16 to 172.48.89.34/16. When a digit that falls outside the network mask changes from 1 to 0 or 0 to 1 the host address is changed. For example, if you change 10101100.00010000.01011001.00100010/16 to 10101100.00010000.01011001.00100011/16 you have changed the host address from 172.16.89.34/16 to 172.16.89.35/16. Each class of IP address supports a specific range of IP network addresses and IP host addresses. The range of IP network addresses available for each class is determined with the formula 2 to the power of the number of available bits. In the case of class A addresses, the value of the first bit in the 1st octet (as shown in the table above) is fixed at 0. This leaves 7 bits for creating additional network addresses. Therefore there are 128 IP network addresses available for class A (27 = 128). The number of IP host addresses available for an IP address class is determined by the formula 2 to the power of the number of available bits minus 2. There are 24 bits available in a class A addresses for IP host addresses. Therefore there are 16,777,214 IP hosts addresses available for class A ((224) - 2 = 16,777,214)). Note The 2 is subtracted because there are 2 IP addresses that cannot be used for a host. The all 0’s host address cannot be used because it is the same as the network address. For example, 10.0.0.0 cannot be both a IP network address and an IP host address. The all 1’s address is a broadcast address that is used to reach all hosts on the network. For example, an IP datagram addressed to 10.255.255.255 will be accepted by every host on network 10.0.0.0. The table below shows the network and host addresses available for each class of IP address. Table 3 Network and Host Addresses Available for Each Class of IP Address Class Network Addresses Host Addresses A 128 16,777,214 B 16,384 3 65534 C 2,097,152 4 254 3 Only 14 bits are available for class B IP network addresses because the first 2 bits are fixed at 10 as shown in Table 2 . 4 Only 21 bits are available for class C IP network addresses because the first 3 bits are fixed at 110 as shown in Table 2 . IP Network Subnetting The arbitrary subdivision of network and host bits in IP address classes resulted in an inefficient allocation of IP space. For example, if your network has 16 separate physical segments you will need 16 IP network addresses. If you use 16 class B IP network addresses, you would be able to support 65,534 hosts on each of the physical segments. Your total number of supported host IP addresses is 1,048,544 (16 * 65,534 = 1,048,544). Very few network technologies can scale to having 65,534 hosts on a single network segment. Very few companies need 1,048,544 IP host addresses. This problem required the development of a new strategy that permitted the subdivision of IP network addresses into smaller groupings of IP subnetwork addresses. This strategy is known as subnetting. If your network has 16 separate physical segments you will need 16 IP subnetwork addresses. This can be accomplished with one class B IP address. For example, start with the class B IP address of 172.16.0.0 you can reserve 4 bits from the third octet as subnet bits. This gives you 16 subnet IP addresses 24 = 16. The table below shows the IP subnets for 172.16.0.0/20. Table 4 Examples of IP Subnet Addresses using 172.16.0.0/20 Number IP Subnet Addresses in Dotted Decimal IP Subnet Addresses in Binary 0 5 172.16.0.0 10101100.00010000.00000000.00000000 1 172.16.16.0 10101100.00010000.00010000.00000000 2 172.16.32.0 10101100.00010000.00100000.00000000 3 172.16.48.0 10101100.00010000.00110000.00000000 4 172.16.64.0 10101100.00010000.01000000.00000000 5 172.16.80.0 10101100.00010000.01010000.00000000 6 172.16.96.0 10101100.00010000.01100000.00000000 7 172.16.112.0 10101100.00010000.01110000.00000000 8 172.16.128.0 10101100.00010000.10000000.00000000 9 172.16.144.0 10101100.00010000.10010000.00000000 10 172.16.160.0 10101100.00010000.10100000.00000000 11 172.16.176.0 10101100.00010000.10110000.00000000 12 172.16.192.0 10101100.00010000.11000000.00000000 13 172.16.208.0 10101100.00010000.11010000.00000000 14 172.16.224.0 10101100.00010000.11100000.00000000 15 172.16.240.0 10101100.00010000.11110000.00000000 5 The first subnet that has all of the subnet bits set to 0 is referred to as subnet 0 . It is indistinguishable from the network address and must be used carefully. When a digit that falls within the subnetwork (subnet) mask changes from 1 to 0 or 0 to 1 the subnetwork address is changed. For example, if you change 10101100.00010000.01011001.00100010/20 to 10101100.00010000.01111001.00100010/20 you have changed the network address from 172.16.89.34/20 to 172.16.121.34/20. When a digit that falls outside the subnet mask changes from 1 to 0 or 0 to 1 the host address is changed. For example, if you change 10101100.00010000.01011001.00100010/20 to 10101100.00010000.01011001.00100011/20 you have changed the host address from 172.16.89.34/20 to 172.16.89.35/20. Timesaver To avoid having to do manual IP network, subnetwork, and host calculations, use one of the free IP subnet calculators available on the Internet. Some people get confused about the terms network address and subnet or subnetwork addresses and when to use them. In the most general sense the term network address means “the IP address that routers use to route traffic to a specific network segment so that the intended destination IP host on that segment can receive it”. Therefore the term network address can apply to both non-subnetted and subnetted IP network addresses. When you are troubleshooting problems with forwarding traffic from a router to a specific IP network address that is actually a subnetted network address, it can help to be more specific by referring to the destination network address as a subnet network address because some routing protocols handle advertising subnet network routes differently from network routes. For example, the default behavior for RIP v2 is to automatically summarize the subnet network addresses that it is connected to their non-subnetted network addresses (172.16.32.0/24 is advertised by RIP v2 as 172.16.0.0/16) when sending routing updates to other routers. Therefore the other routers might have knowledge of the IP network addresses in the network, but not the subnetted network addresses of the IP network addresses. Tip The term IP address space is sometimes used to refer to a range of IP addresses. For example, “We have to allocate a new IP network address to our network because we have used all of the available IP addresses in the current IP address space”. IP Network Address Assignments Routers keep track of IP network addresses to understand the network IP topology (layer 3 of the OSI reference model) of the network to ensure that IP traffic can be routed properly. In order for the routers to understand the network layer (IP) topology, every individual physical network segment that is separated from any other physical network segment by a router must have a unique IP network address. The figure below shows an example of a simple network with correctly configured IP network addresses. The routing table in R1 looks like the table below. Table 5 Routing Table for a Correctly Configured Network Interface Ethernet 0 Interface Ethernet 1 172.31.32.0/24 (Connected) 172.31.16.0/24 (Connected) Figure 4. Correctly Configured Network The figure below shows an example of a simple network with incorrectly configured IP network addresses. The routing table in R1 looks like the table below. If the PC with IP address 172.31.32.3 attempts to send IP traffic to the PC with IP address 172.31.32.54, router R1 cannot determine which interface that the PC with IP address 172.31.32.54 is connected to. Table 6 Routing Table in Router R1 for an Incorrectly Configured Network (Example 1) Ethernet 0 Ethernet 1 172.31.32.0/24 (Connected) 172.31.32.0/24 (Connected) Figure 5. Incorrectly Configured Network (Example 1) To help prevent mistakes as shown in the figure above, Cisco IOS-based networking devices will not allow you to configure the same IP network address on two or more interfaces in the router when IP routing is enabled. The only way to prevent the mistake shown in the figure below, where 172.16.31.0/24 is used in R2 and R3, is to have very accurate network documentation that shows where you have assigned IP network addresses. Table 7 Routing Table in Router R1 for an Incorrectly Configured Network (Example 2) Ethernet 0 Serial 0 Serial 1 172.16.32.0/24 (Connected) 192.168.100.4/29 (Connected) 172.16.31.0/24 RIP 192.168.100.8/29 (Connected) 172.16.31.0/24 RIP Figure 6. Incorrectly Configured Network (Example 2) For a more thorough explanation of IP routing, see the "Related Documents" section for a list of documents related to IP routing. Classless Inter-Domain Routing Due to the continuing increase in internet use and the limitations on how IP addresses can be assigned using the class structure shown in the table above, a more flexible method for allocating IP addresses was required. The new method is documented in RFC 1519 Classless Inter-Domain Routing (CIDR): an Address Assignment and Aggregation Strategy . CIDR allows network administrators to apply arbitrary masks to IP addresses to create an IP addressing plan that meets the requirements of the networks that they administrate. For more information on CIDR, refer to RFC 1519 at http://www.ietf.org/rfc/rfc1519.txt . Prefixes The term prefix is often used to refer to the number of bits of an IP network address that are of importance for building routing tables. If you are using only classful (strict adherence to A, B, and C network address boundaries) IP addresses, the prefixes are the same as the masks for the classes of addresses. For example, using classful IP addressing, a class C IP network address such as 192.168.10.0 uses a 24-bit mask (/24 or 255.255.255.0) and can also be said to have a 24-bit prefix. If you are using CIDR, the prefixes are arbitrarily assigned to IP network addresses based on how you want to populate the routing tables in your network. For example, a group of class C IP addresses such as 192.168.10.0, 192.168.11.0, 192.168.12.0, 192.168.13.0 can be advertised as a single route to 192.168.0.0 with a 16-bit prefix (192.168.0.0/16). This results in a 4:1 reduction in the number of routes that the routers in your network need to manage. How to Configure IP Addresses Establishing IP Connectivity to a Network by Assigning an IP Address to an Interface Increasing the Number of IP Hosts that Are Supported on a Network by Using Secondary IP Addresses Maximizing the Number of Available IP Subnets by Allowing the Use of IP Subnet Zero Specifying the Format of Network Masks Using IP Unnumbered Interfaces on Point-to-Point WAN Interfaces to Limit Number of IP Addresses Required Using IP addresses with 31-Bit Prefixes on Point-to-Point WAN Interfaces to Limit Number of IP Addresses Required Establishing IP Connectivity to a Network by Assigning an IP Address to an Interface Perform this task to configure an IP address on an interface. SUMMARY STEPS 1. enable 2. configure terminal 3. interface type number 4. no shutdown 5. ip address ip-address mask 6. end DETAILED STEPS Command or Action Purpose Step 1 enable Example: Router> enable Enables privileged EXEC mode. Enter your password if prompted. Step 2 configure terminal Example: Router# configure terminal Enters global configuration mode. Step 3 interface type number Example: Router(config)# interface fastethernet 0/0 Specifies an interface and enters interface configuration mode. Step 4 no shutdown Example: Router(config-if)# no shutdown Enables the interface. Step 5 ip address ip-address mask Example: Router(config-if)# ip address 172.16.16.1 255.255.240.0 Configures the IP address on the interface. Step 6 end Example: Router(config-if)# end Exits the current configuration mode and returns to privileged EXEC mode. Troubleshooting Tips The following commands can help troubleshoot IP addressing: show ip interface --Displays the IP parameters for the interface. show ip route connected --Displays the IP networks the networking device is connected to. Increasing the Number of IP Hosts that Are Supported on a Network by Using Secondary IP Addresses If you have a situation in which you need to connect more IP hosts to a network segment and you have used all of the available IP host addresses for the subnet to which you have assigned the segment, you can avoid having to readdress all of the hosts with a different subnet by adding a second IP network address to the network segment. Perform this task to configure a secondary IP address on an interface. SUMMARY STEPS 1. enable 2. configure terminal 3. interface type number 4. no shutdown 5. ip address ip-address mask 6. ip address ip-address mask secondary 7. end DETAILED STEPS Command or Action Purpose Step 1 enable Example: Router> enable Enables privileged EXEC mode. Enter your password if prompted. Step 2 configure terminal Example: Router# configure terminal Enters global configuration mode. Step 3 interface type number Example: Router(config)# interface fastethernet 0/0 Specifies an interface and enters interface configuration mode. Step 4 no shutdown Example: Router(config-if)# no shutdown Enables the interface. Step 5 ip address ip-address mask Example: Router(config-if)# ip address 172.16.16.1 255.255.240.0 Configures the IP address on the interface. Step 6 ip address ip-address mask secondary Example: Router(config-if)# ip address 172.16.32.1 255.255.240.0 secondary Configures the secondary IP address on the interface. Step 7 end Example: Router(config-if)# end Exits the current configuration mode and returns to privileged EXEC mode. Troubleshooting Tips The following commands can help troubleshoot IP addressing: show ip interface --Displays the IP parameters for the interface. show ip route connected --Displays the IP networks the networking device is connected to. What to Do Next If your network has two or more routers and you have already configured a routing protocol, make certain that the other routers can reach the new IP network that you assigned. You might need to modify the configuration for the routing protocol on the router so that it advertises the new network. Consult the Cisco IOS IP Routing: Protocol-Independent Configuration Guide for information on configuring routing protocols. Maximizing the Number of Available IP Subnets by Allowing the Use of IP Subnet Zero If you using subnetting in your network and you are running out of network addresses, you can configure your networking device to allow the configuration of subnet zero. This adds one more usable network address for every subnet in your IP addressing scheme. The table above shows the IP subnets (including subnet 0) for 172.16.0.0/20. Perform this task to enable the use of IP subnet zero on your networking device. SUMMARY STEPS 1. enable 2. configure terminal 3. ip subnet-zero 4. interface type number 5. no shutdown 6. ip address ip-address mask 7. end DETAILED STEPS Command or Action Purpose Step 1 enable Example: Router> enable Enables privileged EXEC mode. Enter your password if prompted. Step 2 configure terminal Example: Router# configure terminal Enters global configuration mode. Step 3 ip subnet-zero Example: Router(config)# ip subnet-zero Enables the use of IP subnet zero. Step 4 interface type number Example: Router(config)# interface fastethernet 0/0 Specifies an interface and enters interface configuration mode. Step 5 no shutdown Example: Router(config-if)# no shutdown Enables the interface. Step 6 ip address ip-address mask Example: Router(config-if)# ip address 172.16.0.1 255.255.240.0 Configures the subnet zero IP address on the interface. Step 7 end Example: Router(config-if)# end Exits the current configuration mode and returns to privileged EXEC mode. Troubleshooting Tips The following commands can help troubleshoot IP addressing: show ip interface --Displays the IP parameters for the interface. show ip route connected --Displays the IP networks the networking device is connected to. Specifying the Format of Network Masks By default, show commands display an IP address and then its netmask in dotted decimal notation. For example, a subnet would be displayed as 131.108.11.55 255.255.255.0. You might find it more convenient to display the network mask in hexadecimal format or bit count format instead. The hexadecimal format is commonly used on UNIX systems. The previous example would be displayed as 131.108.11.55 0XFFFFFF00. The bit count format for displaying network masks is to append a slash (/) and the total number of bits in the netmask to the address itself. The previous example would be displayed as 131.108.11.55/24. Specifying the Format in Which Netmasks Appear for the Current Session Specifying the Format in Which Netmasks Appear for an Individual Line Specifying the Format in Which Netmasks Appear for the Current Session Perform this task to specify the format in which netmasks appear for the current session. SUMMARY STEPS 1. enable 2. term ip netmask-format { bitcount | decimal | hexadecimal } DETAILED STEPS Command or Action Purpose Step 1 enable Example: Router> enable Enables privileged EXEC mode. Enter your password if prompted. Step 2 term ip netmask-format { bitcount | decimal | hexadecimal } Example: Router# term ip netmask-format hexadecimal Specifies the format the router uses to display network masks. Specifying the Format in Which Netmasks Appear for an Individual Line Perform this task to specify the format in which netmasks appear for an individual line. SUMMARY STEPS 1. enable 2. configure terminal 3. line vty first last 4. term ip netmask-format { bitcount | decimal | hexadecimal } 5. end DETAILED STEPS Command or Action Purpose Step 1 enable Example: Router> enable Enables privileged EXEC mode. Enter your password if prompted. Step 2 configure terminal Example: Router# configure terminal Enters global configuration mode. Step 3 line vty first last Example: Router(config)# line vty 0 4 Enters line configuration mode for the range of lines specified by the first and last arguments. Step 4 term ip netmask-format { bitcount | decimal | hexadecimal } Example: Router(config-line)# ip netmask-format hexadecimal Specifies the format the router uses to display the network mask for an individual line. Step 5 end Example: Router(config-if)# end Exits the current configuration mode and returns to privileged EXEC mode. Using IP Unnumbered Interfaces on Point-to-Point WAN Interfaces to Limit Number of IP Addresses Required If you have a limited number of IP network or subnet addresses and you have point-to-point WANs in your network, you can use the IP Unnumbered Interfaces feature to enable IP connectivity on the point-to-point WAN interfaces without actually assigning an IP address to them. Perform this task to configure the IP Unnumbered Interfaces feature on a point-to-point WAN interface. IP Unnumbered Feature Troubleshooting Tips IP Unnumbered Feature The IP Unnumbered Interfaces feature enables IP processing on a point-to-point WAN interface without assigning it an explicit IP address. The IP unnumbered point-to-point WAN interface uses the IP address of another interface to enable IP connectivity, which conserves network addresses. Note The following restrictions apply to the IP Unnumbered Interfaces feature: The IP Unnumbered Interfaces feature is only supported on point-to-point (non-multiaccess) WAN interfaces You cannot netboot a Cisco IOS image over an interface that is using the IP Unnumbered Interfaces feature SUMMARY STEPS 1. enable 2. configure terminal 3. interface type number 4. no shutdown 5. ip address ip-address mask 6. interface type number 7. no shutdown 8. ip unnumbered type number 9. end DETAILED STEPS Command or Action Purpose Step 1 enable Example: Router> enable Enables privileged EXEC mode. Enter your password if prompted. Step 2 configure terminal Example: Router# configure terminal Enters global configuration mode. Step 3 interface type number Example: Router(config)# interface fastethernet 0/0 Specifies an interface and enters interface configuration mode. Step 4 no shutdown Example: Router(config-if)# no shutdown Enables the interface. Step 5 ip address ip-address mask Example: Router(config-if)# ip address 172.16.16.1 255.255.240.0 Configures the IP address on the interface. Step 6 interface type number Example: Router(config-if)# interface serial 0/0 Specifies a point-to-point WAN interface and enters interface configuration mode. Step 7 no shutdown Example: Router(config-if)# no shutdown Enables the point-to-point WAN interface. Step 8 ip unnumbered type number Example: Router(config-if)# ip unnumbered fastethernet 0/0 Enables the IP unnumbered feature on the point-to-point WAN interface. In this example the point-to-point WAN interface uses IP address 172.16.16.1 from Fast Ethernet 0/0. Step 9 end Example: Router(config-if)# end Exits the current configuration mode and returns to privileged EXEC mode. Troubleshooting Tips The following commands can help troubleshoot IP addressing: show ip interface --Displays the IP parameters for the interface. show ip route connected --Displays the IP networks the networking device is connected to. Using IP addresses with 31-Bit Prefixes on Point-to-Point WAN Interfaces to Limit Number of IP Addresses Required You can reduce the number of IP subnets used by networking devices to establish IP connectivity to point-to-point WANs that they are connected to by using IP Addresses with 31-bit Prefixes as defined in RFC 3021. Perform this task to configure an IP address with a 31-bit prefix on a point-to-point WAN interface. RFC 3021 Troubleshooting Tips RFC 3021 Prior to RFC 3021, Using 31-bit Prefixes on IPv4 Point-to-Point Links , many network administrators assigned IP address with a 30-bit subnet mask (255.255.255.252) to point-to-point interfaces to conserve IP address space. Although this practice does conserve IP address space compared to assigning IP addresses with shorter subnet masks such as 255.255.255.240, IP addresses with a 30-bit subnet mask still require four addresses per link: two host addresses (one for each host interface on the link), one all-zeros network address, and one all-ones broadcast network address. The table below shows an example of the four IP addresses that are created when a 30-bit (otherwise known as 255.255.255.252 or /30) subnet mask is applied to the IP address 192.168.100.4. The bits that are used to specify the host IP addresses in bold. Table 8 Four IP Addresses Created When a 30-Bit Subnet Mask (/30) Is Used Address Description Binary 192.168.100.4/30 All-zeros IP address 11000000.10101000.01100100.000001 00 192.168.100.5/30 First host addresses 11000000.10101000.01100100.000001 01 192.168.100.6/30 Second host address 11000000.10101000.01100100.000001 10 192.168.100.7/30 All-ones broadcast address 11000000.10101000.01100100.000001 11 Point-to-point links only have two endpoints (hosts) and do not require broadcast support because any packet that is transmitted by one host is always received by the other host. Therefore the all-ones broadcast IP address is not required for a point-to-point interface. The simplest way to explain RFC 3021 is to say that the use of a 31-bit prefix (created by applying a 31-bit subnet mask to an IP address) allows the all-zeros and all-ones IP addresses to be assigned as host addresses on point-to-point networks. Prior to RFC 3021 the longest prefix in common use on point-to-point links was 30-bits, which meant that the all-zeros and all-ones IP addresses were wasted. The table below shows an example of the two IP addresses that are created when a 31-bit (otherwise known as 255.255.255.254 or /31) subnet mask is applied to the IP address 192.168.100.4. The bit that is used to specify the host IP addresses in bold Table 9 Two IP Addresses Created When a 31-Bit Subnet Mask (/31) Is Used Address Description Binary 192.168.100.4/31 First host address 11000000.10101000.01100100.0000010 0 192.168.100.5/31 Second host address 11000000.10101000.01100100.0000010 1 The complete text for RFC 3021 is available at http://www.ietf.org/rfc/rfc3021.txt . Before You Begin You must have classless IP addressing configured on your networking device before you configure an IP address with a 31-bit prefix on a point-to-point interface. Classless IP addressing is enabled by default in many versions of Cisco IOS software. If you are not certain that your networking device has IP classless addressing configured, enter the ip classless command in global configuration mode to enable it. Note This task can only be performed on point-to-point (nonmultiaccess) WAN interfaces. SUMMARY STEPS 1. enable 2. configure terminal 3. ip classless 4. interface type number 5. no shutdown 6. ip address ip-address mask 7. end DETAILED STEPS Command or Action Purpose Step 1 enable Example: Router> enable Enables privileged EXEC mode. Enter your password if prompted. Step 2 configure terminal Example: Router# configure terminal Enters global configuration mode. Step 3 ip classless Example: Router(config)# ip classless (Optional) Enables IP classless (CIDR). Note This command is enabled by default in many versions of Cisco IOS. If you are not certain if it is enabled by default in the version of Cisco IOS that your networking device is running, enter the ip classless command as shown. When you are done with this task view the configuration. If the ip classless command does not appear in your configuration, it is enabled by default. Step 4 interface type number Example: Router(config)# interface serial 0/0 Specifies a point-to-point WAN interface and enters interface configuration mode. Step 5 no shutdown Example: Router(config-if)# no shutdown Enables the interface. Step 6 ip address ip-address mask Example: Router(config-if)# ip address 192.168.100.4 255.255.255.254 Configures the 31bit prefix IP address on the point-to-point WAN interface. Step 7 end Example: Router(config-if)# end Exits the current configuration mode and returns to privileged EXEC mode. Troubleshooting Tips The following commands can help troubleshoot IP addressing: show ip interface --Displays the IP parameters for the interface. show ip route connected --Displays the IP networks the networking device is connected to. Configuration Examples for IP Addresses Example Establishing IP Connectivity to a Network by Assigning an IP Address to an Interface Example Increasing the Number of IP Hosts that are Supported on a Network by Using Secondary IP Addresses Example Using IP Unnumbered Interfaces on Point-to-Point WAN Interfaces to Limit Number of IP Addresses Required Example Using IP addresses with 31-Bit Prefixes on Point-to-Point WAN Interfaces to Limit Number of IP Addresses Required Example Maximizing the Number of Available IP Subnets by Allowing the Use of IP Subnet Zero Example Establishing IP Connectivity to a Network by Assigning an IP Address to an Interface The following example configures an IP address on three interfaces: ! interface FastEthernet0/0 no shutdown ip address 172.16.16.1 255.255.240.0 ! interface FastEthernet0/1 no shutdown ip address 172.16.32.1 255.255.240.0 ! interface FastEthernet0/2 no shutdown ip address 172.16.48.1 255.255.240.0 ! Example Increasing the Number of IP Hosts that are Supported on a Network by Using Secondary IP Addresses The following example configures secondary IP addresses on three interfaces: ! interface FastEthernet0/0 no shutdown ip address 172.16.16.1 255.255.240.0 ip address 172.16.32.1 255.255.240.0 secondary ! ! interface FastEthernet0/1 no shutdown ip address 172.17.16.1 255.255.240.0 ip address 172.17.32.1 255.255.240.0 secondary ! ! interface FastEthernet0/2 no shutdown ip address 172.18.16.1 255.255.240.0 ip address 172.18.32.1 255.255.240.0 secondary ! Example Using IP Unnumbered Interfaces on Point-to-Point WAN Interfaces to Limit Number of IP Addresses Required The following example configures the unnumbered IP feature on three interfaces: ! interface FastEthernet0/0 no shutdown ip address 172.16.16.1 255.255.240.0 ! interface serial0/0 no shutdown ip unnumbered fastethernet0/0 ! interface serial0/1 no shutdown ip unnumbered fastethernet0/0 ! interface serial0/2 no shutdown ip unnumbered fastethernet0/0 ! Example Using IP addresses with 31-Bit Prefixes on Point-to-Point WAN Interfaces to Limit Number of IP Addresses Required The following example configures 31-bit prefixes on two interfaces: ! ip classless ! interface serial0/0 no shutdown ip address 192.168.100.2 255.255.255.254 ! ! interface serial0/1 no shutdown ip address 192.168.100.4 255.255.255.254 Example Maximizing the Number of Available IP Subnets by Allowing the Use of IP Subnet Zero The following example enables subnet zero: ! interface FastEthernet0/0 no shutdown ip address 172.16.16.1 255.255.240.0 ! ip subnet-zero ! Where to Go Next If your network has two or more routers and you have not already configured a routing protocol, consult the Cisco IOS IP Routing Protocols Configuration Guide , Release 12.4T, for information on configuring routing protocols. Additional References Related Documents Related Topic Document Title Cisco IOS commands Cisco IOS Master Commands List, All Releases IP addressing commands: complete command syntax, command mode, command history, defaults, usage guidelines, and examples Cisco IOS IP Addressing Services Command Reference Fundamental principles of IP addressing and IP routing IP Routing Primer ISBN 1578701082 Standards Standard Title No new or modified standards are supported, and support for existing standards has not been modified -- MIBs MIB MIBs Link No new or modified MIBs are supported, and support for existing MIBs has not been modified To locate and download MIBs for selected platforms, Cisco software releases, and feature sets, use Cisco MIB Locator found at the following URL: http://www.cisco.com/go/mibs RFCs RFC 6 Title RFC 791 Internet Protocol http://www.ietf.org/rfc/rfc0791.txt RFC 1338 Classless Inter-Domain Routing (CIDR): an Address Assignment and Aggregation Strategy http://www.ietf.org/rfc/rfc1519.txt RFC 1466 Guidelines for Management of IP Address Space http://www.ietf.org/rfc/rfc1466.txt RFC 1716 Towards Requirements for IP Routers http://www.ietf.org/rfc/rfc1716.txt RFC 1918 Address Allocation for Private Internets http://www.ietf.org/rfc/rfc1918.txt RFC 3330 Special-Use IP Addresses http://www.ietf.org/rfc/rfc3330.txt 6 These references are only a sample of the many RFCs available on subjects related to IP addressing and IP routing. Refer to the IETF RFC site at http://www.ietf.org/rfc.html for a full list of RFCs. Technical Assistance Description Link The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. http://www.cisco.com/cisco/web/support/index.htmll Feature Information for IP Addresses The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn . An account on Cisco.com is not required. Table 10 Feature Information for IP Addresses Feature Name Releases Feature Information Classless Inter-Domain Routing 10.0 CIDR is a new way of looking at IP addresses that eliminates the concept of classes (class A, class B, and so on). For example, network 192.213.0.0, which is an illegal class C network number, is a legal supernet when it is represented in CIDR notation as 192.213.0.0/16. The /16 indicates that the subnet mask consists of 16 bits (counting from the left). Therefore, 192.213.0.0/16 is similar to 192.213.0.0 255.255.0.0. The following command was introduced or modified: ip classless . IP Subnet Zero 10.0 In order to conserve IP address space IP Subnet Zero allows the use of the all-zeros subnet as an IP address on an interface, such as configuring 172.16.0.1/24 on Fast Ethernet 0/0. The following command was introduced or modified: ip subnet-zero . IP Unnumbered Interfaces 10.0 In order to conserve IP address space, IP unnumbered interfaces use the IP address of another interface to enable IP connectivity. The following command was introduced or modified: ip unnumbered . Using 31-bit Prefixes on IP Point-to-Point Links 12.0(14)S 12.2(4)T In order to conserve IP address space on the Internet, a 31-bit prefix length allows the use of only two IP addresses on a point-to-point link. Previously, customers had to use four IP addresses or unnumbered interfaces for point-to-point links.
Was this Document Helpful?

Contact Cisco

- (Requires a Cisco Service Contract )

Nerd For Tech
May 9, 2021
Basics of IPv4 and IPv6 addressing
TCP/IP is the backbone of communication over internet. Now there are two versions of Internet protocol available IP version 4 and version 6 for communication over the network layer. The key difference between these two are an IPv4 address is 32 bits and expressed in dotted-decimal notation whereas an IPv6 address is 128 bits in length and expressed in hexadecimal format.
IPv4 versus IPv6 representation
- IP version 4
As we can see from the image IPv4 is divided into 4 bits field separated by a dot (4 * 8 = 32), represented in a decimal notation. IPv4 address is divided into two parts for subnetting purpose into network and host field. As the number of devices began to grow over internet IPv4 address space started to deplete and a solution was implemented twenty tears ago.
- IP version 6
An IPv6 address uses 128 bit hexadecimal representation, every 4 bit (nibble) is represented by single hexadecimal (4*32=128). Alphanumeric characters are case insensitive in IPv6 representation so digits after 9 it can be A or a .
Unofficially a section of four hexadecimal in IPv6 is known as hextet similar to octet for IPv4 .RFC 2373 and RFC 5952 provides rules for reducing IP address
- Rule 1 : Omission of leading zeros- Leading zeros can be omitted from an IPv4 or IPv6 address.
IP only allows omission of leading zeros omitting trailing zeros can lead to ambiguous addressing.
- Rule 2 : Omission of all 0s hextets
For IPv6 addresses a double column (::) any single contagious string of one or more hextets, this use of double column further reduces size of IPv6 addresses. Below example shows a sample IPv6 addresses after combing two rules.
Classless Interdomain Routing (CIDR)
CIDR is used for dividing IP address ranges for subnetting and allocation. CIDR divides an IP into two set of numbers. CIDR of notation for IPv4 address is as given below.
192.255.255.255/24
First 24 bits out of 32 bits will be network address and rest of bits are use for host part. The diagram below explains CIDR addressing format for IPv4 addresses and the number of maximum hosts it can have respective class and it’s use.
As the internet grew, the limited IPv4 address space was quickly depleted. A customer request for an IPv4 address and a prefix length(subnet mask) to his network requirement was addressed by relying on Network Address transformation(NAT). to accommodate the number of internal IPv4 addresses in their hosts.
- CIDR IPv6 notation
In case of IPv4 addressing if need to increase host address it need to be pulled from the network part, IPv6 solves this problem. CIDR notation is given below.
ipv6-address/ prefix -length
The prefix length identifies the prefix or network portion of the address .Let’s look at an example of address.
First 64 portion is known network address and the second part is known as interface address. If a site receives /48 prefix, this allows (16⁴=65,535) hosts with 18 quintillion interface for each hosts /56 address space(16⁴=256) subnets with same interfaces for each subnet.
IP address types
IPv6 supports three types of addressing
- All node multicast(Broadcast in IPv4)
A unicast address uniquely identifies an interface on an IPv6 device. A packet sent to unicast address is delivered to interface(prefix address) defined by that address. Single interface can have many addresses
An anycast is a unicast assigned to several devices. In anycast packet is delivered to device that is configured with that address, the anycast packet will be routed to the nearest device.
A muticast identifies a group of interfaces belonging to different devices. A packet delivered to multicast address will be delivered by all devices difference between multicast and unicast is that in uncast packets will be delivered to only one device while in multicast packet will be delivered and processed by all devices.
There exists a broadcast in IPv4 addressing were packets will be delivered to all nodes in the system.
Global routing prefix
Depends on the requirement IP allocation needs substantial planning. Such allocation is known as subnetting.
A typical IPv6 site prefix will have a /48 assigned by its provider, usually from an ISP this creates 16-bit subnet ID allowing 65,536 subnets. Gives us 64 bits for interface ID(we are calling interface ID as each subnet will have interfaces) gives us 18 quintillion interfaces(hosts) per subnets.
More from Nerd For Tech
NFT is an Educational Media House. Our mission is to bring the invaluable knowledge and experiences of experts from all over the world to the novice. To know more about us, visit https://www.nerdfortech.org/.
About Help Terms Privacy
Get the Medium app

krishnaprasad k
Data engineer | Deep learning enthusiast | Back end developer |
Text to speech

IMAGES
VIDEO
COMMENTS
In traditional IPv4 notation, this would be expressed as 192.168..128. What we have done here is to designate the first bit of the last octet as significant in addressing the network. This effectively produces two subnetworks. The first subnetwork is from 192.168..1 to 192.168..127.
CIDR to IPv4 Conversion CIDR is the short for Classless Inter-Domain Routing, an IP addressing scheme that replaces the older system based on classes A, B, and C. A single IP address can be used to designate many unique IP addresses with CIDR.
The system of IP addresses as we are currently using it (IPv4), has been long exhausted. All possible addresses (at least 4,294,967,296) have already been assigned. A solution had to be thought up a few decades ago to solve the problem. CIDR helps extend the amount of available addresses.
An IP address is part of a CIDR block and is said to match the CIDR prefix if the initial n bits of the address and the CIDR prefix are the same. An IPv4 address is 32 bits so an n -bit CIDR prefix leaves 32 − n bits unmatched, meaning that 2 32−n IPv4 addresses match a given n -bit CIDR prefix.
When you create a VPC, you must specify an IPv4 CIDR block (a range of private IPv4 addresses). You can optionally assign an IPv6 CIDR block to your VPC and assign IPv6 addresses from that block to instances in your subnets. Contents. ... The public IPv4 address is assigned from Amazon's pool of public IPv4 addresses, and is assigned to the ...
Download: IPv4 CIDR Chart (PDF) IPv6 IPv6 is similar to IPv4, but it is structured so that all LANs have 64 bits of network prefix as opposed to the variable length of network prefix1 that IPv4 networks have. All IPv6 networks have space for 18,446,744,073,709,551,616 IPv6 addresses. Download: IPv6 Chart (PDF)
Assigning prefixes to Amazon EC2 network interfaces. You can assign a private IPv4 or IPv6 CIDR range, either automatically or manually, to your network interfaces. By assigning prefixes, you scale and simplify the management of applications, including container and networking applications that require multiple IP addresses on an instance.
IPv4 is an identifier with a fixed length of 32-bit (2 32 ), which can represent about 4.3 billion different values 1: 4 294 967 296 The human readable and easily memorable dot-decimal notation, which is also used in technical environments, groups the address into four parts where each consists of an unsigned decimal number with 8 bit:
CIDR stands for Classless Inter-Domain Routing, and is used in IPv4, and more recently, IPv6 routing. Source: Classless Inter-Domain Routing CIDR was introduced in 1993 as a way to slow the usage of IPv4 addresses, which were quickly being exhausted under the older Classful IP addressing system that the internet was first built on.
Some large /8 blocks of IPv4 addresses, the former Class A network blocks, are assigned in whole to single organizations or related groups of organizations, either by the Internet Corporation for Assigned Names and Numbers (ICANN), through the Internet Assigned Numbers Authority (IANA), or a regional Internet registry .
When pods are assigned IPv4 addresses from the VPC CIDR range, this often leads to exhaustion of the limited number of IPv4 addresses available in their VPCs. Exploring IPV4 address exhaustion solutions. Custom pod networking is one approach to alleviate IPv4 address exhaustion when deploying large-scale workloads to an Amazon EKS cluster. It ...
What is CIDR IPv4 Address Range Notation? CIDR stands for "Classless Inter-Domain Routing", and is the method used for assigning IP addresses and routing Internet traffic. IPv4 CIDR notation, specifically, is a way of representing a range of IP addresses in a concise and standardized format.
Each IPv4 address is four bytes in length and is expressed in the form: "nnn.nnn.nnn.nnn", where each "nnn" is a number from 0 through 255, the largest value of that can be expressed in eight binary bits. ... so they cannot be assigned to individual devices. Mask Expression CIDR Notation ... CIDR Notation Sample IP Address Max # of Devices; 255 ...
CIDR is mainly used to use IP addresses and solve the routing table explosion efficiently. It is defined in RFC (Request for comments) 1518 and RFC 4632. It is an address block allocation. There are five different classes in the IPV4 addressing system. The IP address classes are used for Internet IP addresses assignment.
This tool will convert an IPv4 address range into CIDR format. CIDR (Classless Inter-Domain Routing) format is a compact format of expression an IP address along with it routing information. A CIDR notation of 4.4.4.0/24 is a representation of IPv4 addresses with the range of 4.4.4.0 to 4.4.4.255.
IPv4 was initially deployed on 1 January 1983 and is still the most commonly used version. IPv4 addresses are 32-bit numbers often expressed as 4 octets in "dotted decimal" notation (for example ... Users are assigned IP addresses by Internet service providers (ISPs). ... (CIDR): The Internet Address Assignment and Aggregation Plan;
IPv6 addresses are much longer and contain 128 bits instead of 32 bits, like IPv4 addresses. CIDR and subnet masks. Once blocks of IP addresses are assigned to end users, CIDR allows them to be further divided within a private network, which is a process known as subnetting (or sub-networking).
IPv4 addresses support a maximum of 32 bits. The same CIDR notation can be applied to IPv6 addresses. The only difference is IPv6 addresses can contain up to 128 bits. An example of CIDR CIDR blocks CIDR blocks are groups of addresses that share the same prefix and contain the same number of bits.
Due to the continuing increase in internet use and the limitations on how IP addresses can be assigned using the class structure shown in the table above, a more flexible method for allocating IP addresses was required. The new method is documented in RFC 1519 Classless Inter-Domain Routing (CIDR): an Address Assignment and Aggregation Strategy ...
CIDR divides an IP into two set of numbers. CIDR of notation for IPv4 address is as given below. 192.255.255.255/24. ... An anycast is a unicast assigned to several devices. In anycast packet is ...