SlideShare a Scribd company logo
Computer Networks
Week 4
Hamayun khan (PhD Scholar)
Superior University, Lahore
hamayun.khan@superior.edu.pk
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.
Chapter
Outline
Introduction
Classful Addressing
Classless Addressing
Special Addresses
NAT
INTRODUCTION
The identifier used in the IP 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
A protocol like IPv4 that defines addresses has an 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.
The address space of IPv4 is
232 or 4,294,967,296.
Notation
There are three common notations to show an IPv4 address:
binary notation
dotted-decimal notation
hexadecimal notation
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
Figure Dotted-decimal notation
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
CLASSFULADDRESSING
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.
Topics Discussed in the Section
Classes
Classes and Blocks
Two-Level Addressing
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
Figure Netid and hostid
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
Number of blocks in class A is 27 = 128 blocks.
Each block can be assigned to one organization.
Each block contains 16,777,216 addresses.
Figure Blocks in Class A
Millions of class A addresses
are wasted.
Note
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
Many class B addresses are wasted.
Note
Class C
Number of blocks in class C is 221 = 2,097,152.
Each block contains 256 addresses, that can be
assigned to 2,097,152 organizations
Each block contains 256 addresses.
Figure Blocks in Class C
Not so many organizations are so small
to have a class C block.
Note
Class D
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.
Class D addresses are made of one
block, used for multicasting.
Note
The only block of class E addresses was
reserved for future purposes.
Note
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.
Lecture W4 CN IP Addressing P1.pptx

More Related Content

Similar to Lecture W4 CN IP Addressing P1.pptx

Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
Forouzan-ch19-Network-Layer-Logical-Addressing.pptForouzan-ch19-Network-Layer-Logical-Addressing.ppt
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
Jayaprasanna4
 
chapter 6.pptx
chapter 6.pptxchapter 6.pptx
chapter 6.pptx
MelkamtseganewTigabi1
 

Similar to Lecture W4 CN IP Addressing P1.pptx (20)

Ip addressing classful
Ip addressing classfulIp addressing classful
Ip addressing classful
 
Ip addressing classful
Ip addressing classfulIp addressing classful
Ip addressing classful
 
NP - Unit 2 - Internet Addressing, ARP and RARP
NP - Unit 2 - Internet Addressing, ARP and RARP NP - Unit 2 - Internet Addressing, ARP and RARP
NP - Unit 2 - Internet Addressing, ARP and RARP
 
IP addressing
IP addressingIP addressing
IP addressing
 
IP addressing
IP addressingIP addressing
IP addressing
 
IP-address trial.ppt
IP-address trial.pptIP-address trial.ppt
IP-address trial.ppt
 
Chap 04
Chap 04Chap 04
Chap 04
 
Subnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
Subnet Masking in Computer Network--CST 2nd year by Tanushree BhadraSubnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
Subnet Masking in Computer Network--CST 2nd year by Tanushree Bhadra
 
IP addressing and subnetting.pptx
IP addressing and subnetting.pptxIP addressing and subnetting.pptx
IP addressing and subnetting.pptx
 
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
Forouzan-ch19-Network-Layer-Logical-Addressing.pptForouzan-ch19-Network-Layer-Logical-Addressing.ppt
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
 
chapter 6.pptx
chapter 6.pptxchapter 6.pptx
chapter 6.pptx
 
Lecture 03 networking
Lecture 03 networkingLecture 03 networking
Lecture 03 networking
 
Chapter5(i pv4 address)
Chapter5(i pv4 address)Chapter5(i pv4 address)
Chapter5(i pv4 address)
 
Module 6 ip addresing
Module 6   ip addresingModule 6   ip addresing
Module 6 ip addresing
 
Network layer,ipv4, Classful Addressing,notations, Classless addressing,class...
Network layer,ipv4, Classful Addressing,notations, Classless addressing,class...Network layer,ipv4, Classful Addressing,notations, Classless addressing,class...
Network layer,ipv4, Classful Addressing,notations, Classless addressing,class...
 
Ip class
Ip classIp class
Ip class
 
Ch 18 intro to network layer - section 4
Ch 18   intro to network layer - section 4Ch 18   intro to network layer - section 4
Ch 18 intro to network layer - section 4
 
Umutima.ppt
Umutima.pptUmutima.ppt
Umutima.ppt
 
Basics of IP Addressing
Basics of IP AddressingBasics of IP Addressing
Basics of IP Addressing
 
Ch19
Ch19Ch19
Ch19
 

More from ssuserc1e786 (7)

LEC 1.pptx
LEC 1.pptxLEC 1.pptx
LEC 1.pptx
 
Bcsm-f20-405(Web-design).pptx
Bcsm-f20-405(Web-design).pptxBcsm-f20-405(Web-design).pptx
Bcsm-f20-405(Web-design).pptx
 
W1_Lec01_Lec02_Layouts.pptx
W1_Lec01_Lec02_Layouts.pptxW1_Lec01_Lec02_Layouts.pptx
W1_Lec01_Lec02_Layouts.pptx
 
Lecture W5 CN IP Subnetting P2.pptx
Lecture W5 CN IP Subnetting P2.pptxLecture W5 CN IP Subnetting P2.pptx
Lecture W5 CN IP Subnetting P2.pptx
 
Lecture W2 CN Network Types, Layered approach.pptx
Lecture W2 CN Network Types, Layered approach.pptxLecture W2 CN Network Types, Layered approach.pptx
Lecture W2 CN Network Types, Layered approach.pptx
 
W2_Lec03_Lec_04_Activity.pptx
W2_Lec03_Lec_04_Activity.pptxW2_Lec03_Lec_04_Activity.pptx
W2_Lec03_Lec_04_Activity.pptx
 
W1_Lec01_Lec02_Intro.pptx
W1_Lec01_Lec02_Intro.pptxW1_Lec01_Lec02_Intro.pptx
W1_Lec01_Lec02_Intro.pptx
 

Recently uploaded

Recently uploaded (20)

Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdf
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 

Lecture W4 CN IP Addressing P1.pptx

  • 1. Computer Networks Week 4 Hamayun khan (PhD Scholar) Superior University, Lahore hamayun.khan@superior.edu.pk
  • 3. 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.
  • 5. INTRODUCTION The identifier used in the IP 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.
  • 6. An IPv4 address is 32 bits long. The IPv4 addresses are unique and universal.
  • 7. Address Space A protocol like IPv4 that defines addresses has an 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.
  • 8. The address space of IPv4 is 232 or 4,294,967,296.
  • 9. Notation There are three common notations to show an IPv4 address: binary notation dotted-decimal notation hexadecimal notation
  • 10. Binary Notation: Base 2 an IPv4 address is displayed as 32 bits 01110101 10010101 00011101 11101010
  • 11. 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
  • 13. 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
  • 14. 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
  • 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
  • 16. 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
  • 17. Change the following IP addresses from binary notation to hexadecimal notation. a. 10000001 00001011 00001011 11101111 b. 11000001 10000011 00011011 11111111 Example 3
  • 18. 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
  • 19. CLASSFULADDRESSING 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.
  • 20. Topics Discussed in the Section Classes Classes and Blocks Two-Level Addressing
  • 21. 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.
  • 22. 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 ...
  • 23. Figure Finding the class of address
  • 25. 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.
  • 26. Class A Number of blocks in class A is 27 = 128 blocks. Each block can be assigned to one organization. Each block contains 16,777,216 addresses.
  • 27. Figure Blocks in Class A
  • 28. Millions of class A addresses are wasted. Note
  • 29. 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.
  • 30. Figure Blocks in Class B
  • 31. Many class B addresses are wasted. Note
  • 32. Class C Number of blocks in class C is 221 = 2,097,152. Each block contains 256 addresses, that can be assigned to 2,097,152 organizations Each block contains 256 addresses.
  • 33. Figure Blocks in Class C
  • 34. Not so many organizations are so small to have a class C block. Note
  • 35. Class D 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.
  • 36. Class D addresses are made of one block, used for multicasting. Note
  • 37. The only block of class E addresses was reserved for future purposes. Note
  • 38. 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.
  • 39. The range of addresses allocated to an organization in classful addressing was a block of addresses in Class A, B, or C.
  • 40. Since all addresses in a network belonged to a single block, each address in classful addressing contains two parts: netid and hostid.
  • 41. Figure Two-level addressing in classful addressing
  • 42. 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.
  • 43. 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.
  • 44. Figure Information extraction in classful addressing netid First address 000 ... 0
  • 45. 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
  • 46. Figure Solution to Example 7
  • 47. 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
  • 48. Figure Solution to Example 8
  • 49. 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
  • 50. Figure Solution to Example 9
  • 51. Given the network address 17.0.0.0, find the class, the block, and the range of the addresses. Example 10
  • 52. 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.
  • 53. Example 11  Given the network address 132.21.0.0, find the class, the block, and the range of addresses.
  • 54. 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
  • 55. Example 12  Given the network address 220.34.76.0, find the class, the block, and the range of addresses
  • 56. 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
  • 57. Network Address - the first address of a block - used in routing a packet to its destination network.
  • 58. The network address is the identifier of a network. Note
  • 59. Given the address 23.56.7.91, find the beginning address (network address). Example 13
  • 60. 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.
  • 61. Given the address 132.6.17.85, find the beginning address (network address). Example 14
  • 62. 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.
  • 63. Given the address 201.180.56.5, find the beginning address (network address). Example 15
  • 64. 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.