Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-17-2005, 10:10 PM   #1
Registered: Jan 2005
Posts: 44

Rep: Reputation: 15
Class A,B,C licenses

I thought I knew this for a while but I went to school and they are teaching me a different way to figure this out. I googled this and saw there were two different explainations on figuring this out. Post what you think this actually is and lets see if we all get confused as I am getting.

The two different ways to figure this out is...

Class A,B,C lisenses
Class A - 1-127 range of IPs.
Class B - 128-191 range of IPs
Class C - 192-223 range of IPS

so a IP of is a Class A and is a Class C

The other way I am finding is that it is all based on the Subnet mask

meaning if you had an IP of and a mask of then it is a Class A because of the subnet mask...
So by this method the 201 IP is still a class A because of the subnet..
example: and a mask of is a Class A IP

Old 05-17-2005, 11:57 PM   #2
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 124Reputation: 124
Technically, the netmasks are the relevant portions of the system. The ranges you mentioned at the beginning are the ranges as ASSIGNED to owners: they can subnet all they want.

The "Class" is essentially the number of "network" octets.

A.B.C.D/ - Class A
A.B.C.D/ - Class B
A.B.C.D/ - Class C

Now look at CIDR notation: it defies the 'Class' grouping: You can have a /20 network: 20 bits for network address. This is halfway between Class B(/16) and Class C(/24)... aka, A.B.C.D/

I've even seen, on my campus network, .192 and .64 netmasks.
Old 05-18-2005, 07:05 AM   #3
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
With all the different routing protocols (like rip, ospf, eigrp, bgp etc..), the term classful ( and classless ( are more meaningful than the traditional term class. A classful routing protocol (like rip) does not look at the netmask, but rather the high order bits of the first octet to determine the class/netmask. i.e. network portion (n) vs host portion (h)
0nnnnnnn . hhhhhhhh . hhhhhhhh . hhhhhhhh
10nnnnnn . nnnnnnnn . hhhhhhhh . hhhhhhhh
110nnnnn . nnnnnnnn . nnnnnnnn . hhhhhhhh
Note how the bit pattern value of the high order bits corresponds to the class a, b, c ranges.

On the other side of the coin, a classless routing protocol would look at the netmask and not the high order bits.
Old 05-18-2005, 08:53 AM   #4
Senior Member
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
Originally posted by scowles
0nnnnnnn . hhhhhhhh . hhhhhhhh . hhhhhhhh
10nnnnnn . nnnnnnnn . hhhhhhhh . hhhhhhhh
110nnnnn . nnnnnnnn . nnnnnnnn . hhhhhhhh
Originally posted by Matir
The "Class" is essentially the number of "network" octets.

A.B.C.D/ - Class A
A.B.C.D/ - Class B
A.B.C.D/ - Class C
Originally posted by Mishra100
Class A,B,C licenses
Class A - 1-127 range of IPs.
Class B - 128-191 range of IPs
Class C - 192-223 range of IPS
You are all right! If that confuses you more, let me try to clarify.

In a classful implimentation of IP, the range of the first octet determines the "class":
Class A is 1-127 denoted in binary as 0nnnnnnn.hhhhhhhh.hhhhhhhh.hhhhhhhh with a netmask of aka /8

Class B is 128-191 denoted in binary as 10nnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh with a netmask of aka /16

Class C is 192-223 denoted in binary as 110nnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh with a netmask of aka /24
Note that the range of numbers translates to binary such that they start with either 0, 10, or 110 ie 12 decimal is 00000110 binary which starts with 0 while 150 decimal is 10010110 binary which starts with 10.

Again, in a classful implimentation of IP each of these ranges has a predefined netmask so if the IP address starts with 64 then it has a netmask of

What determines the class is the first octet (or more specifically the first 3 binary bits of that first octet) and as a result of what class it is it will have a given netmask.

In what is called classless IP you can further divide an IP block from one class into multiple networks, this is called subnetting. It's also possible to own multiple concurrent blocks in a given class and combine them, this is called supernetting.

If you subnet the addresses from a higher class by 8 or 16 more bits, then you will end up with a subnet mask that looks like it's from another class. Sometimes when this is done the netmask is just referred to by the class letter. As an example, if you take the (or block of class A addresses and divide them up by taking 16 more host bits you end up with (or and this is sometimes just called a class C mask. This is still a class A address block, it has just been subnetted and has a new netmask which is easier to refer to as a class C netmask than saying two-fifty-five dot two-fifty-five dot two-fifty-five dot zero.

The original routing protocols like RIP version 1 do not understand classless IP so if you use an address that starts with 64, it will assume the netmask is This makes RIP1 a lighter routing protocol because it doesn't even store a netmask for the networks. Newer routing protocols use CIDR (Classless Inter-Domain Routing) and they will use a provided netmask to distinguish subnetted blocks of IP addresses on different networks.

Basically, the first number defines what "class" it is but each class has a pre-defined netmask although the netmask doesn't determine what class it belongs to.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Implementing a vector class from a list class purefan Programming 9 04-14-2005 10:48 PM
Licenses gamehack General 15 12-24-2004 06:43 AM
BlackBox.class & VerifierBug.class virus ??? dalek Linux - Security 4 02-29-2004 08:55 AM
Inheriting class members (Qt C++, QApplication class) jtshaw Programming 2 01-15-2004 11:52 AM
c++ : regarding (inheritence)base class and derived class edreddy Programming 6 07-31-2002 06:33 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:01 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration