2. Summary of classful addressingSummary of classful addressing
schemescheme
When Internet addresses were standardized (early
1980s), the Internet address space was divided up
into classes:
Prepared By Adugna A.
4. Special AddressesSpecial Addresses (Cont.)(Cont.)
Within each address class is a set of
addresses that are set aside for use in
local networks setting(private).
Prepared By Adugna A.
6. ExampleExample
SolutionSolution
Find the class of the following IP addresses
00000001 00001011 00001011 11101111
11000001 00001011 00001011 11101111
•00000001 00001011 00001011 11101111
1st
is 0, hence it is Class A
•11000001 00001011 00001011 11101111
1st
and 2nd
bits are 1, and 3rd
bit is 0 hence, Class C
How to identify which class the IP address belongs to
Method #1
Prepared By Adugna A.
8. Finding the class in decimal notation
Method #2
Prepared By Adugna A.
9. ExampleExample
SolutionSolution
Find the class of the following addresses
158.223.1.108
227.13.14.88
158.223.1.108
1st
byte = 158 (128<158<191) class B
227.13.14.88
1st
byte = 227 (224<227<239) class D
Prepared By Adugna A.
10. Method #3Method #3
Class A default mask is 255.0.0.0
Class B default mask is 255.255.0.0
Class C Default mask 255.255.255.0
If default subnet mask is given
Prepared By Adugna A.
11. How do we know how long theHow do we know how long the
network prefix is?network prefix is?
The network prefix used to be implicitly
defined (class-based addressing,
A,B,C,D…)
The network prefix now is flexible and is
indicated by a prefix/netmask (classless).
Prepared By Adugna A.
12. Network AddressesNetwork Addresses
The network address is the first address.
The network address defines the network to the
rest of the Internet.
Given the network address, we can find the
class of the address, the block, and the range of
the addresses in the block
Prepared By Adugna A.
13. ExampleExample
SolutionSolution
Given the network address 132.21.0.0, find the
class, the block( netid), and the range of the
addresses
The 1st
byte is between 128 and 191.
Hence, Class B
The block has a netid of 132.21.
The addresses range from
132.21.0.0 to 132.21.255.255.
Prepared By Adugna A.
14. Subnet MaskSubnet Mask
Frequently, the Network & Host portions of
the address need to be separately extracted.
In most cases, if you know the address class,
it’s easy to separate the 2 portions.
Prepared By Adugna A.
15. Subnet MaskSubnet Mask (Cont.)(Cont.)
Under the addressing scheme, called
Subnetting, separating the Network &
Host requires a special process called
Subnet Masking.
Prepared By Adugna A.
16. Function of Subnet MaskFunction of Subnet Mask
To determine whether an IP address exists
on the local network or outside the local
network.
It is applied to a message’s destination
address to extract the network address.
If the extracted network address matches
the local network ID, the destination is
located on the local network. Otherwise
the message will be forwarded outside to
other network.
Prepared By Adugna A.
17. Subnet MaskSubnet Mask (Cont.)(Cont.)
We can subnet masking process in two
ways: straight or short-cut
1. Straight
we use binary notation for both the
address and the mask and then apply the
AND operation to get block address
(Network address)
• Mask AND IP address =Network Address
Prepared By Adugna A.
18. 2. Short-Cut Method
i. If the byte in the mask is 255, copy the byte
in the destination address.
ii. If the byte in the mask is 0, replace the
byte in the address with 0.
iii. If the byte in the mask is neither 255 nor 0,
we write the mask and the address in binary
and apply the AND operation.
Prepared By Adugna A.
19. Simplified Short-Cut Method AND operation
If the mask is neither 255(1’s) nor 0(0’s), we
write the mask and the address in binary and
apply the AND operation.
Prepared By Adugna A.
20. Boolean Algebra(AND)Boolean Algebra(AND)
Boolean Algebra is a process that applies
binary logic to yield binary results.
1 and 1 = 1
1 and 0 = 0
0 and 1 = 0
0 and 0 = 0
The process of combining binary
values with Boolean Algebra is
called Anding.Prepared By Adugna A.
21. Limitations and objectivesLimitations and objectives
Subnet masks apply only to Class A, B
or C IP addresses.
The subnet mask is like a filter that is
applied to a message’s destination IP
address.
Its objective is to determine if the local
network is the destination network.
Prepared By Adugna A.
22. Examples …Examples …
1. If a destination IP address is
206.175.162.21, we know that it is a
Class C address & that its binary
equivalent is:
11001110.10101111.10100010.00010101
Prepared By Adugna A.
23. Examples …Examples …(Cont’d…)(Cont’d…)
2. We also know that the default subnet
mask for Class C is: 255.255.255.0
and that its binary equivalent is:
11111111.11111111.11111111.00000000
Prepared By Adugna A.
24. Examples …Examples …(Cont’d…)(Cont’d…)
3. When these two binary numbers are
combined using AND, the Network ID of
the destination network is the result:
206.175.162.0 ->(NetID )Prepared By Adugna A.
25. Examples …Examples …(Cont’d…)(Cont’d…)
4. The result is the IP address of the
network which in this case is the same
as the local network & it means, the
message is for a node on the local
network.
Prepared By Adugna A.
26. CIDR cont’d…CIDR cont’d…
Goals: Restructure IP address assignments
to increase efficiency
Hierarchical routing aggregation to
minimize route table entries
Key Concept: The length of the network id (prefix) in IP
addresses is arbitrary/flexible and is defined by the network
hierarchy.
Consequence:
Routers use the IP address and the length of the prefix for
forwarding.
All advertised IP addresses must include a prefix
Prepared By Adugna A.
27. CIDR ExampleCIDR Example
CIDR notation of a network address:
192.0.2.0/18
"18" says that the first 18 bits are the network part of
the address
The network part is called the network prefix
Example:
Assume that a site requires an IP network domain that can support
1000 IP host addresses
With CIDR, the network is assigned a continuous block of 1024 = 210
(>1000) addresses with a 32-10 = 22-bit long prefix
Prepared By Adugna A.
29. CIDR and AddressCIDR and Address
assignmentsassignments
Backbone ISPs obtain large blocks of IP
address space and then reallocate portions of
their address blocks to their customers.
Example:
Assume that an ISP owns the address block
206.0.64.0/18, which represents 16,384 (232-18
=214
) IP
host addresses
No. Host 2N-n
where N(total bit) and n netid prifix
Suppose a client requires 800 host addresses
512=29
<800<1024=210
-> 32-10 = 22,
Assigning a /22 block, i.e., 206.0.68.0/22 -> gives a block
of 1,024 (210
) IP addresses to client.Prepared By Adugna A.
30. Routing IP AddressesRouting IP Addresses
When you build a network, you need to
figure out how many network Ids your
network requires.
To do so, you must account for every
WAN connection & subnet on the
Network.
Every node & router interface requires
a Host address, or ID.
Prepared By Adugna A.
31. Subnetting, Subnet & SubnetSubnetting, Subnet & Subnet
MaskMask
Subnetting, a subnet & a subnet mask
are all different.
In fact, the 1st
creates the 2nd
& is
identified by the 3rd
.
Subnetting is the process of dividing a
network & its IP addresses into
segments, each of which is called a
subnetwork or subnet.
Prepared By Adugna A.
32. SubnettingSubnetting (Cont.)(Cont.)
Through the use of subnetting, the
network from the previous slide can be
logically divided into subnets with fewer
hosts on each subnetwork.
Subnetting
i. Improve the available shared bandwidth
ii. Minimize the amount of broadcast
traffic generated over the entire network.
Prepared By Adugna A.
33. SubnettingSubnetting (Cont.)(Cont.)
Example of subnetting: when the
network administrator divides the
172.20.0.0 network into 5 smaller
networks – 172.20.1.0, 172.20.2.0,
172.20.3.0, 172.20.4.0 & 172.20.5.0 –
the outside world stills sees the network
as 172.20.0.0, but the internal routers
now break the network addressing into
the 5 smaller subnetworks.
Prepared By Adugna A.
34. SubnettingSubnetting (Cont.)(Cont.)
In the example, only a single IP address
is used to reference the network &
instead of 5 network addresses, only
one network reference is included in the
routing tables of routers on other
networks.
Prepared By Adugna A.
35. Borrowing Bits for SubnetBorrowing Bits for Subnet
The key concept in subnetting is borrowing
bits from the host portion of the network to
create a sub-network.
The 2 rules required:
-There must always be at least 2 bits available for
the Host ID.
From each class, only a certain number of bits can be
borrowed from the host portion.
-All of the subnet bits cannot be all 1s or 0s at the
same time.
Remember that the addresses with all ones (broadcast
address) & all zeroes (local network) cannot be used as
they have special meanings.Prepared By Adugna A.
36. Borrowing Bits for SubnetBorrowing Bits for Subnet
(Cont.)(Cont.)
Bits Available for Creating Subnets
Address Class Host Bits Bits Available for
Subnet
A 24 22
B 16 14
C 8 6
Prepared By Adugna A.
37. Subnetting a Class ASubnetting a Class A
NetworkNetwork
Example: To create subnets with more
than 4 millions hosts per subnet, you
must borrow 2 bits from the 2nd
octet &
use 10 masked bits for the subnet mask
(11111111.11000000) or 255.192 in
decimal.
Prepared By Adugna A.
38. Class A Subnet MasksClass A Subnet Masks (Cont.)(Cont.)
A sample of subnet mask options available for Class A addresses.
Prepared By Adugna A.
39. Class A Subnet MasksClass A Subnet Masks (Cont.)(Cont.)
The subnet mask with the highest value
(255.255.255.252) has a binary
representation of:
11111111.11111111.11111111.11111100
The 2 zeroes in this subnet mask
represent the 2 positions set aside for
the Host address portion of the address.
Prepared By Adugna A.
40. Subnetting Class B & Class CSubnetting Class B & Class C
The same procedure will be applied for
Class B & Class C IP addresses & subnet
masks as depicted in table on slide 44
“Class A Subnet Masks”
The only differences are that you have
fewer options (due to a fewer number of
bits available) & that you’re much more
likely to work with Class B & Class C
networks in real life.Prepared By Adugna A.
41. Subnetting Class B & Class CSubnetting Class B & Class C
(Cont.)(Cont.)
A sample of the subnet masks available for Class B networks.
Prepared By Adugna A.
42. Subnetting Class B & Class CSubnetting Class B & Class C
(Cont.)(Cont.)
A list of the subnet masks available for Class C networks.
Prepared By Adugna A.
43. Knowing How to CalculateKnowing How to Calculate
SubnetsSubnets
To determine the number of subnets & hosts
per subnet for any of the available subnet
masks, 2 simple formulas to calculate these
numbers:
Prepared By Adugna A.
44. Method of subnettingMethod of subnetting
In subnetting we find the answer of following
questions.
1. What is subnet mask for given address?
2. How many subnets does given subnet mask provide?
3. What is block size for given subnet mask?
4. What are the valid subnets?
5. What are the total hosts?
6. How many valid hosts per subnet?
7. What is network address of each subnet?
8. What is broadcast address of each subnet?
Prepared By Adugna A.
45. 1. What is subnet mask1. What is subnet mask
for given address?for given address?
Ex. find the subnet mask of address
188.25.45.48/20 ?
This address belong to class B (255.255.0.0)
with /16 in CIDR . Let us borrowed 4 bits
from hosts portion. So this subnet mask in
binary would be
11111111.11111111.11110000.00000000.
Our answer subnet mask would be
255.255.240.0
Prepared By Adugna A.
46. 2. How many subnets does2. How many subnets does
given subnet mask provide?given subnet mask provide?
Ex. in 192.168.1.0/27, N(borrowed bit)
is 3. By looking at address we can
determined that this address is belong
to class C and class C has default
subnet mask 255.255.255.0 [/24 in
CIDR]. In given address we borrowed
27 - 24 = 3 host bits to create subnets.
Now 23
= 8, so our answer is 8.
Prepared By Adugna A.
47. What is block size forWhat is block size for
given subnet mask?given subnet mask?
It is used to calculate the valid subnets
To figure out the block size, use this
formula 256 - Subnet mask = block
size.
For example block size for subnet mask
255.255.255.240 is 256 - 240 = 16.
Prepared By Adugna A.
48. What are the valid subnets?What are the valid subnets?
1st
calculate total subnet by using formula 2N
2nd
find the block size and count from zero in
block until you reach the subnet mask value
incrementing with block size. Ex. the valid
subnets for 192.168.1.0/26.
N=2 [26-24],Total subnets are 22
= 4.
Subnet mask would be 255.255.255.192.
Block size would be 256-192 = 64.
Start counting from zero at blocks of 64, so our valid
subnets would be 0,64,128,192.
Prepared By Adugna A.
49. What are the total hosts?What are the total hosts?
Total hosts per subnet =2H
= Total hosts.
H is the number of host bits. For
example in address 192.168.1.0/26 we
have 32 – 26 = 6. Total hosts per subnet
would be 26
= 64.
Prepared By Adugna A.
50. How many valid hosts areHow many valid hosts are
available per subnet?available per subnet?
As we know, we need to reduce two
address per subnet, one for network ID
and another for broadcast ID.
So our formula, to calculate valid hosts
would be Total hosts -2 = Valid hosts.
In above example we have 64 hosts per
subnet, so valid hosts in each subnet
would be 64 - 2 = 62.
Prepared By Adugna A.
51. What is broadcast address ofWhat is broadcast address of
each subnet?each subnet?
Broadcast address is the last address of
subnet and cannot be assigned to any
host. In above example
0 Subnet has broadcast address 63
64 Subnet has broadcast address 127
128 Subnet has broadcast address 191
192 Subnet has broadcast address 255
Prepared By Adugna A.
52. What is the network addressWhat is the network address
of each subnet?of each subnet?
Network address is the first address of
subnet. This address is used to locate
the network, and cannot be assigned to
any host. In above example address
0,64,128,192 are the network address
Prepared By Adugna A.
53. A Short BroadcastA Short Broadcast
A broadcast is a message that every
node on a network or subnetwork
receives & examines.
Cisco IOS supports 2 different types of
broadcast messages:
Flooded
Directed
Prepared By Adugna A.
54. A Short BroadcastA Short Broadcast (Cont.)(Cont.)
Generally speaking, routers do not
propagate broadcasts, which is one of
the benefits of installing a router in the
first place.
Prepared By Adugna A.
55. A Short BroadcastA Short Broadcast (Cont.)(Cont.)
Flooded broadcasts (those with the
nominal broadcast address of
255.255.255.255) are not forwarded by
the router & are considered local traffic
only.
Directed broadcasts, which contain all
1’s in the Host portion of the IP
address, are addressed to a specific
subnetwork & are allowed to pass.Prepared By Adugna A.