Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Can you have a class C IP address with a subnet mask of 255.255.0.0?

What happens when you have a setting like this?

share|improve this question

5 Answers 5

As i understand it, not really.

A class C network uses 24 bits for the network and 8 for the host, so 0.0 breaks that as it leaves 16 for the network. But its possible to have a private addressing scheme using 255.255.0.0 using class A.

http://www.subnet-calculator.com/subnet.php?net_class=A

In short, you can subnet the default B mask for A, or the default C mask for A and B, but you cant go the other way (C to B or A)... If that makes sense.

share|improve this answer
    
No. Most people understand that when someone says "I have a Class C address" that they mean either they have an address that fell into the old Class C range, and/or that they have an address with a /24 prefix. In today's environment whether or not they can change the prefix to anything less, i.e. 16 depends... On my home router that uses a Class C of 192.168.x.y /24 I can certainly make it /16 if I desire. –  dbasnett Oct 24 '10 at 13:41
    
Class C is /16. Class B is /12 and Class A is /8... So he can –  sinni800 Aug 23 '11 at 11:57
    
@sinni800 class C is /24 , class B is /16 , and class A is /8 in CIDR notation. –  WeloSefer Dec 31 '12 at 6:52

Today's Class C with a subnet mask of 255.255.0.0 equals Class B. This is because the subnet is the only remnant of the old Class system, a concept that only exists today in routing tables for quantifying the number of IP addresses in an IP address segment.

If one goes back historically to RFC 791 in 1981, subnet masks were not relevant to the question. The class was determined by the first few bits of the address, and it was these bits that determined the subnet. Thus Class A had leading bit of 0, B had 10, C had 110 and D had 1110 (multicast), Class E (reserved) had 1111.

This scheme was very wasteful of IP addresses, and did not provide enough Class B addresses. So Classful networking was replaced by Classless Inter-Domain Routing (CIDR), starting in 1993 with the specification of RFC 1518 and RFC 1519, to attempt to solve this problem.

CIDR notation is a syntax of specifying IP addresses and their associated routing prefix. It appends to the address a slash character and the decimal number of leading non-zero bits of the routing prefix, e.g., 192.168.0.0/16 for IPv4, and 2001:db8::/32 for IPv6. (Remember subnet mask.)

For routing purposes, CIDR provides routing prefix aggregation, also known as supernetting or route summarization. For example, sixteen contiguous /24 networks can be aggregated and advertised to a larger network as a single /20 route, if the first 20 bits of their network addresses match. Two aligned contiguous /20s may then be aggregated to a /19, and so forth. This allows a significant reduction in the number of routes that have to be advertised.

Funny enough, it is here that classes have resurfaced as a measure of the number of nodes possible in a segment. See the above article for the definitions of classes such as "1/64 C" and "16 B".

Because we have two concepts called Class, the historical and the modern, confusion does occur, as both concepts are related to subnet masks (the modern one perhaps more so).

share|improve this answer
    
I don't understand. I thought that the IP class is given by the leading bits in the first byte of the address (0... for class A, 10... for class B, 110... for class C. What's that got to do with the subnet mask? –  user29878810 Oct 21 '10 at 10:00
    
The subnet mask says how many bits in the IP address are fixed for this network segment. In your terms : its class. –  harrymc Oct 21 '10 at 10:06
4  
The IP class doesn't exist any more, and hasn't since RFC 1519 in 1993. –  gorilla Oct 21 '10 at 10:45
2  
@gorilla: It's still an existing concept, although it doesn't have the weight it once had. –  harrymc Oct 21 '10 at 10:55
1  
Indeed omnibraid is correct. The class was defined by the leading bits in the address. started with 0 = class A (0-127, but 0 and 127 were invalid, so that left 1-126). started with 10 = class B, started with 110 = class C, started with 1110 = Class D, started with 11110 = Class E. –  gorilla Oct 23 '10 at 2:43

IP Classes A,B and C have been obsoleted a long time ago (1993) by CIDR. Class D is still in use for multicasting. You are now free to use whatever mask you want as long as you own the affected IP addresses ranges. However, as you are unlikely to own 256 contiguous "class C" blocks, if you use such a mask internally but want to interconnect with the Internet, you will have serious routing troubles.

share|improve this answer
2  
Class D is now obsolete, too; that IP range is now called just "multicast IP addresses". –  whitequark Oct 22 '10 at 2:41
    
You are correct in the sense that range has been renamed and CIDR is also used to define subranges within it. –  jlliagre Oct 22 '10 at 5:28

I have not found an RFC that proclaims the use of the word "Class" followed by a letter from A-E obsolete. What RFC 4632 says is:

The solution that the community created was to deprecate the Class A/B/C 
network address assignment system in favor of using "classless",
hierarchical blocks of IP addresses (referred to as prefixes).

Careful reading of that passage is not to outlaw references to Class but to point to the real issue which was assignment.

I do agree that the preferred nomenclature is clearly spelled out in RFC 4632:

...the change from Class A/B/C network numbers to
classless prefixes is to make explicit which bits in a 32-bit IPv4
address are interpreted as the network number (or prefix)...

Having been around networks for some time I don't see an issue with someone talking about "Class A / B / C / D / E", and I know more than a few CCIE's that have let slip the blasphemy of talking Class... Fortunately no one had to correct anyone because we all knew that /8 = Class A, /16 = Class B, and /24 = Class C.


So the correct answer to the OP is:

Yes. The IP Addresses from 192.x.x.x to 223.x.x.x can have a /16 prefix (255.255.0.0). Further comments, and / or best practices can only be given when you provide specifics about the IP address and environment it will be used in.

share|improve this answer

No, because it would infringe on broadcast addressing.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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