IP Location Logo

What is My IP Location? (Geolocation)

Your IP Address is copied Hide IP with VPN  

This is the public IP address of your computer, and the accuracy of geolocation may vary.

Do you have a problem with IP location lookup? Report a problem .

IP Address Details ( Show more details )

Would you like to help us improve ip-to-location data by providing your feedback?

Why do you need geolocation?

There are several ways to find the geolocation of a user: HTML5 API, Cell Signal, and IP Address to name a few. The pairing of an IP address to a geographical location is the method we used to provide geolocation data. There are times when you need to identify where your web visitors are coming from. You might have an ecommerce website, and would like to know where your potential customers are, pre-populate country codes on forms, display different languages and reduce credit card fraud based on geographic location. Or, you might want to fight against illegal spammers and hackers and would like to locate the sources of a problem.

Although it would be nice to be able to find the precise location of a visitor, it is almost impossible to find the exact location of a host given its IP address . However, there are tools available to help identify the approximate location of the host. ARIN Whois database provides a mechanism for finding contact and registration information for IP resources registered with ARIN.

You may also use 3rd party websites such as Geobytes or Dnsstuff to look up the IP address. The whois lookup will reveal the name of the ISP who owns that IP address, and the country where it originated from. If you're lucky, you might also find the city of origin. You may also use products developed by 3rd-party companies like Ip2location and MaxMind. Our sister website, findmyip.org also provides geographic information about your IP address.

You may also use reverse DNS to find out the hostname of the IP address, which might give you some clues. Many ISPs, Corporations, and Academic institutions use location as a qualified hostname, although this is not always true. A couple of things to note here: (1) Reverse DNS translation do not always work. It depends on the correct configuration of the ISP's DNS server. (2) The US domain names such as .com, .net and .org does not always imply that the host is located in the United States.

You may use ' traceroute ' command to find clues to the location of the IP address. The names of the routers through which packets flow from your host to the destination host might hint at the geographical path of the final location.

IP-based Geolocation FAQ

1. what is ip-based geolocation.

IP-based Geolocation is the mapping of an IP address or MAC address to the real-world geographic location of an Internet-connected computing or a mobile device. Geolocation involves mapping IP addresses to the country, region (city), latitude/longitude, ISP, and domain name among other useful things.

2. Where can I get an IP-based Geolocation database?

There are several commercially available geolocation databases, and their pricing and accuracy may vary. Ip2location, MaxMind, Tamo Soft, DB-IP, Ipinfo, and IPligence offer fee-based databases that can be easily integrated into a web application. Most geolocation database vendors offer APIs and example codes (in ASP, PHP, .NET, and Java programming languages) that can be used to retrieve geolocation data from the database. We use several commercial databases to offer free geolocation data on our website.

There are also freely available geolocation databases. Vendors offering commercial geolocation databases also offer a Lite or Community edition that provides IP-to-Country mappings. Ip2Country.net and Webhosting.info (Directi) offer free IP-to-Country databases that can be also integrated into your web application. There are companies also offering free web services that can be used to show the geolocation of an IP address on your website.

3. How accurate is IP-based Geolocation?

The accuracy of the geolocation database varies depending on which database you use. For IP-to-country databases, some vendors claim to offer 98% to 99% accuracy although typical Ip2Country database accuracy is more like 95%. For IP-to-Region (or City), accuracy range anywhere from 50% to 75% if neighboring cities are treated as correct. Considering that there is no official source of IP-to-Region information, 50+% accuracy is pretty good.

4. How does IP-based geolocation work?

ARIN Whois database provides a mechanism for finding contact and registration information for IP resources registered with ARIN. The IP whois information is available for free, and determining the country from this database is relatively easy. When an organization requires a block of IP addresses, a request is submitted, and allocated IP addresses are assigned to a requested ISP.

Common Network Questions

• Do you want to find an IP address of your network printer? Please read How to find an IP of a printer to find ways to obtain an IP number of your network printer.

• Do you want to find IP Addresses of private network? Please read How to find IP addresses of computing devices on the private network?

Security Tools



Popular tools.

DNS Tools

Popular Articles


© 2006 - 2023, Brand Media, Inc. All rights reserved.

IP Subnet Calculator

This calculator returns a variety of information regarding Internet Protocol version 4 (IPv4) and IPv6 subnets including possible network addresses, usable host ranges, subnet mask, and IP class, among others.

IPv4 Subnet Calculator

Ipv6 subnet calculator.

Related Bandwidth Calculator | Binary Calculator

A subnet is a division of an IP network (internet protocol suite), where an IP network is a set of communications protocols used on the Internet and other similar networks. It is commonly known as TCP/IP (Transmission Control Protocol/Internet Protocol).

The act of dividing a network into at least two separate networks is called subnetting, and routers are devices that allow traffic exchange between subnetworks, serving as a physical boundary. IPv4 is the most common network addressing architecture used, though the use of IPv6 has been growing since 2006.

An IP address is comprised of a network number (routing prefix) and a rest field (host identifier). A rest field is an identifier that is specific to a given host or network interface. A routing prefix is often expressed using Classless Inter-Domain Routing (CIDR) notation for both IPv4 and IPv6. CIDR is a method used to create unique identifiers for networks, as well as individual devices. For IPv4, networks can also be characterized using a subnet mask, which is sometimes expressed in dot-decimal notation, as shown in the "Subnet" field in the calculator. All hosts on a subnetwork have the same network prefix, unlike the host identifier, which is a unique local identification. In IPv4, these subnet masks are used to differentiate the network number and host identifier. In IPv6, the network prefix performs a similar function as the subnet mask in IPv4, with the prefix length representing the number of bits in the address.

Prior to the introduction of CIDR, IPv4 network prefixes could be directly obtained from the IP address based on the class (A, B, or C, which vary based on the range of IP addresses they include) of the address and the network mask. Since the introduction of CIDRs, however, assigning an IP address to a network interface requires both an address and its network mask.

Below is a table providing typical subnets for IPv4.

Allocating IP Addresses

Weave Net automatically assigns containers a unique IP address across the network, and also releases that address when the container exits. Unless you explicitly specify an address, this occurs for all invocations of the attach , detach , expose , and hide commands. Weave Net can also assign addresses in multiple subnets.

The following automatic IP address management topics are discussed:

Initializing Peers on a Weave Network

Priming a Peer

Choosing an allocation range.

Three initialization strategies are available: seed, consensus and observer. These options have different tradeoffs, so pick the one that suits your deployment best.

Configuration via seed requires you to provide a list of peer names (via the --ipalloc-init seed= parameter) amongst which the address space will be shared initially. Normally weave derives a unique peer name automatically at launch, but since you need to know them ahead of time in this case you will need to name each peer explicitly via the --name parameter.

Peers in the weave network are identified by a 48-bit value formatted like an ethernet MAC address (e.g. 01:23:45:67:89:ab) - you can either specify the name fully, or substitute a single run of zero-octets using the :: notation, similar to IPv6 address representation : 00:00:00:00:00:01 can be written ::1 01:00:00:00:00:00 can be written 1:: 01:00:00:00:00:01 can be written 1::1

In this configuration each peer knows in advance how the address space has been divided up, and will be able to perform allocations from the outset even under conditions of partition - no consensus is required.

Via One-off Consensus

Alternatively, you can let Weave Net determine the seed automatically via a consensus algorithm. Since you don’t need to provide it with a list of peer names anymore, you can let Weave Net derive those automatically for you as well.

However, in order for Weave Net to form a single consensus reliably you must now instead tell each peer how many peers there are in total either by listing them as target peers or using the --ipalloc-init consensus= parameter.

Just once, when the first automatic IP address allocation is requested in the whole network, Weave Net needs a majority of peers to be present in order to avoid formation of isolated groups, which can lead to inconsistency, for example, the same IP address being allocated to two different containers.

Therefore, you must either supply the list of all peers in the network at weave launch or add the --ipalloc-init consensus= flag to specify how many peers there will be.

To illustrate, suppose you have three hosts, accessible to each other as $HOST1 , $HOST2 and $HOST3 . You can start Weave Net on those three hosts using these three commands:

Or, if it is not convenient to name all the other hosts at launch time, you can pass the number of peers like this:

The consensus mechanism used to determine a majority transitions through three states: ‘deferred’, ‘waiting’ and ‘achieved’:

Via Observation

Finally, some (but never all) peers can be launched as observers by specifying the --ipalloc-init observer option:

You do not need to specify an initial peer count or seed to such peers. This can be useful to add peers to an existing fixed cluster (for example in response to a scale-out event) without worrying about adjusting initial peer counts accordingly.

--ipalloc-init consensus= and How Quorum is Achieved

Normally it isn’t a problem to over-estimate the value supplied to --ipalloc-init consensus= , but if you supply a number that is too small, then multiple independent groups may form.

Weave Net uses the estimate of the number of peers at initialization to compute a majority or quorum number - specifically floor(n/2) + 1.

If the actual number of peers is less than half the number stated, then they keep waiting for someone else to join in order to reach a quorum.

But if the actual number is more than twice the quorum number, then you may end up with two sets of peers with each reaching a quorum and initializing independent data structures. You’d have to be quite unlucky for this to happen in practice, as they would have to go through the whole agreement process without learning about each other, but it’s definitely possible.

The quorum number is only used once at start-up (specifically, the first time someone tries to allocate or claim an IP address). Once a set of peers is initialized, you can add more and they will join on to the data structure used by the existing set.

The one issue to watch is if the earlier peers are restarted, you must restart them using the current number of peers. If they use the smaller number that was correct when they first started, then they could form an independent set again.

To illustrate this last point, the following sequence of operations is safe with respect to Weave Net’s startup quorum:

Under certain circumstances (for example when adding new peers to an existing network) it is desirable to ensure that a peer has successfully joined and is ready to allocate IP addresses. An administrative command is provided for this purpose:

This operation will block until the peer on which it is run has joined successfully.

By default, Weave Net allocates IP addresses in the range. This can be overridden with the --ipalloc-range option:

and must be the same on every host.

The range parameter is written in CIDR notation - in this example “/16” means the first 16 bits of the address form the network address and the allocator is to allocate container addresses that all start 10.2. See IP addresses and routes for more information.

Weave shares the IP address range across all peers, dynamically according to their needs. If a group of peers becomes isolated from the rest (a partition), they can continue to work with the address ranges they had before isolation, and can subsequently be re-connected to the rest of the network without any conflicts arising.

Data persistence

Key IPAM data is saved to disk, so that it is immediately available when the peer restarts:

A data volume container named weavedb is used to store this data.

IANA IPv4 Address Space Registry

ip address range allocation

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Public IP addresses

Public IP addresses allow Internet resources to communicate inbound to Azure resources. Public IP addresses enable Azure resources to communicate to Internet and public-facing Azure services. The address is dedicated to the resource, until it's unassigned by you. A resource without a public IP assigned can communicate outbound. Azure dynamically assigns an available IP address that isn't dedicated to the resource. For more information about outbound connections in Azure, see Understand outbound connections .

In Azure Resource Manager, a public IP address is a resource that has its own properties.

The following resources can be associated with a public IP address:

Virtual machine network interfaces

Virtual Machine Scale Sets

Public Load Balancers

Virtual Network Gateways (VPN/ER)

NAT gateways

Application Gateways

Azure Firewalls

Bastion Hosts

Route Servers

For Virtual Machine Scale Sets, use Public IP Prefixes .


The following table shows the property a public IP can be associated to a resource and the allocation methods. Public IPv6 support isn't available for all resource types at this time.

IP address version

Public IP addresses can be created with an IPv4 or IPv6 address. You may be given the option to create a dual-stack deployment with a IPv4 and IPv6 address.

Public IP addresses are created with one of the following SKUs:

Basic SKU IPv4 addresses can be upgraded after creation to Standard SKU. To learn about SKU upgrade, refer to Public IP upgrade .

Matching SKUs are required for load balancer and public IP resources. You can't have a mixture of basic SKU resources and standard SKU resources. You can't attach standalone virtual machines, virtual machines in an availability set resource, or a virtual machine scale set resources to both SKUs simultaneously. New designs should consider using Standard SKU resources. For more information about a standard load balancer, see Standard Load Balancer .

IP address assignment

Public IPs have two types of assignments:

Static - The resource is assigned an IP address at the time it's created. The IP address is released when the resource is deleted.

Dynamic - The IP address isn't given to the resource at the time of creation when selecting dynamic. The IP is assigned when you associate the public IP address with a resource. The IP address is released when you stop, or delete the resource.

Static public IP addresses are commonly used in the following scenarios:

When you must update firewall rules to communicate with your Azure resources.

DNS name resolution, where a change in IP address would require updating A records.

Your Azure resources communicate with other apps or services that use an IP address-based security model.

You use TLS/SSL certificates linked to an IP address.

Even when you set the allocation method to static , you cannot specify the actual IP address assigned to the public IP address resource. Azure assigns the IP address from a pool of available IP addresses in the Azure location the resource is created in.

Basic public IP addresses are commonly used for when there's no dependency on the IP address.

For example, a public IP resource is released from a resource named Resource A . Resource A receives a different IP on start-up if the public IP resource is reassigned. Any associated IP address is released if the allocation method is changed from static to dynamic . Any associated IP address is unchanged if the allocation method is changed from dynamic to static . Set the allocation method to static to ensure the IP address remains the same.

DNS Name Label

Select this option to specify a DNS label for a public IP resource. This functionality works for both IPv4 addresses (32-bit A records) and IPv6 addresses (128-bit AAAA records). This selection creates a mapping for domainnamelabel . location .cloudapp.azure.com to the public IP in the Azure-managed DNS.

For instance, creation of a public IP with the following settings:

contoso as a domainnamelabel

West US Azure location

The fully qualified domain name (FQDN) contoso.westus.cloudapp.azure.com resolves to the public IP address of the resource.

Each domain name label created must be unique within its Azure location.

If a custom domain is desired for services that use a public IP, you can use Azure DNS or an external DNS provider for your DNS Record.

Availability Zone

Public IP addresses with a standard SKU can be created as non-zonal, zonal, or zone-redundant in regions that support availability zones .

A zone-redundant IP is created in all zones for a region and can survive any single zone failure. A zonal IP is tied to a specific availability zone, and shares fate with the health of the zone. A "non-zonal" public IP addresses are placed into a zone for you by Azure and doesn't give a guarantee of redundancy.

In regions without availability zones, all public IP addresses are created as non-zonal. Public IP addresses created in a region that is later upgraded to have availability zones remain non-zonal. A public IP's availability zone can't be changed after the public IP's creation.

All basic SKU public IP addresses are created as non-zonal. Any IP that is upgraded from a basic SKU to standard SKU remains non-zonal.

Other public IP address features

There are other attributes that can be used for a public IP address.

The Global Tier allows a public IP address to be used with cross-region load balancers.

The Internet Routing Preference option minimizes the time that traffic spends on the Microsoft network, lowering the egress data transfer cost.

At this time, both the Tier and Routing Preference feature are available for standard SKU IPv4 addresses only. They can't be utilized on the same IP address concurrently.

Azure provides a default outbound access IP for VMs that either aren't assigned a public IP address or are in the back-end pool of an internal basic Azure load balancer. The default outbound access IP mechanism provides an outbound IP address that isn't configurable.

The default outbound access IP is disabled when a public IP address is assigned to the VM, the VM is placed in the back-end pool of a standard load balancer, with or without outbound rules, or if an Azure Virtual Network NAT gateway resource is assigned to the subnet of the VM.

VMs that are created by virtual machine scale sets in flexible orchestration mode don't have default outbound access.

For more information about outbound connections in Azure, see Default outbound access in Azure and Use source network address translation (SNAT) for outbound connections .

The limits for IP addressing are listed in the full set of limits for networking in Azure. The limits are per region and per subscription.

Contact support to increase above the default limits based on your business needs.

Public IPv4 addresses have a nominal charge; Public IPv6 addresses have no charge.

To learn more about IP address pricing in Azure, review the IP address pricing page.

Limitations for IPv6

VPN gateways can't be used in a virtual network with IPv6 enabled, either directly or peered with "UseRemoteGateway".

Public IPv6 addresses are locked at an idle timeout of 4 minutes.

Azure doesn't support IPv6 communication for containers.

Use of IPv6-only virtual machines or virtual machines scale sets aren't supported. Each NIC must include at least one IPv4 IP configuration (dual-stack).

IPv6 ranges can't be added to a virtual network with existing resource navigation links when adding IPv6 to existing IPv4 deployments.

Forward DNS for IPv6 is supported for Azure public DNS. Reverse DNS isn't supported.

Routing Preference Internet isn't supported.

For more information on IPv6 in Azure, see here .

Learn about Private IP Addresses in Azure

Deploy a VM with a static public IP using the Azure portal

Submit and view feedback for

Additional resources

// Tutorial //

Understanding ip addresses, subnets, and cidr notation for networking.

Default avatar

By Justin Ellingwood

Understanding IP Addresses, Subnets, and CIDR Notation for Networking


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:

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 to . This range is used by each host to test networking to itself. Typically, this is expressed by the first address in this range: .

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 to are reserved for private network assignment. For class B, this range is to . For class C, the range of to 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 , 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, 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 . 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 . 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 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 . 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 to . The second subnetwork contains the hosts to . 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 is associated with the netmask by using the CIDR notation of . 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 and because the netmask for class C addresses is .

However, using CIDR notation, we can combine these blocks by referencing this chunk as . This specifies that there are 23 bits used for the network portion that we are referring to.

So the first network ( ) could be represented like this in binary:

While the second network ( ) 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 , 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 !!!

Creative Commons

Popular Topics

Try DigitalOcean for free

Join the tech talk.

Please complete your information!

A Short Guide to IP Addressing

How are ip addresses managed and distributed.

IP addresses are managed by the Internet Assigned Numbers Authority (IANA), which has overall responsibility for the Internet Protocol (IP) address pool, and by the Regional Internet Registries (RIRs) to which IANA distributes large blocks of addresses.

The RIRs manage, distribute, and publicly register IP addresses and related Internet number resources, such as Autonomous System Numbers (ASN) and reverse Domain Name System (DNS ) delegations within their respective regions. They do this according to policies which are developed within their respective regional communities, through open and bottom-up processes.

There are currently five RIRs:

The five RIRs together also form the Number Resource Organization (NRO), which carries out joint activities of the RIRs, including joint technical projects, liaison activities, and policy co-ordination. For more background on IP address management visit:

How are IPv6 addresses allocated?

Both IPv4 and IPv6 addresses are allocated to those who show that they need addresses for their networks.

Shouldn’t addresses be allocated on a geographical basis to ensure that distribution is equitable?

For technical reasons the allocation of IP addresses has to follow the topology of the  network  and not geography or national borders.

Therefore, the addresses are allocated for use in specific networks, as they are required. RIRs allocate IP addresses  using community-developed policies that are designed to ensure that distribution is fair and equitable.

In the early days of the Internet, the method for distributing IP addresses was less formal, resulting in some organisations receiving disproportionately large address ranges.

The RIRs were formed to provide a better way of distributing addresses. They have been successful at developing fair and equitable distribution policies. They have also helped to provide stability of the address pool and routing tables throughout a long period of rapid growth.

What happens when IPv4 addresses run out?

The Internet, in its current form, already has. According to the Number Resource Organization,  the world officially ran out of IPv4 addresses in February 2011 .

The only option now is to divide the allocated properties into smaller portions or to start trading what’s already been assigned – both moves could complicate and compromise your privacy.

Related articles

Ipv6 security for ipv4 engineers.

This document provides an overview of IPv6 security that is specifically aimed at IPv4 engineers and operators. Rather than...

IPv6 Security Frequently Asked Questions (FAQ)

Executive Summary The Internet Society recognises that global deployment of the IPv6 protocol is paramount to accommodate the present...

State of IPv6 Deployment 2018

IPv6 deployment continues to increase around the world. In the six years since World IPv6 Launch levels...

Service ClusterIP allocation

In Kubernetes, Services are an abstract way to expose an application running on a set of Pods. Services can have a cluster-scoped virtual IP address (using a Service of type: ClusterIP ). Clients can connect using that virtual IP address, and Kubernetes then load-balances traffic to that Service across the different backing Pods.

How Service ClusterIPs are allocated?

When Kubernetes needs to assign a virtual IP address for a Service, that assignment happens one of two ways:

Across your whole cluster, every Service ClusterIP must be unique. Trying to create a Service with a specific ClusterIP that has already been allocated will return an error.

Why do you need to reserve Service Cluster IPs?

Sometimes you may want to have Services running in well-known IP addresses, so other components and users in the cluster can use them.

The best example is the DNS Service for the cluster. As a soft convention, some Kubernetes installers assign the 10th IP address from the Service IP range to the DNS service. Assuming you configured your cluster with Service IP range and you want your DNS Service IP to be, you'd have to create a Service like this:

but as it was explained before, the IP address has not been reserved; if other Services are created before or in parallel with dynamic allocation, there is a chance they can allocate this IP, hence, you will not be able to create the DNS Service because it will fail with a conflict error.

How can you avoid Service ClusterIP conflicts?

The allocation strategy implemented in Kubernetes to allocate ClusterIPs to Services reduces the risk of collision.

The ClusterIP range is divided, based on the formula min(max(16, cidrSize / 16), 256) , described as never less than 16 or more than 256 with a graduated step between them .

Dynamic IP assignment uses the upper band by default, once this has been exhausted it will use the lower range. This will allow users to use static allocations on the lower band with a low risk of collision.

This example uses the IP address range: (CIDR notation) for the IP addresses of Services.

Range Size: 2 8 - 2 = 254 Band Offset: min(max(16, 256/16), 256) = min(16, 256) = 16 Static band start: Static band end: Range end:

This example uses the IP address range: (CIDR notation) for the IP addresses of Services.

Range Size: 2 12 - 2 = 4094 Band Offset: min(max(16, 4096/16), 256) = min(256, 256) = 256 Static band start: Static band end: Range end:

This example uses the IP address range: (CIDR notation) for the IP addresses of Services.

Range Size: 2 16 - 2 = 65534 Band Offset: min(max(16, 65536/16), 256) = min(4096, 256) = 256 Static band start: Static band ends: Range end:

What's next

Was this page helpful?

Thanks for the feedback. If you have a specific, answerable question about how to use Kubernetes, ask it on Stack Overflow . Open an issue in the GitHub repo if you want to report a problem or suggest an improvement .

India IP Address Ranges

India has a total of 47,659,520 IP address assigned. Below are all IP address ranges in India.


Articles & Tutorials

Study of ipv4 address allocation by continents.

In this article, we are sharing our study of IP address allocation and usage by continents over the past 10 years. The data was collected using  IP2Location [1]  database from 2007 to 2016. We will discuss several relevant topics i.e. IPv4 address class range, registry, assignment and exhaustion.

Overview of IP Address and Class Scheme

In Internet Protocol version 4 (IPv4), IP addresses [2]  consist of 32 bits, which can support 4,294,967,296 (2^32) unique host interface addresses in theory. We represent a 4-bytes IP address by the dotted-decimal notations which use a decimal number for each byte, such as

An IP address can be divided into 2 parts, a network part and a host part. The network part of an IP address identifies the network to which the host is attached. Therefore, all the interfaces attached on the same network have the same network prefix. The size of the network prefix is not always the same due to different classes. The IP addressing scheme divides the total IP address space into five classes; A, B, C, D and E. We can determine in advance which address ranges belong to each class by examining just a few bits of the address.

Regional Internet Registries (RIR) and Assignment

Originally, all the IPv4 address spaces were managed directly by the Internet Assigned Numbers Authority (IANA) [3] , a non-profit organization. In 1992, the Internet Engineering Task Force ( IETF ) recommended that Internet number resources be managed by subsidiary organizations at a regional level. Several Regional Internet Registries ( RIRs ) were established to assume this regional allocation and management role of IP address assignment. Today, there are five RIRs –  APNIC ,  ARIN ,  RIPE NCC ,  LACNIC  and  AFRINIC  which are responsible for all continents.

Hilbert Curve Mapping

We were using  Hilbert curve [4] mapping to represent the topology of IP address assignment by continents. In a nutshell, Hilbert curve is a continuous fractal space-filling curve that preserves the locality, and the locality was the main reason that we selected this mapping concept for the charts.

The Hilbert curve map is square in shape because it is a matrix in the form of the power of 2. The map contained the information of IPs ranging from to arranged into 256 blocks, in 16 x 16 matrix form. In the matrix, each block contains the geolocation information of the 1st octet of the IP address. Now, we have learned that each block represents the information of an octet range (8.x.x.x for instance). Please take note that the position of the blocks is not in a linear sequence from left to right due to the fractal space-filling as described in Hilbert curve. We have made an overlay of the tracing so that you can understand where the octets are positioned on the map.

The 1 st  position [0,0] contains the information of the 0.x.x.x octet range, followed by [0,1] that contains the 1.x.x.x octet range and then [0,2] which contains the 14.x.x.x octet range, so on and so forth. You may have noticed that the adjacent blocks are neither arranged in row-by-row nor column-by-column basis. To better illustrate the Hilbert curve filling, please see the below navigation pattern.

Hilbert Curve

Chart 1: Hilbert Curve

We grouped the geolocation information into 7 continents, namely the  North America ,  South America ,  Europe ,  Africa ,  Asia ,  Oceania  and  Antarctica . There are additional two groups, Unassigned and Reserved IP addresses. Unassigned group refers to the IP addresses that have not been allocated at the time the data was compiled. Reserved IP refers to the IP ranges which were reserved by IETF.

IP Address Space for 2016

IPv4 Address Exhaustion

IPv4 address exhaustion is the depletion of the pool of unallocated IPv4 addresses. At the time of writing, all RIRs except AFRINIC have declared the exhaustion of IP address pool within their registries.

In the 2016 map, we observed some unassigned IP address ranges, but it could be due to reservation by RIRs for future use such as for IPv6 transition. The only class A which is still available is managed by AFRINIC.

Explosive Growth in Asia

Based on the maps from 2007-2012 and Table 1, we have observed a significant increase in the number of IP addresses assigned in Asia by APNIC. In recent years, this trend has decreased due to the exhaustion of the IP address pool.

Year to Year Changes in IP Address Allocation

However, we have also observed usage of IP address in Asia from ranges assigned to other registries such as RIPE NCC, ARIN and AFRINIC. In some cases, it was due to the IP address owner’s business activities such as running a distributed CDN or multi-regional data centers. It is also likely that Asian organizations renting IP address ranges from LIRs due to strong demand of IPv4 address and exhaustion in APNIC.

Time Lapse IP Address Map

We have created an animated GIF so that you could see how IP address allocations have evolved over the years from 2007 to 2016.

Was this article helpful?

Related articles.


  1. IP Address Allocation Process

    ip address range allocation

  2. Study of IPv4 address allocation by continents

    ip address range allocation

  3. LTE IP Address Allocation Schemes I: Basic

    ip address range allocation

  4. ip address allocation spreadsheet template

    ip address range allocation

  5. Introducing Bring Your Own IP (BYOIP) for Amazon VPC

    ip address range allocation

  6. The 3G4G Blog: Static/Dynamic IP Address Allocation in LTE

    ip address range allocation


  1. Grim Dawn

  2. #Arif_Alvi Blocked all escapes

  3. IP addressing Worksheet 2

  4. What is reverse IP Lookup? How much do you know about domains and IP?

  5. IP Address System

  6. IP address subnetting


  1. Create an IP Address Allocation Range

    an IP Address Allocation Range, follow these steps: Click the IP Address Allocation Rangestab. From the Actionslist, select New. In the Namefield, enter a name. Optional:Add a description. Optional:Enter a string in the Usage Typefield. value is entered, must be coordinated with the usage type specified while provisioning the server

  2. IP Address Ranges by Country

    There are 249 countries listed below, and each link will bring you to a new page containing the respective IP address ranges. If you are interested to learn more about the ranking of IP addresses allocated for each country, please visit IP Address Reports for details. Afghanistan Aland Islands Albania Algeria American Samoa Andorra Angola Anguilla

  3. IP address

    An Internet Protocol address ( IP address) is a numerical label such as that is connected to a computer network that uses the Internet Protocol for communication. [1] [2] An IP address serves two main functions: network interface identification and location addressing .

  4. IP Address Lookup

    IP-based Geolocation is the mapping of an IP address or MAC address to the real-world geographic location of an Internet-connected computing or a mobile device. Geolocation involves mapping IP addresses to the country, region (city), latitude/longitude, ISP, and domain name among other useful things. 2.

  5. United States of America IP Address Ranges

    FREE database solution to determine the country, region or state, city, latitude, longitude, ZIP code and time zone of origin for any IP address. IP2Proxy™ LITE FREE database solution to detect open proxies (PUB) and information such as proxy type, country, region, city, ISP, domain, usage type, ASN, last seen proxy and residential proxy.

  6. IP Subnet Calculator

    An IP address is comprised of a network number (routing prefix) and a rest field (host identifier). A rest field is an identifier that is specific to a given host or network interface. A routing prefix is often expressed using Classless Inter-Domain Routing (CIDR) notation for both IPv4 and IPv6.

  7. Allocating IP Addresses

    The range parameter is written in CIDR notation - in this example "/16" means the first 16 bits of the address form the network address and the allocator is to allocate container addresses that all start 10.2. See IP addresses and routes for more information. Weave shares the IP address range across all peers, dynamically according to their needs.

  8. Specifying Addresses in the Range

    Use the IP address table to specify IPv4 or IPv6 addresses that are available to this IP address allocation range. At least one IP address must be specified. An address specification can be: A single IP address such as or 2001:db8::1. A range of IP addresses such as or 2001:db8::1-2001:db8::ffff

  9. Number Resources

    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)

  10. List of assigned /8 IPv4 address blocks

    As IPv4 address exhaustion has advanced to its final stages, some organizations, such as Stanford University, formerly using, have returned their allocated blocks (in this case to APNIC) to assist in the delay of the exhaustion date. List of reserved /8 blocks [ edit] See also: Reserved IP addresses

  11. IANA IPv4 Address Space Registry

    Description The allocation of Internet Protocol version 4 (IPv4) address space to various registries is listed Originally, all the IPv4 address spaces was managed directly by the IANA. address space were allocated to various other registries to manage for particular purposes or RFC 1466 [RFC1466] documents most of these allocations. Reference

  12. List of countries by IPv4 address allocation

    This is a list of countries by IPv4 address allocation, as of 2 April 2012[update]. It includes 252 areas, including all United Nations member states, plus the Holy See, Kosovoand Taiwan. There are 232(over four billion) IP addressesin the IPv4protocol. Of these, almost 600 million are reservedand cannot be used for public routing.[1]

  13. Public IP addresses in Azure

    Set the allocation method to static to ensure the IP address remains the same. DNS Name Label Select this option to specify a DNS label for a public IP resource. This functionality works for both IPv4 addresses (32-bit A records) and IPv6 addresses (128-bit AAAA records).

  14. Understanding IP Addresses, Subnets, and CIDR Notation ...

    This address range includes addresses from to Class E 1111 : This class defines addresses between and Any address that begins with four "1" bits is included in this class.

  15. A Short Guide to IP Addressing

    For technical reasons the allocation of IP addresses has to follow the topology of the ... resulting in some organisations receiving disproportionately large address ranges. The RIRs were formed to provide a better way of distributing addresses. They have been successful at developing fair and equitable distribution policies.

  16. Service ClusterIP allocation

    When Kubernetes needs to assign a virtual IP address for a Service, that assignment happens one of two ways: dynamically the cluster's control plane automatically picks a free IP address from within the configured IP range for type: ClusterIP Services. statically you specify an IP address of your choice, from within the configured IP range for ...

  17. India IP Address Ranges

    FREE database solution to determine the country, region or state, city, latitude, longitude, ZIP code and time zone of origin for any IP address. IP2Proxy™ LITE FREE database solution to detect open proxies (PUB) and information such as proxy type, country, region, city, ISP, domain, usage type, ASN, last seen proxy and residential proxy.

  18. IP Address Allocation

    Because you define that range, you can thereby control the IP address (within the defined range) and the associated TCP/IP settings that the client receives. In Figure 31.1, three hosts — each in a different subnet — request an IP address. Each one broadcasts a DHCPDISCOVER message, which includes its MAC address.

  19. Salesforce IP Addresses and Domains to Allow

    Removed from Salesforce IP Ranges under "Our Network Engineering team additionally recommends that customers allow the following IP addresses:" - -

  20. Study of IPv4 address allocation by continents

    In this article, we are sharing our study of IP address allocation and usage by continents over the past 10 years. The data was collected using IP2Location [1] database from 2007 to 2016. We will discuss several relevant topics i.e. IPv4 address class range, registry, assignment and exhaustion. Overview of IP Address and Class Scheme