How are IPv4 addresses assigned? What sparked my curiosity is that I used to have an IPv4 address of 96.32.179.XX and I moved roughly 2 weeks ago (about 10 miles from previous address) and now I have an IPv4 address of 24.158.252.XXX. Same city and state for each IP.

I would think that each City would be assigned an IPv4 Range, meaning that both of my addresses would start with 96.XX.XXX.XX Or are IPv4 addresses just randomly assigned from your ISP pool of IPv4 addresses that they have available?

Both IPv4 listed above are for residential accounts.

  • Why the vote down already? Will you explain what is not good or clear about my question? Oct 19, 2016 at 12:21
  • 2
    No idea but the answer to your question is that it's depended on your ISPs policy. It could be anything from random IP from his pool to some building on the street mapping. As we've been running out of IPv4 address for a decade or so there have been merges, splits, technical innovates and more that influence such patterns. Without talking to the ISP itself you probably won't be able to discern it.
    – Seth
    Oct 19, 2016 at 12:25
  • @Seth - thank you for that information. With mergers etc, how are IP lookup tools able to display who an ISP is based off IP? Such as this whatismyipaddress.com/ip/ Oct 19, 2016 at 12:29
  • The Internet Assigned Numbers Authority (IANA) assigns IP blocks to regions. Each region e.g. Europe has a "Subdevision" (in this case RIPE) which further assigns those huge blocks into smaller blocks which are eventually at some point are registered to a company. As an example your address was handed out by ARIN to Charter in 2008. Each Registry usually provides a whois API and services like that use them to identify IPs.
    – Seth
    Oct 19, 2016 at 12:47
  • Related on Information Security (later closed as off topic): Can ICANN deny Internet service to people? where roughly the lower half of my answer discusses IP address assignment specifically.
    – user
    Oct 19, 2016 at 17:32

3 Answers 3


Your ISP can be a big company or a local company.

Big companies as Comcast or AT&T in USA have a lot of addresses that they have requested to its Regional Internet Registry.( ARIN in the United States, RIPE in Europe).

As the IPv4 scope is depleted it's very difficult to have a huge chunk of consecutive addresses.

The ISP range could be made of a chunk of 1024 addresses from one range, 4096 from other, etc.

ARIN, RIPE and the other registries assign whatever they find free to the requester.

Small ISPs most of the time depend on bigger ISPs, then, they don't request addresses to ARIN or RIPE. Instead of that they lease addresses from a bigger ISP, resulting on even more partitioned chunks.

Sites that geo-locate using the IP address use databases extracted from the information provided by the registries (ARIN, RIPE, etc.) so they are far from accurate and usually show the physical address of the ISP that requested the range from the registry, not knowing if that range is used by the ISP or leased to another.

  • 1
    Many companies which are not ISPs own provider-independent IPv4 address blocks which came directly from the RIRs. Some non-ISP companies even own multiple provider-independent IPv4 /8 address blocks. Some individuals even own provider-independent IPv4 address blocks. The ISPs will not advertise any IPv4 prefix longer than /24, so that is the maximum prefix length of provider-independent addressing.
    – Ron Maupin
    Oct 19, 2016 at 13:42
  • Regarding geo-lookup sites, I found that MaxMind does a very impressive job of pinpointing the exact location of an IP, even though most other sites don't. Granted, this is a paid service, but it's still very impressive. For example, this is the result I get for querying my current (yay for DHCP) external IP
    – Cas
    Nov 4, 2016 at 12:35

Let's start from the top: The Internet Numbers Registry System (defined in RFC 7020) is a set of systems and organizations that work together to manage all IP addresses in the world.

IANA (Internet Assigned Numbers Authority) "owns" all IP addresses and delegates them to RIR's (Regional Internet Registries), who define their own policies regarding who can get an IP address block, and for what reason they should get one.

IANA assigns IPv4 "blocks", which are basically a set of consecutive IP addresses. The largest assignable block is a /8 block, which means all IP addresses starting with a certain octet (eg: 123...*). RIR's take IP addresses assigned to them by IANA and divide them up into smaller blocks, which are then assigned to organizations such as ISP's or large companies. (For example, Cloudflare is not an ISP, but does have quite a few IP addresses assigned because they operate a very large global network. You can't go to a RIR and request just one IP)

Your ISP will then, depending on its size, go to the RIR and request an allocation of IP addresses. The RIR then assigns your ISP some addresses from the available pool, in an ideal world, this would be one large block of consecutive addresses (for example ( - Unfortunately, the amount of available IP blocks of this size is rapidly shrinking because the IPv4 address space is running out. This is why an ISP might receive two /18 blocks instead of a single /17 block.

Then, when you connect to your ISP's network, you request an address (using DHCP) . Your ISP will pick an address from the pool of available addresses it was assigned by the RIR. Since the ISP probably owns multiple blocks of IP addresses, the chance exists that the IP address you will be assigned is completely different from the one you had previously.

It is possible for an ISP to neatly organize their IP allocations by assigning a certain block to a certain location, but this doesn't really serve any purpose except for looking pretty, which is why they don't do it.

TL;DR: You get your IP from an ISP, which gets it from a RIR, which gets it from IANA. IP's are assigned in a first come, first served method so when your RIR or ISP requests two blocks at separate times, they won't be consecutive. You get a random IP from the pool of available addresses at your ISP, which may be from any of the blocks they own. Your ISP could assign an IP based on your location, but since that has no real benefit, they probably don't.


Your city or house or even connection have nothing to do with this. You get your IP assigned by your ISP. They typically assign this automatically and whats more important dynamically.

So generally, whenever your router/modem restarts and your connection is started (again) you normally get a different ip.

  • I understand you get a new IP each time your modem reboots (typically) - I just was not sure if a certain range of IP's belong to a certain ISP/Area or if there is no such assignment like that. Oct 19, 2016 at 12:27
  • 1
    Again, this has nothing to do with area whatsoever. Every ISP does have a IPv4 block they can then give their customers. Some have more, some have less and resort to Dualstack or IPv6.
    – kyze
    Oct 19, 2016 at 12:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .