THE SCHOOL OF CISCO NETWORKING (SCN): IP ADDRESSING AND SUBNETTING:
Contact No:   ### / ###/ ###
Welcome To The IT Knowledge Base Sharing Freeway "Study With The Zero Fees / Zero Money" Web - If We Believe, That If We Have Knowledge, Let Others Light Their Candles With It. - Our Motivation Has Brought Us Together To Offer Our Helping Hands To The Needy Ones Please. "Student Expectations And Satisfaction Is Always Our Highest Priority")

'Love All, Serve All, Help Ever Hurt Never'

Please Welcome To The "Zero Fees And Zero Money SCN Community Study Page"

We Like To Share Our Stuff With Everyone And Hope You Will Find Something Useful Here. Enjoy Our Collection And Come Back Again And Again, We'll Do Our Best To Make It Always Interesting For You. All Our Stuff Always Available May Be 100% Totally Freely. Use Only For Non-Commercial Purposes Only!

THE SCHOOL OF CISCO NETWORKING (SCN) Is A IT Support Community – Based, Non - Profit Volunteer Organizations, Offering Our Assistance And Support To Developmental Our Services Dedicated To All.

Because Large Section Of Our Students In This World, Especially In Villages, Who Are Under Privileged Expecting For Equal Opportunity In Terms Of Money And Education. We Feel The Sufferings Of Talented Students Losing Their Opportunity To Shine Because Of Their Poor Financial Status. So We Thought That Professional Education Will Be Providing Them Freely.

Our Web Site Is To Give An Easy Way To Understand Each And Every Student Who Are Going To Start CISCO Lab Practice Without Any Doubts And Our ARTICLES STUFF Are Always 100% Totally Free For Everyone, Which Is Belongings To THE SCHOOL OF CISCO NETWORKING (SCN).

Also This Guide Provides Technical Guidance Intended To Help All Network Students, Network Administrators And Security Officers Improve Of Their Demonstrated Ability To Achieve Specific objectives Within Set Timeframes.

Hands - On Experience Is An Invaluable Part Of Preparing For The Lab Exam And Never Pass Up An Opportunity To Configure Or Troubleshoot A Router ( If You Have Access To Lab Facilities, Take Full Advantage Of Them) There Is No Replacement For The Experience You Can Gain From Working In A Lab, Where You Can Configure Whatever You Want To Configure And Introduce Whatever Problems You Want To Introduce, Without Risk Of Disrupting A Production Network.

For Better View Of Our Web Page - Please Use Any Latest Web Browser, Such As (Mozilla Firefox, Google Chrome, Opera, Safari, Internet Explorer, Torch, Maxthon, Sea Monkey, Avant Browser, Deepnet Explorer, And Etc ), Because Some Elements Or Scripts Are Not Work In The Old Web Browser (It Might Not Be Displayed Properly Or Are Not Appearing properly!). Thank You For Your Time And Best Of Luck!

Your Sincerely – Premakumar Thevathasan.
"Our Motivation Has Brought Us Together To Offer Our Helping Hands To The Needy Once Please,Thank You."

IP ADDRESSING AND SUBNETTING:

WHAT IS AN IP ADDRESS:

 

An IP address consists of four so-called octets separated by dots. The octet is a binary number of eight digits, which equals the decimal numbers from 0 to 255.


An Internet Protocol Address IP Address Is An Address Used To Uniquely Identify A Device On An IP Network. It is usually a numerical label assigned to each device participating in a computer network that uses the Internet Protocol for communication.

Currently, IPv6 is being tested and implemented on the 6Bone network, which is an informal collaborative project covering North America, Europe, and Japan. 6Bone Supports the routing of IPv6 packets, since that function has not yet been integrated into Many production routers. 

The good news is that IPv6 principles are very similar to those of IPv4. Moreover, networks and client applications can make the transition to IPv6 easily. One stumbling block is that we humans struggle to see patterns within these new large hexadecimal numbers. It is my objective to give meaning to IP addresses Version6 such as:

2001:0618:71A3:0801:1319:0211:FEC2:82DC

 

INTRODUCTION:


An IP address serves two principal functions:

HOST OR NETWORK INTERFACE IDENTIFICATION AND LOCATION ADDRESSING:

Its role has been characterized as follows: "A name indicates what we seek. An address indicates where it is. A route indicates how to get there."

The designers of the Internet Protocol defined an IP address as a 32-bit number and this system, known as Internet Protocol Version 4 (IPv4), is still in use today. However, due to the enormous growth of the Internet and the predicted depletion of available addresses, a new addressing system (IPv6), using 128 bits for the address, was developed in 1995, standardized as RFC 2460 in 1998, and is being deployed worldwide since the mid-2000s.

 

HOW TO CALCULATE IP ADDRESSES (IP VERSION 4 ADDRESSES):


In IPv4 an address consists of 32 bits which limits the address space to 4294967296 (232) possible unique addresses. IPv4 reserves some addresses for special purposes such as private networks (18 million addresses) or multicast addresses (270 million addresses).

IPv4 addresses are canonically represented in dot-decimal notation, which consists of four decimal numbers, each ranging from 0 to 255, separated by dots, e.g., 172.16.254.1. Each part represents a group of 8 bits (octet) of the address. In some cases of technical writing, IPv4 addresses may be presented in various hexadecimal, octal, or binary representations.

This address is made up of 32 binary bits which can be divisible into a network portion and host portion with the help of a subnet mask. The 32 binary bits are broken into four octets (1 octet = 8 bits). Each octet is converted to decimal and separated by a period (dot). For this reason, an IP address is said to be expressed in dotted decimal format 

FOR EXAMPLE, 172.16.81.100. The value in each octet ranges from 0 to 255 decimal, or 00000000 - 11111111 binary.

HERE IS HOW BINARY OCTETS CONVERT TO DECIMAL: The right most bit, or least significant bit, of an octet holds a value of 20. The bit just to the left of that holds a value of 21. This continues until the left-most bit, or most significant bit, which holds a value of 27. So if all binary bits are a one, the decimal equivalent would be 255 as shown here:
    1     1   1   1    1   1   1  1
  128 64  32 16   8   4   2  1 (128+64+32+16+8+4+2+1=255)

HERE IS A SAMPLE OCTET CONVERSION WHEN NOT ALL OF THE BITS ARE SET TO 1.
0  1 0 0 0 0 0 1
0 64 0 0 0 0 0 1 (0+64+0+0+0+0+0+1=65)
AND THIS IS SAMPLE SHOWS AN IP ADDRESS REPRESENTED IN BOTH BINARY AND DECIMAL.
        10.              1.               23.              19        (decimal)
  00001010 . 00000001 . 00010111 . 00010011 (binary)

IP ADDRESS CLASSES:

These octets are broken down to provide an addressing scheme that can accommodate large and small networks.
There are five different classes of networks, A to E. This document focuses on addressing classes A to C, since classes D and E are reserved and discussion of them is beyond the scope of this document.

You can determine which class any IP address is in by examining the first 4 bits of the IP address.
  •  
  • Class A Addresses Begin With 0xxx, Or     1 To 126 Decimal.
  • Class B Addresses Begin With 10xx, Or 128 To 191 Decimal.
  • Class C Addresses Begin With 110x, Or 192 To 223 Decimal.
  • Class D Addresses Begin With 1110, Or 224 To 239 Decimal.
  • Class E Addresses Begin With 1111, Or 240 To 254 Decimal.

Addresses beginning with 01111111, or 127 decimal, are reserved for loopback and for internal testing on a local machine; [You can test this: you should always be able to ping 127.0.0.1, which points to yourself] Class D addresses are reserved for multicasting; Class E addresses are reserved for future use. They should not be used for host addresses.

Now we can see how the Class determines, by default, which part of the IP address belongs to the NETWORK (N, in Blue) and which part belongs to the HOST (h, in Red).
 
  • Class A  à   NNNNNNNN.hhhhhhhh. hhhhhhhh. hhhhhhhh
  • Class B  à   NNNNNNNN.NNNNNNNN. hhhhhhhh. hhhhhhhh
  • Class C  à  NNNNNNNN.NNNNNNNN.NNNNNNNN. hhhhhhhh

IN THE EXAMPLE, 140.179.220.200 is a Class B address so by default the Network part of the address (also known as the Network Address) is defined by the first two octets (140.179.x.x) and the node part is defined by the last 2 octets (x.x.220.200).

In order to specify the network address for a given IP address, the node section is set to all "0"s.
IN OUR EXAMPLE, 140.179.0.0 specifies the network address for 140.179.220.200. When the node section is set to all "1"s, it specifies a broadcast that is sent to all hosts on the network. 140.179.255.255 specifies the example broadcast address. Note that this is true regardless of the length of the node section.

NoteAlso note that the terms "Class A, Class B" and so on are used in this document to help facilitate the understanding of IP addressing and subnetting. These terms are rarely used in the industry anymore because of the introduction of classless interdomain routing (CIDR).

FIGURE 1:
 
AN A CLASS A ADDRESS, THE FIRST OCTET IS THE NETWORK PORTION, SO THE CLASS A EXAMPLE IN FIGURE 1 has a major network address of 1.0.0.0 - 126.255.255.255. Octets 2, 3, and 4 (the next 24 bits) are for the network manager to divide into subnets and hosts as he/she sees fit. Class A addresses are used for networks that have more than 65,536 hosts (actually, up to 16777214 hosts!).

LOOPBACK ADDRESS:

An address that sends outgoing signals back to the same computer for testing. In a TCP/IP network, the loopback IP address is 127.0.0.1, and pinging it will always return a reply. The loopback address allows a network administrator to treat the local machine as if it were a remote machine. It is used for internal testing on local machines.

Addresses beginning with 01111111, or 127 decimal, are reserved for loopback and for internal testing on a local machine.

IN A CLASS B ADDRESS, the first two octets are the network portion, so the Class B example in Figure 1 has a major network address of 128.0.0.0 - 191.255.255.255. Octets 3 and 4 (16 bits) are for local subnets and hosts. Class B addresses are used for networks that have between 256 and 65534 hosts.

IN A CLASS C ADDRESS, The first three octets are the network portion. The Class C example in Figure 1 has a major network address of 192.0.0.0 - 233.255.255.255. Octet 4 (8 bits) is for local subnets and hosts - perfect for networks with less than 254 hosts.

 

NETWORK MASKS:


A network mask helps you know which portion of the address identifies the network and which portion of the address identifies the Node/Host. Class A, B, and C networks have default masks, also known as natural masks, as shown here:


Class  A:  255.0.0.0
Class  B:  255.255.0.0
Class  C:  255.255.255.0

An IP address on a Class A network that has not been subnetted would have an address/mask pair similar to: 8.20.15.1 255.0.0.0. To see how the mask helps you identify the network and node parts of the address, convert the address and mask to binary numbers.
 
8.20.15.1 = 00001000.00010100.00001111.00000001

255.0.0.0 = 11111111.00000000.00000000.00000000

Once you have the address and the mask represented in binary, then identifying the network and host ID is easier. Any address bits which have corresponding mask bits set to 1 represent the network ID. Any address bits that have corresponding mask bits set to 0 represent the node ID.
 
8.20.15.1 = 00001000.00010100.00001111.00000001

255.0.0.0 = 11111111.00000000.00000000.00000000

            -----------------------------------
                      Net id      |      Host id             
 
Netid     =   00001000 = 8
Hostid   =   00010100.00001111.00000001 = 20.15.1

 

PRIVATE SUBNETS IPv4:

 

There are three IP network addresses reserved for private networks. The addresses are 10.0.0.0, Subnet Mask 255.0.0.0, 172.16.0.0, Subnet Mask 255.240.0.0, and 192.168.0.0, Subnet Mask 255.255.0.0.

 

PRIVATE IP ADDRESSES:


RFC 1918 requests that organizations make use of the private Internet address space for hosts that require IP connectivity within their enterprise network, but do not require external connections to the global Internet.
For this purpose, the IANA has reserved the following three address blocks for private internets:

  • 10.0.0.0/8
  • 127.0.0.0/8
  • 172.16.0.0/12
  • 192.168.0.0/16

RFC1918 name
IP address range
number of addresses
classful description
largest CIDR block (subnet mask)
host id size
24-bit block
10.0.0.0 – 10.255.255.255
16,777,216
single class A
10.0.0.0/8 (255.0.0.0)
24 bits
20-bit block
172.16.0.0 – 172.31.255.255
1,048,576
16 contiguous class Bs
172.16.0.0/12 (255.240.0.0)
20 bits
16-bit block
192.168.0.0 – 192.168.255.255
65,536
256 contiguous class Cs
192.168.0.0/16 (255.255.0.0)
16 bits

Classful addressing is obsolete and has not been used in the Internet since the implementation of Classless Inter-Domain Routing (CIDR – We’ll see this subject in last) starting in 1993.

FOR EXAMPLE, while 10.0.0.0/8 was a single class A network, it is common for organizations to divide it into smaller /16 or /24 networks.

 

These addresses are also notated 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16; They can be used by anyone setting up internal IP networks, such as a lab or home LAN behind a NAT or proxy server or a router. It is always safe to use these because routers on the Internet by default will never forward packets coming from these addresses. These addresses are defined in RFC 1918.

 

( ALSO YOU CAN KNOW PRIVATE IPv6 ADDRESSES:


The concept of private networks and special address reservation for such networks has been carried over to the next generation of the Internet Protocol, IPv6. In the Ipv6 world, the ULA space is fc00::/7, or basically anything that starts with FD in the IPv6 address, so fdxx:xxxx:xxxx

Do note though, if you use Unique Local Addressing in IPv6, these addresses cannot be routed on the Internet. 
The address block fc00::/7 has been reserved by IANA as described in RFC 4193. These addresses are called Unique Local Addresses (ULA). They are defined as being unicast in character and contain a 40-bit random number in the routing prefix to prevent collisions when two private networks are interconnected. Despite being inherently local in usage, the IPv6 address scopes of unique local addresses is global.

A former standard proposed the use of so-called "site-local" addresses in the fec0::/10 range, but due to major concerns about scalability and the poor definition of what constitutes a site, its use has been deprecated since September 2004 by RFC 3879.)

BROADCAST ADDRESS:

IP broadcasting is used by network devices to send a single packet of information that can be accessible by every device on the network. Because TCP communication requires that two devices have a dedicated connection, it is not possible to send broadcast messages in a strictly TCP environment. Instead, UDP packets must be used because that protocol has the capability of sending messages without a specific connection being defined.

LOCAL VERSUS GLOBAL BROADCASTS:

Broadcast messages contain a special destination IP address. The IP address format allows for two types of broadcast message addresses:

LOCAL BROADCASTS AND GLOBAL BROADCASTS:

Network programmers use the local broadcast address to send a broadcast message destined for all devices on a particular subnet. The idea is to localize a broadcast message so that other networks are not affected by the broadcast.

The standard network address part makes up the first part of the local broadcast address, and all 1s are used for the host part of the address (which is the decimal value 255 in the address octet). Example show bellow for the class B network 192.168.0.0, using a subnet mask of 255.255.0.0, the local broadcast address would be 192.168.255.255.

BROADCAST ADDRESS
Similarly, if the subnet is further divided using a subnet mask of 255.255.255.0, each subnet would have its own local broadcast address. The subnet 192.168.1.0 would have a broadcast address of 192.168.1.255, and so on up to the subnet 192.168.254.0, which would have the broadcast address 192.168.254.255.

 

RESERVED IP ADDRESSES:


Certain addresses are reserved for special use in IP networks:
  • The class A network 127.0.0.0 255.0.0.0 is reserved for loopback use. Packets sent to this address are never presented on the physical interface; instead they are looped back by the TCP/IP stack and presented to the appropriate application on the originating host. So, for example, a host running an ftp server and an ftp client could connect to the local FTP server by using 127.0.0.1 as the destination host address. This approach is sometimes used to test applications without involving a physical network or remote host.
  • A Directed Broadcast address has all of the host bits in a particular network set to (binary) 1, and is used to send a packet to all hosts on the network. So for example the destination address 192.168.1.255 is a directed broadcast to all of the hosts in network 192.168.1.0 255.255.255.0
  • A Local Broadcast address is used to send a packet to all hosts on the local network, and has all address bits set to (binary) 1. So the destination address 255.255.255.255 sent by a host on network 192.168.1.0 255.255.255.0 would send a packet to all hosts on the local network
UNDERSTANDING SUBNETTING FOR IPv4:

Every networking professional should have a thorough understanding of TCP/IP subnetting. Subnetting can improve network performance by splitting up collision and broadcast domains.

 

Subnetting is a set of techniques that you can use to efficiently divide the address space of a unicast address prefix for allocation among the subnets of an organization network. The act of subdividing the address space of an IPv4 or IPv6 address prefix.


Subnetting allows you to create multiple logical networks that exist within a single Class A, B, or C network. If you do not subnet, you are only able to use one network from your Class A, B, or C network, which is unrealistic.

Each data link on a network must have a unique network ID, with every node on that link being a member of the same network. If you break a major network (Class A, B, or C) into smaller subnetworks, it allows you to create a network of interconnecting subnetworks.

In Order To Subnet A Network, Extend The Natural Mask Using Some Of The Bits From The Host ID Portion Of The Address To Create A Subnetwork ID.

FOR EXAMPLE, given a Class C network of 204.17.5.0 which has a natural mask of 255.255.255.0, you can create subnets in this manner:
 
204.17.5.0 -      11001100.00010001.00000101.00000000
255.255.255.224 - 11111111.11111111.11111111.11100000
                  --------------------------|sub|----

 

By Extending The Mask To Be 255.255.255.224, You Have Taken Three Bits (Indicated By "Sub") From The Original Host Portion Of The Address And Used Them To Make Subnets. With These Three Bits, It Is Possible To Create Eight Subnets. With The Remaining Five Host ID Bits, Each Subnet Can Have Up To 32 Host Addresses, 30 Of Which Can Actually Be Assigned To A Device Since Host Ids Of All Zeros Or All Ones Are Not Allowed (It Is Very Important To Remember This). So, with this in mind, these subnets have been created.


Take A Look At How A Class B Network Might Be Subnetted. If You Have Network 172.16.0.0, Then You Know That Its Natural Mask Is 255.255.0.0 Or 172.16.0.0/16. Extending The Mask To Anything Beyond 255.255.0.0 Means You Are Subnetting. You Can Quickly See That You Have The Ability To Create A Lot More Subnets Than With The Class C Network. If You Use A Mask Of 255.255.248.0 (/21), How Many Subnets And Hosts Per Subnet Does This Allow For?
 
172.16.0.0  -   10101100.00010000.00000000.00000000
255.255.248.0 - 11111111.11111111.11111000.00000000
                -----------------| sub |-----------

You Are Using Five Bits From The Original Host Bits For Subnets. This Allows You To Have 32 Subnets (25). After Using The Five Bits For Subnetting, You Are Left With 11 Bits For Host Addresses. This Allows Each Subnet So Have 2048 Host Addresses (211), 2046 Of Which Could Be Assigned To Devices.

Note: In the past, there were limitations to the use of a subnet 0 (all subnet bits are set to zero) and all ones subnet (all subnet bits set to one). Some devices would not allow the use of these subnets. Cisco Systems devices allow the use of these subnets when theip subnet zero command is configured.

SAMPLE EXERCISE:

Now that you have an understanding of subnetting, put this knowledge to use. In this example, you are given two address / mask combinations, written with the prefix/length notation, which have been assigned to two devices. Your task is to determine if these devices are on the same subnet or different subnets. You can do this by using the address and mask of each device to determine to which subnet each address belongs.
 
DeviceA: 172.16.17.30/20
DeviceB: 172.16.28.15/20

DETERMINING THE SUBNET FOR DEVICEA:
 
172.16.17.30  -   10101100.00010000.00010001.00011110
255.255.240.0 -   11111111.11111111.11110000.00000000
                  -----------------| sub|------------
subnet =          10101100.00010000.00010000.00000000 = 172.16.16.0

Looking At The Address Bits That Have A Corresponding Mask Bit Set To One, And Setting All The Other Address Bits To Zero (This Is Equivalent To Performing A Logical "AND" Between The Mask And Address), Shows You To Which Subnet This Address Belongs. In This Case, Devicea Belongs To Subnet 172.16.16.0.

DETERMINING THE SUBNET FOR DEVICEB:
 
172.16.28.15  -   10101100.00010000.00011100.00001111
255.255.240.0 -   11111111.11111111.11110000.00000000
                  -----------------| sub|------------
subnet =          10101100.00010000.00010000.00000000 = 172.16.16.0

SUBNET MASKING REVIEW:

Applying a subnet mask to an IP address allows you to identify the network and node parts of the address. The network bits are represented by the 1s in the mask, and the node bits are represented by the 0s.

FOR EXAMPLE: using our test IP address and the default Class B subnet mask, AS BELLOW:
 
10001100 . 10110011 . 11110000 . 11001000      140.179.240.200   Class B IP Address
11111111 . 11111111 . 00000000 . 00000000      255.255.000.000   Default Class B Subnet Mask
--------------------------------------------------------
10001100 . 10110011 . 00000000 . 00000000      140.179.000.000   Network Address

DEFAULT SUBNET MASKS:
  • Class A - 255.0.0.0           - 11111111.00000000.00000000.00000000
  • Class B - 255.255.0.0        - 11111111.11111111.00000000.00000000
  • Class C - 255.255.255.0    - 11111111.11111111.11111111.00000000

Additional bits can be added to the default subnet mask for a given Class to further subnet, or break down, a network. When a bitwise logical AND operation is performed between the subnet mask and IP address, the result defines the Subnet Address (also called the Network Address or Network Number).

There are some restrictions on the subnet address. Node addresses of all "0"s and all "1"s are reserved for specifying the local network (when a host does not know its network address) and all hosts on the network (broadcast address), respectively. This also applies to subnets. A subnet address cannot be all "0"s or all "1"s. This also implies that a 1 bit subnet mask is not allowed.

This restriction is required because older standards enforced this restriction. Recent standards that allow use of these subnets have superseded these standards, but many "legacy" devices do not support the newer standards. If you are operating in a controlled environment, such as a lab, you can safely use these restricted subnets.

To calculate the number of subnets or nodes, use the formula (2n-2) where n = number of bits in either field, and 2n represents 2 raised to the nth power. Multiplying the number of subnets by the number of nodes available per subnet gives you the total number of nodes available for your class and subnet mask. Also, note that although subnet masks with non-contiguous mask bits are allowed, they are not recommended.

EXAMPLE:
 
10001100.10110011.11011100.11001000      140.179.220.200   IP Address
11111111.11111111.11100000.00000000      255.255.224.000   Subnet Mask
--------------------------------------------------------
10001100.10110011.11000000.00000000      140.179.192.000   Subnet Address
10001100.10110011.11011111.11111111      140.179.223.255   Broadcast Address

IN THIS EXAMPLE, a 3 bit subnet mask was used. There are 6 (23-2) subnets available with this size mask (Remember that subnets with all 0's and all 1's are not allowed). Each subnet has 8190 (213-2) nodes. Each subnet can have nodes assigned to any address between the Subnet address and the Broadcast address. This gives a total of 49,140 nodes for the entire class B address subnetted this way. Notice that this is less than the 65,534 nodes an unsubnetted class B address would have.

You can calculate the Subnet Address by performing a bitwise logical AND operation between the IP address and the subnet mask, then setting all the host bits to 0s. Similarly, you can calculate the Broadcast Address for a subnet by performing the same logical AND between the IP address and the subnet mask, then setting all the host bits to 1s. That is how these numbers are derived in the example above.

Subnetting always reduces the number of possible nodes for a given network. There are complete subnet tables available here for Class A, Class B and Class C. These tables list all the possible subnet masks for each class, along with calculations of the number of networks, nodes and total hosts for each subnet.

HERE IS ANOTHER, MORE DETAILED, EXAMPLE, Say you are assigned a Class C network number of 200.133.175.0 You want to utilize this network across multiple small groups within an organization. You can do this by subnetting that network with a subnet address.

We will break this network into 14 subnets of 14 nodes each. This will limit us to 196 nodes on the network instead of the 254 we would have without subnetting, but gives us the advantages of traffic isolation and security. To accomplish this, we need to use a subnet mask 4 bits long. Recall that the default Class C subnet mask is

255.255.255.0 (11111111.11111111.11111111.00000000 binary)

Extending this by 4 bits yields a mask of

255.255.255.240 (11111111.11111111.11111111.11110000 binary)

EASY STEPS FOR SUBNETTING:

The Following Step-By-Step Procedure Can Be Used-

Given an IP address and a subnet mask these steps will easy to enable you to identify the total number of subnets available, the number of hosts per subnet, the network address of the subnet, the first usable address on that subnet and the broadcast address of that subnet.

FOLLOW THESE SIMPLE STEPS:

Step 1 – Determine The Number Of Subnets Required By Your Installation
Step 2 – Determine The Number Of Bits, N, Needed For The Subnet ID Field
Step 3 – Determine The Number Of Bits, M, Needed For The Host ID Field
Step 4 – Determine The Subnet Mask For Your Network
Step 5 – Determine The Total Number Of Subnets Available
Step 6 – Determine The Maximum Number Of Hosts Per Subnet
Step 7For Each Subnet Determine:
              A) The Network Address
              B) The Range Of Host Addresses
              C) The Broadcast Address

·       ALSO Know the decimal values of the powers of 2 from 0 to 8 as presented in TABLE 1 below (e.g., 24 = 16)
·       Know how to add and subtract the decimal values of the powers of 2 in the following table (e.g., 27 – 25 = 128 – 32 = 96). If this decimal arithmetic can be done mentally, then subnetting itself can be accomplished mentally.
TABLE 1
x
2x
2x in Decimal
0
20
1
1
21
2
2
22
4
3
23
8
4
24
16
5
25
32
6
26
64
7
27
128
8
28
256


FOR EXAMPLE Creating Class C Subnetting Scheme:

Basic easy steps. This example uses the Class C address 211.212.10.0. Using the seven steps provided here, you can create a subnetting scheme that allows you to use this address on your network.

Step 1: Determining Number of Subnets Needed

Determining the number of subnets you need is the very first step in subnetting. The number really depends upon your particular network.

Using this very simple counting method, you find that you need a total of five subnets. Unfortunately, you have been assigned a Class C address. The network address 211.212.10.0 allows for a single network of 254 hosts. You must borrow host ID bits to make this address work for you.

Step 2: Determining Number of Bits You Can Borrow:

In Step 2, you must determine the number of bits that you can borrow. This number changes depending on the type of network address you start with. For Class A addresses, you have 24 host ID bits, but you can only borrow up to 22. For Class B addresses, you have 16 host ID bits, but you must have a minimum of two host bits; therefore, you can borrow 14 bits. Your Class C address (211.212.10.0) has eight total

host ID bits, but you can only borrow a maximum of six. The easiest way to determine the number of bits you can borrow is to write the number of octets that contain host ID bits in binary. In the Class C example network 211.212.10.0, you have the following bits to “play” with:
00000000

Step 3: Determining Number of Bits You Must Borrow to Get Needed Number of Subnets

After you determine the number of subnets you need and the number of bits you can borrow, you must calculate the number of host ID bits you must borrow to get the needed number of subnets. The formula for determining the number if bits you must borrow is 2n-2= # of subnets. The n represents the number of bits you borrow. In other words, raise two to the power of the number of bits you borrow and subtract two from that number. The result is the number of useable subnets created when you borrow that number of bits. For the example network, you need five subnets. If you borrow three bits, the formula’s result is six usable subnets: 23 = 8-2 = 6.

Step 4: Turning On Borrowed Bits and Determining Decimal Value

In Step 4, using the bits you determined were available in Step 2, you turn on (set to 1) the number of bits determined you must borrow in Step 3. You must always begin with the high-order bits (the bits starting on the left of a binary number). Using the number of bits you can work with and the number of bits you must borrow (from Step 3), your result is the following: 11100000. In other words, from the eight total bits from Step 2 (six of which you could borrow), you borrow three host ID bits. In Step 4, you also need to determine the decimal value of the octets from which you borrow host ID bits. In this example, 11100000 equals 224. (128 + 64 + 32 = 224)

Step 5: Determining New Subnet Mask:

Step 5 calculates the new subnet mask after you borrow the host ID bits in Step 4. You must add the decimal value from Step 4 to the default subnet mask for the class of address you are subnetting. The example is a Class C address, so the default mask is 255.255.255.0. The new mask after borrowing three bits becomes 255.255.255.224.

Step 6: Finding Host/Subnet Variable:

In Step 6, you must find the lowest of the high-order bits (bits starting from the left) turned “on.” Step 6 takes you all the way back to earlier in the chapter to the values found in each bit position within the octet. Our example defines the octets from which we borrow as 11100000. The highest order bit turned on represents 25, which equals 32. Since 25 is the last high-order bit turned on, the Host/Subnet variable you use in Step 7 is 32.

Step 7: Determining Range of Addresses:

The final step allows you to take the Host/Subnet variable from Step 6 (32) and create your subnet ranges. Using the Class C network above, the range of subnets when you borrow three bits are:

211.212.10.0 to 211.212.10.31
211.212.10.32 to 211.212.10.63
211.212.10.64 to 211.212.10.95
211.212.10.96 to 211.212.10.127
211.212.10.128 to 211.212.10.159
211.212.10.160 to 211.212.10.191
211.212.10.192 to 211.212.10.223
211.212.10.224 to 211.212.10.255

IP addresses cannot be all ones or all zeros; therefore, in most cases the first range of addresses and the last range of addresses are unusable. (In some special circumstances, you can use the first range of addresses, or subnet 0. Only certain manufacturers’ equipment, such as Cisco Systems, fully supports the use of subnet zero.) In each subnet, the first IP address is unusable because it represents the subnet ID. The final address is also unusable because it is the broadcast address for the subnet. Due to these two restrictions, in subnet one, 211.212.10.33 is the first useable host ID and 211.212.10.62 is the last useable host ID.

Class B Address :

This example takes a Class B address and tries to fit it within the needs of a network containing 1000 subnets. You are assigned the Class B address 131.107.0.0. Using the following seven steps, you are going to subnet the Class B address to meet your needs.

Step 1: Determining Number of Subnets Needed :
Examine your network and determine your needs based on current network configuration and future growth (in this case, 1000 subnets).

Step 2: Determining Number of Bits You Can Borrow:

With this Class B network address, you have 16 total bits to work with. You can only borrow up to 14 of these. On your sheet of paper, you should write the number of bits you have in the host ID portion of the address:

00000000.00000000

Step 3: Determining Number of Bits You Must Borrow to Get Number of Subsets Needed:

Using the formula 2n-2= # of usable subnets, you can easily see that you need to borrow 10 bits. When you plug in 10 borrowed bits, you get the following result:
210 = 1024 – 2 = 1022 useable subnets

Step 4: Turning on Borrowed Bits and Determining Decimal Value:

If you turn on 10 bits, you get the following:
11111111.11000000

The decimal values for the octets are 255.192.

Step 5: Determining New Subnet Mask

Your example is a Class B address. In Class B addresses, the default subnet mask is 255.255.0.0. To get your new mask, you add the default mask to the decimal values found in Step 4. The new mask becomes:
255.255.255.192

Step 6: Finding Host/Subnet Variable:

In the next-to-last step, you must find the value of the lowest high-order bit turned on in each octet, from which you borrowed host bits. Since this example is a Class B network and you must borrow a great number of bits to get the proper number of subnets, the borrowing crosses an octet boundary. As a result, you have two Host/Subnet variables.

In this example, the variable in the third octet is 1, and the variable for the fourth octet is 64. You get these values by looking at the binary numbers in Step 4. The third octet has the final bit position, or the 20 bit position, turned on. Since 20 = 1, your variable is 1 in the third octet. In the fourth octet, the second high-order bit or 26 is turned on. The variable in this octet is 64.

Step 7: Determining Range of Addresses:
Figuring the range of addresses for Class B networks is much harder than for Class C. This is especially true in cases like this scenario in which you must borrow a large number of bits.

Using 1 as the variable in the third octet and 64 as the variable in the fourth octet, the range of the first 9 subnets world be:

131.107.0.0 to 131.107.0.63
131.107.0.64 to 131.107.0.127
131.107.0.128 to 131.107.0.191
131.107.0.192 to 131.107.0.255
131.107.1.0 to 131.107.1.63
131.107.1.64. to 131.107.1.127
131.107.1.128 to 131.107.1.191
131.107.1.192 to 131.107.1.255
131.107.2.0 to 131.107.2.63

CIDR -- CLASSLESS INTERDOMAIN ROUTING:

Now that you understand "classful" IP Subnetting principals, you can forget them ;). The reason is CIDR -- Classless InterDomain Routing. CIDR was invented several years ago to keep the internet from running out of IP addresses. The "classful" system of allocating IP addresses can be very wasteful; anyone who could reasonably show a need for more that 254 host addresses was given a Class B address block of 65533 host addresses.

Even more wasteful were companies and organizations that were allocated Class A address blocks, which contain over 16 Million host addresses! Only a tiny percentage of the allocated Class A and Class B address space has ever been actually assigned to a host computer on the Internet.

People realized that addresses could be conserved if the class system was eliminated. By accurately allocating only the amount of address space that was actually needed, the address space crisis could be avoided for many years. This was first proposed in 1992 as a scheme called Supernetting. Under supernetting, the classful subnet masks are extended so that a network address and subnet mask could, for example, specify multiple Class C subnets with one address. For example, If I needed about 1000 addresses,
I could supernet 4: -

Class C networks together:
 
192.60.128.0   (11000000.00111100.10000000.00000000)  Class C subnet address
192.60.129.0   (11000000.00111100.10000001.00000000)  Class C subnet address
192.60.130.0   (11000000.00111100.10000010.00000000)  Class C subnet address
192.60.131.0   (11000000.00111100.10000011.00000000)  Class C subnet address
--------------------------------------------------------
192.60.128.0   (11000000.00111100.10000000.00000000)  Supernetted Subnet address
255.255.252.0  (11111111.11111111.11111100.00000000)  Subnet Mask
192.60.131.255 (11000000.00111100.10000011.11111111)  Broadcast address

In this example, the subnet 192.60.128.0 includes all the addresses from 192.60.128.0 to 192.60.131.255. As you can see in the binary representation of the subnet mask, the Network portion of the address is 22 bits long, and the host portion is 10 bits long.

Under CIDR, the subnet mask notation is reduced to a simplified shorthand. Instead of spelling out the bits of the subnet mask, it is simply listed as the number of 1s bits that start the mask. In the above example, instead of writing the address and subnet mask as
 
192.60.128.0, Subnet Mask 255.255.252.0 
the network address would be written simply as:
192.60.128.0/22

which indicates starting address of the network, and number of 1s bits (22) in the network portion of the address. If you look at the subnet mask in binary (11111111.11111111.11111100.00000000), you can easily see how this notation works.

The use of a CIDR notated address is the same as for a Classful address. Classful addresses can easily be written in CIDR notation (Class A = /8, Class B = /16, and Class C = /24)

It is currently almost impossible for an individual or company to be allocated their own IP address blocks. You will simply be told to get them from your ISP. The reason for this is the ever-growing size of the internet routing table. Just 10 years ago, there were less than 5000 network routes in the entire Internet. Today, there are over 100,000. Using CIDR, the biggest ISPs are allocated large chunks of address space (usually with a subnet mask of /19 or even smaller); the ISP's customers (often other, smaller ISPs) are then allocated networks from the big ISP's pool. That way, all the big ISP's customers (and their customers, and so on) are accessible via 1 network route on the Internet. But I digress.

It is expected that CIDR will keep the Internet happily in IP addresses for the next few years at least. After that, IPv6, with 128 bit addresses, will be needed. Under IPv6, even sloppy address allocation would comfortably allow a billion unique IP addresses for every person on earth! The complete and gory details of CIDR are documented in RFC1519, which was released in September of 1993.

CONCLUSION:

The Goal Of This Article Is To Give A Easy Steps To Calculate IP Addressing And Subnetting.
For Some People, Subnetting Can Be A Difficult Task But With This Article I Hope It May Make The Process Easy. Hope This Article Helps For Beginners!

This Article Written Author By: Premakumar Thevathasan. CCNA, CCNP, CCIP, MCSA, MCSE, MCSA - MSG, CIW Security Analyst, CompTIA Certified A+.

1 comment:

Anonymous said...

Excellent way Of Teaching Sir!