Home > Networking Tips > > Protocols, Lesson 4: Internet Protocol classes - Network and host ID
Networking Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 


Protocols, Lesson 4: Internet Protocol classes - Network and host ID


Firewall.cx
10.15.2004
Rating: -4.56- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Introduction

Every protocol suite defines some type of addressing that identifies computers and networks. IP addresses are no exception to this rule. There are certain values that an IP address can take; these have been defined by the IEEE committee.

A simple IP address is a lot more than just a number. It tells us the network of which the workstation is part and the node ID.

IP address classes and structure

When the IEEE committee sat down to sort out the range of numbers that were going to be used by all computers, they came up with five different ranges or, as we call them, "classes" of IP addresses. When someone applies for IP addresses they are given a certain range within a specific class depending on the size of their network. To keep things as simple as possible, let's first have a look at the five different classes:

[IMAGE]

In the above table, you can see the five classes. Our first class is A and our last is E. The first three classes (A, B and C) are used to identify workstations, routers, switches and other devices, whereas the last two classes (D and E) are reserved for special use.

An IP address consists of 32 Bits, which means it's four Bytes long. The first octet (first eight bits or first byte) of an IP address is enough for us to determine the class to which it belongs. And, depending on the class to which the IP address belongs, we can determine which portion of the IP address is the network ID and which is the node ID.

For example, if I told you that the first octet of an IP address is "168," then, using the above table, you would notice that it falls within the 128-191 range, which makes it a class B IP address.

Understanding the classes

We are now going to take a closer look at the five classes. Earlier I mentioned that companies are assigned different IP ranges within these classes, depending on the size of their network. For instance, if a company required 1000 IP ad

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
Network Administration
How server virtualization improves efficiency in a client-server model
Understand Windows tracert output to troubleshoot network connectivity
Why would a computer show drive letters for discs that don't exist?
Using tracert and TTL to troubleshoot network connectivity problems
Open source software for enterprise network management and monitoring
When do applications suffer from poor network performance?
Tight times? Organize your networking group to stay above the stress
Managing Network Problem Users: The make-it-so CEO
Checking IP configuration to troubleshoot Windows network connectivity
Bandwidth allocation: How can I give a download limit for each user?
Network Administration Research

IP Networking
What is IP?
Connect your LAN to the Internet using static or dynamic NAT
Using tracert and TTL to troubleshoot network connectivity problems
Test your TCP/IP protocol stack to troubleshoot network connectivity
Checking IP configuration to troubleshoot Windows network connectivity
Does IPv6 abandon TCP/IP fragmentation?
VLANs versus IP subnets: Why use a VLAN over IP subnetting?
Difference between circuit-switching and packet-switching in examples
Can Network Address Translation work without static IP addresses?
Why are TCP/IP networks considered unsecured?

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
availability  (SearchNetworking.com)
carrier detect  (SearchNetworking.com)
fiber jumper  (SearchNetworking.com)
layer 2  (SearchNetworking.com)
MAE  (SearchNetworking.com)
Network layer  (SearchNetworking.com)
networking  (SearchNetworking.com)
OSI  (SearchNetworking.com)
patch cord  (SearchNetworking.com)
staggered quadrature phase-shift keying  (SearchNetworking.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


dresses, it would probably be assigned a range that falls within a class B network rather than a class A or C.

The class A IP addresses were designed for large networks, class B for medium size networks and class C for smaller networks.

Introducing network ID and node ID concepts

We need to understand the network ID and node ID concept because it will help us to fully understand why classes exist. Putting it as simply as possible, an IP address gives us two pieces of valuable information:

1) It tells us which network the device is part of (network ID).

2) It identifies that unique device within the network (node ID).

Think of the network ID as the suburb you live in and the node ID as your street in that suburb. You can tell exactly where someone is if you have their suburb and street name. In the same way, the network ID tells us to which network a particular computer belongs and the node ID identifies that computer from all the rest that reside in the same network.

The picture below gives you a small example to help you understand the concept: Explanation:

[IMAGE]

In the above picture, you can see a small network. We have assigned a class C IP range for this network. Remember that class C IP addresses are for small networks. Looking now at Host A, you will see that its IP address is 192.168.0.2. The network ID portion of this IP address is in blue, while the host ID is in orange.

I suppose the next question someone would ask is: How do I figure out which portion of the IP address is the network ID and which is the host ID?

That's what we are going to answer next.

The network and node ID of each class

The network class helps us determine how the four byte, or 32 bit, IP address is divided between network and node portions.

The table below shows you (in binary) how the Network ID and Node ID changes depending on the class:

[IMAGE]

Explanation:
The table above might seem confusing at first but it's actually very simple. We will take class A as an example and analyze it so you can understand exactly what is happening here:

Any class A network has a total of 7 bits for the Network ID (bit 8 is always set to 0) and 24 bits for the Host ID. Now all we need to do is calculate how much seven bits is:

2 to the power of 7 = 128 networks and for the hosts : 2 to the power of 24 = 16,777,216 hosts in each network, of which two cannot be used because one is the Network Address and the other is the network broadcast address (see the table towards the end of this page). This is why when we calculate the "valid" hosts in a network we always subtract "2". So if I asked you how many "valid" hosts can you have a on class A network, you should answer 16,777,214 and NOT 16,777,216.

Below you can see all this in one picture:

[IMAGE]

The same story applies for the other two classes we use, that's class B and class C, the only difference is that the number of networks and hosts changes because the bits assigned to them are different for each class.

Class B networks have 14 bits for the network ID (Bits 15, 16 are set and can't be changed) and 16 bits for the host ID, that means you can have up to '2 to the power of 14' = 16,384 networks and '2 to the power of 16' = 65,536 hosts in each network, of which two cannot be used because one is the network address and the other is the network broadcast address (see the table towards the end of this page). So if I asked you how many "valid" hosts can you have on class B network, you should answer 65,534 and NOT 65,536.

[IMAGE]

Class C networks have 21 bits for the network ID (Bits 22, 23, 24 are set and can't be changed) and eight bits for the host ID, that means you can have up to '2 to the power of 21' = 2,097,152 Networks and '2 to the power of 8' = 256 hosts in each network, of which two cannot be used because one is the network address and the other is the network broadcast address (see the table towards the end of this page). So if I asked you how many "valid" hosts you can have on class C network, you should answer 254 and NOT 256.

Now, even though we have three classes of IP addresses that we can use, there are some IP addresses that have been reserved for special use. This doesn't mean you can't assign them to a workstation but in the case that you did, it would create serious problems within your network. For this reason it's best to avoid using these IP addresses.

The following table shows the IP addresses that you should avoid using:
[TABLE]

Now make sure you keep to the above guidelines because you're going to bump into a lot of problems if you don't!



[TABLE]

That all pretty much covers this section.

Next, is the subnetting section, and before you proceed, make sure you're comfortable with the new concepts and material we have covered, otherwise subnetting will be very hard to understand.

Return to the introduction or continue to Lesson 5.


[IMAGE]
Click over to Firewall.cx for more articles like this one. You don't have to register or jump through any hoops. All you do is get the networking information you want. Copyright 2004 Firewall.cx.

Rate this Tip
To rate tips, you must be a member of SearchNetworking.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Networking Solutions for Business

Alcatel-Lucent Network Business Communications Solutions

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts