Professional Documents
Culture Documents
Classless Sub Netting Apple Diagram
Classless Sub Netting Apple Diagram
Rick Graziani Cabrillo College Note: These example use classless addressing. Instead of a default classful mask, a network mask is given.
What is subnetting?
Network Network 172 16 Host 0 Host 0
Network Network
Subnet
Host
Subnetting is the process of borrowing bits from the HOST bits, in order
to divide the larger network into small subnets. Subnetting does NOT give you more hosts, but actually costs you hosts. You lose two host IP Addresses for each subnet, and perhaps one for the subnet IP address and one for the subnet broadcast IP address. You lose the last subnet and all of its hosts IP addresses as the broadcast for that subnet is the same as the broadcast for the network. In older networks, you would have lost the first subnet, as the subnet IP address is the same as the network IP address. (This subnet can be used in most networks.)
Rick Graziani graziani@cabrillo.edu 2
Analogy
Dividing the barrel of apples into small barrels or baskets does not give us any more apples 100 Apples
Analogy
10
10
10
10
10
10
10
Analogy
100
98 Apples (100 2)
Before subnetting: In any network (or subnet) we can not use all the IP addresses for host addresses. We lose two addresses for every network or subnet. 1. Network Address - One address is reserved to that of the network. 2. Broadcast Address One address is reserved to address all hosts in that network or subnet.
8
(less 2)
8
(less 2)
80 Apples 10 * (10 - 2)
8
(less 2)
8
(less 2)
8
(less 2)
8
(less 2)
8
(less 2)
8
(less 2)
(less 2)
8
(less 2)
8
(less 2)
64 Apples 8 * (10 - 2)
8
(less 2)
8
(less 2)
8
(less 2)
8
(less 2)
8
(less 2)
8
(less 2)
--8
Subnet Example
Network address 172.16.0.0 with /16 network mask Network Network 172 16 Host 0 Host 0
Subnet Example
Network address 172.16.0.0 with /16 network mask Network Network Host Host 172 16 0 0 Subnet
00000000 11111111
Host
00000000 00000000
11111111 11111111
11111111 11111111
Subnet Example
Network address 172.16.0.0 with /16 network mask Using Subnets: subnet mask 255.255.255.0 or /24 Network Network 172 172 172 172 172 172 172
Rick Graziani graziani@cabrillo.edu
16 16 16 16 16 16 16
Subnets
255 Subnets 28 - 1
Subnet Example
Network address 172.16.0.0 with /16 network mask Using Subnets: subnet mask 255.255.255.0 or /24 Network Network 172 172 172 172 172 172 172
Rick Graziani graziani@cabrillo.edu
Host 0 0 0 0 0 0 0
Cannot use last subnet as it contains broadcast address 11
16 16 16 16 16 16 16
Subnets Addresses
255 Subnets 28 - 1
Subnet Example
Class B address 172.16.0.0 with /16 network mask Using Subnets: subnet mask 255.255.255.0 or /24 Network Network 172 172 172 172 172 172 172 16 16 16 16 16 16 16 Subnet 0 1 2 3 Etc. 254 255 Hosts 1 1 1 1 1 1 Host Hosts Addresses 254 254 254 254 254 254
Each subnet has 254 hosts, 28 2
12
Subnet Example
Network address 172.16.0.0 with /16 network mask Using Subnets: subnet mask 255.255.255.0 or /24 Network Network 172 172 172 172 172 172 172
Rick Graziani graziani@cabrillo.edu
16 16 16 16 16 16 16
Broadcast Addresses
255 Subnets 28 - 1
Subnet Example
Network address 172.16.0.0 with /16 network mask Using Subnets: subnet mask 255.255.255.0 or /24 172.16.0.0/24 172.16.10.0/24
172.16.5.0/24
172.16.25.0/24
14
Subnetting Example #2
Host IP Address: 138.101.114.250 Network Mask: 255.255.0.0 Subnet Mask: 255.255.255.192
Given the following Host IP Address, Network Mask and Subnet mask find the following information: Major Network Information Major Network Address Major Network Broadcast Address Range of Hosts if not subnetted Subnet Information Subnet Address Range of Host Addresses (first host and last host) Broadcast Address Other Subnet Information Total number of subnets Number of hosts per subnet
Rick Graziani graziani@cabrillo.edu 17
Major Network Address: 138.101.0.0 Major Network Broadcast Address: 138.101.255.255 Range of Hosts if not Subnetted: 138.101.0.1 to 138.101.255.254
18
Step 1: Translate Host IP Address and Subnet Mask into binary notation
19
ask Network
Step 2: Determine the Network (or Subnet) where this Host address lives: 1. Draw a line under the mask 2. Perform a bit-wise AND operation on the IP Address and the Subnet Mask Note: 1 AND 1 results in a 1, 0 AND anything results in a 0 3. Express the result in Dotted Decimal Notation 4. The result is the Subnet Address of this Subnet or Wire which is 138.101.114.192
Rick Graziani graziani@cabrillo.edu 20
ask Network
Step 2: Determine the Network (or Subnet) where this Host address lives: Quick method: 1. Find the last (right-most) 1 bit in the subnet mask. 2. Copy all of the bits in the IP address to the Network Address 3. Add 0s for the rest of the bits in the Network Address
21
01110010 11 111010 11111111 11 000000 01110010 11 000000 n subnet p n host p counting range counting range
Step 3: Determine which bits in the address contain Network (subnet) information and which contain Host information: Use the Network Mask: 255.255.0.0 and divide (Great Divide) the from the rest of the address. Use Subnet Mask: 255.255.255.192 and divide (Small Divide) the subnet from the hosts between the last 1 and the first 0 in the subnet mask.
Rick Graziani graziani@cabrillo.edu 22
. .
01110010 11 111010 11111111 11 000000 01110010 11 000000 n s et p n ost p co ti g ra ge co ti g ra ge 01110010 114 01110010 114 01110010 114 11 000001 193 111110 254 111111 255
First Host
Last Host
11
Broa cast
11
Host Portion Subnet Address: all 0s First Host: all 0s and a 1 Last Host: all 1s and a 0 Broadcast: all 1s
Rick Graziani graziani@cabrillo.edu 23
ress
ask Network
01110010 11 111010 11111111 11 000000 01110010 11 000000 n s et p n ost p co ti g ra ge co ti g ra ge 01110010 114 11 000001 193
Number of subnet bits 10 10001010 01100101 01110010 11 111110 Last 10 =Host 2 1,024 138 101 114 254 1,024cast subnets total 10001010 01100101 01110010 11 111111 Broa 138 101 114 255 Subtract one if all-zeros subnet cannot be used Subtract one if all-ones subnet cannot be used
Rick Graziani graziani@cabrillo.edu 24
01100101 101
ress
ask Network
01110010 11 111010 11111111 11 000000 01110010 11 000000 n s et p n ost p co ti g ra ge co ti g ra ge 01110010 114 11 000001 193 111110 254 111111 255
Number of host bits 6 10001010 01100101 01110010 Last Host 6 = 64 2 138 101 114 64 host per subnets 10001010 01100101 01110010 Broa cast 138 101 114 Subtract one for the subnet address Subtract one for the broadcast address 62 hosts per subnet
Rick Graziani graziani@cabrillo.edu
11
11
25
Your Turn!
Problem 1 Host IP Address: 10.10.10.193 Network Mask: 255.255.0.0 Subnet Mask: 255.255.255.0 Problem 2 Host IP Address: 10.10.10.193 Network Mask: 255.255.255.0 Subnet Mask: 255.255.255.240 Problem 3 Host IP Address: 10.10.10.193 Network Mask: 255.255.255.0 Subnet Mask: 255.255.255.252
Rick Graziani graziani@cabrillo.edu 26
Subnetting
Rick Graziani Cabrillo College