IP subnet masks, the correct way to say it.
Must be that time of the month for a rant again.
I get fed up when people talk about class C IP address's when they are really trying to describe a /24 address range.
The class system is as follows:-
Class A :-
First bit 0; 7 network bits; 24 host bits
Initial byte: 0 - 127
126 Class As exist (0 and 127 are reserved)
16,777,214 hosts on each Class A
Class B :-
First two bits 10; 14 network bits; 16 host bits
Initial byte: 128 - 191
16,384 Class Bs exist
65,532 hosts on each Class B
Class C :-
First three bits 110; 21 network bits; 8 host bits
Initial byte: 192 - 223
2,097,152 Class Cs exist
254 hosts on each Class C
There are two more less well known classes:-
Class D :-
First four bits 1110; 28 multicast address bits
Initial byte: 224 - 247
Class Ds are multicast addresses - see RFC 1112
Class E :-
First four bits 1111; 28 reserved address bits
Initial byte: 248 - 255
Reserved for experimental use
Or to summerise:-
A 1-126 N.H.H.H
B 128-191 N.N.H.H
C 192-223 N.N.N.H
D 224-239 Not applicable
N=Network
H=Host
Right that is that, class-based IP addressing is generally only used by people who do not know what they are talking about (that used to be me many years ago and I still have the bruises to show for my errors).
Many times people will describe an address incorrectly, lets take an address range sample example of 10.0.0.0 to 10.0.0.255. This has a subnet mask of 255.255.255.0 which is a /24 address NOT as many people would describe as a class A address which would have a subnet mask of 255.0.0.0.
If you use the class notation what would you call the following address ? :-
192.128.1.128 255.255.255.252 so you have a network address of .128, two hosts address's of .129 and .130 and a broadcast of .131.
This address is best described as a /30 address, not a class C address as it is classless.
If you have trouble with this check out the nice and simple tables that Cisco have on the web:-
IP addressing tables
Sometimes people strike lucky and call an address such as 192.168.100.0 /24 as a class C address, well in this case you are correct but more by luck than judgment.
Please do the IT world a big favour, get into the 21st centry and use slash notations when describing subnet masks, the class notation dropped out with RIP 1.
Real problems come to light with the class full addressing scheme when we, (yes you guessed it) started using classless addressing or Variable Length Subnet Masks (VLSM).
RIP1 was the first victim of this, Since non-CIDR routing updates do not include subnet masks, a router must assume that the subnet mask it has been configured with is valid for all subnets. Well the users were the real victims when RIP would summerise a /25 address into a /24. You could get away with this if you were lucky but generally you had the other half of the /24 on another past of the network and suddenly you have two routes advertised for the same network.
Posted at
01:18PM Mar 29, 2007
by Simon Bullen in Networking |
You don't mention what notation you'd want to use in the event that a mask comprises something other than a contiguous block of binary 1s followed by a contiguous block of binary 0s; I'd probably go with dotted decimal, but then again, when did you last see a masking scheme which genuinely needed to be quite so weird?
Posted by Dave Walker on March 29, 2007 at 03:34 PM BST #
Posted by synergy of loxal on July 28, 2007 at 01:46 AM BST #