SlideShare a Scribd company logo
Network layer: “data plane” roadmap
• Network layer: overview
• data plane
• control plane
• What’s inside a router
• input ports, switching, output ports
• buffer management, scheduling
• IP: the Internet Protocol
• datagram format
• addressing
• network address translation
• IPv6
 Generalized Forwarding, SDN
• match+action
• OpenFlow: match+action in action
 Middleboxes
Network Layer: 4-1
Network Layer: Internet
host, router network layer functions:
IP protocol
• datagram format
• addressing
• packet handling conventions
ICMP protocol
• error reporting
• router “signaling”
transport layer: TCP, UDP
link layer
physical layer
network
layer
forwarding
table
Path-selection
algorithms:
implemented in
• routing protocols
(OSPF, BGP)
• SDN controller
Network Layer: 4-2
Network layer. IP Addressing Part 1.pptx
Network layer. IP Addressing Part 1.pptx
IP Datagram format
ver length
32 bits
payload data
(variable length,
typically a TCP
or UDP segment)
16-bit identifier
header
checksum
time to
live
source IP address
head.
len
type of
service
flgs
fragment
offset
upper
layer
destination IP address
options (if any)
IP protocol version number
header length(bytes)
upper layer protocol (e.g., TCP or UDP)
total datagram
length (bytes)
“type” of service:
 diffserv (0:5)
 ECN (6:7)
fragmentation/
reassembly
TTL: remaining max hops
(decremented at each router)
 20 bytes of TCP
 20 bytes of IP
 = 40 bytes + app
layer overhead for
TCP+IP
overhead
e.g., timestamp, record
route taken
32-bit source IP address
32-bit destination IP address
header checksum
Maximum length: 64K bytes
Typically: 1500 bytes or less
Network Layer: 4-5
IP Header…
1.Version: Specifies the IP protocol version (IPv4 or IPv6).
2.Header Length: Indicates the size of the header (in 32-bit words).
3.Type of Service (ToS): Defines quality of service parameters.
4.Total Length: Indicates the entire packet size (header + data).
5.Identification: Helps reassemble fragmented packets.
6.Flags: Control fragmentation behavior (e.g., fragmentation and reassembly).
7.Fragment Offset: Identifies a fragment's position in the original packet.
8.Time-to-Live (TTL): Limits a packet's lifespan to prevent infinite loops.
9.Protocol: Specifies the higher-layer protocol (TCP, UDP, ICMP, etc.).
10.
Header Checksum: Ensures header integrity during transmission.
11.
Source IP Address: Originating IP address.
12.
Destination IP Address: Recipient IP address.
IP
Addressing
OBJECTIVES:
 To introduce the concept of an address space in general and the
address space of IPv4 in particular.
 To discuss the classful architecture and the blocks of addresses
available in each class.
 To discuss the idea of hierarchical addressing and how it has
been implemented in classful addressing.
 To explain subnetting and super-netting.
 To discuss classless addressing, that has been devised to solve the
problems in classful addressing.
 To discuss some special blocks and some special addresses in
each block.
 To discuss NAT technology and show how it can be used to
alleviate of address depletion.
Outline Introduction
Classful Addressing
Classless Addressing
Special Addresses
NAT
INTRODUCTION
The identifier used in the IP/Network layer of the
TCP/IP protocol suite to identify each device
connected to the Internet is called the Internet
address or IP address.
An IPv4 address is a 32-bit address that uniquely
and universally defines the connection of a host or a
router to the Internet; an IP address is the address of
the interface.
An IPv4 address is 32 bits long.
The IPv4 addresses are unique
and universal.
Address Space
An address space is the total number of addresses used by
the protocol. If a protocol uses b bits to define an address, the
address space is 2b
because each bit can have two different
values (0 or 1).
IPv4 uses 32-bits to make address space.
How many?
• For IPv4, this pool is 32-bits (232) in size and contains
4,294,967,296 IPv4 addresses.
• The IPv6 address space is 128-bits (2128) in size, containing
340,282,366,920,938,463,463,374,607,431,768,211,456 IPv6 addresse
s
Notation
There are three common notations to show an IPv4 address:
binary notation (base 2)
dotted-decimal notation (base 256)(0 to 255)
hexadecimal notation (base 16)
Binary Notation: Base 2
an IPv4 address is displayed as 32 bits
01110101 10010101 00011101 11101010
Dotted-Decimal Notation: Base 256
To make the IPv4 address more compact and easier to read,
an IPv4 address is usually written in decimal form with a
decimal point (dot) separating the bytes
18.17
Figure 18.16: Three different notations in IPv4 addressing
Network layer. IP Addressing Part 1.pptx
Change the following IP addresses from binary notation to
dotted-decimal notation.
a. 10000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 11100111 11011011 10001011 01101111
d. 11111001 10011011 11111011 00001111
Example 1
Change the following IP addresses from binary notation to
dotted-decimal notation.
a. 10000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 11100111 11011011 10001011 01101111
d. 11111001 10011011 11111011 00001111
Example 1
Change the following IP addresses from binary notation to
dotted-decimal notation.
a. 10000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 11100111 11011011 10001011 01101111
d. 11111001 10011011 11111011 00001111
Example 1
Solution
We replace each group of 8 bits with its equivalent decimal
number and add dots for separation:
a. 129.11.11.239 b. 193.131.27.255
c. 231.219.139.111 d. 249.155.251.15
Change the following IP addresses from dotted-decimal notation
to binary notation.
a. 111.56.45.78 b. 221.34.7.82
c. 241.8.56.12 d. 75.45.34.78
Example 2
Change the following IP addresses from dotted-decimal notation
to binary notation.
a. 111.56.45.78 b. 221.34.7.82
c. 241.8.56.12 d. 75.45.34.78
Example 2
Solution
We replace each decimal number with its binary equivalent:
a. 01101111 00111000 00101101 01001110
b. 11011101 00100010 00000111 01010010
c. 11110001 00001000 00111000 00001100
d. 01001011 00101101 00100010 01001110
Change the following IP addresses from binary notation to
hexadecimal notation.
a. 10000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
Example 3
Change the following IP addresses from binary notation to
hexadecimal notation.
a. 10000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
Example 3
Solution
We replace each group of 4 bits with its hexadecimal equivalent.
Note that hexadecimal notation normally has no added spaces or
dots; however, 0X (or 0x) is added at the beginning or the
subscript 16 at the end to show that the number is in
hexadecimal.
a. 0X810B0BEF or 810B0BEF16
b. 0XC1831BFF or C1831BFF16
Types Of IP Address
Static IP Address
Static IP Address is an IP Address that once assigned to a network element always remains the same.
They are configured manually.
Dynamic IP Address
Dynamic IP Address is a temporarily assigned IP Address to a network element.
It can be assigned to a different device if it is not in use.
Classification Of IP Addresses
CLASSFUL ADDRESSING
IP addresses, when started a few decades ago,
used the concept of classes. This architecture is
called classful addressing. In the mid-1990s, a new
architecture, called classless addressing, was
introduced that supersedes the original architecture.
In this section, we introduce classful addressing
because it paves the way for understanding
classless addressing and justifies the rationale for
moving to the new architecture.
Classes
 The IP address space is divided into five classes:
A, B, C, D, and E.
 Each class occupies some part of the whole address space.
Recognizing Classes
To find the class of an address -
in the binary notation, the first few bits ...
in the dotted-decimal notation, the value of
the first byte ...
Figure Finding the class of address
1
Class: A
0
Start
1
0
Class: B
1
0
Class: C
1
0
Class: D Class: E
XXX 239
Netid and Hostid
 IP address in classes A, B, and C is divided into Netid and Hostid.
 These parts are of varying lengths, depending on the class of the
address.
Find the class of each address:
a. 00000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 10100111 11011011 10001011 01101111
d. 11110011 10011011 11111011 00001111
Example 5
Find the class of each address:
a. 00000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 10100111 11011011 10001011 01101111
d. 11110011 10011011 11111011 00001111
Example 5
Solution
a. The first bit is 0. This is a class A address.
b. The first 2 bits are 1; the third bit is 0. This is a class C address.
c. The first bit is 0; the second bit is 1. This is a class B address.
d. The first 4 bits are 1s. This is a class E address..
Find the class of each address:
a. 227.12.14.87 b.193.14.56.22 c.14.23.120.8
d. 252.5.15.111 e.134.11.78.56
Example 6
Find the class of each address:
a. 227.12.14.87 b.193.14.56.22 c.14.23.120.8
d. 252.5.15.111 e.134.11.78.56
Example 6
Solution
a. The first byte is 227 (between 224 and 239); the class is D.
b. The first byte is 193 (between 192 and 223); the class is C.
c. The first byte is 14 (between 0 and 127); the class is A.
d. The first byte is 252 (between 240 and 255); the class is E.
e. The first byte is 134 (between 128 and 191); the class is B.
Classes and Blocks
One problem with classful addressing
 Each class is divided into a fixed number of blocks
with each block having a fixed size.
Class A 00000000-01111111 [0 -127]
Number of blocks (Networks) in class A is 27
= 128 blocks.
Each block can be assigned to one organization.
Each block contains 224
=16,777,216 addresses ( Hosts).
Figure Blocks in Class A
Network layer. IP Addressing Part 1.pptx
Subnet Mask
• A subnet mask is a 32-bit number (often represented in dotted
decimal notation like an IP address) used to divide an IP address into
network and host portions. It is made up of ones (1 network) and
zeroes (0) and determines the size of the network by indicating which
part of the IP address is the network portion and which part is the
host portion.
• Let's take an IPv4 address and its corresponding subnet mask:
• IPv4 Address: 100.168.1.100
• Subnet Mask: 255.0.0.0
In binary form:
• IPv4 Address: 01100100.10101000.00000001.01100100
• Subnet Mask: 11111111. 00000000.00000000.00000000
Calculation
• So total number of addresses in
Class A = No. of Blocks in Class A x No. of Hosts in each block of Class A
• = 128 x 16,777,216
• = 2,147,483,648
• This is 50% of the total addresses in IPv4.
Calculation
Millions of class A addresses
are wasted.
Uses:
Class A is used by organizations requiring very large size
networks like Google, Bing, Yahoo etc
Class B
Number of blocks in class B is 214
= 16,384.
Each block can be assigned to one organizations.
Each block contains 65,536 addresses.
Figure Blocks in Class B
Calculation
• Therefore total number of blocks in Class B =
214
= 16,384
• There are 2 bytes (16 bits) for hostid in Class
B so total number of host in each block =
216
= 65,536
• So total number of addresses in Class B = No.
of Blocks in Class B x No. of Hosts in each
block of Class B
• = 16,384 x 65,536
• = 1,073,741,824
• This is 25% of the total addresses in IPv4.
Many class B addresses are wasted.
Note
Network layer. IP Addressing Part 1.pptx
Class C 11000000 – 11011111 [192  223]
Number of blocks (Networks) in class C is 221
= 2,097,152.
Each block contains 256 addresses (Hosts).
Not so many organizations are so small
to have a class C block.
Use:
Class C is used by organizations requiring small to medium
size networks. For example- engineering colleges, small
universities, small offices etc.
Calculation
• Therefore total number of blocks in Class C =
221
= 2,097,152
• There is 1 byte (8 bits) for hostid in Class C so
total number of host in each block = 28
= 256
• So total number of addresses in Class C = No.
of Blocks in Class C x No. of Hosts in each
block of Class C
• = 2,097,152 x 256
• = 536,870,912
• This is 12.5% of the total addresses in IPv4.
Netid 192.0.0
…
Netid 192.0.1 Netid
223.255.255
Class C
192.0.0.0
to
192.0.0.255
192.0.1.0
to
192.0.1.255
223.255.255.0
to
223.255.255.255
11011111.11111111.1111111
1.11111111
Block 1 Block 2 Block 2,097,152
Network layer. IP Addressing Part 1.pptx
Class D 11100000  11101111 [224  239]
Only one block of class D addresses, designed for multicasting
Each address in this class is used to define one group of hosts on
the Internet.
netid or hostid
• For a class D address, there is no
netid or hostid. All class D
addresses are reserved for
multicasting.
• In class D addresses, the first 4 bits
are always 1110 (224).
• The remaining 28 bits are used to
define multicast addresses.
Class D
224.0.0.0 to 239.255.255.255
Single block of 268,435,456
addresses
The only block of class E addresses was
reserved for future purposes.
Class E 11110000  11111111= [240  255]
netid or hostid
• For a class E address, there is no netid or
hostid. All class E addresses are reserved for
special uses.
• In practical terms, Class E addresses are not
utilized in traditional networking and are kept
reserved for potential future uses, research,
or experimental purposes that may arise
within networking or related fields.
Class E
240.0.0.0 to 255.255.255.255
Single block of 268,435,456
addresses
a) Find the class of each address:
b) 00000001 00001011 00001011 11101111
c) The first bit is 0. This is a class A address.
d) 11000001 10000011 00011011 11111111
e) The first 2 bits are 1; the third bit is 0. This is a class C address.
f) 10100111 11011011 10001011 01101111
g) The first bit is 1; the second bit is 0. This is a class B address
h) 11110011 10011011 11111011 00001111
i) The first 4 bits are 1s. This is a class E address..
Example
Find the class of each address:
a. 227.12.14.87 b.193.14.56.22 c.14.23.120.8
d. 252.5.15.111 e.134.11.78.56
Example
Example
Solution
a. The first byte is 227 (between 224 and 239); the class is D.
b. The first byte is 193 (between 192 and 223); the class is C.
c. The first byte is 14 (between 0 and 127); the class is A.
d. The first byte is 252 (between 240 and 255); the class is E.
e. The first byte is 134 (between 128 and 191); the class is B.
Find the class of each address:
a. 227.12.14.87 b.193.14.56.22
c.14.23.120.8
d. 252.5.15.111 e.134.11.78.56
Network layer. IP Addressing Part 1.pptx
Two-Level Addressing
When classful addressing was designed, it was
assumed that the whole Internet is divided into
many networks and each network connects
many hosts.
That is, the Internet was seen as a network of
networks.
A network was normally created by an
organization that wanted to be connected to the
Internet.
The range of addresses allocated to an
organization in classful addressing
was a block of addresses in
Class A, B, or C.
Since all addresses in a network belonged to a
single block, each address in classful addressing
contains two parts: netid and hostid.
Figure Two-level addressing in classful addressing
Extracting Information in a Block
Given any address in the block, we normally
like to know:
- the number of addresses
- the first address
- the last address.
For this, we need to know the class of the
address.
1. The number of addresses in the block,
N = 232−n
.
2. To find the first address: keep the n leftmost
bits and set the (32 − n) rightmost bits to 0.
3. To find the last address: keep the n leftmost
bits and set the (32 − n) rightmost bits to 1s.
Figure Information extraction in classful addressing
netid
First address
000 ... 0
An address in a block is given as 73.22.17.25. Find the number
of addresses in the block, the first address, and the last
address.
Solution
1. The number of addresses in this block is N = 232−n
=
16,777,216.
2. To find the first address, we keep the leftmost 8 bits and set
the rightmost 24 bits all to 0s. The first address is
73.0.0.0/8, in which 8 is the value of n.
3. To find the last address, we keep the leftmost 8 bits and set
the rightmost 24 bits all to 1s. The last address is
73.255.255.255.
Example 7
Figure Solution to Example 7
An address in a block is given as 180.8.17.9. Find the number
of addresses in the block, the first address, and the last
address.
Solution
1. The number of addresses in this block is N = 232−n
=
65,536.
2. To find the first address, we keep the leftmost 16 bits and set
the rightmost 16 bits all to 0s. The first address is
18.8.0.0/16, in which 16 is the value of n.
3. To find the last address, we keep the leftmost 16 bits and set
the rightmost 16 bits all to 1s. The last address is
18.8.255.255.
Example 8
Figure Solution to Example 8
An address in a block is given as 200.11.8.45. Find the number
of addresses in the block, the first address, and the last
address.
Solution
1. The number of addresses in this block is N = 232−n
= 256.
2. To find the first address, we keep the leftmost 24 bits and set
the rightmost 8 bits all to 0s. The first address is
200.11.8.0/24, in which 24 is the value of n.
3. To find the last address, we keep the leftmost 24 bits and set
the rightmost 8 bits all to 1s. The last address is
200.11.8.255/24.
Example 9
Figure Solution to Example 9
Given the network address 17.0.0.0, find the class, the block, and
the range of the addresses.
Example 10
Given the network address 17.0.0.0, find the class, the block, and
the range of the addresses.
Example 10
•Solution
The class is A because the first byte is between 0 and 127. The
block has a netid of 17. The addresses range from 17.0.0.0 to
17.255.255.255.
Example 11
• Given the network address 132.21.0.0, find the
class, the block, and the range of addresses.
Example 11
• Given the network address 132.21.0.0, find the
class, the block, and the range of addresses.
Solution
• The class is B, the block is 132.21, and the range is
132.21.0.0 to 132.21.255.255
Example 12
• Given the network address 220.34.76.0, find the
class, the block, and the range of addresses
Example 12
• Given the network address 220.34.76.0, find the
class, the block, and the range of addresses
Solution
• The class is C, the block is 220.34.76, and the range
of addresses is 220.34.76.0 to 220.34.76.255
Network Address
- the first address of a block
- used in routing a packet to its destination network.
The network address is the identifier of
a network.
Note
Given the address 23.56.7.91, find the beginning address
(network address).
Example 13
Given the address 23.56.7.91, find the beginning address
(network address).
Example 13
Solution
The default mask is 255.0.0.0, which means that only the first
byte is preserved and the other 3 bytes are set to 0s. The network
address is 23.0.0.0.
Given the address 132.6.17.85, find the beginning address
(network address).
Example 14
Given the address 132.6.17.85, find the beginning address
(network address).
Example 14
Solution
The default mask is 255.255.0.0, which means that the first 2
bytes are preserved and the other 2 bytes are set to 0s. The
network address is 132.6.0.0.
Given the address 201.180.56.5, find the beginning address
(network address).
Example 15
Given the address 201.180.56.5, find the beginning address
(network address).
Example 15
Solution
The default mask is 255.255.255.0, which means that the first 3
bytes are preserved and the last byte is set to 0. The network
address is 201.180.56.0.
Subnetting
A subnet, or subnetwork, is a network inside a network.
Subnets make networks more efficient. Through subnetting,
network traffic can travel a shorter distance without passing
through unnecessary routers to reach its destination.
Def
• One goal of a subnet is to split a large network into a grouping of
smaller, interconnected networks to help minimize traffic. This way,
traffic doesn't have to flow through unnecessary routs, increasing
network speeds. Subnetting, the segmentation of a network address
space, improves address allocation efficiency.
Network layer. IP Addressing Part 1.pptx
Class C Subnetting Tutorial
• Subnetting is done by taking the bit/s from host part and adding it to
the network part. Consider the same Class C example given above.
Remember, the first three octets of a Class C network is used to
represent the network and the last octet is used to represent the
host. The default format for a Class C IPv4 address is
Network.Network.Network.Host.
To make things easy, you may remember this.
• If all the bits in the host part are "0", that represents the network id.
• If all the bits in the host part are "0" except the last bit, it is the first
usable IPv4 address.
• If all the bits in the host part are "1" except the last bit, it is the last
usable IPv4 address.
• If all the bits in the host part are "1", that represents the
broadcast address.
Class C 1-bit subnetting tutorial
• Let us try to visualize the unsubnetted Class C network 192.168.10.0
with default subnet mask 255.255.255.0 using below image.
Network address is 192.168.10.0, first usable IPv4 address is
192.168.10.1, second usable IPv4 address is 192.168.10.2, third
usable IPv4 address is 192.168.10.3 ...... up to last usable IPv4 address
192.168.10.254 and the broadcast address 192.168.10.255.
Network layer. IP Addressing Part 1.pptx
Continue
• Consider the example of Class C network 192.168.10.0
255.255.255.0, we discussed above. If we include one bit from the
host part to the network part in the last octet, the default
subnet mask of Class C network 255.255.255.0 is changed into
255.255.255.128. The single bit that is added to the network part
from the host part, in the last octet, can have two possible values.
Those two possible values are either 0 or 1.
• That means, we can get two subnets if we do a single bit subnetting
for a Class C network.
Network layer. IP Addressing Part 1.pptx
SN No Description Binaries Decimal
1
Network Address
11000000.10101000.0000101
0.00000000
192.168.10.0
First IPv4 address
11000000.10101000.0000101
0.00000001
192.168.10.1
Last IPv4 address
11000000.10101000.0000101
0.01111110
192.168.10.126
Broadcast Address
11000000.10101000.0000101
0.01111111
192.168.10.127
2
Network Address
11000000.10101000.0000101
0.10000000
192.168.10.128
First IPv4 address
11000000.10101000.0000101
0.10000001
192.168.10.129
Last IPv4 address
11000000.10101000.0000101
0.11111110
192.168.10.254
Broadcast Address
11000000.10101000.0000101
0.11111111
192.168.10.255
Summary
• The network 192.168.10.0 is divided into two subnets, each subnet has 128 total
IPv4 addresses and 126 usable IPv4 addresses. Two IPv4 addresses are used in
each subnet to represent the network address and the
directed broadcast address. The subnet mask for 1-bit subnetting for a
Class C network is 255.255.255.128.
Visualization
• Subnet 1 has its network address 192.168.10.0 with a subnet mask of 255.255.255.128.
First usable IPv4 address is 192.168.10.1, second usable IPv4 address is 192.168.10.2,
third usable IPv4 address is 192.168.10.3 ...... up to last usable IPv4 address
192.168.10.126 and the broadcast address 192.168.10.127.
• Subnet 2 has its network address 192.168.10.128 with a subnet mask of
255.255.255.128. First usable IPv4 address is 192.168.10.129, second usable IPv4
address is 192.168.10.130, third usable IPv4 address is 192.168.10.131 ...... up to last
usable IPv4 address 192.168.10.254 and the broadcast address 192.168.10.255.
Network layer. IP Addressing Part 1.pptx
Network layer. IP Addressing Part 1.pptx
Network layer. IP Addressing Part 1.pptx
Class C 2-bit subnetting tutorial
SN No Description Binaries Decimal
1
Network Address 11000000.10101000.00001010.00000000 192.168.10.0
First IPv4 address 11000000.10101000.00001010.00000001 192.168.10.1
Last IPv4 address 11000000.10101000.00001010.00111110 192.168.10.62
Broadcast Address 11000000.10101000.00001010.00111111 192.168.10.63
2
Network Address 11000000.10101000.00001010.01000000 192.168.10.64
First IPv4 address 11000000.10101000.00001010.01000001 192.168.10.65
Last IPv4 address 11000000.10101000.00001010.01111110 192.168.10.126
Broadcast Address 11000000.10101000.00001010.01111111 192.168.10.127
3
Network Address 11000000.10101000.00001010.10000000 192.168.10.128
First IPv4 address 11000000.10101000.00001010.10000001 192.168.10.129
Last IPv4 address 11000000.10101000.00001010.10111110 192.168.10.190
Broadcast Address 11000000.10101000.00001010.10111111 192.168.10.191
4
Network Address 11000000.10101000.00001010.11000000 192.168.10.192
First IPv4 address 11000000.10101000.00001010.11000001 192.168.10.193
Last IPv4 address 11000000.10101000.00001010.11111110 192.168.10.254
Broadcast Address 11000000.10101000.00001010.11111111 192.168.10.255
Expl
• The network 192.168.10.0 is divided into four subnets, each subnet
has 64 total IPv4 addresses and 62 usable IPv4 addresses. Two
IPv4 addresses are used in each subnet to represent the
network address and the directed broadcast address. The
subnet mask for 2-bit subnetting for a Class C network is
255.255.255.192.
• Visualization of 2-bit subnetting of Class C network 192.168.10.0 with
subnet mask 255.255.255.192 is given below.
Network layer. IP Addressing Part 1.pptx
Class C 3-bit subnetting tutorial
• If we include three bits from the host part to the network part in last
octet, the default subnet mask of Class C network 255.255.255.0 is
changed into 255.255.255.224. The three bits added to the network
part from the host part in the last octet can have eight possible
values. Those eight possible values are 000, 001, 010, 011, 100, 101,
110 and 111.
Network layer. IP Addressing Part 1.pptx
SN No Description Binaries Decimal
1
Network Address 11000000.10101000.00001010.00000000 192.168.10.0
First IPv4 address 11000000.10101000.00001010.00000001 192.168.10.1
Last IPv4 address 11000000.10101000.00001010.00011110 192.168.10.30
Broadcast Address 11000000.10101000.00001010.00011111 192.168.10.31
2
Network Address 11000000.10101000.00001010.00100000 192.168.10.32
First IPv4 address 11000000.10101000.00001010.00100001 192.168.10.33
Last IPv4 address 11000000.10101000.00001010.00111110 192.168.10.62
Broadcast Address 11000000.10101000.00001010.00111111 192.168.10.63
3
Network Address 11000000.10101000.00001010.01000000 192.168.10.64
First IPv4 address 11000000.10101000.00001010.01000001 192.168.10.65
Last IPv4 address 11000000.10101000.00001010.01011110 192.168.10.94
Broadcast Address 11000000.10101000.00001010.01011111 192.168.10.95
4
Network Address 11000000.10101000.00001010.01100000 192.168.10.96
First IPv4 address 11000000.10101000.00001010.01100001 192.168.10.97
Last IPv4 address 11000000.10101000.00001010.01111110 192.168.10.126
Broadcast Address 11000000.10101000.00001010.01111111 192.168.10.127
5
Network Address 11000000.10101000.00001010.10000000 192.168.10.128
First IPv4 address 11000000.10101000.00001010.10000001 192.168.10.129
Last IPv4 address 11000000.10101000.00001010.10011110 192.168.10.158
Broadcast Address 11000000.10101000.00001010.10011111 192.168.10.159
6
Network Address 11000000.10101000.00001010.10100000 192.168.10.160
First IPv4 address 11000000.10101000.00001010.10100001 192.168.10.161
Last IPv4 address 11000000.10101000.00001010.10111110 192.168.10.190
Broadcast Address 11000000.10101000.00001010.10111111 192.168.10.191
7
Network Address 11000000.10101000.00001010.11000000 192.168.10.192
First IPv4 address 11000000.10101000.00001010.11000001 192.168.10.193
Last IPv4 address 11000000.10101000.00001010.11011110 192.168.10.222
Broadcast Address 11000000.10101000.00001010.11011111 192.168.10.223
8
Network Address 11000000.10101000.00001010.11100000 192.168.10.224
First IPv4 address 11000000.10101000.00001010.11100001 192.168.10.225
Last IPv4 address 11000000.10101000.00001010.11111110 192.168.10.254
Broadcast Address 11000000.10101000.00001010.11111111 192.168.10.255
Network layer. IP Addressing Part 1.pptx
Class C 4-bit subnetting
Subnet Bits Subnet Mask CIDR Total Subnets Usable IPs/Subnet
0 255.255.255.0 /24 1 254
1 255.255.255.128 /25 2 126
2 255.255.255.192 /26 4 62
3 255.255.255.224 /27 8 30
4 255.255.255.240 /28 16 14
5 255.255.255.248 /29 32 6
6 255.255.255.252 /30 64 2
Class B
• Let us try to visualize the unsubnetted Class B network 172.16.0.0
with default subnet mask 255.255.0.0 using below image.
Network address is 172.16.0.0, first usable IPv4 address is 172.16.0.1,
second usable IPv4 address is 172.16.0.2, third usable IPv4 address is
172.16.0.3 ...... up to last usable IPv4 address 172.16.255.254 and the
broadcast address 172.16.255.255.
Network layer. IP Addressing Part 1.pptx
Class B Subnetting
Remember, the first two octets of a Class B network is
used to represent the network and the last two octets
are used to represent a host within that network. The
default format for a Class B IPv4 address is
Network.Network.Host.Host.
Let us consider an example of Class B network
172.16.0.0 - 255.255.0.0. The binary representation
of the above network and its subnet mask are shown
in below table.
Component Binary Decimal
Address Part
10101100.00010000.00000000.00000
000
172.16.0.0
SN Mask
11111111.11111111.00000000.00000
000
255.255.0.0
Points
• Once again,
• If all the bits in the host part are "0", that represents the
network address.
• If all the bits in the host part are "0" except the last bit, it is the first
usable IPv4 address.
• If all the bits in the host part are "1" except the last bit, it is the last
usable IPv4 address.
• If all the bits in the host part are "1", that represents the
directed broadcast address.
Class B 1-bit subnetting tutorial
• If we include one bit from the host part to the network part in the
third octet, the default subnet mask of Class B network 255.255.0.0 is
changed into 255.255.128.0. The single bit added to network part
from host part in the third octet can have two possible values in third
octet, either 0 or 1.
• That means, we can get two subnets if we do a single bit subnetting
on a Class B network.
Network layer. IP Addressing Part 1.pptx
SN No Description Binaries Decimal
1
Network Address
10101100.00010000.00000
000.00000000 172.16.0.0
First IPv4 address
10101100.00010000.00000
000.00000001 172.16.0.1
Last IPv4 address
10101100.00010000.01111
111.11111110 172.16.127.254
Broadcast Address
10101100.00010000.01111
111.11111111 172.16.127.255
2
Network Address
10101100.00010000.10000
000.00000000 172.16.128.0
First IPv4 address 10101100.00010000.10000
000.00000001 172.16.128.1
Last IPv4 address 10101100.00010000.11111
111.11111110 172.16.255.254
Broadcast Address 10101100.00010000.11111
111.11111111 172.16.255.255
Explanation
• The network 172.16.0.0 is divided into two subnets, each subnet has 32,768 total IPv4 addresses and
32,766 usable IPv4 addresses. Two IPv4 addresses are used in each subnet to represent the
network address and directed broadcast address (first and last IPv4 addresses in a subnet block). As
mentioned earlier in this lesson, you cannot use network address or directed broadcast address as the
IPv4 address for devices inside your network. The subnet mask to use for 1-bit subnetting for a
Class B network is 255.255.128.0.
• Visualization of 1-bit subnetting of Class B network 172.16.0.0 with subnet mask 255.255.128.0 is given
below.
• Subnet 1 has its network address 172.16.0.0 with a subnet mask of 255.255.128.0. First usable IPv4
address is 172.16.0.1, second usable IPv4 address is 172.16.0.2, third usable IPv4 address is
172.16.0.3 ...... up to last usable IPv4 address 172.16.127.254 and the broadcast address 172.16.127.255.
• Subnet 2 has its network address 172.16.128.0 with a subnet mask of 255.255.128.0. First usable IPv4
address is 172.16.128.1, second usable IPv4 address is 172.16.128.2, third usable IPv4 address is
172.16.128.3 ...... up to last usable IPv4 address 172.16.255.254 and the broadcast address
172.16.255.255.
Network layer. IP Addressing Part 1.pptx
Class B 2-bit subnetting tutorial
If we include two bits from the host part to the
network part in the third octet, the default
subnet mask of Class B network 255.255.0.0 is
changed into 255.255.192.0. The two bits added to
network part from host part can have four possible
values in third octet, 00, 01, 10, and 11.
That means, we can get four networks if we do a 2-bit
subnetting on a Class B network
Network layer. IP Addressing Part 1.pptx
SN No Description Binaries Decimal
1
Network Address 10101100.00010000.00000000.00000000 172.16.0.0
First IPv4 address 10101100.00010000.00000000.00000001 172.16.0.1
Last IPv4 address 10101100.00010000.00111111.11111110 172.16.63.254
Broadcast Address 10101100.00010000.00111111.11111111 172.16.63.255
2
Network Address 10101100.00010000.01000000.00000000 172.16.64.0
First IPv4 address 10101100.00010000.01000000.00000001 172.16.64.1
Last IPv4 address 10101100.00010000.01111111.11111110 172.16.127.254
Broadcast Address 10101100.00010000.01111111.11111111 172.16.127.255
3
Network Address 10101100.00010000.10000000.00000000 172.16.128.0
First IPv4 address 10101100.00010000.10000000.00000001 172.16.128.1
Last IPv4 address 10101100.00010000.10111111.11111110 172.16.191.254
Broadcast Address 10101100.00010000.10111111.11111111 172.16.191.255
4
Network Address 10101100.00010000.11000000.00000000 172.16.192.0
First IPv4 address 10101100.00010000.11000000.00000001 172.16.192.1
Last IPv4 address 10101100.00010000.11111111.11111110 172.16.255.254
Broadcast Address 10101100.00010000.11111111.11111111 172.16.255.255
Network layer. IP Addressing Part 1.pptx
Class B 3-bit subnetting tutorial
• If we include three bits to the network part from the host part, the
default subnet mask of Class B network 255.255.0.0 is changed into
255.255.224.0. The three bits added to network part can have eight
possible values in the third octet. Those eight possible values are 000,
001, 010, 011, 100, 101, 110 and 111.
• That means, we can get eight networks if we do a 3-bit subnetting on
a Class B network.
Network layer. IP Addressing Part 1.pptx
SN No Description Binaries Decimal
1
Network Address 10101100.00010000.00000000.00000000 172.16.0.0
First IPv4 address 10101100.00010000.00000000.00000001 172.16.0.1
Last IPv4 address 10101100.00010000.00011111.11111110 172.16.31.254
Broadcast Address 10101100.00010000.00011111.11111111 172.16.31.255
2
Network Address 10101100.00010000.00100000.00000000 172.16.32.0
First IPv4 address 10101100.00010000.00100000.00000001 172.16.32.1
Last IPv4 address 10101100.00010000.00111111.11111110 172.16.63.254
Broadcast Address 10101100.00010000.00111111.11111111 172.16.63.255
3
Network Address 10101100.00010000.01000000.00000000 172.16.64.0
First IPv4 address 10101100.00010000.01000000.00000001 172.16.64.1
Last IPv4 address 10101100.00010000.01011111.11111110 172.16.95.254
Broadcast Address 10101100.00010000.01011111.11111111 172.16.95.255
4
Network Address 10101100.00010000.01100000.00000000 172.16.96.0
First IPv4 address 10101100.00010000.01100000.00000001 172.16.96.1
Last IPv4 address 10101100.00010000.01111111.11111110 172.16.127.254
Broadcast Address 10101100.00010000.01111111.11111111 172.16.127.255
5
Network Address 10101100.00010000.10000000.00000000 172.16.128.0
First IPv4 address 10101100.00010000.10000000.00000001 172.16.128.1
Last IPv4 address 10101100.00010000.10011111.11111110 172.16.159.254
Broadcast Address 10101100.00010000.10011111.11111111 172.16.159.255
6
Network Address 10101100.00010000.10100000.00000000 172.16.160.0
First IPv4 address 10101100.00010000.10100000.00000001 172.16.160.1
Last IPv4 address 10101100.00010000.10111111.11111110 172.16.191.254
Broadcast Address 10101100.00010000.10111111.11111111 172.16.191.255
7
Network Address 10101100.00010000.11000000.00000000 172.16.192.0
First IPv4 address 10101100.00010000.11000000.00000001 172.16.192.1
Last IPv4 address 10101100.00010000.11011111.11111110 172.16.223.254
Broadcast Address 10101100.00010000.11011111.11111111 172.16.223.255
8
Network Address 10101100.00010000.11100000.00000000 172.16.224.0
First IPv4 address 10101100.00010000.11100000.00000001 172.16.224.1
Last IPv4 address 10101100.00010000.11111111.11111110 172.16.255.254
Broadcast Address 10101100.00010000.11111111.11111111 172.16.255.255
Network layer. IP Addressing Part 1.pptx
Class B 4-bit subnetting tutorial
• If we add four bits to the network part from host part in the third
octet, for a Class B network, the default subnet mask 255.255.0.0 is
changed to 255.255.240.0. The four bits added to the network part
from the host part, in the third octet, can have sixteen possible
values. Those sixteen possible values are 0000, 0001, 0010, 0011,
0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110
and 1111.
Network layer. IP Addressing Part 1.pptx
SN No Description Binaries Decimal
1
Network Address 10101100.00010000.0
0000000.00000000 172.16.0.0
First IP Address 10101100.00010000.0
0000000.00000001 172.16.0.1
Last IP Address 10101100.00010000.0
0001111.11111110 172.16.15.254
Broadcast Address 10101100.00010000.0
0001111.11111111 172.16.15.255
2
Network Address 10101100.00010000.0
0010000.00000000 172.16.16.0
First IP Address
10101100.00010000.0
0010000.00000001 172.16.16.1
Last IP Address
10101100.00010000.0
0011111.11111110 172.16.31.254
Broadcast Address
10101100.00010000.0
0011111.11111111 172.16.31.255
3
Network Address
10101100.00010000.0
0100000.00000000 172.16.32.0
First IP Address
10101100.00010000.0
0100000.00000001 172.16.32.1
Last IP Address
10101100.00010000.0
0101111.11111110 172.16.47.254
Broadcast Address
10101100.00010000.0
0101111.11111111 172.16.47.255
4
Network Address
10101100.00010000.0
0110000.00000000 172.16.48.0
First IP Address
10101100.00010000.0
0110000.00000001 172.16.48.1
Last IP Address
10101100.00010000.0
0111111.11111110 172.16.63.254
Broadcast Address 10101100.00010000.0
0111111.11111111
172.16.63.255
5
Network Address 10101100.00010000.0
1000000.00000000
172.16.64.0
First IP Address 10101100.00010000.0
1000000.00000001
172.16.64.1
Last IP Address 10101100.00010000.0
1001111.11111110
172.16.79.254
Broadcast Address 10101100.00010000.0
1001111.11111111
172.16.79.255
6
Network Address 10101100.00010000.0
1010000.00000000
172.16.80.0
First IP Address 10101100.00010000.0
1010000.00000001
172.16.80.1
Last IP Address 10101100.00010000.0
1011111.11111110
172.16.95.254
Broadcast Address 10101100.00010000.0
1011111.11111111
172.16.95.255
7
Network Address 10101100.00010000.0
1100000.00000000
172.16.96.0
First IP Address 10101100.00010000.0
1100000.00000001 172.16.96.1
Last IP Address 10101100.00010000.0
1101111.11111110 172.16.111.254
Broadcast Address 10101100.00010000.0
1101111.11111111 172.16.111.255
8
Network Address 10101100.00010000.0
1110000.00000000 172.16.112.0
First IP Address 10101100.00010000.0
1110000.00000001 172.16.112.1
Last IP Address 10101100.00010000.0
1111111.11111110 172.16.127.254
Broadcast Address 10101100.00010000.0
1111111.11111111 172.16.127.255
9
Network Address 10101100.00010000.1
0000000.00000000 172.16.128.0
First IP Address 10101100.00010000.1
0000000.00000001 172.16.128.1
Last IP Address 10101100.00010000.1
0001111.11111110
172.16.143.254
Broadcast Address 10101100.00010000.1
0001111.11111111
172.16.143.255
10
Network Address 10101100.00010000.1
0010000.00000000
172.16.144.0
First IP Address 10101100.00010000.1
0010000.00000001
172.16.144.1
Last IP Address 10101100.00010000.1
0011111.11111110
172.16.159.254
Broadcast Address 10101100.00010000.1
0011111.11111111
172.16.159.255
11
Network Address 10101100.00010000.1
0100000.00000000
172.16.160.0
First IP Address
10101100.00010000.1
0100000.00000001
172.16.160.1
Last IP Address
10101100.00010000.1
0101111.11111110
172.16.175.254
Broadcast Address
10101100.00010000.1
0101111.11111111
172.16.175.255
12
Network Address
10101100.00010000.1
0110000.00000000
172.16.176.0
First IP Address
10101100.00010000.1
0110000.00000001
172.16.176.1
Last IP Address
10101100.00010000.1
0111111.11111110
172.16.191.254
Broadcast Address
10101100.00010000.1
0111111.11111111
172.16.191.255
13
Network Address
10101100.00010000.1
1000000.00000000
172.16.192.0
First IP Address
10101100.00010000.1
1000000.00000001
172.16.192.1
Last IP Address
10101100.00010000.1
1001111.11111110
172.16.207.254
Broadcast Address 10101100.00010000.1
1001111.11111111
172.16.207.255
14
Network Address 10101100.00010000.1
1010000.00000000
172.16.208.0
First IP Address 10101100.00010000.1
1010000.00000001
172.16.208.1
Last IP Address 10101100.00010000.1
1011111.11111110
172.16.223.254
Broadcast Address 10101100.00010000.1
1011111.11111111
172.16.223.255
15
Network Address 10101100.00010000.1
1100000.00000000
172.16.224.0
First IP Address 10101100.00010000.1
1100000.00000001
172.16.224.1
Last IP Address 10101100.00010000.1
1101111.11111110
172.16.239.254
Broadcast Address 10101100.00010000.1
1101111.11111111
172.16.239.255
16
Network Address
10101100.00010000.1
1110000.00000000 172.16.240.0
First IP Address
10101100.00010000.1
1110000.00000001 172.16.240.1
Last IP Address
10101100.00010000.1
1111111.11111110 172.16.255.254
Broadcast Address
10101100.00010000.1
1111111.11111111 172.16.255.255
Subnet Bits Subnet Mask CIDR Total Subnets
Usable IP
Address/Subnet
0 255.255.0.0 /16 1 65534
1 255.255.128.0 /17 2 32766
2 255.255.192.0 /18 4 16382
3 255.255.224.0 /19 8 8190
4 255.255.240.0 /20 16 4094
5 255.255.248.0 /21 32 2046
6 255.255.252.0 /22 64 1022
7 255.255.254.0 /23 128 510
8 255.255.255.0 /24 256 254
9 255.255.255.128 /25 512 126
10 255.255.255.192 /26 1024 62
11 255.255.255.224 /27 2048 30
12 255.255.255.240 /28 4096 14
13 255.255.255.248 /29 8192 6
14 255.255.255.252 /30 16384 2
Class A
• Let us try to visualize the unsubnetted Class A network 10.0.0.0 with
default subnet mask 255.0.0.0 using below image. Network address
is 10.0.0.0, first usable IPv4 address is 10.0.0.1, second usable IPv4
address is 10.0.0.2, third usable IPv4 address is 10.0.0.3 ...... up to last
usable IPv4 address 10.255.255.254 and the broadcast address
10.255.255.255.
Network layer. IP Addressing Part 1.pptx
Class A Subnetting
• Remember, the first octet of a Class A network is used to represent
the network and the remaining three octets are used to represent a
host within that network. The default format for a
Class A IPv4 address is Network.Host.Host.Host.
• Let us consider an example of Class A network 10.0.0.0 - 255.0.0.0.
The binary representation of the above network and its subnet mask
are shown in below table.
Component Binary Decimal
Address Part
00001010.00000000.00000000.00000
000
10.0.0.0
Subnet Mask
11111111.00000000.00000000.00000
000
255.0.0.0
Note
• Once again,
• If all the bits in the host part are "0", that represents the
network address.
• If all the bits in the host part are "0" except the last bit, it is the first
usable IPv4 address.
• If all the bits in the host part are "1" except the last bit, it is the last
usable IPv4 address.
• If all the bits in the host part are "1", that represents the
directed broadcast address.
Class A 1-bit subnetting tutorial
• If we include one bit to network part from the host part in the second
octet, the default subnet mask of a Class A network 255.0.0.0 is
changed into 255.128.0.0. The single bit can have two values in
second octet, either 0 or 1.
• That means, we can get two subnets if we do a single bit subnetting
on a Class A network.
• Please refer below image.
Network layer. IP Addressing Part 1.pptx
SN No Description Binaries Decimal
1
Network Address
00001010.00000000.00000
000.00000000 10.0.0.0
First IPv4 address
00001010.00000000.00000
000.00000001 10.0.0.1
Last IPv4 address
00001010.01111111.11111
111.11111110 10.127.255.254
Broadcast Address
00001010.01111111.11111
111.11111111 10.127.255.255
2
Network Address
00001010.10000000.00000
000.00000000 10.128.0.0
First IPv4 address 00001010.10000000.00000
000.00000001 10.128.0.1
Last IPv4 address 00001010.11111111.11111
111.11111110 10.255.255.254
Broadcast Address 00001010.11111111.11111
111.11111111 10.255.255.255
Explanation
• The network 10.0.0.0 is divided into two subnets, each subnet has 8,388,608 total IPv4 Addresses and
8,388,606 usable IPv4 Addresses. Two IPv4 addresses are used in each subnet to represent the
network address and directed broadcast address (first and last IPv4 addresses in a subnet block). As
mentioned in previous subnetting tutorial lessons, you cannot use network address or
directed broadcast address as the IPv4 address for devices inside your network. The subnet mask to
use for 1-bit subnetting for a Class A network is 255.128.0.0.
• Visualization of 1-bit subnetting of Class A network 10.0.0.0 with subnet mask 255.128.0.0 is given
below.
• Subnet 1 has its network address 10.0.0.0 with a subnet mask of 255.128.0.0. First usable IPv4 address
is 10.0.0.1, second usable IPv4 address is 10.0.0.2, third usable IPv4 address is 10.0.0.3 ...... up to last
usable IPv4 address 10.127.255.254 and the broadcast address 10.127.255.255.
• Subnet 2 has its network address 10.128.0.0 with a subnet mask of 255.128.0.0. First usable IPv4
address is 10.128.0.1, second usable IPv4 address is 10.128.0.2, third usable IPv4 address is
10.128.0.3 ...... up to last usable IPv4 address 10.255.255.254 and the broadcast address
10.255.255.255.
Network layer. IP Addressing Part 1.pptx
Class A 2-bit subnetting tutorial
• If we include two bits to the network part from the host part in the
second octet, the default subnet mask of a Class A network 255.0.0.0
is changed into 255.192.0.0. The two bits added to the network part
from the host part can have four possible values in second octet of a
Class A network , 00, 01, 10, and 11.
• That means, we can get four networks if we do a 2-bit subnetting on
a Class A network. Ths subnet mask to use for Class A network 2-bit
subnetting is 255.192.0.0.
• Please refer below image.
Network layer. IP Addressing Part 1.pptx
SN No Description Binaries Decimal
1
Network Address
00001010.00000000.0000
0000.00000000
10.0.0.0
First IPv4 address 00001010.00000000.0000
0000.00000001
10.0.0.1
Last IPv4 address 00001010.00111111.1111
1111.11111110
10.63.255.254
Broadcast Address
00001010.00111111.1111
1111.11111111
10.63.255.255
2
Network Address
00001010.01000000.0000
0000.00000000
10.64.0.0
First IPv4 address 00001010.01000000.0000
0000.00000001
10.64.0.1
Last IPv4 address
00001010.01111111.1111
1111.11111110 10.127.255.254
Broadcast Address
00001010.01111111.1111
1111.11111111
10.127.255.255
3
Network Address
00001010.10000000.0000
0000.00000000
10.128.0.0
First IPv4 address
00001010.10000000.0000
0000.00000001 10.128.0.1
Last IPv4 address
00001010.10111111.1111
1111.11111110 10.191.255.254
Broadcast Address 00001010.10111111.1111
1111.11111111
10.191.255.255
4
Network Address
00001010.11000000.0000
0000.00000000 10.192.0.0
First IPv4 address
00001010.11000000.0000
0000.00000001
10.192.0.1
Last IPv4 address 00001010.11111111.1111
1111.11111110
10.255.255.254
Broadcast Address 00001010.11111111.1111
1111.11111111
10.255.255.255
Continue
• The network 10.0.0.0 is divided into four subnets, each subnet has
4,194,304 total IPv4 Addresses and 4,194,302 usable IPv4 Addresses.
Two IPv4 addresses are used in each subnet to represent the
network address and directed broadcast address (first and last IPv4
addresses in a subnet block). As mentioned in previous subnetting
tutorial lessons, you cannot use network address or
directed broadcast address as the IPv4 address for devices inside your
network. The subnet mask to use for 2-bit subnetting for a
Class A network is 255.192.0.0.
• Visualization of 2-bit subnetting of Class A network 10.0.0.0 with
subnet mask 255.192.0.0 is given below.
Network layer. IP Addressing Part 1.pptx
Class A 3-bit subnetting tutorial
• If we include three bits to the network part from the host part in the
second octet of a Class A network, the default subnet mask of a
Class A network 255.0.0.0 is changed into 255.224.0.0 The three bits
added to the network part from the host part in second octet can
have eight possible values. Those eight possible values are 000, 001,
010, and 011, 100, 101, 110 and 111.
• That means, we can get eight networks if we do a 3-bit subnetting on
a Class A network and the subnet mask to use for Class A network 3-
bit subnetting is 255.224.0.0.
• Please refer below image.
Network layer. IP Addressing Part 1.pptx
SN No Description Binaries Decimal
1
Network Address
00001010.00000000.
00000000.00000000 10.0.0.0
First IPv4 address 00001010.00000000.00000000
.00000001
10.0.0.1
Last IPv4 address 00001010.00011111.11111111
.11111110 10.31.255.254
Broadcast Address
00001010.00011111.11111111
.11111111 10.31.255.255
2
Network Address
00001010.00100000.00000000
.00000000
10.32.0.0
First IPv4 address
00001010.00100000.00000000
.00000001
10.32.0.1
Last IPv4 address 00001010.00111111.11111111
.11111110
10.63.255.254
Broadcast Address
00001010.00111111.11111111
.11111111 10.63.255.255
3
Network Address 00001010.01000000.00000000
.00000000
10.64.0.0
First IPv4 address
00001010.01000000.00000000
.00000001 10.64.0.1
Last IPv4 address
00001010.01011111.11111111
.11111110
10.95.255.254
Broadcast Address
00001010.01011111.11111111
.11111111
10.95.255.255
4
Network Address 00001010.01100000.00000000
.00000000
10.96.0.0
First IPv4 address 00001010.01100000.00000000
.00000001
10.96.0.1
Last IPv4 address
00001010.01111111.11111111
.11111110 10.127.255.254
Broadcast Address
00001010.01111111.11111111
.11111111
10.127.255.255
5
Network Address
00001010.10000000.00000000
.00000000
10.128.0.0
First IPv4 address 00001010.10000000.00000000
.00000001
10.128.0.1
Last IPv4 address
00001010.10011111.11111111
.11111110
10.159.255.254
Broadcast Address 00001010.10011111.11111111
.11111111
10.159.255.255
6
Network Address
00001010.10100000.00000000
.00000000 10.160.0.0
First IPv4 address
00001010.10100000.00000000
.00000001
10.160.0.1
Last IPv4 address
00001010.10111111.11111111
.11111110
10.191.255.254
Broadcast Address
00001010.10111111.11111111
.11111111
10.191.255.255
7
Network Address 00001010.11000000.00000000
.00000000
10.192.0.0
First IPv4 address
00001010.11000000.00000000
.00000001 10.192.0.1
Last IPv4 address
00001010.11011111.11111111
.11111110 10.223.255.254
Broadcast Address
00001010.11011111.11111111
.11111111
10.223.255.255
8
Network Address
00001010.11100000.00000000
.00000000
10.224.0.0
First IPv4 address
00001010.11100000.00000000
.00000001
10.224.0.1
00001010.11111111.11111111
Continue
• The network 10.0.0.0 is divided into eight subnets, each subnet has
2,097,152 total IPv4 Addresses and 2,097,150 usable IPv4 Addresses.
Two IPv4 addresses are used in each subnet to represent the
network address and directed broadcast address (first and last IPv4
addresses in a subnet block). As mentioned in previous subnetting
tutorial lessons, you cannot use network address or
directed broadcast address as the IPv4 address for devices inside your
network. The subnet mask to use for 3-bit subnetting for a
Class A network is 255.224.0.0.
• Visualization of 3-bit subnetting of Class A network 10.0.0.0 with
subnet mask 255.224.0.0 is given below.
Network layer. IP Addressing Part 1.pptx
Class A 4-bit subnetting tutorial
• If we include four bits to the network part from the host part in the
second octet, the default subnet mask of a Class A network 255.0.0.0
is changed to 255.240.0.0. The four bits added to the network part
from the host part, in the second octet, can have sixteen possible
values. Those sixteen possible values are 0000, 0001, 0010, 0011,
0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110
and 1111.
• That means, we get sixteen subnets if we do a 4-bit subnetting for a
Class A network.
• Please refer below image.
Network layer. IP Addressing Part 1.pptx
SN No Description Binaries Decimal
1
Network Address 00001010.00000000.0
0000000.00000000 10.0.0.0
First IP Address 00001010.00000000.0
0000000.00000001 10.0.0.1
Last IP Address 00001010.00001111.1
1111111.11111110 10.15.255.254
Broadcast Address 00001010.00001111.1
1111111.11111111 10.15.255.255
2
Network Address 00001010.00010000.0
0000000.00000000 10.16.0.0
First IP Address
00001010.00010000.0
0000000.00000001 10.16.0.1
Last IP Address
00001010.00011111.1
1111111.11111110 10.31.255.254
Broadcast Address
00001010.00011111.1
1111111.11111111 10.31.255.255
3
Network Address
00001010.00100000.0
0000000.00000000 10.32.0.0
First IP Address
00001010.00100000.0
0000000.00000001 10.32.0.1
Last IP Address
00001010.00101111.1
1111111.11111110 10.47.255.254
Broadcast Address
00001010.00101111.1
1111111.11111111 10.47.255.255
4
Network Address
00001010.00110000.0
0000000.00000000 10.48.0.0
First IP Address
00001010.00110000.0
0000000.00000001 10.48.0.1
Last IP Address
00001010.00111111.1
1111111.11111110 10.63.255.254
Broadcast Address 00001010.00111111.1
1111111.11111111
10.63.255.255
5
Network Address 00001010.01000000.0
0000000.00000000
10.64.0.0
First IP Address 00001010.01000000.0
0000000.00000001
10.64.0.1
Last IP Address 00001010.01001111.1
1111111.11111110
10.79.255.254
Broadcast Address 00001010.01001111.1
1111111.11111111
10.79.255.255
6
Network Address 00001010.01010000.0
0000000.00000000
10.80.0.0
First IP Address 00001010.01010000.0
0000000.00000001
10.80.0.1
Last IP Address 00001010.01011111.1
1111111.11111110
10.95.255.254
Broadcast Address 00001010.01011111.1
1111111.11111111
10.95.255.255
7
Network Address 00001010.01100000.0
0000000.00000000
10.96.0.0
First IP Address 00001010.01100000.0
0000000.00000001 10.96.0.1
Last IP Address 00001010.01101111.1
1111111.11111110 10.111.255.254
Broadcast Address 00001010.01101111.1
1111111.11111111 10.111.255.255
8
Network Address 00001010.01110000.0
0000000.00000000 10.112.0.0
First IP Address 00001010.01110000.0
0000000.00000001 10.112.0.1
Last IP Address 00001010.01111111.1
1111111.11111110 10.127.255.254
Broadcast Address 00001010.01111111.1
1111111.11111111 10.127.255.255
9
Network Address 00001010.10000000.0
0000000.00000000 10.128.0.0
First IP Address 00001010.10000000.0
0000000.00000001 10.128.0.1
Last IP Address 00001010.10001111.1
1111111.11111110
10.143.255.254
Broadcast Address 00001010.10001111.1
1111111.11111111
10.143.255.255
10
Network Address 00001010.10010000.0
0000000.00000000
10.144.0.0
First IP Address 00001010.10010000.0
0000000.00000001
10.144.0.1
Last IP Address 00001010.10011111.1
1111111.11111110
10.159.255.254
Broadcast Address 00001010.10011111.1
1111111.11111111
10.159.255.255
11
Network Address 00001010.10100000.0
0000000.00000000
10.160.0.0
First IP Address
00001010.10100000.0
0000000.00000001
10.160.0.1
Last IP Address
00001010.10101111.1
1111111.11111110
10.175.255.254
Broadcast Address
00001010.10101111.1
1111111.11111111
10.175.255.255
12
Network Address
00001010.10110000.0
0000000.00000000
10.176.0.0
First IP Address
00001010.10110000.0
0000000.00000001
10.176.0.1
Last IP Address
00001010.10111111.1
1111111.11111110
10.191.255.254
Broadcast Address
00001010.10111111.1
1111111.11111111
10.191.255.255
13
Network Address
00001010.11000000.0
0000000.00000000
10.192.0.0
First IP Address
00001010.11000000.0
0000000.00000001
10.192.0.1
Last IP Address
00001010.11001111.1
1111111.11111110
10.207.255.254
Broadcast Address 00001010.11001111.1
1111111.11111111
10.207.255.255
14
Network Address 00001010.11010000.0
0000000.00000000
10.208.0.0
First IP Address 00001010.11010000.0
0000000.00000001
10.208.0.1
Last IP Address 00001010.11011111.1
1111111.11111110
10.223.255.254
Broadcast Address 00001010.11011111.1
1111111.11111111
10.223.255.255
15
Network Address 00001010.11100000.0
0000000.00000000
10.224.0.0
First IP Address 00001010.11100000.0
0000000.00000001
10.224.0.1
Last IP Address 00001010.11101111.1
1111111.11111110
10.239.255.254
Broadcast Address 00001010.11101111.1
1111111.11111111
10.239.255.255
16
Network Address
00001010.11110000.0
0000000.00000000 10.240.0.0
First IP Address
00001010.11110000.0
0000000.00000001 10.240.0.1
Last IP Address
00001010.11111111.1
1111111.11111110 10.255.255.254
Broadcast Address
00001010.11111111.1
1111111.11111111 10.255.255.255
Subnet Bits Subnet Mask CIDR Total Subnets
Usable IP
Address/Subnet
0 255.0.0.0 /8 1 16777214
1 255.128.0.0 /9 2 8388606
2 255.192.0.0 /10 4 4194302
3 255.224.0.0 /11 8 2097150
4 255.240.0.0 /12 16 1048574
5 255.248.0.0 /13 32 524286
6 255.252.0.0 /14 64 262142
7 255.254.0.0 /15 128 131070
8 255.255.0.0 /16 256 65534
9 255.255.128.0 /17 512 32766
10 255.255.192.0 /18 1024 16382
11 255.255.224.0 /19 2048 8190
12 255.255.240.0 /20 4096 4094
13 255.255.248.0 /21 8192 2046
14 255.255.252.0 /22 16384 1022
15 255.255.254.0 /23 32768 510
16 255.255.255.0 /24 65536 254
17 255.255.255.128 /25 131072 126
18 255.255.255.192 /26 262144 62
19 255.255.255.224 /27 524288 30
20 255.255.255.240 /28 1048576 14
21 255.255.255.248 /29 2097152 6
22 255.255.255.252 /30 4194304 2
VLSM
VLSM
• Variable Length Subnet Masking (VLSM) is a way of further subnetting
a subnet. Using Variable Length Subnet Masking (VLSM) we can
allocate IPv4 addresses to the subnets by the exact need. Variable
Length Subnet Masking (VLSM) allows us to use more than one
subnet mask within the same network address space. If we recollect
from the previous lessons, we can divide a network only into subnets
with equal number of IPv4 addresses. Variable Length Subnet
Masking (VLSM) allows to create subnets from a single network with
unequal number of IPv4 addresses.
Example
• Example: We want to divide 192.168.10.0, which is a Class C network,
into four networks, each with unequal number of IPv4 addresses
requirements as shown below.
• Subnet A : 126 IPv4 Addresses.
Subnet B : 62 IPv4 Addresses.
Subnet C : 30 IPv4 Addresses.
Subnet D : 30 IPv4 Addresses
• Original Network (Network to be subnetted) – 192.168.10.0/24
Variable Length Subnet Masking (VLSM)- First
Division
• Divide the two networks equally with 128 IPv4 addresses (126 usable IPv4 addresses) in
each network using 255.255.255.128 subnet mask (192.168.10.0/25).
• We will get two subnets each with 128 IPv4 addresses (126 usable IPv4 addresses).
• 1) 192.168.10.0/25, which can be represented in binaries as below.
• 11000000.10101000.00001010.00000000
11111111.11111111.11111111.10000000
• 2) 192.168.10.128/25, which can be represented in binaries as below.
• 11000000.10101000.00001010.10000000
11111111.11111111.11111111.10000000
Variable Length Subnet Masking (VLSM)-
Second Division
• Divide second subnet (192.168.10.128/25) we got from the first division again into two
Networks, each with 64 IP Addresses (62 usable IPv4 addresses) using 255.255.255.192
subnet mask.
• We will get two subnets each with 64 IPv4 addresses (62 usable IPv4 addresses).
• 1) 192.168.10.128/26, which can be represented in binaries as below.
• 11000000.10101000.00001010.10000000
11111111.11111111.11111111.11000000
• 2) 192.168.10.192/26
• 11000000.10101000.00001010.11 000000
11111111.11111111.11111111.11000000
Variable Length Subnet Masking (VLSM)-
Third Division
• Divide 192.168.10.192/26 Network again into two Networks, each with 32
IPv4 addresses (30 usable IPv4 addresses) using 255.255.255.224 subnet mask
• We will get two subnets each with 32 IPv4 addresses (30 usable IPv4 addresses
).
• 1) 192.168.10.192/27, which can be represented in binaries as below.
• 11000000.10101000.00001010.11000000
11111111.11111111.11111111.11100000
• 2) 192.168.10.224/27, which can be represented in binaries as below.
• 11000000.10101000.00001010.11100000
11111111.11111111.11111111.11100000
Summary
• Now we have split the 192.168.10.0/24 network into four subnets using
Variable Length Subnet Masking (VLSM), with unequal number of
IPv4 addresses as shown below. Also note that when you divide a network
using Variable Length Subnet Masking (VLSM), the subnet mask are also
different.
• 1) 192.168.10.0 - 255.255.255.128 (126 (128-2) usable IPv4 addresses)
2) 192.168.10.128 - 255.255.255.192 (62 (64-2) usable IPv4 addresses)
3) 192.168.10.192 - 255.255.255.224 (30 (32-2) usable IPv4 addresses)
4) 192.168.10.224 - 255.255.255.224 (30 (32-2) usable IPv4 addresses)

More Related Content

PPTX
Lecture W4 CN IP Addressing P1.pptx
PPT
The network layer is a part of the internet communication process that sends ...
PPTX
chapter 6.pptx
PPT
IPv4 Address uploading.ppt
PPTX
Ch7 IP addressing.pptx
PPTX
Physical Layer and Levels of addressing in Network
PPT
Chap 04
PPTX
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...
Lecture W4 CN IP Addressing P1.pptx
The network layer is a part of the internet communication process that sends ...
chapter 6.pptx
IPv4 Address uploading.ppt
Ch7 IP addressing.pptx
Physical Layer and Levels of addressing in Network
Chap 04
6-LEC- 6.pptx Network Layer. Addressing Subnetting Mask (default and subnet) ...

Similar to Network layer. IP Addressing Part 1.pptx (20)

PPTX
Lesson 5a_IP Addressing.pptx
PPT
PDF
CSE 3202-Lecture-1B.pdfvbccvbcvbcvbvcbvcbcvb
PPTX
5 configuring TCP/IP
PPT
IPv4 Address, IPv6 Address and its types
PPTX
IP Address.pptx
PDF
Networking Brush Up for Amazon AWS Administrators
PPTX
data and addressing for internet having new
PPTX
Ip address presentation
PPTX
IP Addressing.pptx......................
PDF
Chapter_4 Network Layer-IP datagram and addressing.ppt.pdf
PPT
Classful_addressing_Class for IP Addressing
PPTX
IP ADDRESSING AND SUBNETING PRINCIPLES.pptx
PDF
Network layer logical addressing
PPTX
IP Address
PPT
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
PPTX
PPTX
Ipv4 presentation
PPT
IP Addressing.ppt Network layer IP addressing
Lesson 5a_IP Addressing.pptx
CSE 3202-Lecture-1B.pdfvbccvbcvbcvbvcbvcbcvb
5 configuring TCP/IP
IPv4 Address, IPv6 Address and its types
IP Address.pptx
Networking Brush Up for Amazon AWS Administrators
data and addressing for internet having new
Ip address presentation
IP Addressing.pptx......................
Chapter_4 Network Layer-IP datagram and addressing.ppt.pdf
Classful_addressing_Class for IP Addressing
IP ADDRESSING AND SUBNETING PRINCIPLES.pptx
Network layer logical addressing
IP Address
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
Ipv4 presentation
IP Addressing.ppt Network layer IP addressing
Ad

More from MujtabaVlogs (19)

PDF
Lecture 2 The Environment and Corporate Culture.pdf
PDF
Lecture 3 Managing Ethics and Social Responsibility.pdf
PDF
Lecture 1 Introduction to Mangement and Management thinking.pdf
PDF
L06-07 Software Design Requirements Basics.pdf
PDF
L08-09-10 Use cases - Use case Diagram- Expanded Use Cases.pdf
PDF
L13 L14 Software System Sequence Diagram.pdf
PPTX
Chapter 6 - Operating System Deadlock.pptx
PPTX
Chapter 5 - Operating Synchronization.pptx
PPTX
Week 12 Operating System Lectures lec 2.pptx
PPTX
Chapter 4 - Operating Systems Threads.pptx
PPTX
Chapter 3 - InterProcess Communication.pptx
PPTX
Chapter 3 - Operating System Scheduling.pptx
PPTX
Chapter 1 - Operating Systems Introduction.pptx
PPTX
Chapter 0 - Operating System Preliminaries.pptx
PPTX
Chapter 2 - Operating System Processes(1).pptx
PPT
Lec-4-2-Recurrence Relation-Iteration Method.ppt
PDF
CS3001-Computer-Networks-Ch3-Chapter-3.pdf
PPTX
CS3001_Computer_Networks_Chapter_2_v8.1.pptx
PPTX
CS3001_Computer_Networks_Chapter_1_v8.1.pptx
Lecture 2 The Environment and Corporate Culture.pdf
Lecture 3 Managing Ethics and Social Responsibility.pdf
Lecture 1 Introduction to Mangement and Management thinking.pdf
L06-07 Software Design Requirements Basics.pdf
L08-09-10 Use cases - Use case Diagram- Expanded Use Cases.pdf
L13 L14 Software System Sequence Diagram.pdf
Chapter 6 - Operating System Deadlock.pptx
Chapter 5 - Operating Synchronization.pptx
Week 12 Operating System Lectures lec 2.pptx
Chapter 4 - Operating Systems Threads.pptx
Chapter 3 - InterProcess Communication.pptx
Chapter 3 - Operating System Scheduling.pptx
Chapter 1 - Operating Systems Introduction.pptx
Chapter 0 - Operating System Preliminaries.pptx
Chapter 2 - Operating System Processes(1).pptx
Lec-4-2-Recurrence Relation-Iteration Method.ppt
CS3001-Computer-Networks-Ch3-Chapter-3.pdf
CS3001_Computer_Networks_Chapter_2_v8.1.pptx
CS3001_Computer_Networks_Chapter_1_v8.1.pptx
Ad

Recently uploaded (20)

PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PPTX
additive manufacturing of ss316l using mig welding
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
UNIT 4 Total Quality Management .pptx
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
Geodesy 1.pptx...............................................
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
Strings in CPP - Strings in C++ are sequences of characters used to store and...
additive manufacturing of ss316l using mig welding
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Foundation to blockchain - A guide to Blockchain Tech
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Embodied AI: Ushering in the Next Era of Intelligent Systems
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
UNIT 4 Total Quality Management .pptx
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Geodesy 1.pptx...............................................
Lesson 3_Tessellation.pptx finite Mathematics
Lecture Notes Electrical Wiring System Components
OOP with Java - Java Introduction (Basics)
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Internet of Things (IOT) - A guide to understanding
Arduino robotics embedded978-1-4302-3184-4.pdf

Network layer. IP Addressing Part 1.pptx

  • 1. Network layer: “data plane” roadmap • Network layer: overview • data plane • control plane • What’s inside a router • input ports, switching, output ports • buffer management, scheduling • IP: the Internet Protocol • datagram format • addressing • network address translation • IPv6  Generalized Forwarding, SDN • match+action • OpenFlow: match+action in action  Middleboxes Network Layer: 4-1
  • 2. Network Layer: Internet host, router network layer functions: IP protocol • datagram format • addressing • packet handling conventions ICMP protocol • error reporting • router “signaling” transport layer: TCP, UDP link layer physical layer network layer forwarding table Path-selection algorithms: implemented in • routing protocols (OSPF, BGP) • SDN controller Network Layer: 4-2
  • 5. IP Datagram format ver length 32 bits payload data (variable length, typically a TCP or UDP segment) 16-bit identifier header checksum time to live source IP address head. len type of service flgs fragment offset upper layer destination IP address options (if any) IP protocol version number header length(bytes) upper layer protocol (e.g., TCP or UDP) total datagram length (bytes) “type” of service:  diffserv (0:5)  ECN (6:7) fragmentation/ reassembly TTL: remaining max hops (decremented at each router)  20 bytes of TCP  20 bytes of IP  = 40 bytes + app layer overhead for TCP+IP overhead e.g., timestamp, record route taken 32-bit source IP address 32-bit destination IP address header checksum Maximum length: 64K bytes Typically: 1500 bytes or less Network Layer: 4-5
  • 6. IP Header… 1.Version: Specifies the IP protocol version (IPv4 or IPv6). 2.Header Length: Indicates the size of the header (in 32-bit words). 3.Type of Service (ToS): Defines quality of service parameters. 4.Total Length: Indicates the entire packet size (header + data). 5.Identification: Helps reassemble fragmented packets. 6.Flags: Control fragmentation behavior (e.g., fragmentation and reassembly). 7.Fragment Offset: Identifies a fragment's position in the original packet. 8.Time-to-Live (TTL): Limits a packet's lifespan to prevent infinite loops. 9.Protocol: Specifies the higher-layer protocol (TCP, UDP, ICMP, etc.). 10. Header Checksum: Ensures header integrity during transmission. 11. Source IP Address: Originating IP address. 12. Destination IP Address: Recipient IP address.
  • 8. OBJECTIVES:  To introduce the concept of an address space in general and the address space of IPv4 in particular.  To discuss the classful architecture and the blocks of addresses available in each class.  To discuss the idea of hierarchical addressing and how it has been implemented in classful addressing.  To explain subnetting and super-netting.  To discuss classless addressing, that has been devised to solve the problems in classful addressing.  To discuss some special blocks and some special addresses in each block.  To discuss NAT technology and show how it can be used to alleviate of address depletion.
  • 9. Outline Introduction Classful Addressing Classless Addressing Special Addresses NAT
  • 10. INTRODUCTION The identifier used in the IP/Network layer of the TCP/IP protocol suite to identify each device connected to the Internet is called the Internet address or IP address. An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a host or a router to the Internet; an IP address is the address of the interface.
  • 11. An IPv4 address is 32 bits long. The IPv4 addresses are unique and universal.
  • 12. Address Space An address space is the total number of addresses used by the protocol. If a protocol uses b bits to define an address, the address space is 2b because each bit can have two different values (0 or 1). IPv4 uses 32-bits to make address space.
  • 13. How many? • For IPv4, this pool is 32-bits (232) in size and contains 4,294,967,296 IPv4 addresses. • The IPv6 address space is 128-bits (2128) in size, containing 340,282,366,920,938,463,463,374,607,431,768,211,456 IPv6 addresse s
  • 14. Notation There are three common notations to show an IPv4 address: binary notation (base 2) dotted-decimal notation (base 256)(0 to 255) hexadecimal notation (base 16)
  • 15. Binary Notation: Base 2 an IPv4 address is displayed as 32 bits 01110101 10010101 00011101 11101010
  • 16. Dotted-Decimal Notation: Base 256 To make the IPv4 address more compact and easier to read, an IPv4 address is usually written in decimal form with a decimal point (dot) separating the bytes
  • 17. 18.17 Figure 18.16: Three different notations in IPv4 addressing
  • 19. Change the following IP addresses from binary notation to dotted-decimal notation. a. 10000001 00001011 00001011 11101111 b. 11000001 10000011 00011011 11111111 c. 11100111 11011011 10001011 01101111 d. 11111001 10011011 11111011 00001111 Example 1
  • 20. Change the following IP addresses from binary notation to dotted-decimal notation. a. 10000001 00001011 00001011 11101111 b. 11000001 10000011 00011011 11111111 c. 11100111 11011011 10001011 01101111 d. 11111001 10011011 11111011 00001111 Example 1
  • 21. Change the following IP addresses from binary notation to dotted-decimal notation. a. 10000001 00001011 00001011 11101111 b. 11000001 10000011 00011011 11111111 c. 11100111 11011011 10001011 01101111 d. 11111001 10011011 11111011 00001111 Example 1 Solution We replace each group of 8 bits with its equivalent decimal number and add dots for separation: a. 129.11.11.239 b. 193.131.27.255 c. 231.219.139.111 d. 249.155.251.15
  • 22. Change the following IP addresses from dotted-decimal notation to binary notation. a. 111.56.45.78 b. 221.34.7.82 c. 241.8.56.12 d. 75.45.34.78 Example 2
  • 23. Change the following IP addresses from dotted-decimal notation to binary notation. a. 111.56.45.78 b. 221.34.7.82 c. 241.8.56.12 d. 75.45.34.78 Example 2 Solution We replace each decimal number with its binary equivalent: a. 01101111 00111000 00101101 01001110 b. 11011101 00100010 00000111 01010010 c. 11110001 00001000 00111000 00001100 d. 01001011 00101101 00100010 01001110
  • 24. Change the following IP addresses from binary notation to hexadecimal notation. a. 10000001 00001011 00001011 11101111 b. 11000001 10000011 00011011 11111111 Example 3
  • 25. Change the following IP addresses from binary notation to hexadecimal notation. a. 10000001 00001011 00001011 11101111 b. 11000001 10000011 00011011 11111111 Example 3 Solution We replace each group of 4 bits with its hexadecimal equivalent. Note that hexadecimal notation normally has no added spaces or dots; however, 0X (or 0x) is added at the beginning or the subscript 16 at the end to show that the number is in hexadecimal. a. 0X810B0BEF or 810B0BEF16 b. 0XC1831BFF or C1831BFF16
  • 26. Types Of IP Address Static IP Address Static IP Address is an IP Address that once assigned to a network element always remains the same. They are configured manually. Dynamic IP Address Dynamic IP Address is a temporarily assigned IP Address to a network element. It can be assigned to a different device if it is not in use.
  • 27. Classification Of IP Addresses
  • 28. CLASSFUL ADDRESSING IP addresses, when started a few decades ago, used the concept of classes. This architecture is called classful addressing. In the mid-1990s, a new architecture, called classless addressing, was introduced that supersedes the original architecture. In this section, we introduce classful addressing because it paves the way for understanding classless addressing and justifies the rationale for moving to the new architecture.
  • 29. Classes  The IP address space is divided into five classes: A, B, C, D, and E.  Each class occupies some part of the whole address space.
  • 30. Recognizing Classes To find the class of an address - in the binary notation, the first few bits ... in the dotted-decimal notation, the value of the first byte ...
  • 31. Figure Finding the class of address 1 Class: A 0 Start 1 0 Class: B 1 0 Class: C 1 0 Class: D Class: E XXX 239
  • 32. Netid and Hostid  IP address in classes A, B, and C is divided into Netid and Hostid.  These parts are of varying lengths, depending on the class of the address.
  • 33. Find the class of each address: a. 00000001 00001011 00001011 11101111 b. 11000001 10000011 00011011 11111111 c. 10100111 11011011 10001011 01101111 d. 11110011 10011011 11111011 00001111 Example 5
  • 34. Find the class of each address: a. 00000001 00001011 00001011 11101111 b. 11000001 10000011 00011011 11111111 c. 10100111 11011011 10001011 01101111 d. 11110011 10011011 11111011 00001111 Example 5 Solution a. The first bit is 0. This is a class A address. b. The first 2 bits are 1; the third bit is 0. This is a class C address. c. The first bit is 0; the second bit is 1. This is a class B address. d. The first 4 bits are 1s. This is a class E address..
  • 35. Find the class of each address: a. 227.12.14.87 b.193.14.56.22 c.14.23.120.8 d. 252.5.15.111 e.134.11.78.56 Example 6
  • 36. Find the class of each address: a. 227.12.14.87 b.193.14.56.22 c.14.23.120.8 d. 252.5.15.111 e.134.11.78.56 Example 6 Solution a. The first byte is 227 (between 224 and 239); the class is D. b. The first byte is 193 (between 192 and 223); the class is C. c. The first byte is 14 (between 0 and 127); the class is A. d. The first byte is 252 (between 240 and 255); the class is E. e. The first byte is 134 (between 128 and 191); the class is B.
  • 37. Classes and Blocks One problem with classful addressing  Each class is divided into a fixed number of blocks with each block having a fixed size. Class A 00000000-01111111 [0 -127] Number of blocks (Networks) in class A is 27 = 128 blocks. Each block can be assigned to one organization. Each block contains 224 =16,777,216 addresses ( Hosts).
  • 38. Figure Blocks in Class A
  • 40. Subnet Mask • A subnet mask is a 32-bit number (often represented in dotted decimal notation like an IP address) used to divide an IP address into network and host portions. It is made up of ones (1 network) and zeroes (0) and determines the size of the network by indicating which part of the IP address is the network portion and which part is the host portion.
  • 41. • Let's take an IPv4 address and its corresponding subnet mask: • IPv4 Address: 100.168.1.100 • Subnet Mask: 255.0.0.0 In binary form: • IPv4 Address: 01100100.10101000.00000001.01100100 • Subnet Mask: 11111111. 00000000.00000000.00000000
  • 42. Calculation • So total number of addresses in Class A = No. of Blocks in Class A x No. of Hosts in each block of Class A • = 128 x 16,777,216 • = 2,147,483,648 • This is 50% of the total addresses in IPv4. Calculation
  • 43. Millions of class A addresses are wasted. Uses: Class A is used by organizations requiring very large size networks like Google, Bing, Yahoo etc
  • 44. Class B Number of blocks in class B is 214 = 16,384. Each block can be assigned to one organizations. Each block contains 65,536 addresses.
  • 45. Figure Blocks in Class B
  • 46. Calculation • Therefore total number of blocks in Class B = 214 = 16,384 • There are 2 bytes (16 bits) for hostid in Class B so total number of host in each block = 216 = 65,536 • So total number of addresses in Class B = No. of Blocks in Class B x No. of Hosts in each block of Class B • = 16,384 x 65,536 • = 1,073,741,824 • This is 25% of the total addresses in IPv4.
  • 47. Many class B addresses are wasted. Note
  • 49. Class C 11000000 – 11011111 [192  223] Number of blocks (Networks) in class C is 221 = 2,097,152. Each block contains 256 addresses (Hosts).
  • 50. Not so many organizations are so small to have a class C block. Use: Class C is used by organizations requiring small to medium size networks. For example- engineering colleges, small universities, small offices etc.
  • 51. Calculation • Therefore total number of blocks in Class C = 221 = 2,097,152 • There is 1 byte (8 bits) for hostid in Class C so total number of host in each block = 28 = 256 • So total number of addresses in Class C = No. of Blocks in Class C x No. of Hosts in each block of Class C • = 2,097,152 x 256 • = 536,870,912 • This is 12.5% of the total addresses in IPv4.
  • 52. Netid 192.0.0 … Netid 192.0.1 Netid 223.255.255 Class C 192.0.0.0 to 192.0.0.255 192.0.1.0 to 192.0.1.255 223.255.255.0 to 223.255.255.255 11011111.11111111.1111111 1.11111111 Block 1 Block 2 Block 2,097,152
  • 54. Class D 11100000  11101111 [224  239] Only one block of class D addresses, designed for multicasting Each address in this class is used to define one group of hosts on the Internet.
  • 55. netid or hostid • For a class D address, there is no netid or hostid. All class D addresses are reserved for multicasting. • In class D addresses, the first 4 bits are always 1110 (224). • The remaining 28 bits are used to define multicast addresses. Class D 224.0.0.0 to 239.255.255.255 Single block of 268,435,456 addresses
  • 56. The only block of class E addresses was reserved for future purposes. Class E 11110000  11111111= [240  255]
  • 57. netid or hostid • For a class E address, there is no netid or hostid. All class E addresses are reserved for special uses. • In practical terms, Class E addresses are not utilized in traditional networking and are kept reserved for potential future uses, research, or experimental purposes that may arise within networking or related fields. Class E 240.0.0.0 to 255.255.255.255 Single block of 268,435,456 addresses
  • 58. a) Find the class of each address: b) 00000001 00001011 00001011 11101111 c) The first bit is 0. This is a class A address. d) 11000001 10000011 00011011 11111111 e) The first 2 bits are 1; the third bit is 0. This is a class C address. f) 10100111 11011011 10001011 01101111 g) The first bit is 1; the second bit is 0. This is a class B address h) 11110011 10011011 11111011 00001111 i) The first 4 bits are 1s. This is a class E address.. Example
  • 59. Find the class of each address: a. 227.12.14.87 b.193.14.56.22 c.14.23.120.8 d. 252.5.15.111 e.134.11.78.56 Example
  • 60. Example Solution a. The first byte is 227 (between 224 and 239); the class is D. b. The first byte is 193 (between 192 and 223); the class is C. c. The first byte is 14 (between 0 and 127); the class is A. d. The first byte is 252 (between 240 and 255); the class is E. e. The first byte is 134 (between 128 and 191); the class is B. Find the class of each address: a. 227.12.14.87 b.193.14.56.22 c.14.23.120.8 d. 252.5.15.111 e.134.11.78.56
  • 62. Two-Level Addressing When classful addressing was designed, it was assumed that the whole Internet is divided into many networks and each network connects many hosts. That is, the Internet was seen as a network of networks. A network was normally created by an organization that wanted to be connected to the Internet.
  • 63. The range of addresses allocated to an organization in classful addressing was a block of addresses in Class A, B, or C.
  • 64. Since all addresses in a network belonged to a single block, each address in classful addressing contains two parts: netid and hostid.
  • 65. Figure Two-level addressing in classful addressing
  • 66. Extracting Information in a Block Given any address in the block, we normally like to know: - the number of addresses - the first address - the last address. For this, we need to know the class of the address.
  • 67. 1. The number of addresses in the block, N = 232−n . 2. To find the first address: keep the n leftmost bits and set the (32 − n) rightmost bits to 0. 3. To find the last address: keep the n leftmost bits and set the (32 − n) rightmost bits to 1s.
  • 68. Figure Information extraction in classful addressing netid First address 000 ... 0
  • 69. An address in a block is given as 73.22.17.25. Find the number of addresses in the block, the first address, and the last address. Solution 1. The number of addresses in this block is N = 232−n = 16,777,216. 2. To find the first address, we keep the leftmost 8 bits and set the rightmost 24 bits all to 0s. The first address is 73.0.0.0/8, in which 8 is the value of n. 3. To find the last address, we keep the leftmost 8 bits and set the rightmost 24 bits all to 1s. The last address is 73.255.255.255. Example 7
  • 70. Figure Solution to Example 7
  • 71. An address in a block is given as 180.8.17.9. Find the number of addresses in the block, the first address, and the last address. Solution 1. The number of addresses in this block is N = 232−n = 65,536. 2. To find the first address, we keep the leftmost 16 bits and set the rightmost 16 bits all to 0s. The first address is 18.8.0.0/16, in which 16 is the value of n. 3. To find the last address, we keep the leftmost 16 bits and set the rightmost 16 bits all to 1s. The last address is 18.8.255.255. Example 8
  • 72. Figure Solution to Example 8
  • 73. An address in a block is given as 200.11.8.45. Find the number of addresses in the block, the first address, and the last address. Solution 1. The number of addresses in this block is N = 232−n = 256. 2. To find the first address, we keep the leftmost 24 bits and set the rightmost 8 bits all to 0s. The first address is 200.11.8.0/24, in which 24 is the value of n. 3. To find the last address, we keep the leftmost 24 bits and set the rightmost 8 bits all to 1s. The last address is 200.11.8.255/24. Example 9
  • 74. Figure Solution to Example 9
  • 75. Given the network address 17.0.0.0, find the class, the block, and the range of the addresses. Example 10
  • 76. Given the network address 17.0.0.0, find the class, the block, and the range of the addresses. Example 10 •Solution The class is A because the first byte is between 0 and 127. The block has a netid of 17. The addresses range from 17.0.0.0 to 17.255.255.255.
  • 77. Example 11 • Given the network address 132.21.0.0, find the class, the block, and the range of addresses.
  • 78. Example 11 • Given the network address 132.21.0.0, find the class, the block, and the range of addresses. Solution • The class is B, the block is 132.21, and the range is 132.21.0.0 to 132.21.255.255
  • 79. Example 12 • Given the network address 220.34.76.0, find the class, the block, and the range of addresses
  • 80. Example 12 • Given the network address 220.34.76.0, find the class, the block, and the range of addresses Solution • The class is C, the block is 220.34.76, and the range of addresses is 220.34.76.0 to 220.34.76.255
  • 81. Network Address - the first address of a block - used in routing a packet to its destination network.
  • 82. The network address is the identifier of a network. Note
  • 83. Given the address 23.56.7.91, find the beginning address (network address). Example 13
  • 84. Given the address 23.56.7.91, find the beginning address (network address). Example 13 Solution The default mask is 255.0.0.0, which means that only the first byte is preserved and the other 3 bytes are set to 0s. The network address is 23.0.0.0.
  • 85. Given the address 132.6.17.85, find the beginning address (network address). Example 14
  • 86. Given the address 132.6.17.85, find the beginning address (network address). Example 14 Solution The default mask is 255.255.0.0, which means that the first 2 bytes are preserved and the other 2 bytes are set to 0s. The network address is 132.6.0.0.
  • 87. Given the address 201.180.56.5, find the beginning address (network address). Example 15
  • 88. Given the address 201.180.56.5, find the beginning address (network address). Example 15 Solution The default mask is 255.255.255.0, which means that the first 3 bytes are preserved and the last byte is set to 0. The network address is 201.180.56.0.
  • 89. Subnetting A subnet, or subnetwork, is a network inside a network. Subnets make networks more efficient. Through subnetting, network traffic can travel a shorter distance without passing through unnecessary routers to reach its destination.
  • 90. Def • One goal of a subnet is to split a large network into a grouping of smaller, interconnected networks to help minimize traffic. This way, traffic doesn't have to flow through unnecessary routs, increasing network speeds. Subnetting, the segmentation of a network address space, improves address allocation efficiency.
  • 92. Class C Subnetting Tutorial • Subnetting is done by taking the bit/s from host part and adding it to the network part. Consider the same Class C example given above. Remember, the first three octets of a Class C network is used to represent the network and the last octet is used to represent the host. The default format for a Class C IPv4 address is Network.Network.Network.Host.
  • 93. To make things easy, you may remember this. • If all the bits in the host part are "0", that represents the network id. • If all the bits in the host part are "0" except the last bit, it is the first usable IPv4 address. • If all the bits in the host part are "1" except the last bit, it is the last usable IPv4 address. • If all the bits in the host part are "1", that represents the broadcast address.
  • 94. Class C 1-bit subnetting tutorial • Let us try to visualize the unsubnetted Class C network 192.168.10.0 with default subnet mask 255.255.255.0 using below image. Network address is 192.168.10.0, first usable IPv4 address is 192.168.10.1, second usable IPv4 address is 192.168.10.2, third usable IPv4 address is 192.168.10.3 ...... up to last usable IPv4 address 192.168.10.254 and the broadcast address 192.168.10.255.
  • 96. Continue • Consider the example of Class C network 192.168.10.0 255.255.255.0, we discussed above. If we include one bit from the host part to the network part in the last octet, the default subnet mask of Class C network 255.255.255.0 is changed into 255.255.255.128. The single bit that is added to the network part from the host part, in the last octet, can have two possible values. Those two possible values are either 0 or 1. • That means, we can get two subnets if we do a single bit subnetting for a Class C network.
  • 98. SN No Description Binaries Decimal 1 Network Address 11000000.10101000.0000101 0.00000000 192.168.10.0 First IPv4 address 11000000.10101000.0000101 0.00000001 192.168.10.1 Last IPv4 address 11000000.10101000.0000101 0.01111110 192.168.10.126 Broadcast Address 11000000.10101000.0000101 0.01111111 192.168.10.127 2 Network Address 11000000.10101000.0000101 0.10000000 192.168.10.128 First IPv4 address 11000000.10101000.0000101 0.10000001 192.168.10.129 Last IPv4 address 11000000.10101000.0000101 0.11111110 192.168.10.254 Broadcast Address 11000000.10101000.0000101 0.11111111 192.168.10.255
  • 99. Summary • The network 192.168.10.0 is divided into two subnets, each subnet has 128 total IPv4 addresses and 126 usable IPv4 addresses. Two IPv4 addresses are used in each subnet to represent the network address and the directed broadcast address. The subnet mask for 1-bit subnetting for a Class C network is 255.255.255.128.
  • 100. Visualization • Subnet 1 has its network address 192.168.10.0 with a subnet mask of 255.255.255.128. First usable IPv4 address is 192.168.10.1, second usable IPv4 address is 192.168.10.2, third usable IPv4 address is 192.168.10.3 ...... up to last usable IPv4 address 192.168.10.126 and the broadcast address 192.168.10.127. • Subnet 2 has its network address 192.168.10.128 with a subnet mask of 255.255.255.128. First usable IPv4 address is 192.168.10.129, second usable IPv4 address is 192.168.10.130, third usable IPv4 address is 192.168.10.131 ...... up to last usable IPv4 address 192.168.10.254 and the broadcast address 192.168.10.255.
  • 104. Class C 2-bit subnetting tutorial
  • 105. SN No Description Binaries Decimal 1 Network Address 11000000.10101000.00001010.00000000 192.168.10.0 First IPv4 address 11000000.10101000.00001010.00000001 192.168.10.1 Last IPv4 address 11000000.10101000.00001010.00111110 192.168.10.62 Broadcast Address 11000000.10101000.00001010.00111111 192.168.10.63 2 Network Address 11000000.10101000.00001010.01000000 192.168.10.64 First IPv4 address 11000000.10101000.00001010.01000001 192.168.10.65 Last IPv4 address 11000000.10101000.00001010.01111110 192.168.10.126 Broadcast Address 11000000.10101000.00001010.01111111 192.168.10.127 3 Network Address 11000000.10101000.00001010.10000000 192.168.10.128 First IPv4 address 11000000.10101000.00001010.10000001 192.168.10.129 Last IPv4 address 11000000.10101000.00001010.10111110 192.168.10.190 Broadcast Address 11000000.10101000.00001010.10111111 192.168.10.191 4 Network Address 11000000.10101000.00001010.11000000 192.168.10.192 First IPv4 address 11000000.10101000.00001010.11000001 192.168.10.193 Last IPv4 address 11000000.10101000.00001010.11111110 192.168.10.254 Broadcast Address 11000000.10101000.00001010.11111111 192.168.10.255
  • 106. Expl • The network 192.168.10.0 is divided into four subnets, each subnet has 64 total IPv4 addresses and 62 usable IPv4 addresses. Two IPv4 addresses are used in each subnet to represent the network address and the directed broadcast address. The subnet mask for 2-bit subnetting for a Class C network is 255.255.255.192. • Visualization of 2-bit subnetting of Class C network 192.168.10.0 with subnet mask 255.255.255.192 is given below.
  • 108. Class C 3-bit subnetting tutorial • If we include three bits from the host part to the network part in last octet, the default subnet mask of Class C network 255.255.255.0 is changed into 255.255.255.224. The three bits added to the network part from the host part in the last octet can have eight possible values. Those eight possible values are 000, 001, 010, 011, 100, 101, 110 and 111.
  • 110. SN No Description Binaries Decimal 1 Network Address 11000000.10101000.00001010.00000000 192.168.10.0 First IPv4 address 11000000.10101000.00001010.00000001 192.168.10.1 Last IPv4 address 11000000.10101000.00001010.00011110 192.168.10.30 Broadcast Address 11000000.10101000.00001010.00011111 192.168.10.31 2 Network Address 11000000.10101000.00001010.00100000 192.168.10.32 First IPv4 address 11000000.10101000.00001010.00100001 192.168.10.33 Last IPv4 address 11000000.10101000.00001010.00111110 192.168.10.62 Broadcast Address 11000000.10101000.00001010.00111111 192.168.10.63 3 Network Address 11000000.10101000.00001010.01000000 192.168.10.64 First IPv4 address 11000000.10101000.00001010.01000001 192.168.10.65 Last IPv4 address 11000000.10101000.00001010.01011110 192.168.10.94 Broadcast Address 11000000.10101000.00001010.01011111 192.168.10.95 4 Network Address 11000000.10101000.00001010.01100000 192.168.10.96 First IPv4 address 11000000.10101000.00001010.01100001 192.168.10.97 Last IPv4 address 11000000.10101000.00001010.01111110 192.168.10.126 Broadcast Address 11000000.10101000.00001010.01111111 192.168.10.127 5 Network Address 11000000.10101000.00001010.10000000 192.168.10.128 First IPv4 address 11000000.10101000.00001010.10000001 192.168.10.129 Last IPv4 address 11000000.10101000.00001010.10011110 192.168.10.158 Broadcast Address 11000000.10101000.00001010.10011111 192.168.10.159 6 Network Address 11000000.10101000.00001010.10100000 192.168.10.160 First IPv4 address 11000000.10101000.00001010.10100001 192.168.10.161 Last IPv4 address 11000000.10101000.00001010.10111110 192.168.10.190 Broadcast Address 11000000.10101000.00001010.10111111 192.168.10.191 7 Network Address 11000000.10101000.00001010.11000000 192.168.10.192 First IPv4 address 11000000.10101000.00001010.11000001 192.168.10.193 Last IPv4 address 11000000.10101000.00001010.11011110 192.168.10.222 Broadcast Address 11000000.10101000.00001010.11011111 192.168.10.223 8 Network Address 11000000.10101000.00001010.11100000 192.168.10.224 First IPv4 address 11000000.10101000.00001010.11100001 192.168.10.225 Last IPv4 address 11000000.10101000.00001010.11111110 192.168.10.254 Broadcast Address 11000000.10101000.00001010.11111111 192.168.10.255
  • 112. Class C 4-bit subnetting
  • 113. Subnet Bits Subnet Mask CIDR Total Subnets Usable IPs/Subnet 0 255.255.255.0 /24 1 254 1 255.255.255.128 /25 2 126 2 255.255.255.192 /26 4 62 3 255.255.255.224 /27 8 30 4 255.255.255.240 /28 16 14 5 255.255.255.248 /29 32 6 6 255.255.255.252 /30 64 2
  • 114. Class B • Let us try to visualize the unsubnetted Class B network 172.16.0.0 with default subnet mask 255.255.0.0 using below image. Network address is 172.16.0.0, first usable IPv4 address is 172.16.0.1, second usable IPv4 address is 172.16.0.2, third usable IPv4 address is 172.16.0.3 ...... up to last usable IPv4 address 172.16.255.254 and the broadcast address 172.16.255.255.
  • 116. Class B Subnetting Remember, the first two octets of a Class B network is used to represent the network and the last two octets are used to represent a host within that network. The default format for a Class B IPv4 address is Network.Network.Host.Host. Let us consider an example of Class B network 172.16.0.0 - 255.255.0.0. The binary representation of the above network and its subnet mask are shown in below table.
  • 117. Component Binary Decimal Address Part 10101100.00010000.00000000.00000 000 172.16.0.0 SN Mask 11111111.11111111.00000000.00000 000 255.255.0.0
  • 118. Points • Once again, • If all the bits in the host part are "0", that represents the network address. • If all the bits in the host part are "0" except the last bit, it is the first usable IPv4 address. • If all the bits in the host part are "1" except the last bit, it is the last usable IPv4 address. • If all the bits in the host part are "1", that represents the directed broadcast address.
  • 119. Class B 1-bit subnetting tutorial • If we include one bit from the host part to the network part in the third octet, the default subnet mask of Class B network 255.255.0.0 is changed into 255.255.128.0. The single bit added to network part from host part in the third octet can have two possible values in third octet, either 0 or 1. • That means, we can get two subnets if we do a single bit subnetting on a Class B network.
  • 121. SN No Description Binaries Decimal 1 Network Address 10101100.00010000.00000 000.00000000 172.16.0.0 First IPv4 address 10101100.00010000.00000 000.00000001 172.16.0.1 Last IPv4 address 10101100.00010000.01111 111.11111110 172.16.127.254 Broadcast Address 10101100.00010000.01111 111.11111111 172.16.127.255 2 Network Address 10101100.00010000.10000 000.00000000 172.16.128.0 First IPv4 address 10101100.00010000.10000 000.00000001 172.16.128.1 Last IPv4 address 10101100.00010000.11111 111.11111110 172.16.255.254 Broadcast Address 10101100.00010000.11111 111.11111111 172.16.255.255
  • 122. Explanation • The network 172.16.0.0 is divided into two subnets, each subnet has 32,768 total IPv4 addresses and 32,766 usable IPv4 addresses. Two IPv4 addresses are used in each subnet to represent the network address and directed broadcast address (first and last IPv4 addresses in a subnet block). As mentioned earlier in this lesson, you cannot use network address or directed broadcast address as the IPv4 address for devices inside your network. The subnet mask to use for 1-bit subnetting for a Class B network is 255.255.128.0. • Visualization of 1-bit subnetting of Class B network 172.16.0.0 with subnet mask 255.255.128.0 is given below. • Subnet 1 has its network address 172.16.0.0 with a subnet mask of 255.255.128.0. First usable IPv4 address is 172.16.0.1, second usable IPv4 address is 172.16.0.2, third usable IPv4 address is 172.16.0.3 ...... up to last usable IPv4 address 172.16.127.254 and the broadcast address 172.16.127.255. • Subnet 2 has its network address 172.16.128.0 with a subnet mask of 255.255.128.0. First usable IPv4 address is 172.16.128.1, second usable IPv4 address is 172.16.128.2, third usable IPv4 address is 172.16.128.3 ...... up to last usable IPv4 address 172.16.255.254 and the broadcast address 172.16.255.255.
  • 124. Class B 2-bit subnetting tutorial If we include two bits from the host part to the network part in the third octet, the default subnet mask of Class B network 255.255.0.0 is changed into 255.255.192.0. The two bits added to network part from host part can have four possible values in third octet, 00, 01, 10, and 11. That means, we can get four networks if we do a 2-bit subnetting on a Class B network
  • 126. SN No Description Binaries Decimal 1 Network Address 10101100.00010000.00000000.00000000 172.16.0.0 First IPv4 address 10101100.00010000.00000000.00000001 172.16.0.1 Last IPv4 address 10101100.00010000.00111111.11111110 172.16.63.254 Broadcast Address 10101100.00010000.00111111.11111111 172.16.63.255 2 Network Address 10101100.00010000.01000000.00000000 172.16.64.0 First IPv4 address 10101100.00010000.01000000.00000001 172.16.64.1 Last IPv4 address 10101100.00010000.01111111.11111110 172.16.127.254 Broadcast Address 10101100.00010000.01111111.11111111 172.16.127.255 3 Network Address 10101100.00010000.10000000.00000000 172.16.128.0 First IPv4 address 10101100.00010000.10000000.00000001 172.16.128.1 Last IPv4 address 10101100.00010000.10111111.11111110 172.16.191.254 Broadcast Address 10101100.00010000.10111111.11111111 172.16.191.255 4 Network Address 10101100.00010000.11000000.00000000 172.16.192.0 First IPv4 address 10101100.00010000.11000000.00000001 172.16.192.1 Last IPv4 address 10101100.00010000.11111111.11111110 172.16.255.254 Broadcast Address 10101100.00010000.11111111.11111111 172.16.255.255
  • 128. Class B 3-bit subnetting tutorial • If we include three bits to the network part from the host part, the default subnet mask of Class B network 255.255.0.0 is changed into 255.255.224.0. The three bits added to network part can have eight possible values in the third octet. Those eight possible values are 000, 001, 010, 011, 100, 101, 110 and 111. • That means, we can get eight networks if we do a 3-bit subnetting on a Class B network.
  • 130. SN No Description Binaries Decimal 1 Network Address 10101100.00010000.00000000.00000000 172.16.0.0 First IPv4 address 10101100.00010000.00000000.00000001 172.16.0.1 Last IPv4 address 10101100.00010000.00011111.11111110 172.16.31.254 Broadcast Address 10101100.00010000.00011111.11111111 172.16.31.255 2 Network Address 10101100.00010000.00100000.00000000 172.16.32.0 First IPv4 address 10101100.00010000.00100000.00000001 172.16.32.1 Last IPv4 address 10101100.00010000.00111111.11111110 172.16.63.254 Broadcast Address 10101100.00010000.00111111.11111111 172.16.63.255 3 Network Address 10101100.00010000.01000000.00000000 172.16.64.0 First IPv4 address 10101100.00010000.01000000.00000001 172.16.64.1 Last IPv4 address 10101100.00010000.01011111.11111110 172.16.95.254 Broadcast Address 10101100.00010000.01011111.11111111 172.16.95.255 4 Network Address 10101100.00010000.01100000.00000000 172.16.96.0 First IPv4 address 10101100.00010000.01100000.00000001 172.16.96.1 Last IPv4 address 10101100.00010000.01111111.11111110 172.16.127.254 Broadcast Address 10101100.00010000.01111111.11111111 172.16.127.255 5 Network Address 10101100.00010000.10000000.00000000 172.16.128.0 First IPv4 address 10101100.00010000.10000000.00000001 172.16.128.1 Last IPv4 address 10101100.00010000.10011111.11111110 172.16.159.254 Broadcast Address 10101100.00010000.10011111.11111111 172.16.159.255 6 Network Address 10101100.00010000.10100000.00000000 172.16.160.0 First IPv4 address 10101100.00010000.10100000.00000001 172.16.160.1 Last IPv4 address 10101100.00010000.10111111.11111110 172.16.191.254 Broadcast Address 10101100.00010000.10111111.11111111 172.16.191.255 7 Network Address 10101100.00010000.11000000.00000000 172.16.192.0 First IPv4 address 10101100.00010000.11000000.00000001 172.16.192.1 Last IPv4 address 10101100.00010000.11011111.11111110 172.16.223.254 Broadcast Address 10101100.00010000.11011111.11111111 172.16.223.255 8 Network Address 10101100.00010000.11100000.00000000 172.16.224.0 First IPv4 address 10101100.00010000.11100000.00000001 172.16.224.1 Last IPv4 address 10101100.00010000.11111111.11111110 172.16.255.254 Broadcast Address 10101100.00010000.11111111.11111111 172.16.255.255
  • 132. Class B 4-bit subnetting tutorial • If we add four bits to the network part from host part in the third octet, for a Class B network, the default subnet mask 255.255.0.0 is changed to 255.255.240.0. The four bits added to the network part from the host part, in the third octet, can have sixteen possible values. Those sixteen possible values are 0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110 and 1111.
  • 134. SN No Description Binaries Decimal 1 Network Address 10101100.00010000.0 0000000.00000000 172.16.0.0 First IP Address 10101100.00010000.0 0000000.00000001 172.16.0.1 Last IP Address 10101100.00010000.0 0001111.11111110 172.16.15.254 Broadcast Address 10101100.00010000.0 0001111.11111111 172.16.15.255 2 Network Address 10101100.00010000.0 0010000.00000000 172.16.16.0 First IP Address 10101100.00010000.0 0010000.00000001 172.16.16.1 Last IP Address 10101100.00010000.0 0011111.11111110 172.16.31.254 Broadcast Address 10101100.00010000.0 0011111.11111111 172.16.31.255 3 Network Address 10101100.00010000.0 0100000.00000000 172.16.32.0 First IP Address 10101100.00010000.0 0100000.00000001 172.16.32.1 Last IP Address 10101100.00010000.0 0101111.11111110 172.16.47.254 Broadcast Address 10101100.00010000.0 0101111.11111111 172.16.47.255 4 Network Address 10101100.00010000.0 0110000.00000000 172.16.48.0 First IP Address 10101100.00010000.0 0110000.00000001 172.16.48.1 Last IP Address 10101100.00010000.0 0111111.11111110 172.16.63.254 Broadcast Address 10101100.00010000.0 0111111.11111111 172.16.63.255 5 Network Address 10101100.00010000.0 1000000.00000000 172.16.64.0 First IP Address 10101100.00010000.0 1000000.00000001 172.16.64.1 Last IP Address 10101100.00010000.0 1001111.11111110 172.16.79.254 Broadcast Address 10101100.00010000.0 1001111.11111111 172.16.79.255 6 Network Address 10101100.00010000.0 1010000.00000000 172.16.80.0 First IP Address 10101100.00010000.0 1010000.00000001 172.16.80.1 Last IP Address 10101100.00010000.0 1011111.11111110 172.16.95.254 Broadcast Address 10101100.00010000.0 1011111.11111111 172.16.95.255 7 Network Address 10101100.00010000.0 1100000.00000000 172.16.96.0 First IP Address 10101100.00010000.0 1100000.00000001 172.16.96.1 Last IP Address 10101100.00010000.0 1101111.11111110 172.16.111.254 Broadcast Address 10101100.00010000.0 1101111.11111111 172.16.111.255 8 Network Address 10101100.00010000.0 1110000.00000000 172.16.112.0 First IP Address 10101100.00010000.0 1110000.00000001 172.16.112.1 Last IP Address 10101100.00010000.0 1111111.11111110 172.16.127.254 Broadcast Address 10101100.00010000.0 1111111.11111111 172.16.127.255 9 Network Address 10101100.00010000.1 0000000.00000000 172.16.128.0 First IP Address 10101100.00010000.1 0000000.00000001 172.16.128.1 Last IP Address 10101100.00010000.1 0001111.11111110 172.16.143.254 Broadcast Address 10101100.00010000.1 0001111.11111111 172.16.143.255 10 Network Address 10101100.00010000.1 0010000.00000000 172.16.144.0 First IP Address 10101100.00010000.1 0010000.00000001 172.16.144.1 Last IP Address 10101100.00010000.1 0011111.11111110 172.16.159.254 Broadcast Address 10101100.00010000.1 0011111.11111111 172.16.159.255 11 Network Address 10101100.00010000.1 0100000.00000000 172.16.160.0 First IP Address 10101100.00010000.1 0100000.00000001 172.16.160.1 Last IP Address 10101100.00010000.1 0101111.11111110 172.16.175.254 Broadcast Address 10101100.00010000.1 0101111.11111111 172.16.175.255 12 Network Address 10101100.00010000.1 0110000.00000000 172.16.176.0 First IP Address 10101100.00010000.1 0110000.00000001 172.16.176.1 Last IP Address 10101100.00010000.1 0111111.11111110 172.16.191.254 Broadcast Address 10101100.00010000.1 0111111.11111111 172.16.191.255 13 Network Address 10101100.00010000.1 1000000.00000000 172.16.192.0 First IP Address 10101100.00010000.1 1000000.00000001 172.16.192.1 Last IP Address 10101100.00010000.1 1001111.11111110 172.16.207.254 Broadcast Address 10101100.00010000.1 1001111.11111111 172.16.207.255 14 Network Address 10101100.00010000.1 1010000.00000000 172.16.208.0 First IP Address 10101100.00010000.1 1010000.00000001 172.16.208.1 Last IP Address 10101100.00010000.1 1011111.11111110 172.16.223.254 Broadcast Address 10101100.00010000.1 1011111.11111111 172.16.223.255 15 Network Address 10101100.00010000.1 1100000.00000000 172.16.224.0 First IP Address 10101100.00010000.1 1100000.00000001 172.16.224.1 Last IP Address 10101100.00010000.1 1101111.11111110 172.16.239.254 Broadcast Address 10101100.00010000.1 1101111.11111111 172.16.239.255 16 Network Address 10101100.00010000.1 1110000.00000000 172.16.240.0 First IP Address 10101100.00010000.1 1110000.00000001 172.16.240.1 Last IP Address 10101100.00010000.1 1111111.11111110 172.16.255.254 Broadcast Address 10101100.00010000.1 1111111.11111111 172.16.255.255
  • 135. Subnet Bits Subnet Mask CIDR Total Subnets Usable IP Address/Subnet 0 255.255.0.0 /16 1 65534 1 255.255.128.0 /17 2 32766 2 255.255.192.0 /18 4 16382 3 255.255.224.0 /19 8 8190 4 255.255.240.0 /20 16 4094 5 255.255.248.0 /21 32 2046 6 255.255.252.0 /22 64 1022 7 255.255.254.0 /23 128 510 8 255.255.255.0 /24 256 254 9 255.255.255.128 /25 512 126 10 255.255.255.192 /26 1024 62 11 255.255.255.224 /27 2048 30 12 255.255.255.240 /28 4096 14 13 255.255.255.248 /29 8192 6 14 255.255.255.252 /30 16384 2
  • 136. Class A • Let us try to visualize the unsubnetted Class A network 10.0.0.0 with default subnet mask 255.0.0.0 using below image. Network address is 10.0.0.0, first usable IPv4 address is 10.0.0.1, second usable IPv4 address is 10.0.0.2, third usable IPv4 address is 10.0.0.3 ...... up to last usable IPv4 address 10.255.255.254 and the broadcast address 10.255.255.255.
  • 138. Class A Subnetting • Remember, the first octet of a Class A network is used to represent the network and the remaining three octets are used to represent a host within that network. The default format for a Class A IPv4 address is Network.Host.Host.Host. • Let us consider an example of Class A network 10.0.0.0 - 255.0.0.0. The binary representation of the above network and its subnet mask are shown in below table.
  • 139. Component Binary Decimal Address Part 00001010.00000000.00000000.00000 000 10.0.0.0 Subnet Mask 11111111.00000000.00000000.00000 000 255.0.0.0
  • 140. Note • Once again, • If all the bits in the host part are "0", that represents the network address. • If all the bits in the host part are "0" except the last bit, it is the first usable IPv4 address. • If all the bits in the host part are "1" except the last bit, it is the last usable IPv4 address. • If all the bits in the host part are "1", that represents the directed broadcast address.
  • 141. Class A 1-bit subnetting tutorial • If we include one bit to network part from the host part in the second octet, the default subnet mask of a Class A network 255.0.0.0 is changed into 255.128.0.0. The single bit can have two values in second octet, either 0 or 1. • That means, we can get two subnets if we do a single bit subnetting on a Class A network. • Please refer below image.
  • 143. SN No Description Binaries Decimal 1 Network Address 00001010.00000000.00000 000.00000000 10.0.0.0 First IPv4 address 00001010.00000000.00000 000.00000001 10.0.0.1 Last IPv4 address 00001010.01111111.11111 111.11111110 10.127.255.254 Broadcast Address 00001010.01111111.11111 111.11111111 10.127.255.255 2 Network Address 00001010.10000000.00000 000.00000000 10.128.0.0 First IPv4 address 00001010.10000000.00000 000.00000001 10.128.0.1 Last IPv4 address 00001010.11111111.11111 111.11111110 10.255.255.254 Broadcast Address 00001010.11111111.11111 111.11111111 10.255.255.255
  • 144. Explanation • The network 10.0.0.0 is divided into two subnets, each subnet has 8,388,608 total IPv4 Addresses and 8,388,606 usable IPv4 Addresses. Two IPv4 addresses are used in each subnet to represent the network address and directed broadcast address (first and last IPv4 addresses in a subnet block). As mentioned in previous subnetting tutorial lessons, you cannot use network address or directed broadcast address as the IPv4 address for devices inside your network. The subnet mask to use for 1-bit subnetting for a Class A network is 255.128.0.0. • Visualization of 1-bit subnetting of Class A network 10.0.0.0 with subnet mask 255.128.0.0 is given below. • Subnet 1 has its network address 10.0.0.0 with a subnet mask of 255.128.0.0. First usable IPv4 address is 10.0.0.1, second usable IPv4 address is 10.0.0.2, third usable IPv4 address is 10.0.0.3 ...... up to last usable IPv4 address 10.127.255.254 and the broadcast address 10.127.255.255. • Subnet 2 has its network address 10.128.0.0 with a subnet mask of 255.128.0.0. First usable IPv4 address is 10.128.0.1, second usable IPv4 address is 10.128.0.2, third usable IPv4 address is 10.128.0.3 ...... up to last usable IPv4 address 10.255.255.254 and the broadcast address 10.255.255.255.
  • 146. Class A 2-bit subnetting tutorial • If we include two bits to the network part from the host part in the second octet, the default subnet mask of a Class A network 255.0.0.0 is changed into 255.192.0.0. The two bits added to the network part from the host part can have four possible values in second octet of a Class A network , 00, 01, 10, and 11. • That means, we can get four networks if we do a 2-bit subnetting on a Class A network. Ths subnet mask to use for Class A network 2-bit subnetting is 255.192.0.0. • Please refer below image.
  • 148. SN No Description Binaries Decimal 1 Network Address 00001010.00000000.0000 0000.00000000 10.0.0.0 First IPv4 address 00001010.00000000.0000 0000.00000001 10.0.0.1 Last IPv4 address 00001010.00111111.1111 1111.11111110 10.63.255.254 Broadcast Address 00001010.00111111.1111 1111.11111111 10.63.255.255 2 Network Address 00001010.01000000.0000 0000.00000000 10.64.0.0 First IPv4 address 00001010.01000000.0000 0000.00000001 10.64.0.1 Last IPv4 address 00001010.01111111.1111 1111.11111110 10.127.255.254 Broadcast Address 00001010.01111111.1111 1111.11111111 10.127.255.255 3 Network Address 00001010.10000000.0000 0000.00000000 10.128.0.0 First IPv4 address 00001010.10000000.0000 0000.00000001 10.128.0.1 Last IPv4 address 00001010.10111111.1111 1111.11111110 10.191.255.254 Broadcast Address 00001010.10111111.1111 1111.11111111 10.191.255.255 4 Network Address 00001010.11000000.0000 0000.00000000 10.192.0.0 First IPv4 address 00001010.11000000.0000 0000.00000001 10.192.0.1 Last IPv4 address 00001010.11111111.1111 1111.11111110 10.255.255.254 Broadcast Address 00001010.11111111.1111 1111.11111111 10.255.255.255
  • 149. Continue • The network 10.0.0.0 is divided into four subnets, each subnet has 4,194,304 total IPv4 Addresses and 4,194,302 usable IPv4 Addresses. Two IPv4 addresses are used in each subnet to represent the network address and directed broadcast address (first and last IPv4 addresses in a subnet block). As mentioned in previous subnetting tutorial lessons, you cannot use network address or directed broadcast address as the IPv4 address for devices inside your network. The subnet mask to use for 2-bit subnetting for a Class A network is 255.192.0.0. • Visualization of 2-bit subnetting of Class A network 10.0.0.0 with subnet mask 255.192.0.0 is given below.
  • 151. Class A 3-bit subnetting tutorial • If we include three bits to the network part from the host part in the second octet of a Class A network, the default subnet mask of a Class A network 255.0.0.0 is changed into 255.224.0.0 The three bits added to the network part from the host part in second octet can have eight possible values. Those eight possible values are 000, 001, 010, and 011, 100, 101, 110 and 111. • That means, we can get eight networks if we do a 3-bit subnetting on a Class A network and the subnet mask to use for Class A network 3- bit subnetting is 255.224.0.0. • Please refer below image.
  • 153. SN No Description Binaries Decimal 1 Network Address 00001010.00000000. 00000000.00000000 10.0.0.0 First IPv4 address 00001010.00000000.00000000 .00000001 10.0.0.1 Last IPv4 address 00001010.00011111.11111111 .11111110 10.31.255.254 Broadcast Address 00001010.00011111.11111111 .11111111 10.31.255.255 2 Network Address 00001010.00100000.00000000 .00000000 10.32.0.0 First IPv4 address 00001010.00100000.00000000 .00000001 10.32.0.1 Last IPv4 address 00001010.00111111.11111111 .11111110 10.63.255.254 Broadcast Address 00001010.00111111.11111111 .11111111 10.63.255.255 3 Network Address 00001010.01000000.00000000 .00000000 10.64.0.0 First IPv4 address 00001010.01000000.00000000 .00000001 10.64.0.1 Last IPv4 address 00001010.01011111.11111111 .11111110 10.95.255.254 Broadcast Address 00001010.01011111.11111111 .11111111 10.95.255.255 4 Network Address 00001010.01100000.00000000 .00000000 10.96.0.0 First IPv4 address 00001010.01100000.00000000 .00000001 10.96.0.1 Last IPv4 address 00001010.01111111.11111111 .11111110 10.127.255.254 Broadcast Address 00001010.01111111.11111111 .11111111 10.127.255.255 5 Network Address 00001010.10000000.00000000 .00000000 10.128.0.0 First IPv4 address 00001010.10000000.00000000 .00000001 10.128.0.1 Last IPv4 address 00001010.10011111.11111111 .11111110 10.159.255.254 Broadcast Address 00001010.10011111.11111111 .11111111 10.159.255.255 6 Network Address 00001010.10100000.00000000 .00000000 10.160.0.0 First IPv4 address 00001010.10100000.00000000 .00000001 10.160.0.1 Last IPv4 address 00001010.10111111.11111111 .11111110 10.191.255.254 Broadcast Address 00001010.10111111.11111111 .11111111 10.191.255.255 7 Network Address 00001010.11000000.00000000 .00000000 10.192.0.0 First IPv4 address 00001010.11000000.00000000 .00000001 10.192.0.1 Last IPv4 address 00001010.11011111.11111111 .11111110 10.223.255.254 Broadcast Address 00001010.11011111.11111111 .11111111 10.223.255.255 8 Network Address 00001010.11100000.00000000 .00000000 10.224.0.0 First IPv4 address 00001010.11100000.00000000 .00000001 10.224.0.1 00001010.11111111.11111111
  • 154. Continue • The network 10.0.0.0 is divided into eight subnets, each subnet has 2,097,152 total IPv4 Addresses and 2,097,150 usable IPv4 Addresses. Two IPv4 addresses are used in each subnet to represent the network address and directed broadcast address (first and last IPv4 addresses in a subnet block). As mentioned in previous subnetting tutorial lessons, you cannot use network address or directed broadcast address as the IPv4 address for devices inside your network. The subnet mask to use for 3-bit subnetting for a Class A network is 255.224.0.0. • Visualization of 3-bit subnetting of Class A network 10.0.0.0 with subnet mask 255.224.0.0 is given below.
  • 156. Class A 4-bit subnetting tutorial • If we include four bits to the network part from the host part in the second octet, the default subnet mask of a Class A network 255.0.0.0 is changed to 255.240.0.0. The four bits added to the network part from the host part, in the second octet, can have sixteen possible values. Those sixteen possible values are 0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110 and 1111. • That means, we get sixteen subnets if we do a 4-bit subnetting for a Class A network. • Please refer below image.
  • 158. SN No Description Binaries Decimal 1 Network Address 00001010.00000000.0 0000000.00000000 10.0.0.0 First IP Address 00001010.00000000.0 0000000.00000001 10.0.0.1 Last IP Address 00001010.00001111.1 1111111.11111110 10.15.255.254 Broadcast Address 00001010.00001111.1 1111111.11111111 10.15.255.255 2 Network Address 00001010.00010000.0 0000000.00000000 10.16.0.0 First IP Address 00001010.00010000.0 0000000.00000001 10.16.0.1 Last IP Address 00001010.00011111.1 1111111.11111110 10.31.255.254 Broadcast Address 00001010.00011111.1 1111111.11111111 10.31.255.255 3 Network Address 00001010.00100000.0 0000000.00000000 10.32.0.0 First IP Address 00001010.00100000.0 0000000.00000001 10.32.0.1 Last IP Address 00001010.00101111.1 1111111.11111110 10.47.255.254 Broadcast Address 00001010.00101111.1 1111111.11111111 10.47.255.255 4 Network Address 00001010.00110000.0 0000000.00000000 10.48.0.0 First IP Address 00001010.00110000.0 0000000.00000001 10.48.0.1 Last IP Address 00001010.00111111.1 1111111.11111110 10.63.255.254 Broadcast Address 00001010.00111111.1 1111111.11111111 10.63.255.255 5 Network Address 00001010.01000000.0 0000000.00000000 10.64.0.0 First IP Address 00001010.01000000.0 0000000.00000001 10.64.0.1 Last IP Address 00001010.01001111.1 1111111.11111110 10.79.255.254 Broadcast Address 00001010.01001111.1 1111111.11111111 10.79.255.255 6 Network Address 00001010.01010000.0 0000000.00000000 10.80.0.0 First IP Address 00001010.01010000.0 0000000.00000001 10.80.0.1 Last IP Address 00001010.01011111.1 1111111.11111110 10.95.255.254 Broadcast Address 00001010.01011111.1 1111111.11111111 10.95.255.255 7 Network Address 00001010.01100000.0 0000000.00000000 10.96.0.0 First IP Address 00001010.01100000.0 0000000.00000001 10.96.0.1 Last IP Address 00001010.01101111.1 1111111.11111110 10.111.255.254 Broadcast Address 00001010.01101111.1 1111111.11111111 10.111.255.255 8 Network Address 00001010.01110000.0 0000000.00000000 10.112.0.0 First IP Address 00001010.01110000.0 0000000.00000001 10.112.0.1 Last IP Address 00001010.01111111.1 1111111.11111110 10.127.255.254 Broadcast Address 00001010.01111111.1 1111111.11111111 10.127.255.255 9 Network Address 00001010.10000000.0 0000000.00000000 10.128.0.0 First IP Address 00001010.10000000.0 0000000.00000001 10.128.0.1 Last IP Address 00001010.10001111.1 1111111.11111110 10.143.255.254 Broadcast Address 00001010.10001111.1 1111111.11111111 10.143.255.255 10 Network Address 00001010.10010000.0 0000000.00000000 10.144.0.0 First IP Address 00001010.10010000.0 0000000.00000001 10.144.0.1 Last IP Address 00001010.10011111.1 1111111.11111110 10.159.255.254 Broadcast Address 00001010.10011111.1 1111111.11111111 10.159.255.255 11 Network Address 00001010.10100000.0 0000000.00000000 10.160.0.0 First IP Address 00001010.10100000.0 0000000.00000001 10.160.0.1 Last IP Address 00001010.10101111.1 1111111.11111110 10.175.255.254 Broadcast Address 00001010.10101111.1 1111111.11111111 10.175.255.255 12 Network Address 00001010.10110000.0 0000000.00000000 10.176.0.0 First IP Address 00001010.10110000.0 0000000.00000001 10.176.0.1 Last IP Address 00001010.10111111.1 1111111.11111110 10.191.255.254 Broadcast Address 00001010.10111111.1 1111111.11111111 10.191.255.255 13 Network Address 00001010.11000000.0 0000000.00000000 10.192.0.0 First IP Address 00001010.11000000.0 0000000.00000001 10.192.0.1 Last IP Address 00001010.11001111.1 1111111.11111110 10.207.255.254 Broadcast Address 00001010.11001111.1 1111111.11111111 10.207.255.255 14 Network Address 00001010.11010000.0 0000000.00000000 10.208.0.0 First IP Address 00001010.11010000.0 0000000.00000001 10.208.0.1 Last IP Address 00001010.11011111.1 1111111.11111110 10.223.255.254 Broadcast Address 00001010.11011111.1 1111111.11111111 10.223.255.255 15 Network Address 00001010.11100000.0 0000000.00000000 10.224.0.0 First IP Address 00001010.11100000.0 0000000.00000001 10.224.0.1 Last IP Address 00001010.11101111.1 1111111.11111110 10.239.255.254 Broadcast Address 00001010.11101111.1 1111111.11111111 10.239.255.255 16 Network Address 00001010.11110000.0 0000000.00000000 10.240.0.0 First IP Address 00001010.11110000.0 0000000.00000001 10.240.0.1 Last IP Address 00001010.11111111.1 1111111.11111110 10.255.255.254 Broadcast Address 00001010.11111111.1 1111111.11111111 10.255.255.255
  • 159. Subnet Bits Subnet Mask CIDR Total Subnets Usable IP Address/Subnet 0 255.0.0.0 /8 1 16777214 1 255.128.0.0 /9 2 8388606 2 255.192.0.0 /10 4 4194302 3 255.224.0.0 /11 8 2097150 4 255.240.0.0 /12 16 1048574 5 255.248.0.0 /13 32 524286 6 255.252.0.0 /14 64 262142 7 255.254.0.0 /15 128 131070 8 255.255.0.0 /16 256 65534 9 255.255.128.0 /17 512 32766 10 255.255.192.0 /18 1024 16382 11 255.255.224.0 /19 2048 8190 12 255.255.240.0 /20 4096 4094 13 255.255.248.0 /21 8192 2046 14 255.255.252.0 /22 16384 1022 15 255.255.254.0 /23 32768 510 16 255.255.255.0 /24 65536 254 17 255.255.255.128 /25 131072 126 18 255.255.255.192 /26 262144 62 19 255.255.255.224 /27 524288 30 20 255.255.255.240 /28 1048576 14 21 255.255.255.248 /29 2097152 6 22 255.255.255.252 /30 4194304 2
  • 160. VLSM
  • 161. VLSM • Variable Length Subnet Masking (VLSM) is a way of further subnetting a subnet. Using Variable Length Subnet Masking (VLSM) we can allocate IPv4 addresses to the subnets by the exact need. Variable Length Subnet Masking (VLSM) allows us to use more than one subnet mask within the same network address space. If we recollect from the previous lessons, we can divide a network only into subnets with equal number of IPv4 addresses. Variable Length Subnet Masking (VLSM) allows to create subnets from a single network with unequal number of IPv4 addresses.
  • 162. Example • Example: We want to divide 192.168.10.0, which is a Class C network, into four networks, each with unequal number of IPv4 addresses requirements as shown below. • Subnet A : 126 IPv4 Addresses. Subnet B : 62 IPv4 Addresses. Subnet C : 30 IPv4 Addresses. Subnet D : 30 IPv4 Addresses • Original Network (Network to be subnetted) – 192.168.10.0/24
  • 163. Variable Length Subnet Masking (VLSM)- First Division • Divide the two networks equally with 128 IPv4 addresses (126 usable IPv4 addresses) in each network using 255.255.255.128 subnet mask (192.168.10.0/25). • We will get two subnets each with 128 IPv4 addresses (126 usable IPv4 addresses). • 1) 192.168.10.0/25, which can be represented in binaries as below. • 11000000.10101000.00001010.00000000 11111111.11111111.11111111.10000000 • 2) 192.168.10.128/25, which can be represented in binaries as below. • 11000000.10101000.00001010.10000000 11111111.11111111.11111111.10000000
  • 164. Variable Length Subnet Masking (VLSM)- Second Division • Divide second subnet (192.168.10.128/25) we got from the first division again into two Networks, each with 64 IP Addresses (62 usable IPv4 addresses) using 255.255.255.192 subnet mask. • We will get two subnets each with 64 IPv4 addresses (62 usable IPv4 addresses). • 1) 192.168.10.128/26, which can be represented in binaries as below. • 11000000.10101000.00001010.10000000 11111111.11111111.11111111.11000000 • 2) 192.168.10.192/26 • 11000000.10101000.00001010.11 000000 11111111.11111111.11111111.11000000
  • 165. Variable Length Subnet Masking (VLSM)- Third Division • Divide 192.168.10.192/26 Network again into two Networks, each with 32 IPv4 addresses (30 usable IPv4 addresses) using 255.255.255.224 subnet mask • We will get two subnets each with 32 IPv4 addresses (30 usable IPv4 addresses ). • 1) 192.168.10.192/27, which can be represented in binaries as below. • 11000000.10101000.00001010.11000000 11111111.11111111.11111111.11100000 • 2) 192.168.10.224/27, which can be represented in binaries as below. • 11000000.10101000.00001010.11100000 11111111.11111111.11111111.11100000
  • 166. Summary • Now we have split the 192.168.10.0/24 network into four subnets using Variable Length Subnet Masking (VLSM), with unequal number of IPv4 addresses as shown below. Also note that when you divide a network using Variable Length Subnet Masking (VLSM), the subnet mask are also different. • 1) 192.168.10.0 - 255.255.255.128 (126 (128-2) usable IPv4 addresses) 2) 192.168.10.128 - 255.255.255.192 (62 (64-2) usable IPv4 addresses) 3) 192.168.10.192 - 255.255.255.224 (30 (32-2) usable IPv4 addresses) 4) 192.168.10.224 - 255.255.255.224 (30 (32-2) usable IPv4 addresses)

Editor's Notes

  • #11: universal - the addressing system must be accepted by any host that wants to be connected to the Internet
  • #51: Class A255.0.0.0Over 16 millionhost Class B255.255.0.0Over 16 thousand Class C 255.255.255.0 16 million subnetwork 254host