4

I am trying to understand the addressing strategies. But there is something which I can't grasp. Maybe I am missing a very basic point, if so, I am sorry beforehand.

From my researches, let's say, if a company wants 100,000 IP addresses for their network, Class C won't cut it since Class C can allocate 256 addresses. Same for Class B since it can allocate 65,536 addresses. So they were asking for Class A which can allocate 16,777,216 addresses but that would be a huge waste of IP addresses.

Now coming to my question. Don't all computers in a company reside behind a public IP address configured by a router? Let's say I have one router for an office in Istanbul which has 185.245.32.78 as the public IP address. All the computers in that office would have 192.168.xxx.xxx as private IP addresses. The same for other offices. I could use 20 different public IP addresses for other offices spreading around the world and have same private IP addresses behind a routers.

Doesn't this mean I could have many offices with networks with only Class C allocation?

  • Back in the time when classful addressing was used, NAT wasn't a thing yet. – immibis Dec 11 '18 at 22:25
6

You are confusing the typical home networking setup, which is off-topic here. with a business network. Many businesses have multiple services (often the same type of service provided by different servers), and they need public addressing for each server.

Under your example, a company with multiple web servers for different functions would have a single public address, and TCP port 80 (HTTP) for that single public address could only be forwarded to one of those servers.


The original premise of IP is that each host gets a unique address. The version of NAT (NAPT) that allows a network to hide behind a single public address only works with ICMP, TCP, and UDP. Other transport protocols are broken by NAPT, and even some application-layer protocols that use TCP or UDP are broken by NAPT.

  • Nat can work fine for other protocols too, it depends on the network equipment. I have sctp NAT running. – PlasmaHH Sep 16 '18 at 20:15
  • @PlasmaHH, the RFC specifies only ICMP, TCP, and UDP, and identifies this as a weakness of NAPT. If the device supports other transport protocols, it is non-standard. – Ron Maupin Sep 16 '18 at 22:25
5

Network classes died 25 years ago when CIDR was introduced in 1993.

Classes were extremely wasteful because end user requirements needed to be rounded up to the next largest class. A requirement for 1,000 IP addresses was allocated a class B network, removing 65,536 addresses from the pool. That's a "waste" of 98%.

You can hide a lot of private IP addresses behind a single public address (or just a few addresses) if you just need client access. However, if you're planning to offer services to the public Internet you do need proper, public IPs.

Note that NAT was only defined in 1999, six years after CIDR. Without NAT, HTTP and other application-layer proxies need be used to provide private-to-public connectivity. Both NAT and proxies break the end-to-end paradigm of TCP/IP and can cause serious problems.

  • The general problem is of course exactly as you say. But I certainly remember allocations of multiple class C blocks rather than a class B long before CIDR was universal, though of course this had impact on size of routing tables. – jonathanjo Sep 16 '18 at 11:33
5

You bring up several different topics in one question 😏. Let me address them separately.

First, understand that classful addressing is obsolete and has been since before you were born. I don’t know why they still teach it, but it’s ancient history.

Second, what you say is theoretically possible, but that’s not the way the Internet works.

You’re describing Network Address Translation (NAT) which was developed to get around the lack of IPv4 addresses. You use private addresses inside your network and translate them to one or more public addresses. Typically those public addresses belong to your ISP who “rents” them to you. You can get “your own” address space, but only if you’re a large organization - it's also expensive.

Internet service providers do not advertise networks smaller than /24 on the Internet, so your public addresses for all your offices will be part of your ISP addresses. If you have your own, you can’t advertise anything less than /24 or a block of 256 addresses.

  • "but only if you’re a large organization" - or if you were in the early days, when they were handing out /8s like Halloween candy to random orgs that had no business owning a /8. – Kevin Sep 16 '18 at 17:19
  • 1
    @Kevin In the early days, the Internet was just an experimental curiosity, so why not hand out /8s? – Ron Trunk Sep 16 '18 at 17:51
  • In the early days what we now call a /8 is all there was. Classes were introduced to improve allocation efficiency, then CIDR was introduced to improve it further. – Peter Green Dec 11 '18 at 4:46
2

Don't all computers in a company reside behind a public IP configured by a router?

This is a set-up which became "normal" in the 1990s - maybe after the end of classful routing in 1993 or at the same time.

Before that time NAT was at least not common so each computer in the internet had its own public IP address!

So a company with 260 computers needed 260 public IP addresses.

With classless routing this actually means 512 public IP addresses; with classful routing this means 65536 public IP addresses.

  • 2
    Depending on regional addressing policies at a particular time, a 260 requirement might well have had two class C blocks allocated. "Public IP address" was the only kind before RFC 1597 in 1994 (ignoring loopback etc). – jonathanjo Sep 16 '18 at 11:43
1

If you're taking some kind of course where they teach you about network classes, you'll probably need to remember that stuff until you've passed. Apart from that: Forget about network classes, it hasn't been relevant for 25 years.

You're right in saying that simple offices don't need more than one public IP address. But the Internet contains both non-simple offices (the company I work for used to host test servers in our office in Copenhagen that had to be accessible to employees in Dubai) and networks that aren't offices.

And in the old days there were offices where every device had a public IP address (I managed such a net 16-18 years ago). It had some advantages and some disadvantages.

Another reason why offices aren't important in this regard: Simple offices often only need the IP address they get from their ISP, meaning they don't even affect the allocation the company might have.

1

In addition to the points others have mentioned, the classful system allocated the prefixes 0 through 127 as class A nets (and reserved 0 and 127), meaning that half of the address space was allocated to network sizes nobody actually needed, and therefore mostly wasted. Another quarter of the address space was class B nets, which were also bigger than (almost) anyone needed, and therefore also mostly wasted.

NAT has allowed more organizations (and individuals/families/etc) to fit in class C nets, but only one eighth of the address space was allocated as class C. So even after the NAT (and carrier-grade NAT, etc) became available, the classful system would still be enormously wasteful. In particular, it wouldn't have allowed us to pull back the old class A allocations, and reallocate them as more useful blocks.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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