ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

Step-by-Step tutorial by expert to understand IP adressing and subnetting (CCNA context) Part-I

Updated on November 27, 2008

Written, Designed and Edited by: Aftab-tekdad


First of all let us understand IP? IP stands for Internet Protocol. It is a part of TCP/IP stack. IP is a layer 3 protocol according to OSI reference model. IP is mainly responsible for routing. The IP protocol uses specific address called IP address or logical address. Whenever you send any data to another system using any network based application, like internet explorer, FTP client or outlook express etc., the data travels from your network application to the TCP. TCP adds the relevant information to the data and hands it over to the IP. =================================================


The IP protocol here adds the source and destination IP address. Now let us discuss about IP address in detail.


As you can see in the illustration, IP address is a 32 bit binary number. But for the ease of human reference it is being represented into dotted decimal notations.Actually it is the dotted decimal notation which is always assigned to the systems by network administrator. Then why do we need to understand the binary form? Definitely this question should arise in your mind. Well as a Cisco Certified Network Associate, you may be required to perform complex tasks related to networking. One of the tasks may be to subnet the IP address. I know now you will be thinking about subnetting. Well here all I can tell you is that subnetting is a process of dividing one network into multiple smaller networks. Let us get back to our core topic. That is, what is IP address? As we discussed earlier, it's a layer three or logical address used by IP protocol to determine whereabouts of the destination system and the exact system itself. Let us delve into further details.


As I told you that IP address is a 32 bit binary numbers, which identifies to which logical group the computer belongs to and the exact host. In other words, IP address constitutes of two parts. One part of the address identifies the logical group or network ID of the computer and the other part represents the host itself.Here in the illustration, up to "192.168.0" is network portion and "1" is the host portion of the address. In other words the computer which is assigned with an IP address of belongs to network and its unique identification is "1". Now the important question is how it is decided that how much portion of the IP address is network address and how much is the host ID? If you look at the binary format of the example IP address, you will find the answer. All continuous "1's" in the subnet mask decides the network portion of the IP address. The portion of IP address above all continuous ones in subnet mask represents network address. The portion of IP address above all remaining zeroes represents host ID.


Here you can see that PC-1 and PC-2 are in network. Since both of the computers are sharing the common network id, i.e., 192.168.0, we can call them to be belonging to same logical group. The computers belonging to same logical group can communicate with each other directly without the help of any intermediate device like routers. At the other side PC-3 and PC-4 are in other logical group which is Here PC-3 and PC-4 both share the same network portion, i.e., 192.168.1 and there host ID's are unique in their network. Remember, in the world of networking, it is not the physical layout which makes different networks, but it is the layer three addresses or logical address which divides computers into different networks. In the illustration if we assign all of the four computers the same network id, i.e., then all of them will become a single network and we will not require a device like router in between. Computers in the same network can communicate with each other without any third device. But computers with different network id must have some type of router in between to act as gateway for the computers of the two networks.


Suppose here in the diagram if PC-1 wants to send a data packet to PC-2, what will happen? At PC-1 the IP protocol will put its own IP address as source address, PC-2's IP address as destination IP address in the data packet. While a source and destination layer three addresses are being added to the data packet by say IP protocol, the IP protocol decides whether the packet is destined for the same network or to other network than its own. If the destination network is same then it knows that there is no requirement of any gateway address. It will simply send an ARP broadcast to its own network, asking for the MAC address of the destination machine i.e., PC-2. ARP stands for Address Resolution Protocol and it is a part of the TCP/IP protocol stack. ARP is used to resolve the MAC address from the known IP address. Here in our case the layer three components know what the destination IP address is. But it does not know the MAC address of the computer who's IP address is So in order to know the destination machines MAC address without which data cannot be moved out of the machine, PC-1 sends ARP broadcast to its own network, asking for the MAC address of the PC-2. The broadcast means request destined for all computers.


Here in our case the ARP broadcast will be looking something like this. You can see that PC-1 is sending an ARP broadcast to entire network. Entire network here is specified by 255 which is the maximum value for the host portion. Just have a look over the Destination IP address i.e., the packet is destined for the every computer whose Network ID is 192.168.0. This broadcast packet will reach to every computer at the routers E0 side. But the router will not allow this broadcast to be propagated to other side of the router. The ARP broadcast contains a request asking for PC-2's MAC address. In the last line you can see that PC-2 is responding with its MAC address. This is how computers learn about destination computers MAC address. Then layer two protocols like Ethernet put this address as destination MAC address before data is finally being sent out of the computer. So this whole process was related to the communication between computers in same network. What will happen if PC-1 wanted to communicate with PC-3?

============================================== ====

In the case of PC-1 wanted to communicate with PC-3, the Layer three protocols will discover that the destination computer is in other network and it can't get MAC address of the destination computer directly. Because a computer cannot broadcast any thing other than its own network. And when the router will receive a broadcast destined for network, it will simply drop it. So once PC-1 decided that the destination is in other network, it knows there must be some kind of router in between, and instead of asking for the MAC address of the destination Machine in the ARP broadcast, it should ask for the MAC address of the router. So now in this case PC-1 will send a broadcast to its own network, but instead of asking for the MAC address of the destination computer, it is asking who is having which is the routers address to which side the PC-1's network is connected. The router is replying with its own MAC address to the PC-1. Once PC-1 obtains the PC-3's MAC address, it will send the packet on the network. Now this packet will be received by the router, Since the packet's destination MAC address will match with the router's MAC address. Now router will check the received packets destination layer three network ID and it will find that the destination network is directly connected to it on Port E1. So router will send an ARP broadcast on E1 destined for the network asking for the MAC address of PC-3 will send its MAC address to the router and router will add that MAC address to the packets destination layer two address field and forward it to the E1 interface. So you would have understood how layer three protocols like IP are used to divide computers into different logical groups. You also understood that routers do not forward broadcasts to other side. Actually we will discuss routing in later chapters. Let us get back to the current topic that is IP addressing.


First of all let us get familiar with little of background. The TCP/IP protocols were initially developed as part of the research network developed by the United States Defense Advanced Research Projects Agency (DARPA or ARPA) in the 1970s by pioneering network engineers Vinton Cerf and Bob Kahn. The Designers of the IP protocols created 5 classes of the IP addresses. Namely class A, class B, class C, class D and class E.


Class A is having first 8 bits reserved for network addressing and remaining 24 bits for host addressing. Hence it is having a default subnet mask of Its decimal address range is from 1-126. Network in class A is reserved for loop back address. Loop back address like is used by all operating systems to identify itself. If you successfully ping to this address, it means the TCP/IP protocol is installed properly and it is functional. Class B is having first 16 bits reserved for network addressing and remaining 16 bits for host addressing. Hence it is having a default subnet mask of Its decimal address range is from 128-191.

Class C is having first 24 bits reserved for network addressing and remaining 8 bits for host addressing. Hence it is having a default subnet mask of Class D is reserved for multicasting and is in the range of 224-239. Class E is reserved for R&D purposes and is in the range of 240-255. Out of these five classes, only class A, B, and C are allowed to be used for commercial purposes. We cannot assign class D and E addresses to computers.


According to the documentations of IP addressing, the first highest order bit in class A must remain "0", hence we actually get a network range of 2^7-2 equals to 126, i.e., from to and 2^24-2 equals to 16777214 hosts per network. For class B, the first highest order bit must remain "on" and second "off " that is binary "10" which gives a total of 2^14-2 equals to 16382 networks, i.e., from to and 2^16-2 equals to 65534 hosts per network. For class C, the first and second highest order bit must remain "on" and the third highest order bit "off" that is binary "110" which gives a total of 2^21-2 equals to 2097150 networks, i.e., from to and 2^8 -2 equals to 254 hosts per network. Here you might be thinking why I am subtracting 2 from either number of networks or number of hosts. Well that's a genuine doubt. Again according to IP documentation all the network bits cannot be either on or off at the same time so we have to subtract two combinations of all zeros and all ones. The same rule applies to host addressing as well so all the host bits cannot be turned on or off at the same time, hence minus two. In the case of hosts, all host bits turned "on" represent a broadcast address and all host bits turned off represent a network address. We cannot assign broadcast address as well as network address to hosts so we have to minus it.

Since all the class A addresses were being assigned to the universities and military organizations in the early days itself, the class A is not available for the public. Almost all class B addresses are also exhausted. Only some of the class C addresses are available. Earlier 2^32 IP addresses were considered quite a large number ...!! That's what was thought by the developers of IP protocol like DoD. When the TCP/IP protocol was developed at DoD, only few computers were there in the universities and other organizations. And not all of them were thinking to connect with each other. So 2^32 really seemed a big number those days. But with the advent of time the popularity of TCP/IP protocol started to soar. Almost every one wanted to be connected and hence every computer required one IP address in order to connect to others, and no more than one computer connected together can use the same IP address. Soon it was realized that in near future the IP address is going to be scarce. So the Scientists came up with a solution to do away with the shortage of IP address.


They kept aside some of the IP addresses from all of the three classes namely class A, B, and C to be used as Private IP addresses. The remaining IP addresses in the above mentioned three classes were reserved to be used on internet and termed as Public IP address. The important thing to remember is that the computers having any IP address within these private ranges cannot connect to internet directly without some sort of network address translation. We will discuss network address translation later. The computers having addresses between these private ranges cannot connect to the internet directly due to the fact that the internet routers are configured to not forward the data packets destined for these private IP addresses. In other words if an internet router receives a packet destined for Private IP address, it will simply drop the packet. And this is implemented to save the IP addresses. You would be wondering how keeping aside some of the IP addresses as private addresses save the overall public IP addresses..? in fact it seems to be decreasing the number of public IP addresses.


Just look at the network and you can yourself figure out how keeping few IP addresses as private saves lot of IP addresses. Here you see a private network comprising of lot of desktop computers is connected to internet through a server which is doing Network Address Translation. The server is having two network adapter cards with two IP addresses. The server's internal network card is having the IP address within the same Private network as that of Desktop computers. While server's external network interface card is having a public IP address Using this public IP address, server is connected to internet. All the desktop computers are configured with a gateway as Whenever any desktop computer want to connect to the internet, they simply send the data to NAT server, the server removes the source IP address from the clients packet and replaces it by its own public IP address, then forwards it to the internet. Though all the internal hosts having private IP addresses can connect to internet, but the IP addresses which will be going out as source addresses will be that of NAT server, that is When replies come from the internet for the internal hosts, the NAT server hands over the data packets to the appropriate hosts. This is how thousands of computers in a company having private IP addresses can connect to internet using only single public IP address. Since Packets destined for private IP addresses gets discarded by internet routers, end number of organizations or companies can use the same private IP addresses internally and they will require only single public IP address. So definitely division of IP addresses into Public and Private saves a lot of IP addresses. Private IP addresses also provide a kind of security to the companies, since all the internal hosts having private IP addresses are represented by a single Public IP address. Only that single public IP address remains visible to internet. Though a lot of Public IP addresses are being saved due to private IP addresses but still large numbers of IP addresses are being wasted due to certain reasons. How still the IP addresses are being wasted, I will explain you. ======================================================

Just have a close look at the network. You can see several internet routers with two end networks attached. The very important thing you will notice in this exhibit is that every internet router's directly connected interfaces are consuming complete one network. See the connection between Router-B and Router-C, Router-B is having and Router-C is having an IP address of both in the class-C. Out of 254 IP addresses available in the Class-C network, only two IP addresses are being used between Router-B and Router-C. The remaining 252 IP addresses cannot be used anywhere else now, since same network cannot be assigned at multiple sides of the routers. Due to this rule a lot of IP addresses are being wasted between router to router connections. Lot of IP addresses are getting lost at network-1 and network-2 as well. You see that network-1 requires only 20 IP addresses and network-2 requires only 30 IP addresses, the remaining IP addresses at network-1 and network-2 cannot be used anywhere else, again causing a loss of lot of IP addresses. To save the IP addresses further getting lost this way, a new workaround was done, known as subnetting. Subnetting not only saves the IP addresses, but it also provides better management of the network. In simple words, subnetting is a process of dividing one large network into multiple smaller sub-networks. Just remember that in the network in front of you, lot of IP addresses were getting wasted due to the very less number of IP addresses required on the router interfaces than the number of IP addresses available in each Class-C network. So now we can divide one network into multiple smaller networks and those smaller networks can be assigned at different interfaces of the routers. In the present scenario, we are using almost five (5) class-C networks. This provides almost 254*5 equals to 1270 IP address. And how many addresses are we using? Only 58? So we are using only 58 IP addresses out of total 1270. How many IP addresses are getting wasted? 1270-58 is equal to 1212 IP addresses. So you can see that we are losing almost 1212 IP addresses which cannot be assigned any where else. The solution? Just divide the networks into smaller ones and save lot of IP addresses. Now how those networks can be divided... I will teach you in a moment. For subnetting please select IP addressing and subnetting part-II


This website uses cookies

As a user in the EEA, your approval is needed on a few things. To provide a better website experience, uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at:

Show Details
HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
LoginThis is necessary to sign in to the HubPages Service.
Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
AkismetThis is used to detect comment spam. (Privacy Policy)
HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the or domains, for performance and efficiency reasons. (Privacy Policy)
Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
MavenThis supports the Maven widget and search functionality. (Privacy Policy)
Google AdSenseThis is an ad network. (Privacy Policy)
Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
Index ExchangeThis is an ad network. (Privacy Policy)
SovrnThis is an ad network. (Privacy Policy)
Facebook AdsThis is an ad network. (Privacy Policy)
Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
AppNexusThis is an ad network. (Privacy Policy)
OpenxThis is an ad network. (Privacy Policy)
Rubicon ProjectThis is an ad network. (Privacy Policy)
TripleLiftThis is an ad network. (Privacy Policy)
Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)
ClickscoThis is a data management platform studying reader behavior (Privacy Policy)