SlideShare a Scribd company logo
Computer Networks – CSE331
Lecture 5
 Unique number that represent universally defines connection of a
device (a router, computer etc)
 IPv4 address is 32bit long identifier
 The address space is 232 or 4,294,967,296 (more that 4 billion)
 4 octets each separated by a dot (dotted decimal notation)
 Each octet is of b bits so 0-255 value
 128.11.3.31
 First address is 146.102.29.0 and the last address is 146.102.32.255
 Subtract first address from last in base 256 0.0.3.255
 Convert this to base 10 & add 1
 See more examples from Forouzan book chapter 5
 (Review your concepts for number conversion)
 The network prefix identifies a network and the host number
identifies a specific host (actually, interface on the network).
 Two level addressing
 How do we know how long the network prefix is?
 The network prefix used to be implicitly defined (class-based
addressing, A,B,C,D…)
 The network prefix now is flexible and is indicated by a
prefix/netmask (classless)
network prefix host number
 Address is associated
with interface
223.1.1.1
223.1.1.2
223.1.1.3
223.1.1.4 223.1.2.9
223.1.2.2
223.1.2.1
223.1.3.2223.1.3.1
223.1.3.27
 When Internet addresses were standardized (early 1980s)
 5 Classes
Network Prefix
 Wastage – not enough addresses an organization require
 Routing table issue
 If 2000 address are required?
 A & B class are much more
 8 class C addresses
 Flexibility required
1 bit reserved so 27 blocks
Hence 128 organizations
24 bits are of host part
Hence 224 hosts in each
127.x.x.x is reserved for loopback address
For complete list see reading material slide
Subnetting
 Problem: Organizations have
multiple networks which are
independently managed
 Solution 1: Allocate an address for
each network
 Difficult to manage
 From the outside of the
organization, each network
must be addressable i.e have
an identifiable address.
 Solution 2: Add another level of
hierarchy to the IP addressing
structure
University Network
Medical
School
Library
Engineering
School
 Split the host number portion of an IP address into a subnet
number and a (smaller) host number
 Result is a 3-layer hierarchy
 Then:
 Subnets can be freely assigned within the organization
 Internally, subnets are treated as separate networks
 Subnet structure is not visible outside the organization
network prefix host number
subnet numbernetwork prefix host number
extended network prefix
Lec 5(Ip Addressing and Subnets)
Will be more in Lab
CIDR: Classless InterDomain Routing
 subnet portion of address of arbitrary length
 address format: a.b.c.d/x, where x is # bits in subnet portion
of address
 Purchase what you need
11001000 00010111 00010000 00000000
subnet
part
host
part
200.23.16.0/23
Can not judge block by looking at address
 230.8.24.56 could belong to many blocks
 So prefix is required, suffix can be changed
 Given 17.63.110.114/24
 Prefix & Suffix length
 No of addresses?
 Network mask?
 First address?
 Last address?
 Given 110.23.120.14/20
 Prefix & Suffix length
 No of addresses?
 Network mask?
 First address?
 Last address?
=> 232-24 = 28 = 256
255.255.255.0
17.63.110.0
17.63.110.255
=> 232-20 = 212 = 4096
20 bits are 1 => 255.255.240.0
First 20 bits => 110.23.112.0
First 20 bits fix, last 12 bits 1 =>
110.23.127.255
24 and 8
20 and 12
CIDR Block Prefix # of Host Addresses
/27 32 hosts
/26 64 hosts
/25 128 hosts
/24 256 hosts
/23 512 hosts
/22 1,024 hosts
/21 2,048 hosts
/20 4,096 hosts
/19 8,192 hosts
/18 16,384 hosts
/17 32,768 hosts
/16 65,536 hosts
/15 131,072 hosts
/14 262,144 hosts
/13 524,288 hosts
206.0.64.0/18
204.188.0.0/15
209.88.232.0/21Internet Backbone
ISP K owns:
Company X :
206.0.68.0/22
ISP Y :
209.88.237.0/24
Organization Z1 :
209.88.237.192/26
Organization Z2 :
209.88.237.0/26
Backbone sends everything
which matches the prefixes
206.0.64.0/18, 204.188.0.0/15,
209.88.232.0/21 to ISP K.
ISP K sends everything which
matches the prefix:
206.0.68.0/22 to Company X,
209.88.237.0/24 to ISP Y
Backbone routers do not know
anything about Company X, ISP
Y, or Organizations Z1, Z2.
ISP K does not know about
Organizations Z1, Z2. ISP Y sends everything which matches
the prefix:
209.88.237.192/26 to Organizations Z1
209.88.237.0/26 to Organizations Z2
 Some Address is 152.4.3.9/21
 We have to make 4 subnets
 Find address for each subnet
 How many bits are now part of subnet address
 How many host we can attach in a subnet
 What is the network mask for each subnet
 What is the first & last address for each subnet
 Forouzan book
 Chapter 5
 Leave NAT
 Reserved addresses
 http://www.inetdaemon.com/tutorials/internet/ip/addresses/specia
l.shtml
 http://www.iana.org/assignments/iana-ipv4-special-registry/iana-
ipv4-special-registry.xhtml
 Or See Original RFC http://www.rfc-editor.org/rfc/rfc5735.txt

More Related Content

PPTX
Pjsmith ip addressing & subnetting madeeasy
PPTX
Subnet Masks
PPT
About ip address
PPTX
NAT and Subnetting
DOCX
Subnet Design
PDF
Assignment subnetting part1 - solutions
PPTX
Subnetting made simple
PPT
network Addressing
Pjsmith ip addressing & subnetting madeeasy
Subnet Masks
About ip address
NAT and Subnetting
Subnet Design
Assignment subnetting part1 - solutions
Subnetting made simple
network Addressing

What's hot (20)

PPT
PDF
13788 3
PPT
IP Subnetting
PPT
Explaining ip address
PPTX
Subnetting
PPTX
Lecture 03 networking
PPTX
Subnet Mask
PPSX
Classless subnetting
PPT
Ip addressing classful
PPT
Ip address concepts
PPTX
Week11 lec1
DOC
I pv4 address classes
PPT
Computer Networking: Subnetting and IP Addressing
PPTX
iP Address ,
PPT
Chapter 19: Logical Addressing
PPSX
CyberLab TCP/IP and IP Addressing & Subnetting
PPTX
Network layer,ipv4, Classful Addressing,notations, Classless addressing,class...
PDF
IP Addressing and Subnetting
PPT
Ip addresses
PPT
Subnetting a class_c_address
13788 3
IP Subnetting
Explaining ip address
Subnetting
Lecture 03 networking
Subnet Mask
Classless subnetting
Ip addressing classful
Ip address concepts
Week11 lec1
I pv4 address classes
Computer Networking: Subnetting and IP Addressing
iP Address ,
Chapter 19: Logical Addressing
CyberLab TCP/IP and IP Addressing & Subnetting
Network layer,ipv4, Classful Addressing,notations, Classless addressing,class...
IP Addressing and Subnetting
Ip addresses
Subnetting a class_c_address
Ad

Similar to Lec 5(Ip Addressing and Subnets) (20)

PPTX
NP - Unit 2 - Internet Addressing, ARP and RARP
PPTX
Ramakant tyagi presentation on ip addressing
PPTX
Lecture_Network_Layer-IP Addressing.pptx
PDF
IP addressing by Mamun Sir
PPTX
Subnetting Presentation
PPT
IP Address
PPT
Module3
PPT
subnetting ipv4-Ipv4 subneeting methodologies
PPTX
CN Unit 3
PPTX
vlsm technologyytfyuftuvygubiugiugu.pptx
PPT
How IP address works
PDF
Subnetting
PPTX
Network.pptx
PPTX
Network
PPTX
Network.pptx
PDF
Lecture 06
PPTX
computer network notes in network layer.
PPT
Ip Addressing Basics
PPTX
An IPv4 address is a 32-bit address, typically represented in dotted decimal ...
PPT
cwest_Sem_1__Ch_10_Supplement__Subnetting.ppt
NP - Unit 2 - Internet Addressing, ARP and RARP
Ramakant tyagi presentation on ip addressing
Lecture_Network_Layer-IP Addressing.pptx
IP addressing by Mamun Sir
Subnetting Presentation
IP Address
Module3
subnetting ipv4-Ipv4 subneeting methodologies
CN Unit 3
vlsm technologyytfyuftuvygubiugiugu.pptx
How IP address works
Subnetting
Network.pptx
Network
Network.pptx
Lecture 06
computer network notes in network layer.
Ip Addressing Basics
An IPv4 address is a 32-bit address, typically represented in dotted decimal ...
cwest_Sem_1__Ch_10_Supplement__Subnetting.ppt
Ad

More from maamir farooq (20)

DOCX
Ooad lab1
PPT
Lesson 03
PPT
Lesson 02
PDF
Php client libray
PDF
Swiftmailer
PDF
PDF
PPTX
PDF
PDF
J query 1.7 cheat sheet
PDF
Assignment
PDF
Java script summary
PDF
PDF
PPTX
PPTX
Css summary
DOCX
Manual of image processing lab
PDF
Session management
PDF
Data management
PPTX
Content provider
Ooad lab1
Lesson 03
Lesson 02
Php client libray
Swiftmailer
J query 1.7 cheat sheet
Assignment
Java script summary
Css summary
Manual of image processing lab
Session management
Data management
Content provider

Recently uploaded (20)

PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Business Ethics Teaching Materials for college
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Institutional Correction lecture only . . .
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Pharmacology of Heart Failure /Pharmacotherapy of CHF
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Week 4 Term 3 Study Techniques revisited.pptx
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
FourierSeries-QuestionsWithAnswers(Part-A).pdf
O5-L3 Freight Transport Ops (International) V1.pdf
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Abdominal Access Techniques with Prof. Dr. R K Mishra
Business Ethics Teaching Materials for college
2.FourierTransform-ShortQuestionswithAnswers.pdf
Institutional Correction lecture only . . .
Module 4: Burden of Disease Tutorial Slides S2 2025
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
VCE English Exam - Section C Student Revision Booklet
Anesthesia in Laparoscopic Surgery in India
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Microbial disease of the cardiovascular and lymphatic systems

Lec 5(Ip Addressing and Subnets)

  • 1. Computer Networks – CSE331 Lecture 5
  • 2.  Unique number that represent universally defines connection of a device (a router, computer etc)  IPv4 address is 32bit long identifier  The address space is 232 or 4,294,967,296 (more that 4 billion)  4 octets each separated by a dot (dotted decimal notation)  Each octet is of b bits so 0-255 value  128.11.3.31
  • 3.  First address is 146.102.29.0 and the last address is 146.102.32.255  Subtract first address from last in base 256 0.0.3.255  Convert this to base 10 & add 1  See more examples from Forouzan book chapter 5  (Review your concepts for number conversion)
  • 4.  The network prefix identifies a network and the host number identifies a specific host (actually, interface on the network).  Two level addressing  How do we know how long the network prefix is?  The network prefix used to be implicitly defined (class-based addressing, A,B,C,D…)  The network prefix now is flexible and is indicated by a prefix/netmask (classless) network prefix host number
  • 5.  Address is associated with interface 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2223.1.3.1 223.1.3.27
  • 6.  When Internet addresses were standardized (early 1980s)  5 Classes Network Prefix
  • 7.  Wastage – not enough addresses an organization require  Routing table issue  If 2000 address are required?  A & B class are much more  8 class C addresses  Flexibility required 1 bit reserved so 27 blocks Hence 128 organizations 24 bits are of host part Hence 224 hosts in each 127.x.x.x is reserved for loopback address For complete list see reading material slide
  • 8. Subnetting  Problem: Organizations have multiple networks which are independently managed  Solution 1: Allocate an address for each network  Difficult to manage  From the outside of the organization, each network must be addressable i.e have an identifiable address.  Solution 2: Add another level of hierarchy to the IP addressing structure University Network Medical School Library Engineering School
  • 9.  Split the host number portion of an IP address into a subnet number and a (smaller) host number  Result is a 3-layer hierarchy  Then:  Subnets can be freely assigned within the organization  Internally, subnets are treated as separate networks  Subnet structure is not visible outside the organization network prefix host number subnet numbernetwork prefix host number extended network prefix
  • 11. Will be more in Lab
  • 12. CIDR: Classless InterDomain Routing  subnet portion of address of arbitrary length  address format: a.b.c.d/x, where x is # bits in subnet portion of address  Purchase what you need 11001000 00010111 00010000 00000000 subnet part host part 200.23.16.0/23
  • 13. Can not judge block by looking at address  230.8.24.56 could belong to many blocks  So prefix is required, suffix can be changed
  • 14.  Given 17.63.110.114/24  Prefix & Suffix length  No of addresses?  Network mask?  First address?  Last address?  Given 110.23.120.14/20  Prefix & Suffix length  No of addresses?  Network mask?  First address?  Last address? => 232-24 = 28 = 256 255.255.255.0 17.63.110.0 17.63.110.255 => 232-20 = 212 = 4096 20 bits are 1 => 255.255.240.0 First 20 bits => 110.23.112.0 First 20 bits fix, last 12 bits 1 => 110.23.127.255 24 and 8 20 and 12
  • 15. CIDR Block Prefix # of Host Addresses /27 32 hosts /26 64 hosts /25 128 hosts /24 256 hosts /23 512 hosts /22 1,024 hosts /21 2,048 hosts /20 4,096 hosts /19 8,192 hosts /18 16,384 hosts /17 32,768 hosts /16 65,536 hosts /15 131,072 hosts /14 262,144 hosts /13 524,288 hosts
  • 16. 206.0.64.0/18 204.188.0.0/15 209.88.232.0/21Internet Backbone ISP K owns: Company X : 206.0.68.0/22 ISP Y : 209.88.237.0/24 Organization Z1 : 209.88.237.192/26 Organization Z2 : 209.88.237.0/26 Backbone sends everything which matches the prefixes 206.0.64.0/18, 204.188.0.0/15, 209.88.232.0/21 to ISP K. ISP K sends everything which matches the prefix: 206.0.68.0/22 to Company X, 209.88.237.0/24 to ISP Y Backbone routers do not know anything about Company X, ISP Y, or Organizations Z1, Z2. ISP K does not know about Organizations Z1, Z2. ISP Y sends everything which matches the prefix: 209.88.237.192/26 to Organizations Z1 209.88.237.0/26 to Organizations Z2
  • 17.  Some Address is 152.4.3.9/21  We have to make 4 subnets  Find address for each subnet  How many bits are now part of subnet address  How many host we can attach in a subnet  What is the network mask for each subnet  What is the first & last address for each subnet
  • 18.  Forouzan book  Chapter 5  Leave NAT  Reserved addresses  http://www.inetdaemon.com/tutorials/internet/ip/addresses/specia l.shtml  http://www.iana.org/assignments/iana-ipv4-special-registry/iana- ipv4-special-registry.xhtml  Or See Original RFC http://www.rfc-editor.org/rfc/rfc5735.txt