2. 19.2
CLASSFULL ADDRESSING
CLASSFULL ADDRESSING
This lecture provides basic information needed in
This lecture provides basic information needed in
order to configure your router for routing IP, such as
order to configure your router for routing IP, such as
how addresses are broken down and how subnetting
how addresses are broken down and how subnetting
works. You learn how to assign each interface on the
works. You learn how to assign each interface on the
router an IP address with a unique subnet.
router an IP address with a unique subnet.
3. 19.3
CLASSFULL ADDRESSING
CLASSFULL ADDRESSING
Address
Address - The unique number ID assigned to one host
- The unique number ID assigned to one host
or interface in a network.
or interface in a network.
Subnet
Subnet - A portion of a network that shares a
- A portion of a network that shares a
particular subnet address.
particular subnet address.
Subnet mask
Subnet mask - A 32-bit combination used to describe
- A 32-bit combination used to describe
which portion of an address refers to the subnet and
which portion of an address refers to the subnet and
which part refers to the host.
which part refers to the host.
Interface
Interface - A network connection.
- A network connection.
12. CLASSFULL ADDRESSING
CLASSFULL ADDRESSING
An IP address is an address used in order to uniquely
An IP address is an address used in order to uniquely
identify a device on an IP network.
identify a device on an IP network.
The address is made up of 32 binary bits, which can
The address is made up of 32 binary bits, which can
be divisible into a network portion and host portion
be divisible into a network portion and host portion
with the help of a subnet mask.
with the help of a subnet mask.
The 32 binary bits are broken into four octets (1 octet
The 32 binary bits are broken into four octets (1 octet
= 8 bits).
= 8 bits).
13. CLASSFULL ADDRESSING
CLASSFULL ADDRESSING
Each octet is converted to decimal and separated by a
Each octet is converted to decimal and separated by a
period (dot).
period (dot).
For this reason, an IP address is said to be expressed
For this reason, an IP address is said to be expressed
in dotted decimal format (for example, 172.16.81.100).
in dotted decimal format (for example, 172.16.81.100).
The value in each octet ranges from 0 to 255 decimal,
The value in each octet ranges from 0 to 255 decimal,
or 00000000 - 11111111 binary.
or 00000000 - 11111111 binary.
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
128 64 32 16 8 4 2 1 (128+64+32+16+8+4+2+1=255)
128 64 32 16 8 4 2 1 (128+64+32+16+8+4+2+1=255)
14. CLASSFULL ADDRESSING
CLASSFULL ADDRESSING
And this sample shows an IP address represented in
And this sample shows an IP address represented in
both binary and decimal.
both binary and decimal.
10. 1. 23. 19 (decimal)
10. 1. 23. 19 (decimal)
00001010.00000001.00010111.00010011 (binary)
00001010.00000001.00010111.00010011 (binary)
These octets are broken down to provide an addressing
These octets are broken down to provide an addressing
scheme that can accommodate large and small
scheme that can accommodate large and small
networks.
networks.
In this lecture we will focuses on classes A to C, since
In this lecture we will focuses on classes A to C, since
classes D and E are reserved.
classes D and E are reserved.
15. CLASSFULL ADDRESSING
CLASSFULL ADDRESSING
Network Masks
Network Masks
A network mask helps you know which portion of the
A network mask helps you know which portion of the
address identifies the network and which portion of
address identifies the network and which portion of
the address identifies the node.
the address identifies the node.
Class A, B, and C networks have default masks, also
Class A, B, and C networks have default masks, also
known as natural masks, as shown here:
known as natural masks, as shown here:
Class A: 255.0.0.0
Class A: 255.0.0.0
Class B: 255.255.0.0
Class B: 255.255.0.0
Class C: 255.255.255.0
Class C: 255.255.255.0
16. CLASSFULL ADDRESSING
CLASSFULL ADDRESSING
An IP address on a Class A network that has not been
An IP address on a Class A network that has not been
subnetted would have an address/mask pair similar to:
subnetted would have an address/mask pair similar to:
8.20.15.1 255.0.0.0.
8.20.15.1 255.0.0.0.
In order to see how the mask helps you identify the
In order to see how the mask helps you identify the
network and node parts of the address, convert the
network and node parts of the address, convert the
address and mask to binary numbers.
address and mask to binary numbers.
8.20.15.1 = 00001000.00010100.00001111.00000001
8.20.15.1 = 00001000.00010100.00001111.00000001
255.0.0.0 = 11111111.00000000.00000000.00000000
255.0.0.0 = 11111111.00000000.00000000.00000000
17. CLASSFULL ADDRESSING
CLASSFULL ADDRESSING
Any address bits which have corresponding mask bits
Any address bits which have corresponding mask bits
set to 1 represent the network ID.
set to 1 represent the network ID.
Any address bits that have corresponding mask bits set
Any address bits that have corresponding mask bits set
to 0 represent the node ID.
to 0 represent the node ID.
8.20.15.1 = 00001000.00010100.00001111.00000001
8.20.15.1 = 00001000.00010100.00001111.00000001
255.0.0.0 = 11111111.00000000.00000000.00000000
255.0.0.0 = 11111111.00000000.00000000.00000000
-----------------------------------
-----------------------------------
net id | host id
net id | host id
netid = 00001000 = 8
netid = 00001000 = 8
hostid = 00010100.00001111.00000001 = 20.15.1
hostid = 00010100.00001111.00000001 = 20.15.1
18. CLASSFULL ADDRESSING
CLASSFULL ADDRESSING
If you break a major network (Class A, B, or C) into
If you break a major network (Class A, B, or C) into
smaller subnetworks, it allows you to create a network
smaller subnetworks, it allows you to create a network
of interconnecting subnetworks.
of interconnecting subnetworks.
Each data link on this network would then have a
Each data link on this network would then have a
unique network/subnetwork ID.
unique network/subnetwork ID.
Any device, or gateway, that connects n
Any device, or gateway, that connects n
networks/subnetworks has n distinct IP addresses
networks/subnetworks has n distinct IP addresses
19. CLASSFULL ADDRESSING
CLASSFULL ADDRESSING
In order to subnet a network, extend the natural mask
In order to subnet a network, extend the natural mask
with some of the bits from the host ID portion of the
with some of the bits from the host ID portion of the
address in order to create a subnetwork ID.
address in order to create a subnetwork ID.
For example, given a Class C network of 204.17.5.0
For example, given a Class C network of 204.17.5.0
which has a natural mask of 255.255.255.0, you can
which has a natural mask of 255.255.255.0, you can
create subnets in this manner:
create subnets in this manner:
204.17.5.0 -
204.17.5.0 -
11001100.00010001.00000101.00000000
11001100.00010001.00000101.00000000
255.255.255.224 -
255.255.255.224 -
11111111.11111111.11111111.11100000
11111111.11111111.11111111.11100000
20. CLASSFULL ADDRESSING
CLASSFULL ADDRESSING
By extending the mask to be 255.255.255.224, you
By extending the mask to be 255.255.255.224, you
have taken three bits (indicated by "sub") from the
have taken three bits (indicated by "sub") from the
original host portion of the address and used them to
original host portion of the address and used them to
make subnets.
make subnets.
With these three bits,it is possible to create eight
With these three bits,it is possible to create eight
subnets. 2
subnets. 2n
n
= 2
= 23
3
= 8
= 8
With the remaining five host ID bits, each subnet can
With the remaining five host ID bits, each subnet can
have up to 32 host addresses, 30 of which can actually
have up to 32 host addresses, 30 of which can actually
be assigned to a device since host ids of all zeros or all
be assigned to a device since host ids of all zeros or all
ones are not allowed (it is very important to remember
ones are not allowed (it is very important to remember
this). 2
this). 2n
n
-2 = 2
-2 = 25
5
-2 = 32-2 = 30
-2 = 32-2 = 30
22. CLASSFULL ADDRESSING
CLASSFULL ADDRESSING
The mask of 255.255.255.224 can also be denoted as
The mask of 255.255.255.224 can also be denoted as
/27 as there are 27 bits that are set in the mask. This
/27 as there are 27 bits that are set in the mask. This
second method is used with Classless inter-domain
second method is used with Classless inter-domain
routing CIDR.
routing CIDR.
With this method, one of these networks can be
With this method, one of these networks can be
described with the notation prefix/length.
described with the notation prefix/length.
For example, 204.17.5.32/27 denotes the network
For example, 204.17.5.32/27 denotes the network
204.17.5.32 255.255.255.224.
204.17.5.32 255.255.255.224.
The prefix/length notation is used to denote the mask
The prefix/length notation is used to denote the mask
subnet
subnet
23. CLASSFULL ADDRESSING
CLASSFULL ADDRESSING
The network subnetting scheme in this section allows
The network subnetting scheme in this section allows
for eight subnets, and the network might appear as:
for eight subnets, and the network might appear as:
Each of the routers in Figure is attached to four subnetworks, one
Each of the routers in Figure is attached to four subnetworks, one
subnetwork is common to both routers. Also, each router has an IP
subnetwork is common to both routers. Also, each router has an IP
address for each subnetwork to which it is attached. Each
address for each subnetwork to which it is attached. Each
subnetwork could potentially support up to 30 host addresses.
subnetwork could potentially support up to 30 host addresses.
24. CLASSFULL ADDRESSING
CLASSFULL ADDRESSING
The more host bits you use for a subnet mask, the more subnets
The more host bits you use for a subnet mask, the more subnets
you have available.
you have available.
However, the more subnets available, the less host addresses
However, the more subnets available, the less host addresses
available per subnet.
available per subnet.
For example, a Class C network of 204.17.5.0 and a mask of
For example, a Class C network of 204.17.5.0 and a mask of
255.255.255.224 (/27) allows you to have eight subnets, each
255.255.255.224 (/27) allows you to have eight subnets, each
with 32 host addresses (30 of which could be assigned to
with 32 host addresses (30 of which could be assigned to
devices). If you use a mask of 255.255.255.240 (/28), the break
devices). If you use a mask of 255.255.255.240 (/28), the break
down is:
down is:
204.17.5.0 - 11001100.00010001.00000101.00000000
204.17.5.0 - 11001100.00010001.00000101.00000000
255.255.255.240 - 11111111.11111111.11111111.11110000
255.255.255.240 - 11111111.11111111.11111111.11110000
25. CLASSFULL ADDRESSING
CLASSFULL ADDRESSING
Since you now have four bits to make subnets with, you only
Since you now have four bits to make subnets with, you only
have four bits left for host addresses.
have four bits left for host addresses.
So in this case you can have up to 16 subnets, each of which
So in this case you can have up to 16 subnets, each of which
can have up to 16 host addresses (14 of which can be assigned
can have up to 16 host addresses (14 of which can be assigned
to devices).
to devices).
26. CLASSFULL ADDRESSING
CLASSFULL ADDRESSING
Given the Class C network of 204.15.5.0/24, subnet the
Given the Class C network of 204.15.5.0/24, subnet the
network in order to create the network in Figure with
network in order to create the network in Figure with
the host requirements shown.
the host requirements shown.
27. CLASSFULL ADDRESSING
CLASSFULL ADDRESSING
Looking at the network shown in Figure, you can see that you
Looking at the network shown in Figure, you can see that you
are required to create five subnets.
are required to create five subnets.
The largest subnet must support 28 host addresses. Is this
The largest subnet must support 28 host addresses. Is this
possible with a Class C network? and if so, then how?
possible with a Class C network? and if so, then how?
You can start by looking at the subnet requirement. In order to
You can start by looking at the subnet requirement. In order to
create the five needed subnets you would need to use three bits
create the five needed subnets you would need to use three bits
from the Class C host bits. Two bits would only allow you four
from the Class C host bits. Two bits would only allow you four
subnets (2
subnets (22
2
).
).
Since you need three subnet bits, that leaves you with five bits
Since you need three subnet bits, that leaves you with five bits
for the host portion of the address. How many hosts does this
for the host portion of the address. How many hosts does this
support? 2
support? 25
5
= 32 (30 usable). This meets the requirement.
= 32 (30 usable). This meets the requirement.
28. CLASSFULL ADDRESSING
CLASSFULL ADDRESSING
Therefore you have determined that it is possible to create this
Therefore you have determined that it is possible to create this
network with a Class C network.
network with a Class C network.
An example of how you might assign the subnetworks is:
An example of how you might assign the subnetworks is: