Upload
lenore
View
48
Download
3
Tags:
Embed Size (px)
DESCRIPTION
Subnetting. IP Addresses. IP addresses identify hosts and network devices To send and receive messages on an IP network, every host must be assigned a unique 32-bit IP address IP address are displayed in dotted-decimal notation 192.168.1.1 Each of the 4 octets represents 8 bits - PowerPoint PPT Presentation
Citation preview
Subnetting
IP Addresses
IP addresses identify hosts and network devices To send and receive messages on an IP network, every
host must be assigned a unique 32-bit IP address IP address are displayed in dotted-decimal notation
192.168.1.1
Each of the 4 octets represents 8 bits
IP addresses are hierarchical The network portion identifies the network that a host
belongs to The host portion identifies an individual host on a
network
Network AddressesNetwork Addresses
The network portion of the address, is used to represent the entire network It represents a group of IP addresses that can be used on
that networkThe network address consists of the network field
plus all 0’s in the host portion of the address 192.168.18.00000000 192.168.18.0
The Network address is not a usable host IP addressNetwork addresses are only used by routers to decide
how to get packets to their destination
Host vs. Network PortionHost vs. Network Portion
Network Number
Host Number
Broadcast Address
A Broadcast Address is the address used to send messages to every host on the same network
A Broadcast Address consists of the Network address, plus all 1’s in the host field
The Broadcast address is NOT a USABLE host address and can not be assigned to a host
Broadcast AddressesBroadcast Addresses
Network Address Broadcast Address 120.0.0.0 120.255.255.255170.50.0.0. 170.5.255.255192.168.10 192.168.10.255
Usable Host AddressesUsable Host Addresses
As we just saw, the Network address and the Broadcast address are NOT usable host addresses
A usable host IP address is an IP address that: Is not a Network Address (all 0’s in host field) Is not a Broadcast Address (all 1’s in host field) Is not a reserved Address (127 addresses) Is a Class A, B or C address
Only a usable host IP address can be assigned to a host device
Determining Usable Host Addresses
Network Usable Hosts Broadcast
10.0.0.0 10.0.0.1 – 10.255.255.254 10.255.255.255
172.16.0.0 172.16.0.1-172.16.255.254172.16.255.255
192.168.1.0 192.168.1.1-192.168.1.254 192.168.1.255
Available Host AddressesAvailable Host Addresses
The number of available host addresses on a network can be calculated with the formula:
2 ^ host bits – 2 Network type Available Hosts 255.0.0.0 2 ^ 24 -2 = 16, 277, 214 255.255.0.0 2 ^ 16- 2 = 65, 534 255.255.255.0 2 ^ 8 – 2 = 254
The reason we always subtract 2 from the total host addresses to determine the available host addresses, is because the network address and broadcast address are NOT usable host address
Therefore, every network has 2 addresses that can not be assigned to hosts, the very 1st address (all 0’s in the host portion) and the very last address (all 1’s in the host portion)
IP Address Classes
To create more possible network designations, the 32-bit address space was organized into five classes. Class A, B, and C: Commercial networks Class D and E: multicast and experimental
The class of a network is indicated by the values of the first few bits of the IP address, called the high-order bits.
Commercial IP Address ClassesCommercial IP Address Classes
Class C addresses are usually assigned to small networks Use 3 octets for the network and 1 for the hosts N.N.N.H The default subnet mask is 24 bits: 255.255.255.0 2, 097, 150 (2 ^ 21 – 2) possible networks 254 (2 ^ 8 – 2) available host addresses per network
Class B addresses are typically used for medium-sized networks Use 2 octets for the network and 2 for the hosts N.N.H.H The default subnet mask is 16 bits: 255.255.0.0 16, 382 (2 ^ 14 – 2) possible networks 65, 534 (2 ^ 16 – 2) available host addresses per network
Class A addresses are typically assigned to large organizations. Use 1 octet for the network and 3 for the hosts N.H.H.H The default subnet mask is 8 bits: 255.0.0.0 126 (2 ^ 7 – 2) possible networks 16, 777, 214 (2 ^ 24 – 2) available host addresses per network
Class A
The first bit is always 0 Addresses start with 0 to 126
Class B
First two bits are always 1 and 0 Addresses start with 128 to 191
Class C
First three bits are always 1, 1 and 0 Addresses start with 192 to 223
The value of the 1The value of the 1stst Octet OctetThe class of an address can be determined by the value
of the first octetEach Class of IP Address can only begin with a certain
valueAlso notice, that there is a leading bit pattern that never
changes for each class of addressesClass Decimal Value of 1st Octet Leading Bit value
Class A 1 - 126 0Class B 128 – 191 10Class C 192 – 223 110Class D 224 – 239 1110Class E 240 – 255 1111
1 to 126
Private Network Addresses
Private Network Addresses
The Loopback AddressThere are also private addresses that can be
used for the diagnostic testing of devices.This type of private address is known as a
loopback address. The class A, 127.0.0.0 network address, is
reserved for loopback testing. The loopback IP address, 127.0.0.1 is used to
test a NIC card to verify that it is sending and receiving signals.
Subnet MasksSubnet Masks
A subnet mask is a 32 bit address which tells devices which part of the IP address is network and which part is host Let routers & hosts figure out which network or subnet an IP
address belongs to
Subnet Masks contain:all 1’s in the network field all 0’s in the host field
Example Subnet Masks: 255.255.255.0 255.255.0.0 255.255.255.128 255.254.0.0
Subnet Mask Formats
Subnet Masks can be written in 2 different formats:
1. Dotted Decimal format 192.168.1.1 255.255.255.0
2. Bit-Mask Format 192.168.1.1 /24
This indicates that there are 24 bits ( 24 1’s) in the network and subnetwork portion of the address (255.255.255.0)
Default Subnet MasksDefault Subnet Masks A default Subnet Mask is used when a network has NOT
been subnetted Default Subnet Masks
Class A: 255.0.0.0 OR /8 11111111.00000000.00000000.00000000 8 bits for network, 24 bits for host
Class B: 255.255.0.0 OR /16 11111111. 11111111.00000000.00000000 16 bits for network, 16 bits for host
Class C: 255.255.255.0 OR /24 11111111.11111111.1111111.00000000 24 bits for network, 8 bits for host
Subnettting
Subnetting… Is dividing a network address into smaller divisions, or
subnets It allows you to divide a Class A, B or C network
address into smaller subnetworks, with their own network addresses
Each subnet acts like its own LAN and is connected to its own router interface
Class C Network: 192.168.1.0
Addresses AvailableAddresses Available: 192.168.1.0 - 192.168.1.255 (256 total) 192.168.1.1 - 192.168.1.254 are usable (254 usable)
Goal:Goal: Need 4 separate network addresses for 4 company LANs
Solution:Solution: Subnet the Network Address
How?How? 256 Addresses to work with 256 / 4 Subnets needed = 64 Addresses per Subnet
Subnet 1 Subnet 2Subnet 1 Subnet 2 Subnet 3 Subnet 3 Subnet 4Subnet 40 to 63 64 to 127 129 to 191 192 to 255
Sample Subnetting Scheme
Subnets Created:
Network Address Assigned:
Why Subnet a Network?
1. Provides better organization of Large Networks more efficient assignment of addresses breaks a network into smaller sections, which act like
separate networks, without applying for additional Network addresses
2. Gives local administrators more control over their local networks
adds security between networks
3. Reduces the size of the broadcast domain Helps minimize traffic loads by restricting broadcast traffic
to smaller area
Classful Subnetting
Routers see each network as a Single network with a single network number. This keeps routing tables small Each network is identified to routers by its network number Ex. Given a local IP address of 192.168.10.14, the world outside
your LAN sees only the advertised major network number of 192.168.10.0.
Only internal routers (within your organization) use the Subnet Addresses to route between your local networks These routers use the subnet addresses to recognize different
subnets within your whole network – all other routers ignore it!
Subnet Address
A subnet address is the address that identifies a subnet (similar to a network address)
It contains: All 1’s1’s in the networknetwork and Subnet Subnet Fields All 0’s0’s in the HostHost fields
Subnet addresses are created by borrowing bits from the Host field of a network address and making them part of the network Field
All Hosts on a Subnetwork share a common subnetwork address- they are all on the same network or subnet
Creating Subnets
NetworkNetwork Network Host
S HH H H H HS
•2 Bits are borrowed from the Host Field to make a Subnet Field, which becomes part of the Subnet Address
To create Subnets: To create Subnets: Bits are Borrowed from the Host Field and made
part of the network field This Creates a Subnet Field in the IP address
Custom Subnet Masks
When a network has been subnetted, it no longer uses the Default Subnet Mask
A subnetted network must use a Custom Subnet Mask, which tells the router how many bits have been borrowed from the host portion of the address
The router must use a modified or custom subnet mask to distinguish the subnets from each other
The Custom Subnet MaskCustom Subnet Mask is created by borrowing bits from the host portion of the default subnet mask, and changing them from 0’s to 1’s
Create a Custom Subnet Mask ExampleExample: A Class A subnet mask, with 2 bits borrowed:
Default Mask = 255.0.0.0 2 bits borrowed = 255.11000000.0.0 Custom Subnet Mask = 255.192.0.0
Example:Example: A class B subnet mask with 3 bits borrowed Default Mask = 255.255.0.0 2 bits borrowed = 255.255.11100000.0 Custom Subnet Mask = 255.255.224.0
ExampleExample: A class C subnet mask with 4 bits borrowed: Default Mask = 255.255.255.0 2 bits borrowed = 255.255.255.1111 Custom Subnet Mask = 255.255.255.240
Subnet Mask Bit Patterns
Recognizing Bit Patterns:
10000000 = 128
11000000 = 192
11100000 = 224
11110000 = 240
11111000 = 248
11111100 = 252
11111110 = 254
11111111 = 255
How many bits to borrow?
So how do you know how many bits to borrow to Subnet and to create the Custom Subnet Mask?
How many bits you borrow depends on How How MANY SUBNETSMANY SUBNETS you need to create!
Use these Formulas: Total subnets created = 2 Total subnets created = 2 xx
(x = # of bits borrowed) Usable subnets created = 2 Usable subnets created = 2 xx -2 -2
(2 less than the total subnets)
Subnetting Rules
A Minimum of 2 bits must be borrowed A Minimum of 2 bits must be left over You can’t use the 1st subnet created because
it contains the network address for the entire network
You can’t use the last subnet created because it contains the broadcast address for the entire network
Number of Subnets Created
S HH H H H HS
2 Bits Borrowed= 22 = 4 Subnets, 2 usable
S SS H H H HS
4 Bits Borrowed = 24 = 16 Subnets, 14 usable
S HS H H H HS
3 Bits Borrowed = 23 = 8 Subnets, 6 usable
Number of Subnets Created
S SS S H H HS
5 Bits Borrowed = 25 = 32 Subnets, 30 usable
S SS S S H HS
6 Bits Borrowed = 26 = 64 Subnets, 62 usable
How Many Host Addresses per Subnet? Often it is very important to know not only how MANY
SUBNETS will be created, but also how MANY HOST MANY HOST ADDRESSESADDRESSES will be available to each subnet
How many host addresses will be available on each subnet is determine by how many bits are left in the host field of the address
Use these formulas to determine how many host addresses are available to each subnet: Total host addresses per subnet = 2 Total host addresses per subnet = 2 yy
y = the number of bits left over in the host portion of the address (bits not borrowed)
Usable host addresses per subnet = 2 y -2 Usable host addresses per subnet = 2 y -2 2 less than the total
How Many Host Addresses per Subnet?
NetworkNetwork Network Host
S HH H H H HS
6 Bits are left in the Host field of the address
2 Bits borrowed = 2 usable SubnetsHost Addresses = 26 (64) per subnetUsable Addresses = 62 per subnet
Why is the usable number of host addresses 2 less than the total number of addresses available?
Each subnetwork has its own Subnetwork Address and Broadcast Address
Both of these addresses are Reserved and cannot be used! The 1st IP address in each subnet becomes the Subnetwork
Address The Last IP address in each subnet becomes the Broadcast
Address Thus 2 addresses in each subnet cannot be used as host
addresses
What about the other 2 Addresses?
An unfortunate by-product of creating subnetworks is that the reserved network and broadcast numbers can not be used in each subnetwork. Every Subnet created creates 2 more unusable addresses in the network.
The Trade-Off
Formulas to Remember!
# Usable Subnets Created = 2# Bits Borrowed - 2
# Total Hosts/Subnet = 2# Host Bits Remaining
# Total Subnets Created = 2# Bits Borrowed
# Usable Hosts/Subnet = 2# Host Bits Remaining - 2
The network 192.56.32.0 needs to be divided into 2 usable subnets, what is the custom subnet mask?
• What class is the address? • What is the default subnet mask? • We need 2 usable subnets – how many bits do we need to
borrow? • What is the Custom subnet mask?
• 8 bits are in the host portion of address (00000000)• We need to borrow 2 bits from the left side of the host
portion of the default subnet mask to create our subnet maskNNNNNNNN.NNNNNNNN.NNNNNNNN.SShhhhhh 11111111. 11111111. 11111111. 11000000
Custom Subnet Mask Problem
C255.255.255.0
2255.255.255.192255.255.255.192
The network 177.56.0.0 needs 3 usable The network 177.56.0.0 needs 3 usable subnetworks, what would it’s custom subnetworks, what would it’s custom subnet mask be?subnet mask be?
What class is this address What is the default subnet mask? How many bits need to be borrowed? What is the custom subnet mask? 11111111.11111111.11100000.00000000
How many bits have been borrowed to for the How many bits have been borrowed to for the address 205.10.7.16, with mask 255.255.255.240? address 205.10.7.16, with mask 255.255.255.240? How many usable subnets are there?How many usable subnets are there?
What class is this address? What is the default subnet mask? How many bits were borrowed to make this mask? How many usable subnets will that create?
Custom Subnet Mask Problems
B
255.255.224.03 (8 total, 6 usable)
255.255.0.0
C255.255.255.0
414
Subnetting When we subnet a network, these are the things that
must be determined:1.1. Custom Subnet MaskCustom Subnet Mask2.2. Subnet Address for each SubnetSubnet Address for each Subnet
The address that identifies the entire subnet – only used by routers (like a network address)
Contain’s all 1’s in the network/subnet portion of the address and all 0’s in the host portion of the address
The 1st address in each Subnet range3.3. Broadcast Address for each SubnetBroadcast Address for each Subnet
The address used to send messages to all hosts in the subnet The last address in each subnet range Contains all 1’s in the host portion of the Subnet Address
4.4. Usable Host addresses for each subnetUsable Host addresses for each subnet All the addresses in each subnet that can be assigned to hosts
We now know how to create the Custom Subnet Mask, but how do we determine the Subnet Information?
Subnetting
These are the steps we use to Subnet:1. Determine what class the Network address is
2. Determine the Default Subnet Mask
3. Determine How many bits need to be borrowed to create the needed # of subnets
4. Create the Custom Subnet Mask
5. Determine the Subnet Addresses
6. Determine the Broadcast Address for each subnet
7. Determine the usable host addresses for each subnet
Subnetting ProblemThe network 192.168.10.0 needs 6 usable subnets
Find the subnetwork address for each subnet Find the ranges usable host IP addresses for each subnet Find the broadcast address for each subnet
1. What is the Class? 2. What is the Default Subnet Mask?3. How many bits need to be borrowed?
4. What is the custom Subnet Maskcustom Subnet Mask?
C255.255.255.0
•Need 6 usable subnets. •3 bits = 6 usable subnets
11111111.11111111.11111111.11100000 = 255.255.255. 224
Subnetting Problem
192.168.10.SSSHHHHH192.168.10.000|00000 – 192.168.10.0 - 1st (not usable)
192.168.10.001|00000 – 192.168.10.32 – 2nd (1st usable)
192.168.10.010|00000 –192.168.10.64 – 3rd (2nd usable)
192.168.10.011|00000 – 192.168.10.96 – 4th (3rd usable)
192.168.10.100|00000 – 192.168.10.128 – 5th (4th usable)
192.168.10.101|00000 – 192.168.10.160– 6th (5th usable)
192.168.10.110|00000 – 192.168.10.192– 7th (6th usable)
192.168.10.111|00000 – 192.168.10.224 – 8th (not usable)
5. Determine the Subnet AddressesSubnet Addresses• Use binary counting to begin converting the 0’s in the subnet portion to 1’s
(starting from the last bit borrowed)
Subnetting Problem
6. Determine the Broadcast AddressBroadcast Address for each subnet7. Determine the usable host addressesusable host addresses for each
subnet
Usable Subnet Subnet Address Usable Hosts Broadcast Address
1. What class is this address?
2. What is the default subnet mask?
3. How many bits need to be borrowed to get 4 usable subnets?
4. What is the custom subnet mask?
Class B Subnetting
The network 177.56.45.13 needs 7 usable subnetworks – What is the Subnetwork Address, Broadcast Address and Host Range for the 3rd subnet
B
255.255.0.0
4 bits
23= 6 usable subnets
255.255.240.0255.255.11110000.0
Original Network: 177.56.hhhhhhhh.hhhhhhhh
Subnetted Network: 177.56.SSSShhhh.hhhhhhhh177.56.0000|0000.0 – 1st subnet, not usable
177.56.0001|0000.0– 177.56.16.0 – 2nd subnet, 1st usable 177.56.0010|0000.0 – 177.56.32.0 – 3rd subnet, 2nd usable177.56.0011|0000.0 – 177.96.48.0 – 4th subnet, 3rd usable177.56.0100|0000.0 – 177.56.64.0 – 5th subnet, 4th usable177.56.0101|0000.0 – 177.56.80.0 – 6th subnet, 5th usable177.56.0110|0000.0 – 177.56.96.0 – 7th subnet, 6th usable177.56.0111|0000.0 – 177.56.112.0 – 8th subnet, 7th usable=========================================177.56.1111|0000.0 – 177.56.240.0- last subnet, not usable
NOTE: Do you see a pattern above? The place value of the last subnetted bit is also the increment by which the subnetwork numbers will increase!!!!
5. Determine Subnet Addresses
Subnetting Shortcut
The value of the Subnet addresses increases by the value of the LAST BIT BORROWED
The place value of the last subnetted bit is also the increment by which the subnetwork numbers will increase!!!!
Ex. Subnet Mask 255.255.255.240Borrow 4 bits: SSSS|hhhh
•The place value of the last bit borrowed = 16•Subnetwork numbers = .0, .16, .32, .48, .64, .80, etc.
Subnetting Shortcuts
If you borrow Subnets increase by Ex:
For Class A, B and C
2 bits 11000000 64 192.168.1.64
3 bits 11100000 32 172.16.32.0
4 bits 11110000 16 10.16.0.0
5 bits 11111000 8 192.168.1.8
6 bits 11111100 4 120.4.0.0
For Class A and B only
7 bits 11111110 2 150.1.2.0
8 bits 11111111 1 90.1.0.0
Class B Subnetting
6. Determine the Broadcast AddressBroadcast Address for the firstst 6 subnets
7. Determine the usable host addressesusable host addresses the first 6 subnets
Subnet Subnet Address
Host Addresses Broadcast Address
1st 177.56.16.0 177.56.16.1 - 177.56.31.254 177.56.31.255
2nd 177.56.32.0 177.56.32.1 – 177.56.47.254 177.56.47.255
3rd 177.56.48.0 177.56.48.1 -177.56.63.254 177.56.63.255
4th 177.56.64.0 177.56.64.1 -177.56.79.254 177.56.79.255
5th 177.56.80.0 177.56.80.1-177.56.95.254 177.56.95.255
6th 177.56.96.0 177.56.96.1- 177.56.111.254 177.56.111.255
Find info for the 2nd usable subnet
Subnetwork Address: 177.56.32.0
Broadcast Address: 177.56.47.255
Host Address Range: 177.56.32.1 – 177.56.47.254
NOTE: The broadcast address is the very last address in this subnet’s range. This is a Class B address which means we must consider the last 2 octets
NOTE: This is a Class B address which means we must consider the last 2 octets
Boolean AND
• ANDing is used by devices to determine which Subnet an address belongs to
• Devices AND IP addresses and their subnet mask, to determine the subnet address
= 10101100 00010000 00000010 00000000
= 172 16 2 0
this host is on the subnetwork 172.16.2.0
ANDing
By what increment do the subnets increase?
What is the subnet address?
By 32
How many Bits have been borrowed (subnetted):
3
Class : C
Default Subnet Mask 255.255.255.0
Reverse Subnetting
192.168.10.64
You can also use Reverse Subnetting to determine what subnet a host address belongs to
IP Host Address: 192.168.10.70
Default Subnet Mask: 255.255.255.224