www.soran.edu.iq 1
Soran University
Faculty of Science
Mr.Ababakr I Rasul
Lecture 1 Subnetting and
VLSM
Ababakr.rasul@soran.edu.iq
www.soran.edu.iq
IP address classes
Class Start address Finish address
A 0.0.0.0 126.255.255.255
B 128.0.0.0 191.255.255.255
C 192.0.0.0 223.255.255.255
D 224.0.0.0 239.255.255.255
E 240.0.0.0 255.255.255.255
2
www.soran.edu.iq
Private IP Addresses
These IP addresses are used for internal use by company or home networks that need to
use TCP/IP
3
Class Private Start Address Private End Address
A 10.0.0.0 10.255.255.255
B 172.16.0.0 172.31.255.255
C 192.168.0.0 192.168.255.255
www.soran.edu.iq
Subnetting
Subnetting an IP network is to separate a big network into
smaller multiple networks for reorganization and security
purposes.
www.soran.edu.iq
Table :Subnet a network
Subnet mask 128 192 224 240 248 252 254 255
Bits value 128 64 32 16 8 4 2 1
2^ power number
2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
Bits borrowed 1 2 3 4 5 6 - -
Subnet
prefix
Class C
Class B
Class A
/25
/17
/9
/26
/18
/10
/27
/19
/11
/28
/20
/12
/29
/21
/13
/30
/22
/14
-
/23
/15
-
www.soran.edu.iq
Subnet mask
Table : Default Subnet Masks for Class A, Class B and Class C Networks
IP Address
Class
Total # Of
Bits For
Network ID /
Host ID
Default Subnet Mask
First Octet
Second
Octet
Third Octet Fourth Octet
Class A 8 / 24
11111111
(255)
00000000
(0)
00000000
(0)
00000000
(0)
Class B 16 / 16
11111111
(255)
11111111
(255)
00000000
(0)
00000000
(0)
Class C 24 / 8
11111111
(255)
11111111
(255)
11111111
(255)
00000000
(0)
www.soran.edu.iq
How to determine host and subnet
A- (2n
) where N is equal to number of bits borrowed.
determine number of total subnet.
A- (2h
-2) where H equal to number of host bits
determine number of valid host per subnet subnet
www.soran.edu.iq
Example
Class C: 192.168.100.50 / 26
Subnet mask: 255.255.255.192
Number of subnets: 2n
= 22
= 4 ( n = number of borrowed bits )
Number of usable host: 2h
-2= 26
-2 = 64 – 2 = 62
To find network address Convert both IP address and subnet mask to binary number
128 64 32 16 8 4 2 1
192. 168. 100. 50
11000000. 10101000. 01100100. 00110010 IP address
255. 255. 255. 192 and
11111111. 11111111. 11111111. 11000000 subnet mask
-----------------------------------------------------------
110000000. 10101000. 01100100. 00000000
192 . 168 . 100 . 0
Network address: 192.168.100.0
First usable host: 192.168.100.1 last host =number of host or(valid host)+network address
Last host: 192.168.100.62 last host =0+62
Broadcast address: 192.168.100.63
www.soran.edu.iq
Example
200.10.5.68/28 what is subnet mask, network, first host, broadcast ,last host ?
How many hosts or subnets are valid?
200.10.5.68/28
255.255.255.240
200.10.5.01000100
And
255.255.255.11110000
-----------------------------------
200.10.5. 64
200.10.5.64 network address
200.10.5.65 first host
200.10.5.78 last host last host =number of host + network address =64+14
200.10.5.79 broadcast
2n
=24
= 16 subnet
2H
-2= 24
-2=14 hosts
www.soran.edu.iq
Variable-length subnet masking
(VLSM)
www.soran.edu.iq
What Variable-Length Subnet Masking
(VLSM))
VLSM amounts to "subnetting subnets” which means that VLSM
allows network engineers to divide an IP address space into a
hierarchy of subnets of different sizes, making it possible to create
subnets with very different host counts without wasting large
numbers of addresses.
www.soran.edu.iq
VLSM
Available subnet - 192.168.2.0/24
Solution:
In this network we have 6 networks (LAN1 – LAN2 – LAN3
– WAN link1 – WAN link2 – WAN link3)
1- Determine the class of this network 192.168.2.0/24
(Class: C , N = 24bits , H = 8bits, Default Mask = 24)
2- Order the networks from the largest size to the
smallest:
1) LAN 2 (50 hosts)
2) LAN1 (24 hosts)
3) LAN3 (8 hosts)
4) WAN link 1 - WAN link 2 - WAN link 3 (2 hosts)
www.soran.edu.iq
VLSM (cont….)
3-Start from the biggest network:
1) LAN 2 (50 hosts):
H = 6 bits -> 26
-2 = 62 hosts
S = 2 bits -> 22
= 4 subnets
mask = N + S = 24+2 = /26 =(255.255.255.192)
LAN2 will take the subnet ID: 192.168.2.0 /26
Subnet 192.168.2.0/26 00000000
subnetmask 255.255.255.192 11000000 and
Network address 192.168.2.0 0= 00000000
First address 192.168.2.1
Last address 192.168.2.62 last host =network address +number of host or(valid host)=0+62=62
Brodcast adress 192.168.2.63
192.168.2.64 Next network address for another host
www.soran.edu.iq
VLSM (cont….)
2) LAN 1 (24 hosts):
H = 5 bits -> 25
-2 = 30 hosts
S = 3 bits -> 23
= 8 subnets
/mask = N + S = 24+3 = /27 =(255.255.255.224)
subnet 192.168.2.64/27 01000000
subnet mask 255.255.255.224 11100000 and
Network address 192.168.2.64 64= 01000000
First address 192.168.2.65
Last address 192.168.2.94 last host =network address +number of host or(valid host)=64+30=94
Brodcast adress 192.168.2.95
192.168.2.96 Next network address for another host
www.soran.edu.iq
VLSM (cont….)
3) LAN 3 (8 hosts):
H = 4 bits -> 24
-2 = 14 hosts
S = 4 bits -> 24
= 16 subnets
/mask = N + S = 24+4 = /28 =(255.255.255.240)
subnet 192.168.2.96/28 01100000
subnet mask 255.255.255.240 11110000 and
Network address 192.168.2.96 96 = 01100000
First address 192.168.2.97
Last address 192.168.2.110 last host =network address +number of host or(valid host)=96+14=110
Brodcast adress 192.168.2.111
192.168.2.112 Next network address for another host
www.soran.edu.iq
VLSM (cont….)
4) WAN Links 1,2,3 (2 hosts):
H = 2 bits -> 22
-2 = 2 hosts
S = 6 bits -> 26
= 64 subnets
/mask = N + S = 24+6 = /30 =(255.255.255.252)
192.168.2.112/30
subnet 192.168.2.112/30 01110000
subnet mask 255.255.255.252 11111100 and
Network address 192.168.2.112 112= 01110000
First address 192.168.2.113
Last address 192.168.2.114 last host =network address +number of host or(valid host)=112+2=114
Brodcast adress 192.168.2.115
192.168.2.116 Next network address for another host
www.soran.edu.iq
VLSM (cont….)
4) WAN Links 1,2,3 (2 hosts):
H = 2 bits -> 22
-2 = 2 hosts
S = 6 bits -> 26
= 64 subnets
/mask = N + S = 24+6 = /30 =(255.255.255.252)
192.168.2.116/30
subnet 192.168.2.116/30 01110000
subnet mask 255.255.255.252 11111100 and
Network address 192.168.2.116 116= 01110000
First address 192.168.2.117
Last address 192.168.2.118 last host =network address +number of host or(valid host)=116+2=118
Brodcast adress 192.168.2.119
192.168.2.120 Next network address
www.soran.edu.iq 18
Subnetting HomeWork
Write of the subnet mask, Network address, first host address, last host address,
broadcast address, and number subnet and hosts
 192.168.5.100 /29
 192.168.4.87/25
www.soran.edu.iq
VLSM Homework
Find the (VLSM) and determine the range of Hosts the following term.
Available subnet = 192.168.1.0/24

vlsm technologyytfyuftuvygubiugiugu.pptx

  • 1.
    www.soran.edu.iq 1 Soran University Facultyof Science Mr.Ababakr I Rasul Lecture 1 Subnetting and VLSM Ababakr.rasul@soran.edu.iq
  • 2.
    www.soran.edu.iq IP address classes ClassStart address Finish address A 0.0.0.0 126.255.255.255 B 128.0.0.0 191.255.255.255 C 192.0.0.0 223.255.255.255 D 224.0.0.0 239.255.255.255 E 240.0.0.0 255.255.255.255 2
  • 3.
    www.soran.edu.iq Private IP Addresses TheseIP addresses are used for internal use by company or home networks that need to use TCP/IP 3 Class Private Start Address Private End Address A 10.0.0.0 10.255.255.255 B 172.16.0.0 172.31.255.255 C 192.168.0.0 192.168.255.255
  • 4.
    www.soran.edu.iq Subnetting Subnetting an IPnetwork is to separate a big network into smaller multiple networks for reorganization and security purposes.
  • 5.
    www.soran.edu.iq Table :Subnet anetwork Subnet mask 128 192 224 240 248 252 254 255 Bits value 128 64 32 16 8 4 2 1 2^ power number 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0 Bits borrowed 1 2 3 4 5 6 - - Subnet prefix Class C Class B Class A /25 /17 /9 /26 /18 /10 /27 /19 /11 /28 /20 /12 /29 /21 /13 /30 /22 /14 - /23 /15 -
  • 6.
    www.soran.edu.iq Subnet mask Table :Default Subnet Masks for Class A, Class B and Class C Networks IP Address Class Total # Of Bits For Network ID / Host ID Default Subnet Mask First Octet Second Octet Third Octet Fourth Octet Class A 8 / 24 11111111 (255) 00000000 (0) 00000000 (0) 00000000 (0) Class B 16 / 16 11111111 (255) 11111111 (255) 00000000 (0) 00000000 (0) Class C 24 / 8 11111111 (255) 11111111 (255) 11111111 (255) 00000000 (0)
  • 7.
    www.soran.edu.iq How to determinehost and subnet A- (2n ) where N is equal to number of bits borrowed. determine number of total subnet. A- (2h -2) where H equal to number of host bits determine number of valid host per subnet subnet
  • 8.
    www.soran.edu.iq Example Class C: 192.168.100.50/ 26 Subnet mask: 255.255.255.192 Number of subnets: 2n = 22 = 4 ( n = number of borrowed bits ) Number of usable host: 2h -2= 26 -2 = 64 – 2 = 62 To find network address Convert both IP address and subnet mask to binary number 128 64 32 16 8 4 2 1 192. 168. 100. 50 11000000. 10101000. 01100100. 00110010 IP address 255. 255. 255. 192 and 11111111. 11111111. 11111111. 11000000 subnet mask ----------------------------------------------------------- 110000000. 10101000. 01100100. 00000000 192 . 168 . 100 . 0 Network address: 192.168.100.0 First usable host: 192.168.100.1 last host =number of host or(valid host)+network address Last host: 192.168.100.62 last host =0+62 Broadcast address: 192.168.100.63
  • 9.
    www.soran.edu.iq Example 200.10.5.68/28 what issubnet mask, network, first host, broadcast ,last host ? How many hosts or subnets are valid? 200.10.5.68/28 255.255.255.240 200.10.5.01000100 And 255.255.255.11110000 ----------------------------------- 200.10.5. 64 200.10.5.64 network address 200.10.5.65 first host 200.10.5.78 last host last host =number of host + network address =64+14 200.10.5.79 broadcast 2n =24 = 16 subnet 2H -2= 24 -2=14 hosts
  • 10.
  • 11.
    www.soran.edu.iq What Variable-Length SubnetMasking (VLSM)) VLSM amounts to "subnetting subnets” which means that VLSM allows network engineers to divide an IP address space into a hierarchy of subnets of different sizes, making it possible to create subnets with very different host counts without wasting large numbers of addresses.
  • 12.
    www.soran.edu.iq VLSM Available subnet -192.168.2.0/24 Solution: In this network we have 6 networks (LAN1 – LAN2 – LAN3 – WAN link1 – WAN link2 – WAN link3) 1- Determine the class of this network 192.168.2.0/24 (Class: C , N = 24bits , H = 8bits, Default Mask = 24) 2- Order the networks from the largest size to the smallest: 1) LAN 2 (50 hosts) 2) LAN1 (24 hosts) 3) LAN3 (8 hosts) 4) WAN link 1 - WAN link 2 - WAN link 3 (2 hosts)
  • 13.
    www.soran.edu.iq VLSM (cont….) 3-Start fromthe biggest network: 1) LAN 2 (50 hosts): H = 6 bits -> 26 -2 = 62 hosts S = 2 bits -> 22 = 4 subnets mask = N + S = 24+2 = /26 =(255.255.255.192) LAN2 will take the subnet ID: 192.168.2.0 /26 Subnet 192.168.2.0/26 00000000 subnetmask 255.255.255.192 11000000 and Network address 192.168.2.0 0= 00000000 First address 192.168.2.1 Last address 192.168.2.62 last host =network address +number of host or(valid host)=0+62=62 Brodcast adress 192.168.2.63 192.168.2.64 Next network address for another host
  • 14.
    www.soran.edu.iq VLSM (cont….) 2) LAN1 (24 hosts): H = 5 bits -> 25 -2 = 30 hosts S = 3 bits -> 23 = 8 subnets /mask = N + S = 24+3 = /27 =(255.255.255.224) subnet 192.168.2.64/27 01000000 subnet mask 255.255.255.224 11100000 and Network address 192.168.2.64 64= 01000000 First address 192.168.2.65 Last address 192.168.2.94 last host =network address +number of host or(valid host)=64+30=94 Brodcast adress 192.168.2.95 192.168.2.96 Next network address for another host
  • 15.
    www.soran.edu.iq VLSM (cont….) 3) LAN3 (8 hosts): H = 4 bits -> 24 -2 = 14 hosts S = 4 bits -> 24 = 16 subnets /mask = N + S = 24+4 = /28 =(255.255.255.240) subnet 192.168.2.96/28 01100000 subnet mask 255.255.255.240 11110000 and Network address 192.168.2.96 96 = 01100000 First address 192.168.2.97 Last address 192.168.2.110 last host =network address +number of host or(valid host)=96+14=110 Brodcast adress 192.168.2.111 192.168.2.112 Next network address for another host
  • 16.
    www.soran.edu.iq VLSM (cont….) 4) WANLinks 1,2,3 (2 hosts): H = 2 bits -> 22 -2 = 2 hosts S = 6 bits -> 26 = 64 subnets /mask = N + S = 24+6 = /30 =(255.255.255.252) 192.168.2.112/30 subnet 192.168.2.112/30 01110000 subnet mask 255.255.255.252 11111100 and Network address 192.168.2.112 112= 01110000 First address 192.168.2.113 Last address 192.168.2.114 last host =network address +number of host or(valid host)=112+2=114 Brodcast adress 192.168.2.115 192.168.2.116 Next network address for another host
  • 17.
    www.soran.edu.iq VLSM (cont….) 4) WANLinks 1,2,3 (2 hosts): H = 2 bits -> 22 -2 = 2 hosts S = 6 bits -> 26 = 64 subnets /mask = N + S = 24+6 = /30 =(255.255.255.252) 192.168.2.116/30 subnet 192.168.2.116/30 01110000 subnet mask 255.255.255.252 11111100 and Network address 192.168.2.116 116= 01110000 First address 192.168.2.117 Last address 192.168.2.118 last host =network address +number of host or(valid host)=116+2=118 Brodcast adress 192.168.2.119 192.168.2.120 Next network address
  • 18.
    www.soran.edu.iq 18 Subnetting HomeWork Writeof the subnet mask, Network address, first host address, last host address, broadcast address, and number subnet and hosts  192.168.5.100 /29  192.168.4.87/25
  • 19.
    www.soran.edu.iq VLSM Homework Find the(VLSM) and determine the range of Hosts the following term. Available subnet = 192.168.1.0/24