Hi and welcome everyone.
Today we are going to learn about the basics of the IP addressing
structure that enables users all over the world to communicate across
the network.
I’ll be guiding you through this lesson.
By the end of this lesson, you will be able to:
1. Understand IPv4 addresses and subnet masks in the network
environment
2. Identify the range of IP addresses
3. Understand how to implement FLSM and VLSM addressing in a
network
_________________________________________________________
Do you have a home address?
Imagine how difficult it would be to send a mail to your house if you
didn’t have a home address?
We can all agree that an address is very important.
It’s the same with your IP address.
The IP address is required in order to communicate with other devices
on the Internet.
Let’s find out more.
_________________________________________________________
What is an IP address? An IP, or Internet Protocol, address is a unique
32-bit identifier for Internet hosts.
But what do we need an IP address for?
Our IP address enables us to send and retrieve data over our Internet
connections, ensuring that our messages will reach their correct Internet
destinations.
But how does it relate to the OSI model?
Pause
This is the popular Open Systems Interconnect (OSI) Model. It was
created as an architecture for developers to follow to design protocols for
network communications.
The OSI model features seven specific layers.
The Network Layer is the one that defines how interconnected networks
function.
Here, we will focus on IP Address version 4 or IPv4 throughout this
lesson, as IP Address version 6 and other OSI layers will be discussed
in the next lesson.
Now, let’s learn more about IP address version 4.
Click next to continue.
_________________________________________________________
Let’s look at the IP address version 4 structure.
When a host receives an IP address, it looks at all 32 bits as they are
received by the Network Interface Card or NIC.
However, we as human, need to convert those 32 bits into their four
octet decimal equivalent, so we can remember and work with them
better.
Each octet is made up of 8 bits and each bit has a value.
The four groups of 8 bits have the same set of values. The rightmost bit
in an octet has a value of 1 and the values of the remaining bits, from
right to left, are 2, 4, 8, 16, 32, 64 and 128.
Given this binary address, as an example,
Determine the value of the octet by adding the values of positions
wherever there is a binary 1 present.
If there is a 0 in a position, do not add the value.
Then, add the 8 bits to get the value of the octet.
Lastly, combine the value of each octet to form an IP address.
We can observe that the value of each of the four octets can range from
0 to a maximum of 255.
_________________________________________________________
Next, this table represents the IPv4 classes. IP addresses are grouped
into 5 classes. Classes A, B and C are commercial addresses and are
assigned to hosts.
Class A’s IP range is [Link] to [Link].
Class B’s IP range is [Link] to [Link].
Class C’s IP range is [Link] to [Link].
Class D is reserved for multicast use and
Class E is reserved for experimental use.
Class A addresses employ one octet to represent the network and three
to represent the host. The default subnet mask is 8 bits . These
addresses are typically assigned to large organizations.
Class B addresses have two octets to represent the network and two for
the host. The default subnet mask is 16 bits. These addresses are
typically used for medium-sized networks.
Class C addresses have three octets for the network and one for the
host. The default subnet mask is 24 bits. Class C addresses are usually
assigned to small networks.
You will need to memorize this table for this course.
_________________________________________________________
Now we will look more closely at the hierarchical IPv4 structure. A 32-bit
IP address has two parts.
The first part identifies the network and the second part identifies a host
on that network.
Both parts are required in an IP address.
For example, if a host has the IP address [Link], the first three
octets, (192.168.5), identify the network portion of the address, and the
last octet, (.11) identifies the host.
Another example of a hierarchical network is the telephone system. With
a telephone number, the country code, area code and exchange
represent the network address and the remaining digits represent a local
phone number.
Click next to look at another example.
_________________________________________________________
In this scenario, we wish to transmit some data via the Internet to IP
address, [Link].
But how can we locate the host at [Link]?
When the data reaches the destination Router, it will look for the network
portion of the address.
The Router only needs to know how to reach each network, rather than
needing to know the location of each individual host.
Then the data moves to the Switch to identify the destination host
address.
When it reaches the Switch, there are two available hosts in the network.
The Switch then will compare the host address of the received data and
the available hosts in the network.
Next, the Switch will forward the data to the target host with IP address
[Link].
Next we will learn about the role of the Subnet Mask.
_________________________________________________________
As mention earlier, there are two parts to every IP address; the Network
portion and the Host portion.
But, How do hosts know which part refers to the network and which
refers to the host? This is the job of the Subnet Mask.
The subnet mask is essentially a sequence of 1s followed by a sequence
of 0s.
The 1s indicates how many bits are being used to represent the network
ID, while, Host bits are always zero 0 in a subnet mask.
_________________________________________________________
There are two ways to represent a Subnet Mask; we can use Dotted
Decimal Notation or Prefix Length Notation.
Specifically, the prefix length is the number of bits set to 1 in the subnet
mask. It is written in “slash notation”, which is a “/” followed by the
number of bits set to 1. Therefore, count the number of bits in the subnet
mask and prepend it with a slash.
Here is the default subnet mask for Class A, Class B and Class C IP
address.
Class A addresses have only one octet to represent the network portion
and three to represent the host portion. The default subnet mask is 8
bits, [Link].
Class B addresses have two octets to represent the network portion and
two for the host portion. The default subnet mask is 16 bits, [Link].
Class C addresses have three octets for the network portion and one for
the host portion. The default subnet mask is 24 bits, [Link].
Click on the example button to look at an examples Subnet Masks using
various prefix lengths.
Let’s look at this IP address; [Link] with slash 24.
Slash 24 here is the number of network bits.
It indicates how many bits are being used to represent the network
portion.
We can convert the network bits into the decimal format to see that the
subnet mask in dotted decimal notation is [Link].
Here is another example.
This example involves various types of prefix length.
This IP address comes with subnet mask slash 18, meaning that there
are 18 network bits.
Next, convert the network bits into the decimal format. The subnet mask
in dotted decimal notation is [Link].
_________________________________________________________
Now, let’s see how Host 1 uses its subnet mask to determine if Host 2 is
on the same network.
When a host sends a packet, it compares its subnet mask to its own IP
address and the destination IP address.
If the network bits match, both the source and destination host are on
the same network and the packet can be delivered locally.
If they do not match, the sending host forwards the packet to the local
router interface to be sent on to the other network.
For the first step, convert all the addresses into binary form.
Look at the subnet mask. The subnet mask is /24. Separate the subnet
mask into the network and host portion at bit-24.
The 1s in the subnet mask represent the network portion; the 0s
represent the host portion.
In this example, the first three octets comprise the network portion, and
the last octet represents the host portion.
Next, the subnet mask is applied to the Host1 and Host2 IP addresses
from left to right, bit for bit.
If the network bits match, both Host1 and Host2 are on the same
network.
If they do not match, the hosts are on different network.
In this example, all bits in network portion match.
Therefore, both Host1 and Host2 are on the same network.
_________________________________________________________
Let’s see another example.
First, convert all the addresses into binary form.
Look at the subnet mask. The subnet mask is /28. Separate the subnet
mask into network and host portion at bit-28.
In this example, the first 28 bits comprise the network portion, and the
remaining bits represents the host portion.
Next, the subnet mask is applied.
You can see at bit-28 in the network portion, the two bits do not match.
Therefore, Host1 and Host2 are not in the same network.
_________________________________________________________
All hosts that connect directly to the Internet require a unique public IP
address. Because of the finite number of 32-bit addresses available,
there is a risk of running out of IPv4 addresses.
One solution put forward was to reserve some private addresses for use
exclusively inside an organization. This allows hosts within an
organization to communicate with one another without the need of a
unique public IP address.
This table presents several ranges of addresses within each of the
classes A, B and C that are reserved.
For Class A, the IP addresses [Link] to [Link] are reserved
for private use.
There 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, [Link] network address, is reserved for
loopback addresses.
The reserved private IP range for Class B is from [Link] to
[Link].
In Class C, the reserved private IP range is from [Link] to
[Link].
Look at this example. The host with a Class B IP, [Link] is
allowed to access the Internet because the IP is not in the private IP
range of Class B.
While the host with a Class A IP, [Link], is not allowed to
access the Internet because the IP is within the private range.
_________________________________________________________
Did you manage to get all the answers correct? If so, well done, you just
completed the activity. Congratulations.
We have just completed learning about Understand IPv4 addresses and
subnet masks in the network environment
Now, let’s take a look at The range of IP addresses.
If you are going to set up a network, then you have to know how to
distribute the IP addresses.
In order to do this, it is essential to know the relevant network address
and broadcast address.
To calculate network and broadcast addresses, firstly you have to know
your IP address and subnet mask.
The Network address is the IP address with all 0’s in the host bits.
The Broadcast address is the IP address with all 1’s in the host bits.
While the useable or valid IP addresses are any addresses between the
network address and broadcast address.
_________________________________________________________
Given an IP Address, [Link] slash 28, we wish to find the range
of useable addresses.
For the 1st step, identify the subnet mask. Given subnet mask is /28. /28
is equal to 28 network bits. To find the 28th bit, you have to convert the
decimal IP to binary form. So at 28th network bit, divide the IP by draw a
line. This will divide the IP into the network portion on the left and the
host portion on the right.
In the 2nd step, we will find the Network address . To find the network
address, you have to change all host bits to bit 0. Then, convert all the
binary into decimal form. You will get [Link]. This is the First IP in
the range.
Next, find the broadcast address. To find the broadcast address, you
have to change all host bits to 1. Then, convert all the binary back to the
decimal form. You will get [Link]. This is the Last IP in the
range.
So, the useable addresses are [Link] to [Link]
We will practise this further later on.
_________________________________________________________
How can we identify how many addresses are available for a given IP
range?
Here is the formula. Number of hosts is equal to 2 to the power of the
number of host bits, minus 2. We have to subtract 2 as the network and
broadcast addresses are invalid.
To see another example, click on the button.
As in the previous example, we have the IP address [Link] /28
with [Link] to [Link] in the useable range. But how many
valid addresses are there?
Firstly, Using the given formula, you find the number of host bits which is
the complete number of IPv4 bits (32 bits) minus the network bits (prefix
28 network bits).
32 bits minus 28 bits is equal to 4 host bits.
Then you can calculate the number of hosts using the formula.
2 to the power of 4 host bits and then minus 2.
The answer is 14. So there are 14 valid IP addresses.
_________________________________________________________
Did you manage to get all the answers correct? If so, well done, you just
completed the activity. Congratulations.
We have just completed this section where we looked at calculating the
range of IP addresses available.
Now, let’s take a look at how to implement FLSM and VLSM addressing
in a network.
The world is running out of available IP addresses and subnetting helps
to extend the existing addresses.
Subnetting is the process of borrowing bits from the host bits, in order to
divide the larger network into small subnets.
There are two type of Subnetting; FLSM and VLSM.
A Fixed Length Subnet Mask or FLSM is where all subnets have the
same number of hosts when performing subnetting.
In FLSM all subnets use same subnet mask, this lead to inefficiencies.
A Variable Length Subnet Mask or VLSM is where all subnets have a
different number of hosts when performing subnetting according the
network requirement, without wasting IP addresses.
Click next to see the Five basic steps in performing FLSM and VLSM
subnetting
_________________________________________________________
Here are the Five basic steps in performing FLSM and VLSM subnetting:
Step 1 is to Identify the bits to borrow,
Step 2 Borrow the bits,
Step 3 Create a new subnet mask,
Step 4 Find the range,
And lastly Step 5 is creating the subnet
Let’s practice FLSM on this topology.
Given a network address, [Link] /24. Divide the address into a
network that can support 20 hosts per subnet.
For the first step, you have to identify the host bit to borrow.
Here, Bit 5 is chosen as it can produce 30 hosts, enough to support for
20 hosts per subnet, as required.
Next, in Step 2, you need to borrow the host bit from Step 1, which is 5
bits.
Firstly, refer to the given subnet mask, /24.
At 24th bit, divide the IP address. Now you can identify the network
portion.
Now, using the borrowed host bits as in Step 1, start counting from right
to left for 5 host bits. One two three four five.
Then divide the IP at the 5th bit. This will mark the beginning of the host
portion.
The three bits left between the network and host will be classified as the
Subnet bit.
We can use these bits to calculate the number of subnets.
There are three subnet bits. Using the formula two to the power of the
subnet bits, we get 8. Hence we will have 8 subnets, Subnet 0 to Subnet
7.
For Step 3, you need to create a new subnet mask.
In this step, the host bits are subtracted from the number of IPv4 bits to
get 27 bits .
Then, convert the 27 network bits to the decimal format.
The new subnet mask is [Link]. This new subnet mask will be
used in Step 4.
Let’s proceed to Step 4.
In Step 4, you find the range based on the new subnet mask in Step 3.
The new subnet mask is subtracted from the full subnet mask as shown
to get [Link]
Let’s move on to Step 5.
In this last step, you are going to design a subnet that can support 20
hosts using the result from Step 4.
Firstly, use the given network address [Link].
Add the range value from Step 4, [Link] to the network address.
You will get [Link]. This is identified as the Broadcast address.
Therefore, the IP range for Subnet 0 is [Link] /27 to
[Link] /27.
This range is classified as Subnet 0, the first subnet.
For the next network address, [Link], repeat the same steps. We
can use this method to create 8 subnets.
There will be 8 subnets with the same number of hosts.
_________________________________________________________
Next, Let’s implement VLSM on this topology. Notice that there are two
different networks with different numbers of hosts.
To implement VLSM, we use the same 5 steps as before
Step 1: Identify the bits to borrow
Step 2: Borrow the bits
Step 3: Create a new subnet mask
Step 4: Find the range value
Step 5: Create the subnet
In VLSM, the calculation starts with the largest network size. So, you
start the calculation for the network with 60 hosts.
For the first step, you have to identify the host bit to borrow.
Here, Bit 6 is chosen as it can produce 62 hosts, which can cover 60
hosts per subnet, as required in the topology.
Next, in Step 2, you need to borrow the host bit from Step 1, which is 6
bits.
Firstly, refer to the given subnet mask, /24.
At the 24th bit, divide the IP address. Now we can identify the network
portion.
Now, using the borrowed host bit as in Step 1, start counting from right
to left for 6 host bits. One two three four five six.
Then divide the IP at the 6th bit. Now you have the host portion.
The two bits left between the network and host will act as our Subnet.
We will use these bits to calculate our subnets.
There are two subnet bits. Using the formula two to the power of the
number of subnet bits, we get 4 subnets, Subnet 0 to Subnet 3.
For Step 3, you need to create a new subnet mask.
In this step, we subtract the 6 host bits from the 32 IPv4 bits to get 26.
Then, convert the 26 network bits to the decimal format.
The new subnet mask is [Link]. This new subnet mask will be
used in Step 4.
In Step 4, you find the range value based on the new subnet mask in
Step 3.
The new subnet mask, [Link] is subtracted from the full
subnet mask, which is [Link] to get [Link].
Let’s move on to Step 5.
In this last step, you are going to design a subnet that can support 60
hosts using the result in Step 4.
Firstly, use the given network address [Link].
Add the range value from Step 4, [Link] to the network address.
You will get [Link]. This is our Broadcast address.
Therefore, the IP range for Subnet 0 is [Link] /26 to
[Link] /26.
This range is classified as Subnet 0, the first subnet. In this example,
there’s only one network with 60 hosts. So, you just need to know the
range of Subnet 0.
The next network address is 220.10. 10.64 /26. This network address
will be used to find the range of our 28-host network.
Click next to see how to do this
_________________________________________________________
The same subnetting calculation is applied to find the range of the 28-
host network.
For the first step, you have to identify the host bit to borrow.
Here, Bit 5 is chosen as it can produce 30 hosts.
Next, in Step 2, you need to borrow the host bit from Step 1, which is 5
bits.
Firstly, refer to the given subnet mask, /26.
At the 26th bit, divide the IP address.
Now, using the borrowed host bit as in Step 1, start counting from right
to left for 5 host bits. One two three four five.
Then divide the IP at the 5th bit.
The one bit left between the network and host portion is for our Subnet.
In this subnet, there is one subnet bit. Using the formula two to the
power of the number of subnet bits, we find 2 subnets, Subnet 0 to
Subnet 1.
For Step 3, you need to create a new subnet mask.
In this step, the host bits are subtracted from the IPv4 bits to get 27 bits.
Then, convert the 27 network bits to the decimal format.
The new subnet mask is [Link]. This new subnet mask will be
used in Step 4.
In Step 4, you find the range value based on the new subnet mask in
Step 3.
The new subnet mask, [Link] is subtracted from the full
subnet mask, which is [Link] to get [Link].
Let’s move on to Step 5.
In this last step, you are going to design a subnet that can support 28
hosts using the result from Step 4.
Firstly, use the network address [Link] and new subnet mask /27
from Step 3.
Add the range value from Step 4, [Link] to the network address.
You will get [Link]. This is our Broadcast address.
Therefore, the IP range for Subnet 0 is [Link] /27 to [Link]
/27.
This range is classified as Subnet 0, the first subnet.
In this example, there’s only one network with 28 hosts. So, you just
need to know the range of Subnet 0.
_________________________________________________________
Did you manage to get all the answers correct? If so, well done, you just
completed the activity. Congratulations.
This is a video about subnetting, the practice of dividing a network into
two or more networks.
Click on the button to play the video.
_________________________________________________________
Okay, let’s summarize what we have learned today.
IP addresses are unique 32-bit addresses grouped into four 8-bit
bytes called octets.
IP addresses use a two-part hierarchical structure of network bits
and host bits.
IP addresses and subnet masks are used by routers to determine
the network location of hosts.
IP addresses are grouped into classes according to the number of
bits used for designating the network, and further divided into
public and private ranges.
Private IP addresses must be translated to public IP addresses in
order to move through the Internet.
There are two type of subnetting; FLSM and VLSM.
Okay everyone, that’s it for today.
If you have any questions regarding the subtopics don’t hesitate to ask
your lecturer.
I hope you enjoyed today’s lesson and I’ll see you next time.