SUBNETTING - Learngroup · Subnetting - Subnetting a network means to use the subnet mask to divide...
Transcript of SUBNETTING - Learngroup · Subnetting - Subnetting a network means to use the subnet mask to divide...
Subnetting - Subnetting a network means to use the subnet mask to divide the
network and break a large network up into smaller, more efficient and
manageable segments, or subnets.
- Subnetting is done by taking part of host bits then add it to
the network part
Network part Host part
Subnet
bits
Network part Host part
IP
address
Subnetting Example Divide network 192.168.1.0/24 into 4 subnets Solution: 4 subnets need 2 bits
192.168.1 . 0
192.168.1 . 0000 0000 to 0011 1111
192.168.1 . 0100 0000 to 0111 1111
192.168.1 . 1000 0000 to 1011 1111
192.168.1 . 1100 0000 to 1111 1111
subnet mask is 255.255.255.192 or /26
The first subnet is 192.168.1.0/26
The second subnet is 192.168.1.64/26
The third subnet is 192.168.1.128/26
The fourth subnet is 192.168.1.192/26
0 - 63
64 - 127
128 - 191
192 - 255
Divide network 192.168.1.0/24 into 4 subnets -
Solution :
4 subnets need 2 bits
- subnet mask = 255.255.255.192
- interesting octet is 192
- hop count = 256 – 192 = 64
- The first subnet is 192.168.1.0/26
- The second subnet is 192.168.1.64/26
- The third subnet is 192.168.1.128/26
- The fourth subnet is 192.168.1.192/26
Subnetting Example
0 - 63
64 - 127
128 - 191
192 - 255
Divide network 172.16.0.0/16 into 8subnets
Solution :
- 8 subnets need 3 bits
- subnet mask = 255.255.224.0
- interesting octet is 224
- hop count = 256 – 224 = 32
- The first subnet is 172.16.0.0/19
- The second subnet is 172.16.32.0/19
- The third subnet is 172.16.64.0/19
-The 8th subnet is 172.16.224.0/19
Subnetting Example
172.16.0.1-172.16.31.254
172.16.32.1 -172.16.63.254
172.16.64.1-172.16. 95.254
172.16.224.1-172.16.255.254
Divide network 10.0.0.0/10 into 4subnets
Solution :
- 4subnets need 2 bits
- subnet mask = 255.240.0. 0
- interesting octet is 240
- hop count = 256 – 240= 16
- The first subnet is 10.0.0.0/12
- The second subnet is 10.16.0.0/12
- The third subnet is 10.32.0.0/12
- The fourth subnet is 10.48.0.0/12
Subnetting Example
10.0.0.1-10.15.255.254
10.16.0.1-10.31.255.254
10.32.0.1-10.47.255.254
10.48.0.1-10.63.255.254
Given the Class C network of 204.15.5.0/24, subnet the
network in order to create the network in the figure below, with
the host requirements shown
Calculating Addresses without
VLSM
Looking at the network shown, you can see that
you are required to create five subnets.
The largest subnet must support 28 host
addresses.
You can start by looking at the subnet
requirement.
In order to create the 5 needed subnets you would
need to use 3 bits from the Class C host bits.
Two bits would only allow you four subnets (22).
How many hosts will this support? 25 = 32 (30
usable).
This meets the requirement
Calculating Addresses without
VLSM
Subnet Mask = 255. 255. 255. 224 /27
Interesting Octet is 224
Hope Count = 256-224 = 32
Subnet A: 204.15.5.0/27 host address range 1 to
30
Subnet B: 204.15.5.32/27 host address range 33
to 62
Subnet C: 204.15.5.64/27 host address range 65
to 94
Subnet D: 204.15.5.96/27 host address range 97
to 126
Subnet E: 204.15.5.128/27 host address range
129 to 158
Waste of IP Addresses ?
Subnet A: 204.15.5.0/27 host address range 1 to
30
Only 14 Addresses Used
Subnet B: 204.15.5.32/27 host address range 33
to 62
Only 28 Addresses Used.
Subnet C: 204.15.5.64/27 host address range 65
to 94
Only 2 Addresses Used
Subnet D: 204.15.5.96/27 host address range 97
to 126
Only 7 Addresses Used
Subnet E: 204.15.5.128/27 host address range
129 to 158
Only 28 Addresses Used
In many cases, having the same subnet mask for all
subnets ends up wasting address space.
Solution ?
Using Variable Length Subnet Masks (VLSM)
VLSM allows you to use different masks for each
subnet, thereby using address space efficiently
How ?
The easiest way to assign the subnets is to assign
the largest first and work your way down.
In our case:
Proceed in the following order: Network B, E, A, D,
C
Subnet B: requires a /27 (255.255.255.224) mask to
support 28 hosts
We have calculated that before:
Subnet B: 204.15.5.0/27 host address range 1 to
30
Subnet E: requires a /27 (255.255.255.224) mask to
support 28 hosts
We have also calculated that before:
Subnet E: 204.15.5.32/27 host address range 33
to 62
Calculating Addresses with
VLSM
Subnet A: Needs 14 Hosts
Take one of the subnets from the last subnetting
procedure (other than the ones given to B and E.
Example: 204.15.5.64/27 (Apply Subnetting on
this one)
To support 14 hosts (at least 4 bits are needed for
the hosts)
Subnet Mask = 255. 255.255.240 /28
Interesting Octet = 240 Hop Count = 256 – 240
= 16
Number of Subnets = 2 ^ 1 = 2
204.15.5.64/28 -> Host address range 65 to 78
(Assign that to Subnet A)
204.15.5.80/28 -> Host Address Range 81 to 95
Calculating Addresses with
VLSM
Subnet D: Needs 7 Hosts
Take one of the subnets from the last subnetting
procedure (other than the ones given to A and D
Example: 204.15.5.80/28 (Apply Subnetting on
this one)
To support 7 hosts (at least 4 bits are needed for
the hosts, 3 bits has only 6 valid hosts)
Hence no need for any more subnetting
204.15.5.80/28 -> Host Address Range 81 to 94
Calculating Addresses with
VLSM
Subnet C: Needs 2 Hosts
Take one of the subnets from the last procedure
(other than the ones given to A
Example: 204.15.5.96/28 (Apply Subnetting on
this one)
To support 2 hosts (at least 2 bits are needed for
the hosts)
Subnet Mask = 255. 255.255.252 /30
Interesting Octet = 252 Hop Count = 256 – 252
= 4
Number of Subnets = 2 ^ 2 = 4
204.15.5.96/30 -> Host address range 97 to 98
(Assign that to Subnet C)
204.15.5.100/30 -> Host Address Range 101 to
102
Calculating Addresses with
VLSM
Finally:
Subnet B: 204.15.5.0/27 host address range 1 to
30
Subnet E: 204.15.5.32/27 host address range 33
to 62
Subnet A 204.15.5.64/28 host address range 65 to
78
Subnet D 204.15.5.80/28 host address range 81
to 94
Subnet C 204.15.5.96/30 host address range 97
to 98
Calculating Addresses with
VLSM