Hypothetical situation: 1 Class B or 3 Class C address ranges?

Megatomic

Lifer
Nov 9, 2000
20,127
6
81
If you were going to set up a WAN that needed to provide for ~2700 discrete public IP addresses and this WAN spanned the continent, would you use 1 Class B or 3 consecutive Class C IP address ranges? Why would you choose one over the other? I am learning about setting up networks now and I was posed this question by my mentor. I haven't a clue...

Thanks for any opinions.
 

Chubs

Member
Apr 4, 2001
144
0
0
Originally posted by: SeekingTao
If you were going to set up a WAN that needed to provide for ~2700 discrete public IP addresses and this WAN spanned the continent, would you use 1 Class B or 3 consecutive Class C IP address ranges? Why would you choose one over the other? I am learning about setting up networks now and I was posed this question by my mentor. I haven't a clue...

Thanks for any opinions.

Well...I believe a Class C address can only support up to 254 hosts - and 3 x 254 falls way short of your ~2,700 need. So, I'd opt for the Class B which can support up to 65K hosts.
 

Megatomic

Lifer
Nov 9, 2000
20,127
6
81
Originally posted by: Chubs
Originally posted by: SeekingTao
If you were going to set up a WAN that needed to provide for ~2700 discrete public IP addresses and this WAN spanned the continent, would you use 1 Class B or 3 consecutive Class C IP address ranges? Why would you choose one over the other? I am learning about setting up networks now and I was posed this question by my mentor. I haven't a clue...

Thanks for any opinions.

Well...I believe a Class C address can only support up to 254 hosts - and 3 x 254 falls way short of your ~2,700 need. So, I'd opt for the Class B which can support up to 65K hosts.


I thought about that but he is a sneaky guy. With subnetting or supernetting could 3x Class C ranges supply all the needed ranges?
 

Megatomic

Lifer
Nov 9, 2000
20,127
6
81
Thanks for the first reply Chubs, I was leaning towards that and now I feel better. I think I'll go with your suggestion. :)
 

Chubs

Member
Apr 4, 2001
144
0
0
Originally posted by: SeekingTao
Originally posted by: Chubs
Originally posted by: SeekingTao
If you were going to set up a WAN that needed to provide for ~2700 discrete public IP addresses and this WAN spanned the continent, would you use 1 Class B or 3 consecutive Class C IP address ranges? Why would you choose one over the other? I am learning about setting up networks now and I was posed this question by my mentor. I haven't a clue...

Thanks for any opinions.

Well...I believe a Class C address can only support up to 254 hosts - and 3 x 254 falls way short of your ~2,700 need. So, I'd opt for the Class B which can support up to 65K hosts.


I thought about that but he is a sneaky guy. With subnetting or supernetting could 3x Class C ranges supply all the needed ranges?

No, not really. Supernetting Class C addresses will make them appear as one network, but you still only have 8 bits per range to set the host ID.

Here's a link to a great explanation: supernetting example
 

EricT

Junior Member
Feb 28, 2003
21
0
0
I think your mentor is not giving you the full story, intentional or not...

1 class B network is not going to work, because then it would be a LAN with 65K hosts rather than a WAN. The "WAN spanning the continent" phrase is probably the most important piece of the puzzle, because it implies multiple locations and routed links between these locations. So you don't need 2700 addresses somewhere, you need groups of x addresses in y places and maybe that is where the 3 class C subnets are coming from: you could then have up to 762 hosts per location which would seem a good maximum because otherwise your WAN would not be covering the entire continent (for lack of hosts).

In any case you would need 1 subnetted Class C range in which you could configure all your WAN links, and you would need one or more Class C (or subnetted class C) ranges for your locations depending on their size. It is a bid odd that the word "consecutive" is used, because that is only relevant if you planned on using supernetting and that is not possible with 3 ranges...

Anyway, I would vote against the Class B because you would have to subnet it and then it wouldn't be a class B anymore... If you used only class C subnets you would be "wasting" some addresses (ie a site with 6 hosts consuming 254 addresses) but it can be done and it would be easy from an administration point of view.

Regards,

Eric

 

Lord Evermore

Diamond Member
Oct 10, 1999
9,558
0
76
The waste from multiple Class C addresses is going to be far far less than letting roughly 62,000 IP address go unused. :)

It's completely possible to use a single Class B among multiple locations. It just takes a bit more setting up, and can cause issues with some ISPs who filter route announcements that aren't full class blocks (above a certain level anyway). I ran into this many times at my last job, customers unable to reach a remote server, or non-customers unable to reach one of ours.

What you do is just subnet the Class B into whatever your needs are, then register those subnets with an IRR (or several). The IRRs (Internet Routing Registry) maintain records of things like the subnets, which ARIN does not (because they only refer to full class blocks). ISPs then use their records to make automated decisions (or manual) about what sort of routing to allow.

Some ISPs won't allow any subnet that's smaller than a /19, for example, if the IPs are part of the Class B address space. They do this to keep from having bad network admins send out a route announcement for every single block of 256 address in their Class B. (Many supposed trained people assume if you make something a /24, it now becomes a Class C address.) This is done just to prevent excess, unneccessary routes having to be stored and processed by a router -- every route entry takes the same amount of memory, no matter how large a block it references. Their policies WILL however let through 4 separate Class C blocks through because they are a full block, not a subnet of a block.

But, if you have several locations using IPs from a single Class B, it's perfectly valid to need to route them all to different networks. Since the introduction of subnetting and Classless Inter-Domain Routing (CIDR), routers are generally configured to not restrict routes to full blocks. Before that, the routers couldn't even use a route which wasn't a full block -- highly wasteful of IP space. So there's nothing wrong with subnetting a Class B, but it might be filtered by some ISPs due to policies trying to limit bad routing from other people. If an entire Class B goes to the same place, the ISP doesn't need to know about each block of 1024 IPs individually.

An ISP that looks at the IRRs will make note of exceptions, and their routers will have their filters modified to allow the registered subnet. In some cases, this is only done manually after someone points out they can't reach a site. In other cases they may have an automated system that compares routes to the registry or regularly rebuilds the filters based on an updated registry. Of course, since most everyone that has an entire Class B is using it at one site, or using large blocks of it rather than many small blocks, such filtering doesn't cause a large amount of problems; plus, the number of "regular" websites with addresses from a subnetted Class B are probably pretty small.
 

ScottMac

Moderator<br>Networking<br>Elite member
Mar 19, 2001
5,471
2
0
A minor correction:

The class of the address does not change with a subnet (or supernet) mask.

The class of the address is determined by the leading bits in the most significant byte.

00 = Class A
10 = Class B
11 = Class C
111= Class D

CIDR certainly messes with the the ABC's, but by definition, the class of the address is static.

With the information given, a Class B is the only way to go. If Private addressing could be used, then one class C would be way more than enough.

FWIW

Scott
 

Lord Evermore

Diamond Member
Oct 10, 1999
9,558
0
76
A Class B is certainly not required in this instance. Each site can use 4 Class C addresses with ease. Modern operating systems and other network equipment will disregard the class, so that 3 consecutive Class C addresses can be seen as a single /22, allowing a fully integrated network. If consecutive Class C blocks can't be obtained for each site, then it does become a little more complicated.

Of course, the use of NAT in as many points as possible is highly recommended to conserve address space. A Class B would be highly wasteful, and it's doubtful that ARIN would allocate that size block for someone only needing 2700 IPs (you must justify address needs).

I don't think anyone specifically made any mention in this thread of anything that confuses the difference between a sequence of 65k addresses (a /16) and an actual Class B block. There is of course a huge difference, but not such that it matters much to this situation. If someone thinks that they can only get "Class C" blocks or "Class B" blocks in order to get a certain number of IPs, that's wrong, since you could get 65k addresses by getting 256 Class C blocks (though it would be more efficient and waste less to get a single Class B).

Oh, incidentally, if you combine 4 Class C blocks into a single /22 network, you have fewer wasted IPs in many cases than if you used separate Class C blocks. According to the original specifications, you can't use IPs such as 205.205.205.0 or 205.205.205.255 as a host address (any netmask where the binary format is all zeroes or all ones). For a Class C address (192.0.0.0 through 211.255.255.255) that means any address ending in .0 or .255. But if you have a block of 4 that includes those IPs, and you configure it as a single network of /22, then you can make use of them (though it may cause problems with traffic through an older configuration on the Internet). Cisco routers and others allow the "ip subnet 0" configuration, which allows those IPs to be used as source/destination, meaning they can be a host sending or receiving traffic, rather than being unusable. So, instead of losing 2 addresses from each Class C, you only lose 2 total, the first in the sequence and the last. If the traffic happens to pass through a router that is not configured to allow the 0 subnet, it will probably die at that point. You'd probably want to use those IPs only if you are on the edge of needing another whole block of IPs just to get 3 or 4 more.