SlideShare una empresa de Scribd logo
1 de 23
Descargar para leer sin conexión
1
IP Subnetting and
Addressing
Indian Institute of Technology Kharagpur
Prof Indranil Sengupta
Computer Science and Engineering
Indian Institute of Technology
Kharagpur
Lecture 6: IP Subnetting and Addressing
On completion, the student will be able to:
1. Explain the concept of IP subnets, and subnet
masks.
2. Compare the benefits of using subnets against
multiple address classes.
3. Explain the concept of variable length subnet
mask (VLSM) with example.
4. Explain how classless inter-domain routing
(CIDR) helps in better address assignment.
2
IP Subnetting
IP Subnet
• Basic concept:
A subset of a class A, B or C network.
• IP addresses that do not use subnets
consists of
a network portion, and
a host portion.
Represents a static two-level hierarchical
addressing model.
3
IP Subnet (contd.)
• IP subnets introduces a third level of
hierarchy.
a network portion
a subnet portion
a host portion
Allow more efficient (and structured)
utilization of the addresses.
Uses network masks.
Natural Masks
• Network mask 255.0.0.0 is applied to
a class A network 10.0.0.0.
In binary, the mask is a series of
contiguous 1’s followed by a series of
contiguous 0’s.
11111111 00000000 00000000 00000000
Network
portion
Host
portion
4
Natural Masks (contd.)
• Provide a mechanism to split the IP
address 10.0.0.20 into
a network portion of 10, and
a host portion of 20.
Decimal Binary
IP address:10.0.0.20 00001010 00000000 00000000 00010100
Mask: 255.0.0.0 11111111 00000000 00000000 00000000
Network Host
Natural Masks (contd.)
• Class A, B and C addresses
Have fixed division of network and host
portions.
Can be expressed as masks.
Called natural masks.
• Natural Masks
Class A :: 255.0.0.0
Class B :: 255.255.0.0
Class C :: 255.255.255.0
5
Creating Subnets using Masks
• Masks are very flexible.
Using masks, networks can be divided
into smaller subnets.
• How?
By extending the network portion of the
address into the host portion.
• Advantage gained:
We can create a large number of subnets
from one network.
Can have less number of hosts per
network.
Example: Subnets
• Network mask 255.255.0.0 is applied
to a class A network 10.0.0.0.
This divides the IP address 10.5.0.20
into
a network portion of 10,
a subnet portion of 5, and
a host portion of 20.
The 255.255.0.0 mask borrows a portion
of the host space, and applies it to
network space.
6
Subnets (contd.)
• What happens?
Initially it was a single large Class A
network (224-2 hosts).
We have now split the network into
256 subnets.
From 10.0.0.0 to 10.255.0.0.
The hosts pet subnet decreases to
65,534.
Subnets (contd.)
Decimal Binary
IP address: 10.5.0.20 00001010 00000101 00000000 00010100
Mask: 255.255.0.0 11111111 11111111 00000000 00000000
Network Subnet Host
7
Default Mask and Subnet mask
AND
AND
Default Mask
255.255.0.0
Subnet Mask
255.255.192.0
IP Address
144.16.72.57
IP Address
144.16.72.57
Network Address
144.16.0.0
Network Address
144.16.64.0
192: 1100 0000
72: 0100 1000
Subnets vrs Multiple Address Classes
• Subnets
Management of subnets is done by
local network administrator.
Single entry in external router tables.
• Multiple Address Classes
Multiple entries in external router tables.
Additional overhead on the backbone
(external) routers.
8
Comparison
R
R R
R
R R
SUBNETS
MULTIPLE
ADDRESS
CLASSES
Variable Length Subnet Masks (VLSM)
• Basic concept
The same network can be configured
with different masks.
Can have subnets of different sizes.
Allows better utilization of available
addresses.
9
Example: VLSM
• Suppose we are assigned a Class C
network 192.203.17.0.
To be divided into three subnets.
Corresponding to three departments.
With 110, 45 and 50 hosts respectively.
D1
(110)
D2
(45)
D3
(50)
The Example (contd.)
• Available subnet options
The network mask will be the Class C
natural mask 255.255.255.0
Subnet masks of the form 255.255.255.X
Can be used to divide the network
into more subnets.
10
4641111 1100252
8321111 1000248
16161111 0000240
3281110 0000224
6441100 0000192
12821000 0000128
No. of
Hosts
No. of
Subnets
X (in
binary)
X
• Cannot satisfy the requirements.
The Subnet Options
The VLSM Option
• Basic concept:
Use the mask 255.255.255.128 to divide
the network address into two subnets
with 128 hosts each.
192.203.17.0 (.0 to .127)
192.203.17.0 (.128 to .255)
11
The VLSM Option (contd.)
Next subnet the second .128 subnet
using a mask of 255.255.255.192.
Creates two subnets, 64 hosts each
192.213.17.128 (.128 to .191)
192.213.17.128 (.192 to .255)
The VLSM Option (contd.)
192.203.17.0
192.203.17.0 (.0 to .127) 192.203.17.0 (.128 to .255)
192.213.17.128 (.128 to .191)
192.213.17.128 (.192 to .255)
Mask:
255.255.255.128
Mask:
255.255.255.192
12
HIDDEN SLIDE
Interface 1 :: 128 hosts
Network number: 192.203.17.0
Network mask: 255.255.255.128
Address: 192.203.17.0 -- .127
Interface 2 :: 64 hosts
Network number: 192.203.17.128
Network mask: 255.255.255.192
Address: 192.203.17.128 -- .191
Interface 3 :: 64 hosts
Network number: 192.203.17.192
Network mask: 255.255.255.192
Address: 192.203.17.192 -- .255
Running out of IP addresses
• Growing demand for IP addresses.
Severe strain on the classful model.
Due to wastage of address space.
• Measures taken:
Creative allocation of IP addresses.
Classless Inter-Domain Routing (CIDR).
Private IP addresses, and Network
Address Translation (NAT).
IP version 6 (IPv6).
13
CIDR: Introduction
• The size of the global routing tables
have grown very fast in recent years.
Caused routers to become saturated.
• CIDR is a new concept to manage IP
networks.
Classless Inter Domain Routing.
No concept of class A, B, C networks.
Reduces sizes of routing tables.
Basic Idea Behind CIDR
• An IP address is represented by a
prefix, which is the IP address of the
network.
• It is followed by a slash, followed by
a number M.
M: number of leftmost contiguous bits
to be used for the network mask.
Example: 144.16.192.57 / 18
14
CIDR: An Important Rule
• The number of addresses in each
block must be a power of 2.
• The beginning address in each block
must be divisible by the number of
addresses in the block.
A block that contains 16 addresses
cannot have beginning address as
144.16.223.36.
But the address 144.16.192.64 is
possible.
Example: CIDR
• An organization is allotted a block with
beginning address:
144.16.192.24 / 29
What is the range of the block?
Start addr: 10010000 00011000 11000000 00011000
End addr: 10010000 00011000 11000000 00011111
There are 8 addresses in the block.
15
Recent Trend
• Move on to CIDR addressing.
Existing classful networks can also be
represented using this notation.
Class A: W.X.Y.Z / 8
Class B: W.X.Y.Z / 16
Class C: W.X.Y.Z / 24
• Recent routers support CIDR.
16
SOLUTIONS TO QUIZ
QUESTIONS ON
LECTURE 5
Quiz Solutions on Lecture 5
1. What does the port number in a TCP
connection specify?
It specifies the communicating
processes on the two end systems.
2. Why is it necessary to have both IP
address and port number in a packet?
IP address identifies the host computer.
Port number identifies a running process
in the host computer.
17
Quiz Solutions on Lecture 5
3. Which of the layers TCP, UDP and IP
provides for reliable communication?
Only TCP provides reliable
communication.
4. Both UDP and IP transmit datagrams. In
what ways are they different?
UDP carries the port numbers of
source and destination, and an
optional checksum, in addition.
Quiz Solutions on Lecture 5
5. What are well-known port numbers?
Port numbers that are assigned to
standard programs and known publicly
are called well-known port numbers.
They lie in the range 1 and 1023.
6. What are ephemeral port numbers?
They are temporary and short-lived port
numbers assigned by client on a per
connection basis. They range from 1024
to 65535.
18
Quiz Solutions on Lecture 5
7. With respect to a transport level
connection, what are the five components
in an association?
a) The protocol (TCP or UDP).
b) Local host IP address (32-bit value).
c) Local port number (16-bit value).
d) Remote host IP address (32-bit value).
e) Remote port number (16-bit value).
Quiz Solutions on Lecture 5
8. Why is the pseudo-header used in
calculating TCP checksum?
To protect TCP from misdelivery from IP.
9. What are the different fields in the pseudo
header?
Source IP address, destination IP address,
protocol, segment length.
19
Quiz Solutions on Lecture 5
10. Suppose that 5000 bytes are transferred over
TCP. The first byte is numbered 20050. What
are the sequence numbers for each segment
if data is sent in four segments with the first
two segments carrying 1000 bytes and the
last two segment carrying 1500 bytes?
Segment 1 20,050 (20,050 to 21,049)
Segment 2 21,050 (21,050 to 22,049)
Segment 3 22,050 (22,050 to 23,549)
Segment 4 23,550 (23,550 to 25,049)
Quiz Solutions on Lecture 5
11. What is the purpose of the PSH flag in the
TCP header?
To “push” TCP data. Typically used to
indicate end of message.
12. What is the purpose of the ACK flag in the
TCP header?
To indicate that the “Acknowledgement”
field is in use.
20
Quiz Solutions on Lecture 5
13. If you are developing a network application
on a reliable LAN environment, which of TCP
or UDP would you prefer, and why?
UDP, because reliability of transmission
need not be worried about. And UDP is
faster than TCP.
QUIZ QUESTIONS ON
LECTURE 6
21
Quiz Questions on Lecture 6
1. For the subnet mask 255.255.192.0, how
many hosts per subnet are possible?
2. In classful addressing, if we are using the
subnet mask 255.255.192.0, which address
class does it correspond to?
3. What is the subnet address if the
destination IP address is 144.16.34.124 and
the subnet mask is 255.255.240.0 ?
4. What is the natural mask for a class C
network?
Quiz Questions on Lecture 6
5. Using simple subnets, is it possible to
divide a network into unequal sized
subnets?
6. For an IP address 10.17.5.122 and subnet
mask 255.255.128.0, what is the subnet
address? How many hosts per subnet
are possible?
7. Among multiple network classes and
subnets, which alternative imposes more
burden on the external router?
22
Quiz Questions on Lecture 6
8. Using VLSM, give a scheme to split a
class C address into four subnets where
the number of hosts required are:
100, 55, 20, 30
9. If the number of hosts required are 100,
50, 50 and 20, can VLSM be used?
10. Can the following be the beginning
addresses in CIDR based addressing?
144.16.192.32/28 188.15.170.55/28
10.17.18.42/28 200.0.100.80/28
Quiz Questions on Lecture 6
11. For a CIDR address of the form W.X.Y.Z/20,
what is the maximum number of hosts
possible in the network?
12. Which of the following can be the starting
address of a CIDR block that contains 512
addresses?
144.16.24.128 144.16.75.0
144.16.24.0 144.16.0.0
23
Indian Institute of Technology Kharagpur

Más contenido relacionado

La actualidad más candente

Cisco.actualtests.200 120.v2013-12-10.by.watson.314q (2 new q)
Cisco.actualtests.200 120.v2013-12-10.by.watson.314q (2 new q)Cisco.actualtests.200 120.v2013-12-10.by.watson.314q (2 new q)
Cisco.actualtests.200 120.v2013-12-10.by.watson.314q (2 new q)keiko277
 
Cisco.exactquestions.200 120.v2014-12-23.by.konrad.338q
Cisco.exactquestions.200 120.v2014-12-23.by.konrad.338qCisco.exactquestions.200 120.v2014-12-23.by.konrad.338q
Cisco.exactquestions.200 120.v2014-12-23.by.konrad.338qkeiko277
 
IP Addressing and Subnetting
IP Addressing and SubnettingIP Addressing and Subnetting
IP Addressing and Subnettingcbtvid
 
Computer Networking: Subnetting and IP Addressing
Computer Networking: Subnetting and IP AddressingComputer Networking: Subnetting and IP Addressing
Computer Networking: Subnetting and IP AddressingBisrat Girma
 
I pv4 address classes
I pv4 address classesI pv4 address classes
I pv4 address classesmail2rajeev10
 
CCNA Exam 640-802 Version 9.3
CCNA Exam 640-802 Version 9.3CCNA Exam 640-802 Version 9.3
CCNA Exam 640-802 Version 9.3Ravi Yasas
 
CyberLab TCP/IP and IP Addressing & Subnetting
CyberLab TCP/IP and IP Addressing & SubnettingCyberLab TCP/IP and IP Addressing & Subnetting
CyberLab TCP/IP and IP Addressing & SubnettingVivek chan
 
Subnetting (FLSM & VLSM) with examples
Subnetting (FLSM & VLSM) with examplesSubnetting (FLSM & VLSM) with examples
Subnetting (FLSM & VLSM) with examplesKrishna Mohan
 
Ip address concepts
Ip address conceptsIp address concepts
Ip address conceptsmyrajendra
 
IP Addressing & subnetting strategy
IP Addressing & subnetting strategyIP Addressing & subnetting strategy
IP Addressing & subnetting strategyMustafa Salam
 
FP 303 COMPUTER NETWORK PAPER FINAL Q
FP 303 COMPUTER NETWORK PAPER FINAL QFP 303 COMPUTER NETWORK PAPER FINAL Q
FP 303 COMPUTER NETWORK PAPER FINAL QSyahriha Ruslan
 
Transport Layer Numericals
Transport Layer NumericalsTransport Layer Numericals
Transport Layer NumericalsManisha Keim
 
IPv4 addressing and subnetting
IPv4 addressing and subnettingIPv4 addressing and subnetting
IPv4 addressing and subnettingShashank Asthana
 
Network Layer Numericals
Network Layer NumericalsNetwork Layer Numericals
Network Layer NumericalsManisha Keim
 

La actualidad más candente (20)

Cisco.actualtests.200 120.v2013-12-10.by.watson.314q (2 new q)
Cisco.actualtests.200 120.v2013-12-10.by.watson.314q (2 new q)Cisco.actualtests.200 120.v2013-12-10.by.watson.314q (2 new q)
Cisco.actualtests.200 120.v2013-12-10.by.watson.314q (2 new q)
 
Cisco.exactquestions.200 120.v2014-12-23.by.konrad.338q
Cisco.exactquestions.200 120.v2014-12-23.by.konrad.338qCisco.exactquestions.200 120.v2014-12-23.by.konrad.338q
Cisco.exactquestions.200 120.v2014-12-23.by.konrad.338q
 
IP Addressing and Subnetting
IP Addressing and SubnettingIP Addressing and Subnetting
IP Addressing and Subnetting
 
Computer Networking: Subnetting and IP Addressing
Computer Networking: Subnetting and IP AddressingComputer Networking: Subnetting and IP Addressing
Computer Networking: Subnetting and IP Addressing
 
I pv4 address classes
I pv4 address classesI pv4 address classes
I pv4 address classes
 
CCNA Exam 640-802 Version 9.3
CCNA Exam 640-802 Version 9.3CCNA Exam 640-802 Version 9.3
CCNA Exam 640-802 Version 9.3
 
CyberLab TCP/IP and IP Addressing & Subnetting
CyberLab TCP/IP and IP Addressing & SubnettingCyberLab TCP/IP and IP Addressing & Subnetting
CyberLab TCP/IP and IP Addressing & Subnetting
 
Vlsm
VlsmVlsm
Vlsm
 
Subnetting (FLSM & VLSM) with examples
Subnetting (FLSM & VLSM) with examplesSubnetting (FLSM & VLSM) with examples
Subnetting (FLSM & VLSM) with examples
 
Ip addressing
Ip addressingIp addressing
Ip addressing
 
IP Subnetting
IP SubnettingIP Subnetting
IP Subnetting
 
Ip address concepts
Ip address conceptsIp address concepts
Ip address concepts
 
IP Addressing & subnetting strategy
IP Addressing & subnetting strategyIP Addressing & subnetting strategy
IP Addressing & subnetting strategy
 
FP 303 COMPUTER NETWORK PAPER FINAL Q
FP 303 COMPUTER NETWORK PAPER FINAL QFP 303 COMPUTER NETWORK PAPER FINAL Q
FP 303 COMPUTER NETWORK PAPER FINAL Q
 
Transport Layer Numericals
Transport Layer NumericalsTransport Layer Numericals
Transport Layer Numericals
 
Explaining ip address
Explaining ip addressExplaining ip address
Explaining ip address
 
Ip addressing classful
Ip addressing classfulIp addressing classful
Ip addressing classful
 
IPv4 addressing and subnetting
IPv4 addressing and subnettingIPv4 addressing and subnetting
IPv4 addressing and subnetting
 
Network Layer Numericals
Network Layer NumericalsNetwork Layer Numericals
Network Layer Numericals
 
IP addressing
IP addressingIP addressing
IP addressing
 

Destacado (6)

Dee2034 chapter 5 counter
Dee2034 chapter 5 counterDee2034 chapter 5 counter
Dee2034 chapter 5 counter
 
Week11 lec1
Week11 lec1Week11 lec1
Week11 lec1
 
Ch19
Ch19Ch19
Ch19
 
Ch20
Ch20Ch20
Ch20
 
Classless addressing
Classless addressingClassless addressing
Classless addressing
 
Classless subnetting
Classless subnettingClassless subnetting
Classless subnetting
 

Similar a Lecture 06

IP_ADDRESSING_AND_SUBNETTING.pptx
IP_ADDRESSING_AND_SUBNETTING.pptxIP_ADDRESSING_AND_SUBNETTING.pptx
IP_ADDRESSING_AND_SUBNETTING.pptxgamerchan1
 
Microsoft windows server 2003
Microsoft windows server 2003Microsoft windows server 2003
Microsoft windows server 2003bishal mahat
 
Ip Addressing Basics
Ip Addressing BasicsIp Addressing Basics
Ip Addressing Basicstmavroidis
 
Rashmi T S-Intrenship PPT.pptx
Rashmi T S-Intrenship PPT.pptxRashmi T S-Intrenship PPT.pptx
Rashmi T S-Intrenship PPT.pptxManojGowdaKb
 
Free CCNA workbook by networkers home pdf
Free CCNA workbook by networkers home pdfFree CCNA workbook by networkers home pdf
Free CCNA workbook by networkers home pdfNetworkershome
 
Subnetting and routing
Subnetting and routingSubnetting and routing
Subnetting and routingGaurav Juneja
 
Chapter 8 - IP Subnetting, Troubleshooting and Introduction to NAT 9e
Chapter 8 - IP Subnetting, Troubleshooting and Introduction to NAT 9eChapter 8 - IP Subnetting, Troubleshooting and Introduction to NAT 9e
Chapter 8 - IP Subnetting, Troubleshooting and Introduction to NAT 9eadpeer
 
Computer Networks Module III
Computer Networks Module IIIComputer Networks Module III
Computer Networks Module IIIAjit Nayak
 
CCNAX 200 120 dumps
CCNAX 200 120 dumpsCCNAX 200 120 dumps
CCNAX 200 120 dumpsabdulquyyum
 

Similar a Lecture 06 (20)

Network Layer V.ppt
Network Layer V.pptNetwork Layer V.ppt
Network Layer V.ppt
 
TCP IP Addressing
TCP IP AddressingTCP IP Addressing
TCP IP Addressing
 
Lecture 03 networking
Lecture 03 networkingLecture 03 networking
Lecture 03 networking
 
How IP address works
How IP address worksHow IP address works
How IP address works
 
IP_ADDRESSING_AND_SUBNETTING.pptx
IP_ADDRESSING_AND_SUBNETTING.pptxIP_ADDRESSING_AND_SUBNETTING.pptx
IP_ADDRESSING_AND_SUBNETTING.pptx
 
Subnetting class C
Subnetting class CSubnetting class C
Subnetting class C
 
Microsoft windows server 2003
Microsoft windows server 2003Microsoft windows server 2003
Microsoft windows server 2003
 
Ip Addressing Basics
Ip Addressing BasicsIp Addressing Basics
Ip Addressing Basics
 
Rashmi T S-Intrenship PPT.pptx
Rashmi T S-Intrenship PPT.pptxRashmi T S-Intrenship PPT.pptx
Rashmi T S-Intrenship PPT.pptx
 
Free CCNA workbook by networkers home pdf
Free CCNA workbook by networkers home pdfFree CCNA workbook by networkers home pdf
Free CCNA workbook by networkers home pdf
 
Subnetting and routing
Subnetting and routingSubnetting and routing
Subnetting and routing
 
Chapter 8 - IP Subnetting, Troubleshooting and Introduction to NAT 9e
Chapter 8 - IP Subnetting, Troubleshooting and Introduction to NAT 9eChapter 8 - IP Subnetting, Troubleshooting and Introduction to NAT 9e
Chapter 8 - IP Subnetting, Troubleshooting and Introduction to NAT 9e
 
CCNA 200-120 Exam Quick Notes
CCNA 200-120 Exam Quick NotesCCNA 200-120 Exam Quick Notes
CCNA 200-120 Exam Quick Notes
 
Day 5.5 subnetting
Day 5.5 subnettingDay 5.5 subnetting
Day 5.5 subnetting
 
Mod10
Mod10Mod10
Mod10
 
Computer Networks Module III
Computer Networks Module IIIComputer Networks Module III
Computer Networks Module III
 
CCNA DUMPS 200-120
CCNA DUMPS 200-120CCNA DUMPS 200-120
CCNA DUMPS 200-120
 
CCNAX 200 120 dumps
CCNAX 200 120 dumpsCCNAX 200 120 dumps
CCNAX 200 120 dumps
 
Subnetting
SubnettingSubnetting
Subnetting
 
CCNA Icnd110 s04l03
CCNA Icnd110 s04l03CCNA Icnd110 s04l03
CCNA Icnd110 s04l03
 

Último

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 

Último (20)

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 

Lecture 06

  • 1. 1 IP Subnetting and Addressing Indian Institute of Technology Kharagpur Prof Indranil Sengupta Computer Science and Engineering Indian Institute of Technology Kharagpur Lecture 6: IP Subnetting and Addressing On completion, the student will be able to: 1. Explain the concept of IP subnets, and subnet masks. 2. Compare the benefits of using subnets against multiple address classes. 3. Explain the concept of variable length subnet mask (VLSM) with example. 4. Explain how classless inter-domain routing (CIDR) helps in better address assignment.
  • 2. 2 IP Subnetting IP Subnet • Basic concept: A subset of a class A, B or C network. • IP addresses that do not use subnets consists of a network portion, and a host portion. Represents a static two-level hierarchical addressing model.
  • 3. 3 IP Subnet (contd.) • IP subnets introduces a third level of hierarchy. a network portion a subnet portion a host portion Allow more efficient (and structured) utilization of the addresses. Uses network masks. Natural Masks • Network mask 255.0.0.0 is applied to a class A network 10.0.0.0. In binary, the mask is a series of contiguous 1’s followed by a series of contiguous 0’s. 11111111 00000000 00000000 00000000 Network portion Host portion
  • 4. 4 Natural Masks (contd.) • Provide a mechanism to split the IP address 10.0.0.20 into a network portion of 10, and a host portion of 20. Decimal Binary IP address:10.0.0.20 00001010 00000000 00000000 00010100 Mask: 255.0.0.0 11111111 00000000 00000000 00000000 Network Host Natural Masks (contd.) • Class A, B and C addresses Have fixed division of network and host portions. Can be expressed as masks. Called natural masks. • Natural Masks Class A :: 255.0.0.0 Class B :: 255.255.0.0 Class C :: 255.255.255.0
  • 5. 5 Creating Subnets using Masks • Masks are very flexible. Using masks, networks can be divided into smaller subnets. • How? By extending the network portion of the address into the host portion. • Advantage gained: We can create a large number of subnets from one network. Can have less number of hosts per network. Example: Subnets • Network mask 255.255.0.0 is applied to a class A network 10.0.0.0. This divides the IP address 10.5.0.20 into a network portion of 10, a subnet portion of 5, and a host portion of 20. The 255.255.0.0 mask borrows a portion of the host space, and applies it to network space.
  • 6. 6 Subnets (contd.) • What happens? Initially it was a single large Class A network (224-2 hosts). We have now split the network into 256 subnets. From 10.0.0.0 to 10.255.0.0. The hosts pet subnet decreases to 65,534. Subnets (contd.) Decimal Binary IP address: 10.5.0.20 00001010 00000101 00000000 00010100 Mask: 255.255.0.0 11111111 11111111 00000000 00000000 Network Subnet Host
  • 7. 7 Default Mask and Subnet mask AND AND Default Mask 255.255.0.0 Subnet Mask 255.255.192.0 IP Address 144.16.72.57 IP Address 144.16.72.57 Network Address 144.16.0.0 Network Address 144.16.64.0 192: 1100 0000 72: 0100 1000 Subnets vrs Multiple Address Classes • Subnets Management of subnets is done by local network administrator. Single entry in external router tables. • Multiple Address Classes Multiple entries in external router tables. Additional overhead on the backbone (external) routers.
  • 8. 8 Comparison R R R R R R SUBNETS MULTIPLE ADDRESS CLASSES Variable Length Subnet Masks (VLSM) • Basic concept The same network can be configured with different masks. Can have subnets of different sizes. Allows better utilization of available addresses.
  • 9. 9 Example: VLSM • Suppose we are assigned a Class C network 192.203.17.0. To be divided into three subnets. Corresponding to three departments. With 110, 45 and 50 hosts respectively. D1 (110) D2 (45) D3 (50) The Example (contd.) • Available subnet options The network mask will be the Class C natural mask 255.255.255.0 Subnet masks of the form 255.255.255.X Can be used to divide the network into more subnets.
  • 10. 10 4641111 1100252 8321111 1000248 16161111 0000240 3281110 0000224 6441100 0000192 12821000 0000128 No. of Hosts No. of Subnets X (in binary) X • Cannot satisfy the requirements. The Subnet Options The VLSM Option • Basic concept: Use the mask 255.255.255.128 to divide the network address into two subnets with 128 hosts each. 192.203.17.0 (.0 to .127) 192.203.17.0 (.128 to .255)
  • 11. 11 The VLSM Option (contd.) Next subnet the second .128 subnet using a mask of 255.255.255.192. Creates two subnets, 64 hosts each 192.213.17.128 (.128 to .191) 192.213.17.128 (.192 to .255) The VLSM Option (contd.) 192.203.17.0 192.203.17.0 (.0 to .127) 192.203.17.0 (.128 to .255) 192.213.17.128 (.128 to .191) 192.213.17.128 (.192 to .255) Mask: 255.255.255.128 Mask: 255.255.255.192
  • 12. 12 HIDDEN SLIDE Interface 1 :: 128 hosts Network number: 192.203.17.0 Network mask: 255.255.255.128 Address: 192.203.17.0 -- .127 Interface 2 :: 64 hosts Network number: 192.203.17.128 Network mask: 255.255.255.192 Address: 192.203.17.128 -- .191 Interface 3 :: 64 hosts Network number: 192.203.17.192 Network mask: 255.255.255.192 Address: 192.203.17.192 -- .255 Running out of IP addresses • Growing demand for IP addresses. Severe strain on the classful model. Due to wastage of address space. • Measures taken: Creative allocation of IP addresses. Classless Inter-Domain Routing (CIDR). Private IP addresses, and Network Address Translation (NAT). IP version 6 (IPv6).
  • 13. 13 CIDR: Introduction • The size of the global routing tables have grown very fast in recent years. Caused routers to become saturated. • CIDR is a new concept to manage IP networks. Classless Inter Domain Routing. No concept of class A, B, C networks. Reduces sizes of routing tables. Basic Idea Behind CIDR • An IP address is represented by a prefix, which is the IP address of the network. • It is followed by a slash, followed by a number M. M: number of leftmost contiguous bits to be used for the network mask. Example: 144.16.192.57 / 18
  • 14. 14 CIDR: An Important Rule • The number of addresses in each block must be a power of 2. • The beginning address in each block must be divisible by the number of addresses in the block. A block that contains 16 addresses cannot have beginning address as 144.16.223.36. But the address 144.16.192.64 is possible. Example: CIDR • An organization is allotted a block with beginning address: 144.16.192.24 / 29 What is the range of the block? Start addr: 10010000 00011000 11000000 00011000 End addr: 10010000 00011000 11000000 00011111 There are 8 addresses in the block.
  • 15. 15 Recent Trend • Move on to CIDR addressing. Existing classful networks can also be represented using this notation. Class A: W.X.Y.Z / 8 Class B: W.X.Y.Z / 16 Class C: W.X.Y.Z / 24 • Recent routers support CIDR.
  • 16. 16 SOLUTIONS TO QUIZ QUESTIONS ON LECTURE 5 Quiz Solutions on Lecture 5 1. What does the port number in a TCP connection specify? It specifies the communicating processes on the two end systems. 2. Why is it necessary to have both IP address and port number in a packet? IP address identifies the host computer. Port number identifies a running process in the host computer.
  • 17. 17 Quiz Solutions on Lecture 5 3. Which of the layers TCP, UDP and IP provides for reliable communication? Only TCP provides reliable communication. 4. Both UDP and IP transmit datagrams. In what ways are they different? UDP carries the port numbers of source and destination, and an optional checksum, in addition. Quiz Solutions on Lecture 5 5. What are well-known port numbers? Port numbers that are assigned to standard programs and known publicly are called well-known port numbers. They lie in the range 1 and 1023. 6. What are ephemeral port numbers? They are temporary and short-lived port numbers assigned by client on a per connection basis. They range from 1024 to 65535.
  • 18. 18 Quiz Solutions on Lecture 5 7. With respect to a transport level connection, what are the five components in an association? a) The protocol (TCP or UDP). b) Local host IP address (32-bit value). c) Local port number (16-bit value). d) Remote host IP address (32-bit value). e) Remote port number (16-bit value). Quiz Solutions on Lecture 5 8. Why is the pseudo-header used in calculating TCP checksum? To protect TCP from misdelivery from IP. 9. What are the different fields in the pseudo header? Source IP address, destination IP address, protocol, segment length.
  • 19. 19 Quiz Solutions on Lecture 5 10. Suppose that 5000 bytes are transferred over TCP. The first byte is numbered 20050. What are the sequence numbers for each segment if data is sent in four segments with the first two segments carrying 1000 bytes and the last two segment carrying 1500 bytes? Segment 1 20,050 (20,050 to 21,049) Segment 2 21,050 (21,050 to 22,049) Segment 3 22,050 (22,050 to 23,549) Segment 4 23,550 (23,550 to 25,049) Quiz Solutions on Lecture 5 11. What is the purpose of the PSH flag in the TCP header? To “push” TCP data. Typically used to indicate end of message. 12. What is the purpose of the ACK flag in the TCP header? To indicate that the “Acknowledgement” field is in use.
  • 20. 20 Quiz Solutions on Lecture 5 13. If you are developing a network application on a reliable LAN environment, which of TCP or UDP would you prefer, and why? UDP, because reliability of transmission need not be worried about. And UDP is faster than TCP. QUIZ QUESTIONS ON LECTURE 6
  • 21. 21 Quiz Questions on Lecture 6 1. For the subnet mask 255.255.192.0, how many hosts per subnet are possible? 2. In classful addressing, if we are using the subnet mask 255.255.192.0, which address class does it correspond to? 3. What is the subnet address if the destination IP address is 144.16.34.124 and the subnet mask is 255.255.240.0 ? 4. What is the natural mask for a class C network? Quiz Questions on Lecture 6 5. Using simple subnets, is it possible to divide a network into unequal sized subnets? 6. For an IP address 10.17.5.122 and subnet mask 255.255.128.0, what is the subnet address? How many hosts per subnet are possible? 7. Among multiple network classes and subnets, which alternative imposes more burden on the external router?
  • 22. 22 Quiz Questions on Lecture 6 8. Using VLSM, give a scheme to split a class C address into four subnets where the number of hosts required are: 100, 55, 20, 30 9. If the number of hosts required are 100, 50, 50 and 20, can VLSM be used? 10. Can the following be the beginning addresses in CIDR based addressing? 144.16.192.32/28 188.15.170.55/28 10.17.18.42/28 200.0.100.80/28 Quiz Questions on Lecture 6 11. For a CIDR address of the form W.X.Y.Z/20, what is the maximum number of hosts possible in the network? 12. Which of the following can be the starting address of a CIDR block that contains 512 addresses? 144.16.24.128 144.16.75.0 144.16.24.0 144.16.0.0
  • 23. 23 Indian Institute of Technology Kharagpur