Escolar Documentos
Profissional Documentos
Cultura Documentos
1
OBJECTIVES
Understand IP Addressing and
Classes
Describe the operation and benefits of
using private and public IP addressing
Implement static and dynamic
addressing services for hosts in a LAN
environment.
Subnetting
2
IP ADDRESSING
An IP address is a numeric identifier
assigned to each machine on an IP
network.
It designates the specific location of a
device on the network.
IP addressing was designed to allow
hosts on one network to communicate
with a host on a different network
regardless of the type of LANs the hosts
are participating in.
3
4
IP TERMINOLOGY
5
192.168.1.2
The address is split in blocks. Each
block is separated from the other with
dots.
IP addresses are composed of four
blocks. Each of the four blocks is called
an octet (the name octet comes from the
fact that each block is composed of eight
bits).
Each octets allowed value ranges from 0
to 255. 6
BINARY AND DECIMAL CONVERSION
7
UNDERSTANDING THE POWERS OF 2
8
IP ADDRESSES
Every IP Address has a node portion and a
network portion.
IP Address: 192.168.5.201
Network Portion: 192.168.5.201
Node Portion: 192.168.5.201
9
NETWORK ADDRESSING
Subdividing an IP address into a network and
node address is determined by the class
designation of ones network.
This figure summarizes the three classes of
networks
10
IP ADDRESS CLASSES
11
CLASS A
15
16
CLASS A LIMITS
17
Examples:
19
Examples:
21
Examples:
1st Class C address range: 192.0.0.0 to 192.0.0.255;
2nd Class C address range: 192.0.1.0 to 192.0.1.255;
3rd Class C address range: 192.0.2.0 to 192.0.2.255;
256th Class C address range: 192.0.255.0 to
192.0.255.255;
257th Class C address range: 192.1.0.0 to
192.1.0.255;
258th Class C address range: 192.1.1.0 to
192.1.1.255;
512th Class C address range: 192.1.255.0 to
192.1.255.255
513th Class C address range: 192.2.0.0 to
192.2.0.255 22
23
Easily Finding the Class of an IP Address
Its important to have memorized the
beginning and ending addresses for the first
octet of classes A to C.
At the very least, its necessary to remember
the binary formation of the address:
first bit is a 0, class A
24
SUBNET MASK
The subnet mask tells us which part of an
IP address is the node portion vs. the
network portion
An IP address without a subnet mask is
meaningless
IP Address: 192.168.5.201
Subnet Mask: 255.255.255.0
----------------------------------------------------
Network ID: 192.168.5.0
25
SUBNET MASK AND ANDING
IP: 192.168.5.201
Subnet: 255.255.255.0
26
Network address: This is the designation
used in routing to send packets to a remote
networkfor example, 10.0.0.0, 172.16.0.0,
and 192.168.10.0.
27
28
NETWORK ID
The all zeros host address is the same as
the network ID
Ex. IP: 192.168.1.0
Subnet: 255.255.255.0
----------------------------------------
Network ID: 192.168.1.0
30
HOST ID
The first part of the IP address (network ID)
is used to find the network where the packet
needs to be sent.
31
CLASSES A, B, AND C, AND THEIR
DEFAULT SUBNET MASKS
32
RESERVED ADDRESSING
Address Function
1. Network address of all 1. Interpreted to mean this
0s network or segment.
2. Network address of all 2. Interpreted to mean all
1s networks.
3. Network 127.0.0.1 3. Reserved for loopback
tests.
4. Node address of all 0s 4. Interpreted to mean
network address or any
host on specified network
33
Node address of all 1sInterpreted to mean all
nodes on the specified
network
Entire IP address set Used by Cisco routers to
to all 0s designate the default route.
Could also mean (same as
35
However, one special range of addresses is
set aside for loopback functionality.
This is the range 127.0.0.0 to
127.255.255.255. IP datagrams sent by a
host to a 127.x.x.x loopback address are not
passed down to the data link layer for
transmission.
Instead, they loop back to the source device
at the IP level. Data is sent by a device's layer
three IP implementation and then
immediately received by it.
36
The purpose of the loopback range is
testing of the TCP/IP protocol
implementation on a host. Since the lower
layers are short-circuited, sending to a
loopback address allows the higher layers
(IP and above) to be effectively tested
without the chance of problems at the lower
layers manifesting themselves.
127.0.0.1 is the address most commonly
used for testing purposes. 37
PRIVATE ADDRESSES
39
PUBLIC ADDRESSES
Most IP addresses are public addresses.
Public addresses are registered as belonging
to a specific organization.
40
BROADCAST ADDRESSES
Layer 2 broadcasts These are sent to all
nodes on a LAN.
Broadcasts (layer 3) These are sent to all
nodes on the network.
Unicast These are sent to a single
destination host.
Multicast These are packets sent from a
single source and transmitted to many
devices on different networks.
41
IPV6
IPV6, which is the next generation of the
TCP/IP suite. The IP addressing part, in
special, has IP addresses composed of 128
bits.
This means there are 3.4 1038 (thats 3.4
times 10 followed by 38 zeros). Just for an
idea, this gives 5 1028 (five times 10
followed by 28 zeros) addresses available for
each of the approximately 6.5 billion people
living on the earth. 42
SUBNETTING
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.
43
Youlose 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.
44
Subnetting allows for creating multiple
logical networks from a single address block
45
SUBNETTING BENEFITS
Benefits of subnetting include:
Reduced network traffic
Optimized network performance
Simplified management
Facilitated spanning of large
geographical distances.
46
ANALOGY
Dividing the barrel of
apples into small
barrels or baskets
does not give us any
more apples
100 Apples
47
10 barrels x 10 apples = 100 apples
10 10 10
10 10
10
100 Apples
(10 * 10)
10 10 10
Before subnetting:
In any network (or subnet) we
can not use all the IP addresses
for host addresses.
98 Apples
(100 2) We lose two addresses for every
network or subnet.
Network Address - One address
is reserved to that of the
network.
Broadcast Address One
address is reserved to address
all hosts in that network or
subnet. 49
CALCULATING SUBNETS AND HOSTS
The number of subnets is calculated using
n
2 , where n is the number of bits borrowed
21 = 2 subnets
the more bits borrowed, the more subnets
can be defined
The number of usable hosts per subnet is
calculated using 2h - 2 where h is the
number of host bits left
27 2 = 126 useable hosts per subnet
with each bit borrowed, fewer host
50
addresses are available per subnet
Block size= 256 - (new subnet mask after
borrowing)
51
SUBNET 192.168.1.0/24 --- 2 SUBNETS
52
EXERCICE
192.168.1.0/24
1. We need 4 subnets.
2. We need 5 subnets
3. We need 8 subnets
53
HOW TO CREATE SUBNETS
Take bits from the host portion of the IP
address and reserve the to divine the
subnet address.
To create a subnet, follow these steps:
54
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:
One subnet mask for your entire
network
A unique subnet ID for each physical
segment
55
A range of host IDs for each subnet
SUBNET ADDRESSES
56
Given a network IP address, there are two
types of problems involving subnetting:
57
EXERCISE
A company would like to break its Class B
network IP address 172.16.0.0 into 60
different subnets. Find ranges of IP
addresses for each subnet and new mask.
58
EXERCISE 2
A company would like to break its Class
C private IP address 192.168.10.0 into
as many subnets as possible provided
that they can get at least 58 hosts per
subnet. Find ranges of IP addresses for
each subnet and new mask.
62
EXERCICE 3
A company would like to break its Class B
private IP address 172.16.0.0 into as
many subnets as possible provided that
they can get at least 300 clients per
subnet. Find ranges of IP addresses for
each subnet and new mask.
63
VARIABLE LENGTH SUBNET MASK (VLSM)
67
Compare and contrast classful and classless
IP addressing.
Review VLSM and explain the benefits of
classless IP addressing.
Describe the role of the Classless Inter-
Domain Routing (CIDR) standard in making
efficient use of scarce IPv4 addresses
68
CIDR uses Variable Length Subnet
Masking (VLSM) to help conserve
address space.
-VLSM is simply subnetting a
subnet
69
Classful routing
only allows for one subnet mask for
all networks
VLSM & classless routing
This is the process of subnetting a
subnet
-More than one subnet mask can be
used
-More efficient use of IP addresses
as compared to classful IP
addressing 70
71
EXERCICES
72
1. A network manager in Kigali Institute of
Tourism (KIT) has been given a network
address of 192.168.1.0/24. Using Variable
Length Subnet Mask (VLSM), what are the
subnets address needed, their valid hosts
and broadcast addresses based on the
following requirements:
- KIT_Kigali needs 100 host addresses.
76
CIDR VALUES
77
SUBNETTING CLASS C ADDRESSES
In a Class C address, only 8 bits are available for
defining the hosts. Remember that subnet bits
start at the left and go to the right, without
skipping bits. This means that the only Class C
subnet masks can be the following:
Binary Decimal CIDR
------------------------------------------------
10000000 = 128 /25
11000000 = 192 /26
11100000 = 224 /27
11110000 = 240 /28
11111000 = 248 /29 78
Host Meaning
Subnet
Host Meaning
Subnet
81
82
HOW MANY SUBNETS?
22 = number of subnets.
X is the number of masked bits, or
the 1s.
For example, in 11000000, the
number of ones gives us 22 subnets.
In this example there are 4 subnets.
83
HOW MANY HOSTS PER SUBNET?
2y-2 = number of hosts per subnet.
Y is the number of unmasked bits, or
the 0s.
For example, in 11000000, the
number of zeros gives us 26-2 hosts.
In this example, there are 62 hosts
per subnet.
84
WHAT ARE THE VALID SUBNETS?
256-subnet mask = block size, or base
number.
For example 256-192=64. 64 is the
first subnet. The next subnet would be
the base number plus itself or
64+64=128, (the second subnet).
85
WHATS THE BROADCAST ADDRESS FOR
EACH SUBNET?
Thebroadcast address is all host bits
turned on, which is the number
immediately preceding the next subnet.
86
WHAT ARE THE VALID HOSTS?
Valid
hosts are the number between the
subnets, omitting all 0s and all 1s.
87
VLSM was designed to maximize
addressing efficiency
each WAN link requires 2 host
addresses
Breaks up a subnet into a smaller subnet
88
USING VLSM STEP 1
Calculate a subnet from the original 192.168.15.0/24
block to accommodate the largest LAN, i.e. 58 hosts
Keep 6 host bits to cater for the 58 hosts
Ch 6 - 90
6
2 2 = 62 useable host addresses
mask for last octet 11000000
2 bits are borrowed to create 4 possible subnets
192.168.15.0/26 (subnet 0)
192.168.15.64/26 (subnet 1)
192.168.15.128/26 (subnet 2)
192.168.15.192/26 (subnet 3)
Assign subnet 0 (192.168.15.0/26) to this LAN
Ch 6 - 91
mask for the last octet is 11100000
Use the next available address of
192.168.15.64/26 to create an address block
for this subnet
One more bit is borrowed from the above
subnet
192.168.15.64/27
This subnet, 192.168.15.64/27, creates
two more subnets
192.168.15.01000000/27 (subnet 0)
192.168.15.64/27
192.168.15.01100000/27 (subnet 1)
192.168.15.96/27
Assign the 192.168.15.64/27 to this
LAN
1 subnet left unused
92
USING VLSM STEP 3
Consider the LAN with the next fewer hosts,
i.e. 10 hosts
Require 4 host bits to accommodate 10
hosts
24 2 = 14 useable host addresses
mask for the last octet is 11110000
Use the next available address of
192.168.15.96/27 to create an address
block for this subnet
One more bit is borrowed from the above
subnet
192.168.15.96/28
This subnet, 192.168.15.96/28, creates
two more subnets
192.168.15.01100000/28 (subnet 0)
192.168.15.96/28
192.168.15.01110000/28 (subnet 1)
192.168.15.112/28
Assign both these subnets to the LANs
with the same number of hosts
no subnet left
94
USING VLSM STEP 4
Ch 6 - 95
mask for the last octet is 11111100
Ch 6 - 96
192.168.15.10000000/30 (subnet 0)
192.168.15.128/30
192.168.15.10000100/30 (subnet 1)
192.168.15.132/30
192.168.15.10001000/30 (subnet 2)
192.168.15.136/30
192.168.15.10001100/30 (subnet 3)
192.168.15.140/30
USING VLSM STEP 5
Calculate the address range and broadcast
address for each subnet
Ch 6 - 97
Document the host requirements, subnet
addresses, address range, broadcast addresses
and network prefix
USING VLSM NETWORK DIAGRAM
Ch 6 - 98
SUMMARY
99
99
SUBNETTING EXERCISE:
Youve been hired to troubleshoot a problem network.
The customer says that they are having problems
with computers being able to connect to each other.
The network has computers with the following IPs:
201.54.13.1
201.54.13.6
201.54.13.21
201.54.13.31
201.54.13.32
201.54.13.63
201.54.13.65
All the computers are using the 255.255.255.224
mask 100
203.121.45.28
101
SUBNETTING EXERCISE 2:
Write out the subnets for the 202.54.13.0
network, subnetted with the
255.255.255.240 mask.
102
VARIABLE-LENGTH SUBNET MASKS (VLSM)
VLSM removed the class boundary
restriction of traditional subnet masks.
With VLSM a network of any class can be
subnetted to almost any size.
103
SEVEN STEPS TO SUBNETTING
Step 1: Determining Number of Subnets Needed
Step 2: Determining Number of Bits You Can
Borrow
Step 3: Determining Number of Bits You Must
Borrow to Get Needed Number of Subnets
Step 4: Turning On Borrowed Bits and
Determining Decimal Value
Step 5: Determining New Subnet Mask
Step 6: Finding Host/Subnet Variable
Step 7: Determining Range of Addresses 104
SUBNET MASK
105
106
UNICAST
107
UNICAST TRANSMISSION 6.2.3.1
The process of sending a packet from one host
to another host
Ch 6 - 108
normal host-to-host communication
Unicast packets use the host address of the
destination device as the destination address
and can be routed through an internetwork
BROADCAST TRANSMISSION
The process of sending a packet from one host to all
hosts in the network
Ch 6 - 109
packet uses a special broadcast address as the
destination address
Used for locating special services/devices for which
the address is not known or when the host needs to
provide information to all hosts on the network
mapping upper-layer addresses to lower-layer
addresses
requesting an address
exchanging routing information by routing
protocols
Ch 6 - 110
BROADCAST TRANSMISSION (CONTD)
Directed broadcast
is sent to all hosts on a specific network,
Ch 6 - 111
usually a non-local network
although routers do not forward directed
broadcasts, they may be configured to do
so.
Ch 6 - 112
hosts on the local network
packets used a destination address of
255.255.255.255 (all ones)
packets addressed to the limited broadcast
address will only appear on the local
network
As an example, a host within the 172.16.4.0 /24
network would broadcast to all the hosts in its
network using a packet with a destination
address of 255.255.255.255.
MULTICAST TRANSMISSION
The process of sending a packet from one host to a
selected group of hosts
designed to conserve bandwidth
Ch 6 - 113
A special block of addresses from 224.0.0.0 to
239.255.255.255 is used for multicast groups
addressing
Hosts that wish to receive particular multicast data
are called multicast clients
video and audio distribution
routing information exchange by routing
protocols
software distribution
news feeds
Ch 6 - 114
For the IP address 187.124.100.45, with the
subnet mask 255.255.240.0,
what is the network ID?
115
Given the network 192.168.25.0, with the
default class C subnet mask,
subnet it to obtain:
116
1. What is used by a host to determine the host ID
on a given data
packet?
A. The IP header
A. 11001111.11010001.01000100.01100100
B. 10000111.11010001.01000100.01100100
C. 11001111.11010001.01000100.01101100
117
D. 11001111.11010001.11001101.01100100
3. You are a network administrator who needs to
subnet a network to
create nine subnets from a given class C network.
How many bits will you need to borrow from the host
ID part of the address?
A. 1
B. 9
C. 4
D. 3
B. 140.30.50.65
C. 230.20.35.14
D. 200.17.45.15
B. Class E
C. Class B
119
D. Class D
7. How many bits would you need to borrow from
the host ID part of
an address, to create 40 subnets?
A. 10 bits
B. 6 bits
C. 4 bits
D. 8 bits
A. 32
B. 128
C. 8
D. 16
B. 255.255.240.0
121
C. 255.255.255.192
11. Your ISP has given you four class B networks,
131.107.8.0,
131.107.9.0, 131.107.10.0, 131.107.11.0. Which
network address
should you use to combine those networks into a
single address?
A. 131.107.9.0/22
B. 131.107.10.0/22
C. 131.107.10.0/23
D. 131.107.8.0/22
C. 255.254.255.0
13. Which of the following addresses does
not belong to an address range
reserved for private use?
A. 172.24.0.0
B. 10.20.30.0
C. 192.167.0.0
D. 192.168.100.0
A. 254 C. 30
123
B. 128 D. 62
15. The class of networks which has the
biggest number of hosts per network is?
A. Class E C. Class D
B. Class C D. Class A
124
PROTOCOLS
HTTP uses TCP port 80
SMTP uses TCP port 25
125