Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 24

DATA SUBNETTING

COMMUNICATION AND By Mr.Chishala G.


Email:gmakunka@gmail.com
NETWORKING
SUBNETTING
By now you know that having one large network is not a good thing.
But how would you fix the out of control problem that Figure 5.1 illustrates?
Wouldn’t it be nice to be able to break up that one, huge network address and
create four manageable networks from it.
To make that happen, you would need to apply the infamous trick of subnetting
because it’s the best way to break up a giant network into a bunch of smaller
ones.
Fig 5.1 One network
SUBNETTING
Take a look at Figure 5.2 and see how this might look.
Fig 5.2 Multiple networks connected together
SUBNETTING
How to Create Subnets
 Creating subnetworks is essentially the act of taking bits from the host portion of the address
and reserving them to define the subnet address instead.
Clearly this will result in fewer bits being available for defining your hosts.
In this first section, we’ll be discussing classful routing, which refers to the fact that all hosts (nodes) in the network are using the
exact same subnet mask.
to create a subnet, we’ll start by fulfilling these three steps:
1.Determine the number of required network IDs:
One for each LAN subnet
One for each wide area network connection
2. Determine the number of required host IDs per subnet:
 One for each TCP/IP host
One for each router interface
3. Based on the above requirements, create the following:
A unique subnet mask for your entire network
 A unique subnet ID for each physical segment
 A range of host IDs for each subnet
SUBNETTING
Subnet Masks:
For the subnet address scheme to work, every machine on the network must know which
part of the host address will be used as the subnet address.
This condition is met by assigning a subnet mask to each machine.
A subnet mask is a 32-bit value that allows the device that’s receiving IP packets to distinguish
the network ID portion of the IP address from the host ID portion of the IP address.
This 32-bit subnet mask is composed of 1s and 0s, where the 1s represent the positions that refer
to the network subnet addresses.
Not all networks need subnets, and if not, it really means that they’re using the default
subnet mask, which is basically the same as saying that a network doesn’t have a subnet
address.
Table 5.1 shows the default subnet masks for Classes A, B, and C.
SUBNETTING
Default subnet mask:
SUBNETTING
Understanding powers of 2:
SUBNETTING
Classless Inter-Domain Routing (CIDR):It’s basically the method that Internet service
providers (ISPs) use to allocate a number of addresses to a company, a home.
They provide addresses in a certain block size, When you receive a block of addresses from an
ISP, what you get will look something like this: 192.168.10.32/28.
This is telling you what your subnet mask is. The slash notation (/) means how many bits are
turned on (1s). Obviously, the maximum could only be /32 because a byte is 8 bits and there are 4
bytes in an IP address: (4 x 8 = 32)
But keep in mind that regardless of the class of address, the largest subnet mask available can
only be a /30 because you’ve got to keep at least 2 bits for host bits.
Take, for example, a Class A default subnet mask, which is 255.0.0.0. This tells us that the first
byte of the subnet mask is all ones (1s), or 11111111.
When referring to a slash notation, you need to count all the 1-bits to figure out your mask. The
255.0.0.0 is considered a /8 because it has 8 bits that are 1s—that is, 8 bits that are turned on.
A Class B default mask would be 255.255.0.0, which is a /16 because 16 bits are ones (1s):
11111111.11111111.00000000.00000000.
SUBNETTING
Table 5.2 has a listing of every available subnet mask and its equivalent CIDR slash notation.
SUBNETTING
SUBNETTING
SUBNETTING
The /8 through /15 can only be used with Class A network addresses. /16 through /23 can be used
by Class A and B network addresses.
The /24 through /30 can be used by Class A, B, and C network addresses.
This is a big reason why most companies use Class A network addresses.
Since they can use all subnet masks, they get the maximum flexibility in network design. you
cannot configure a router using this slash format.
Nevertheless, it’s really important for you to know subnet masks in the slash notation (CIDR)
Subnetting Class C Addresses:
There are many different ways to subnet a network. The right way is the way that works best for
you.
 In a Class C address, only 8 bits are available for defining the hosts. Remember that subnet bits
start at the left and move to the right, without skipping bits.
This means that the only Class C subnet masks can be the following:
SUBNETTING
Binary Decimal CIDR
---------------------------------------------------------
00000000 = 255.255.255.0 /24
10000000 = 255.255.255.128 /25
11000000 = 255.255.255.192 /26
11100000 = 255.255.255.224 /27
11110000 = 255.255.255.240 /28
11111000 = 255.255.255.248 /29
11111100 = 255.255.255.252 /30
We can’t use a /31 or /32 because, we must have at least 2 host bits for assigning IP addresses to
hosts.
 we can never use a /32 because that would mean zero host bits available
SUBNETTING
When you’ve chosen a possible subnet mask for your network and need to determine the number of
subnets, valid hosts, and the broadcast addresses of a subnet that mask will provide,
 all you need to do is answer five simple questions:
1.How many subnets does the chosen subnet mask produce?
2.How many valid hosts per subnet are available?
3.What are the valid subnets?
4. What’s the broadcast address of each subnet?
5.What are the valid hosts in each subnet?
This is where you’ll be really glad you followed my advice and took the time to memorize your
powers of 2. If you didn’t, now would be a good time…
Here’s how you arrive at the answers to those five big questions:
SUBNETTING
How many subnets? 2^x = number of subnets. x is the number of masked bits, or the 1s. For example,
in 11000000, the number of 1s gives us 2^2 subnets. So in this example, there are 4 subnets.
How many hosts per subnet? 2^y – 2 = number of hosts per subnet. y is the number of unmasked bits,
or the 0s.
For example, in 11000000, the number of 0s gives us 26 – 2 hosts, or 62 hosts per subnet.
You need to subtract 2 for the subnet address and the broadcast address, which are not valid hosts.
What are the valid subnets? 256 – subnet mask = block size, or increment number.
An example would be the 255.255.255.192 mask, where the interesting octet is the fourth octet.
Just use this math: 256 – 192 = 64. The block size of a 192 mask is always 64.
Start counting at zero in blocks of 64 until you reach the subnet mask value and these are your
subnets in the fourth octet: 0, 64, 128, 192. Easy, not so?
SUBNETTING
What’s the broadcast address for each subnet? Now here’s the really easy part.
Since we counted our subnets in the last section as 0, 64, 128, and 192, the
broadcast address is always the number right before the next subnet.
 For example, the 0 subnet has a broadcast address of 63 because the next subnet is
64.
The 64 subnet has a broadcast address of 127 because the next subnet is 128, and
so on.
Remember, the broadcast address of the last subnet is always 255.
What are the valid hosts? Valid hosts are the numbers between the subnets.
For example, if 64 is the subnet number and 127 is the broadcast address, then 65–
126 is the valid host range.
Your valid range is always the group of numbers between the subnet address and
the broadcast address
SUBNETTING
Practice Example #1C: 255.255.255.128 (/25)
Since 128 is 10000000 in binary, there is only 1 bit for subnetting and 7 bits for hosts.
We’re going to subnet the Class C network address 192.168.10.0.
192.168.10.0 = Network address
255.255.255.128 = Subnet mask
Now, let’s answer our big five:
How many subnets? Since 128 is 1 bit on (10000000), the answer would be 2^1 = 2.
How many hosts per subnet? We have 7 host bits off (10000000), so the equation would be
2^7 – 2 = 126 hosts.
Once you figure out the block size of a mask, the amount of hosts is always the block size
minus 2. No need to do extra math if you don’t need
SUBNETTING
What are the valid subnets? 256 – 128 = 128. Remember, we’ll start at zero and count in our block
size, so our subnets are 0, 128.
By just counting your subnets when counting in your block size, you really don’t need to do steps
1 and 2.
We can see we have two subnets, and in the step before this one, just remember that the amount of
hosts is always the block size minus 2, and in this example, that gives us 2 subnets, each with 126
hosts.
What’s the broadcast address for each subnet? The number right before the value of the next
subnet is all host bits turned on and equals the broadcast address.
For the zero subnet, the next subnet is 128, so the broadcast of the 0 subnet is 127.
What are the valid hosts? These are the numbers between the subnet and broadcast address.
The easiest way to find the hosts is to write out the subnet address and the broadcast address,
which makes valid hosts completely obvious.
SUBNETTING
 The following table shows the 0 and 128 subnets, the valid host ranges of each, and the broadcast
address of both subnets:
SUBNETTING
Implementing a Class C /25 logical network would be as follows:
SUBNETTING
Practice Example #2C: 255.255.255.192 (/26):
This time, we’re going to subnet the network address 192.168.10.0 using the subnet mask
255.255.255.192.
192.168.10.0 = Network address
255.255.255.192 = Subnet mask
Now, let’s answer the big five:
How many subnets? Since 192 is 2 bits on (11000000), the answer would be 2^2 = 4 subnets.
How many hosts per subnet? We have 6 host bits off (11000000), giving us 26 – 2 = 62 hosts.
 The amount of hosts is always the block-size minus 2.
What are the valid subnets? 256 – 192 = 64. Remember, to start at zero and count in our block size.
 This means our subnets are 0, 64, 128, and 192. We can see we have a block size of 64, so we have 4
subnets, each with 62 hosts.
SUBNETTING
What’s the broadcast address for each subnet? The number right before the value of the next
subnet is all host bits turned on and equals the broadcast address.
 For the zero subnet, the next subnet is 64, so the broadcast address for the zero subnet is 63.
What are the valid hosts? These are the numbers between the subnet and broadcast address.
As I said, the easiest way to find the hosts is to write out the subnet address and the broadcast
address, which clearly delimits our valid hosts.
 The following table shows the 0, 64, 128, and 192 subnets, the valid host ranges of each, and the
broadcast address of each subnet:
SUBNETTING
you can see that we can now subnet a /26 as long as we can count in increments of 64.
what are you going to do with this fascinating information? Implement it! We’ll use Figure below
shows a /26 network implementation.
SUBNETTING
The /26 mask provides four subnetworks, and we need a subnet for each router interface.
With this mask, in this example, we actually have room with a spare subnet to add to another router
interface in the future. Always plan for growth if possible.

---------------------------------------------------------------------------------------------------------------------------
Quiz 5.
Given a network address 192.168.10.0/27, get the maximum subnets and show its implementation.
----------------------------------------------------------------------------------------------------------------------------

You might also like