SlideShare une entreprise Scribd logo
1  sur  22
Chapter 4
Network Layer
Computer Networking: A
Top Down Approach
4th edition.
Jim Kurose, Keith Ross
Addison-Wesley, July
2007.
Classless Addressing
•To overcome address depletion
•No classes, but the address are still granted in blocks.
•The size of the block( the number of addresses) varies based
on the nature and size of the entity.
• Household: 2 addresses
•Large organization: thousands of addresses
• ISP: thousands or hundreds of thousands based on the
number of customers it may serve.
•The number of addresses in a block must be power of two
(2,4,8…..).
•Classless Inter Domain Routing (CIDR)
Mask:Slash Notation
• Each mask is made of some ones from
the left and followed by some 0s.
• Instead of 255.255.255.224
– Mask has 27 1s
– Attach this number to a classless address

–x.y.z.t/n
• n defines the number of bits that are same in
every block.
Subnetting
Home Assignment

An organization is granted a block of addresses with the
beginning address 14.24.74.0/24. There are 232−24= 256
addresses in this block. The organization needs to have
11 subnets as shown below:
a. two subnets, each with 64 addresses.
b. two subnets, each with 32 addresses.
c. three subnets, each with 16 addresses.

d. four subnets, each with 4 addresses.
Design the subnets.
Internet and Routing
Basic function of the Internet
 To allow any two hosts to talk to each other using IP

packets

Routing enables data packets to find the way

through the Internet
Depending on the locations of the two hosts, the
delivery can be
 Direct, or
 Indirect
Direct delivery
Indirect delivery
How do hosts make routing
decisions?
When a host X receives a packet to be
delivered to Y

Host X checks whether Y is within the
same subnet
If yes, directly deliver the packet to

host Y
If no, deliver the packet to the
appropriate router
How can host X tell whether Y is in the
same network?
Exercise
Host X with IP address 130.130.10.10 and

network mask 255.255.255.128 receives the
following two packets:
 Packet A destined for 130.130.10.56
 Packet B destined for 130.130.10.156

Determine whether they will be delivered

directly or indirectly?.
Solution
Host IP address is 130.130.10.10
Subnet mask is 255.255.255.128

Network address is 130.130.10.0
Address range 130.130.10.0 to 130.130.10.127
Packet A will be delivered directly
Packet B will be delivered indirectly
CIDR and Routing
Information
Company X :

ISP X owns:

National ISP

206.0.68.0/22

206.0.64.0/18
204.188.0.0/15
209.88.232.0/21

ISP y :
209.88.237.0/24

Organization z1 :

Organization z2 :

209.88.237.192/26

209.88.237.0/26
CIDR and Routing
Information

Routers in National ISP do not
know anything about Company
X, ISP Y, or Organizations z1, z2.

Company X :
ISP X does not know about
Organizations z1, z2.

National ISP

206.0.68.0/22
ISP X owns:
ISP y sends everything which matches
the prefix:
206.0.64.0/18
209.88.237.192/26 to Organization z1
204.188.0.0/15
209.88.237.0/26 to Organization z2
209.88.232.0/21

ISP X sends everything which
matches the prefix:
206.0.68.0/22 to Company X,
209.88.237.0/24 to ISP y

National ISP sends everything
which matches the prefixes
206.0.64.0/18, 204.188.0.0/15,
209.88.232.0/21 to ISP X.

ISP y :
209.88.237.0/24

Organization z1 :

Organization z2 :

209.88.237.192/26

209.88.237.0/26
Routing Protocols

• Define how routers exchange network information
– What type of information
– The format of information exchange
– When to exchange
– Which router to exchange information with
• Examples
– Routing Information Protocol (RIP)
– Enhanced Interior Gateway Routing Protocol
(EIGRP)
– CISCO Proprietary

– Open Shortest Path First (OSPF)
– Border Gateway Protocol (BGP)
Routing Algorithms
Given a set of routers a
routing algorithm finds a
“Good” path from source
router to destination router
Least cost path

routing algorithm

local forwarding table
header value output link
0100
0101
0111
1001

A graph is used to
formulate routing problems
A Graph G=(N,E) is a

Set of N nodes and a
collection E of edges
Nodes in the graph
represent Routers
Edges represent physical
links

3
2
2
1

packet’s header
0111

1
3 2
Graph Abstraction
5
2

u

v
2

1

x

3

w
3

1

5

z

1

y

2

Graph: G = (N,E)

N = set of routers = { u, v, w, x, y, z }
E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) }
Graph Abstraction: costs
5
2

u

v
2

1

x

• c(x,x‟) = cost of link (x,x‟)

3

w
3

1

5

z

1

y

2

- e.g., c(w,z) = 5
• Cost can be
•Physical length of the link
•Delay etc.

Cost of path (x1, x2, x3,…, xp) = c(x1,x2) + c(x2,x3) + … + c(xp-1,xp)
Question: What‟s the least-cost path between u and z ?

Routing algorithm: Algorithm that finds least-cost path
Routing Algorithm Classification
Global Routing Algorithm

Decentralized Routing
Algorithm

 Computes least cost path

 No node has complete








using complete global
knowledge about the
network.
Takes connectivity between
all nodes and all link costs
as input.
All routers have complete
topology, link cost
information
Also called “Link State”
Algorithms
Used by Open Shortest
Path First Protocol (OSPF)








information about the cost
of all links.
In the beginning knowledge
of its own directly attached
links.
Computes least cost path by
an iterative process of
calculation and exchange of
information.
Also called Distance Vector
(DV) Algorithm
Used by Routing Information
Protocol (RIP)
Link-State Routing Algorithm
 Network topology and link

costs are known to all
nodes
 Each node broadcast
link state packets to all
other nodes in the
network
 Each link state packet
contains the identities
and cost of its attached
links
Dijkstra‟s Algorithm
 Computes least cost paths
from one node („source”) to
all other nodes
 Iterative: After k
iterations, least cost paths
to k destinations are known

Notation:
 D(v): Current value of least
cost path from source to
destination (v).

 p(v): Predecessor node along
path from source to v
 N': Subset of nodes whose
least cost path is definitively
known
Dijkstra‟s Algorithm: Example
Step
0
1
2
3
4
5

N'
u
ux
uxy
uxyv
uxyvw
uxyvwz

D(v),p(v) D(w),p(w)
2,u
5,u
2,u
4,x
2,u
3,y
3,y

5
2

u

v
2

1

x

D(x),p(x)
1,u

D(y),p(y)
∞
2,x

D(z),p(z)
∞
∞

4,y
4,y
4,y

Resulting forwarding table in u:
3

w
3

1

5

z

1

y

destination

2

link

x

(u,x)

y

(u,x)

v
w
z

(u,v)
(u,x)
(u,x)
Dijkstra‟s Algorithm
5

1 Initialization:
3
v
w
2 N' = {u}
2
3 for all nodes v
u
2
1
4
if v is a neighbor of u
3
1
5
then D(v) = c(u,v)
x
y
1
6
else D(v) = ∞
7
8 Loop
9 find w not in N' such that D(w) is a minimum
10 add w to N'
11 update D(v) for each neighbor v of w and not in N' :
12
D(v) = min( D(v), D(w) + c(w,v) )
13 /* new cost to v is either old cost to v or known
14 shortest path cost to w plus cost from w to v */
15 until all nodes in N'

5

z
2
Dijkstra‟s Algorithm-Example

Find the shortest path from S to all nodes using Dijkstra‟s
Algorithm?
Solution
Step
0

N’
s

D(x), p(x)

D(t),p(t)

D(u),p(u)

D(v),p(v)

D(w),p(w)

D(y),p(y)

D(z),p(z)

∞

1,s

4,s

∞

∞

∞

∞

1

st

∞

3,t

5,t

∞

8,t

6,t

2

stu

∞

5,t

6,u

8,t

6,t

3

stuv

8,v

6,u

6,v

6,t

4

stuvy

8,v

6,u

5

stuvyz

8,v

6,u

6

stuvyzw

8,v

7

stuvyzwx

6,t

Contenu connexe

Tendances

Internet Technology (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2013...
Internet Technology (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2013...Internet Technology (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2013...
Internet Technology (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2013...Mumbai B.Sc.IT Study
 
Final exam review answer(networking)
Final exam review answer(networking)Final exam review answer(networking)
Final exam review answer(networking)welcometofacebook
 
Cloud computing and security final
Cloud computing and security finalCloud computing and security final
Cloud computing and security finalAkash Kamble
 
Computer Networks Homework Help
Computer Networks Homework HelpComputer Networks Homework Help
Computer Networks Homework HelpAssignmentpedia
 
Networking basics and basic cisco commands
Networking basics and basic cisco commandsNetworking basics and basic cisco commands
Networking basics and basic cisco commandsKrishna Mohan
 
Solve Ip Address Problem By Yapa Wijeratne
Solve Ip Address Problem By Yapa WijeratneSolve Ip Address Problem By Yapa Wijeratne
Solve Ip Address Problem By Yapa WijeratneYapa
 
Subnet questions with ans(networking)
Subnet questions with ans(networking)Subnet questions with ans(networking)
Subnet questions with ans(networking)welcometofacebook
 
Enhancement and performance evaluation of a multicast routing mechanism in zi...
Enhancement and performance evaluation of a multicast routing mechanism in zi...Enhancement and performance evaluation of a multicast routing mechanism in zi...
Enhancement and performance evaluation of a multicast routing mechanism in zi...Raja' Masa'deh
 
Cloud computing and security 03
Cloud computing and security 03Cloud computing and security 03
Cloud computing and security 03Akash Kamble
 
Computer Communication Networks-Routing protocols 1
Computer Communication Networks-Routing protocols 1Computer Communication Networks-Routing protocols 1
Computer Communication Networks-Routing protocols 1Krishna Nanda
 

Tendances (20)

Internet Technology (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2013...
Internet Technology (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2013...Internet Technology (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2013...
Internet Technology (Practical Questions Paper) [CBSGS - 75:25 Pattern] {2013...
 
CINAF protocol
CINAF protocolCINAF protocol
CINAF protocol
 
Final exam review answer(networking)
Final exam review answer(networking)Final exam review answer(networking)
Final exam review answer(networking)
 
Ip addressing
Ip addressingIp addressing
Ip addressing
 
Lightweight Address Hopping forDefending the IPv6 IoT
Lightweight Address Hopping forDefending the IPv6 IoTLightweight Address Hopping forDefending the IPv6 IoT
Lightweight Address Hopping forDefending the IPv6 IoT
 
Cloud computing and security final
Cloud computing and security finalCloud computing and security final
Cloud computing and security final
 
Computer Networks Homework Help
Computer Networks Homework HelpComputer Networks Homework Help
Computer Networks Homework Help
 
3 ip address
3 ip address3 ip address
3 ip address
 
Vlsm
VlsmVlsm
Vlsm
 
Lecture 06
Lecture 06Lecture 06
Lecture 06
 
Prb#5
Prb#5Prb#5
Prb#5
 
Lecture 03 networking
Lecture 03 networkingLecture 03 networking
Lecture 03 networking
 
Networking basics and basic cisco commands
Networking basics and basic cisco commandsNetworking basics and basic cisco commands
Networking basics and basic cisco commands
 
Solve Ip Address Problem By Yapa Wijeratne
Solve Ip Address Problem By Yapa WijeratneSolve Ip Address Problem By Yapa Wijeratne
Solve Ip Address Problem By Yapa Wijeratne
 
Subnet questions with ans(networking)
Subnet questions with ans(networking)Subnet questions with ans(networking)
Subnet questions with ans(networking)
 
Enhancement and performance evaluation of a multicast routing mechanism in zi...
Enhancement and performance evaluation of a multicast routing mechanism in zi...Enhancement and performance evaluation of a multicast routing mechanism in zi...
Enhancement and performance evaluation of a multicast routing mechanism in zi...
 
Cloud computing and security 03
Cloud computing and security 03Cloud computing and security 03
Cloud computing and security 03
 
Computer Communication Networks-Routing protocols 1
Computer Communication Networks-Routing protocols 1Computer Communication Networks-Routing protocols 1
Computer Communication Networks-Routing protocols 1
 
Vlsm workbook instructors edition v2 0-solucionario
Vlsm workbook  instructors edition   v2 0-solucionarioVlsm workbook  instructors edition   v2 0-solucionario
Vlsm workbook instructors edition v2 0-solucionario
 
Subnetting
SubnettingSubnetting
Subnetting
 

En vedette

Taller técnicas efectivas de cobranza
Taller técnicas efectivas de cobranzaTaller técnicas efectivas de cobranza
Taller técnicas efectivas de cobranzaantonio soto
 
Alta gastronomia Masia Notari 2014
Alta gastronomia Masia Notari 2014Alta gastronomia Masia Notari 2014
Alta gastronomia Masia Notari 2014Igrafiq Diseño Web
 
What can Lard Oil do for your company?
What can Lard Oil do for your company?What can Lard Oil do for your company?
What can Lard Oil do for your company?Kristen White
 
What did you learn from audience feedback
What did you learn from audience  feedbackWhat did you learn from audience  feedback
What did you learn from audience feedbacklaurabryanmedia1
 
Who are the Summertime Engineering Job Seekers?
Who are the Summertime Engineering Job Seekers?Who are the Summertime Engineering Job Seekers?
Who are the Summertime Engineering Job Seekers?HireEngineers
 
Round up 5
Round up 5Round up 5
Round up 5violina2
 
Atmega16 Microconntroller Data sheet
Atmega16 Microconntroller Data sheetAtmega16 Microconntroller Data sheet
Atmega16 Microconntroller Data sheetMicrotech Solutions
 
運を引き寄せる
運を引き寄せる運を引き寄せる
運を引き寄せるShu Yamada
 
Cim d'àligues. Sessió de vol
Cim d'àligues. Sessió de volCim d'àligues. Sessió de vol
Cim d'àligues. Sessió de volprimariachanel
 
chuvas ácidas e aquecimento global
chuvas ácidas e aquecimento globalchuvas ácidas e aquecimento global
chuvas ácidas e aquecimento globalAna9494
 
Intro boekenteaser
Intro boekenteaserIntro boekenteaser
Intro boekenteaserBibwesterlo
 
Why are your projects missing the mark?
Why are your projects missing the mark?Why are your projects missing the mark?
Why are your projects missing the mark?Swift Software
 
Legal aspects of doing business in the netherlands - 2014
Legal aspects of doing business in the netherlands - 2014Legal aspects of doing business in the netherlands - 2014
Legal aspects of doing business in the netherlands - 2014Loyens & Loeff
 
Daniel and Revlation
Daniel and RevlationDaniel and Revlation
Daniel and RevlationBibliata TV
 

En vedette (17)

Taller técnicas efectivas de cobranza
Taller técnicas efectivas de cobranzaTaller técnicas efectivas de cobranza
Taller técnicas efectivas de cobranza
 
Alta gastronomia Masia Notari 2014
Alta gastronomia Masia Notari 2014Alta gastronomia Masia Notari 2014
Alta gastronomia Masia Notari 2014
 
What can Lard Oil do for your company?
What can Lard Oil do for your company?What can Lard Oil do for your company?
What can Lard Oil do for your company?
 
What did you learn from audience feedback
What did you learn from audience  feedbackWhat did you learn from audience  feedback
What did you learn from audience feedback
 
Who are the Summertime Engineering Job Seekers?
Who are the Summertime Engineering Job Seekers?Who are the Summertime Engineering Job Seekers?
Who are the Summertime Engineering Job Seekers?
 
Round up 5
Round up 5Round up 5
Round up 5
 
Atmega16 Microconntroller Data sheet
Atmega16 Microconntroller Data sheetAtmega16 Microconntroller Data sheet
Atmega16 Microconntroller Data sheet
 
運を引き寄せる
運を引き寄せる運を引き寄せる
運を引き寄せる
 
Cim d'àligues. Sessió de vol
Cim d'àligues. Sessió de volCim d'àligues. Sessió de vol
Cim d'àligues. Sessió de vol
 
Stregthen collaboration
Stregthen collaborationStregthen collaboration
Stregthen collaboration
 
chuvas ácidas e aquecimento global
chuvas ácidas e aquecimento globalchuvas ácidas e aquecimento global
chuvas ácidas e aquecimento global
 
Intro boekenteaser
Intro boekenteaserIntro boekenteaser
Intro boekenteaser
 
Week14 lec1
Week14 lec1Week14 lec1
Week14 lec1
 
Why are your projects missing the mark?
Why are your projects missing the mark?Why are your projects missing the mark?
Why are your projects missing the mark?
 
Legal aspects of doing business in the netherlands - 2014
Legal aspects of doing business in the netherlands - 2014Legal aspects of doing business in the netherlands - 2014
Legal aspects of doing business in the netherlands - 2014
 
Style sheet
Style sheetStyle sheet
Style sheet
 
Daniel and Revlation
Daniel and RevlationDaniel and Revlation
Daniel and Revlation
 

Similaire à Classless Addressing and CIDR

Introduction to Computer Networks
Introduction to Computer NetworksIntroduction to Computer Networks
Introduction to Computer NetworksVenkatesh Iyer
 
Module 3- transport_layer .pptx
Module 3- transport_layer           .pptxModule 3- transport_layer           .pptx
Module 3- transport_layer .pptxhariprasad279825
 
module11-ospf(Open Shortest Path First).ppt
module11-ospf(Open Shortest Path First).pptmodule11-ospf(Open Shortest Path First).ppt
module11-ospf(Open Shortest Path First).pptElectro00
 
module10-rip (1).ppt
module10-rip (1).pptmodule10-rip (1).ppt
module10-rip (1).pptRakesh Dhiman
 
ExOR Multihop Routing in Wireless Networks
ExOR Multihop Routing in Wireless NetworksExOR Multihop Routing in Wireless Networks
ExOR Multihop Routing in Wireless NetworksYatindra shashi
 
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdfmrcopyxerox
 
Powerpoint one
Powerpoint onePowerpoint one
Powerpoint onepqatester
 
Powerpoint one
Powerpoint onePowerpoint one
Powerpoint onepqatester
 
Network layer
Network layerNetwork layer
Network layersbkbca
 
Chapter 3 slides (Distributed Systems)
Chapter 3 slides (Distributed Systems)Chapter 3 slides (Distributed Systems)
Chapter 3 slides (Distributed Systems)soe sumijan
 

Similaire à Classless Addressing and CIDR (20)

Introduction to Computer Networks
Introduction to Computer NetworksIntroduction to Computer Networks
Introduction to Computer Networks
 
Lecture set 5
Lecture set 5Lecture set 5
Lecture set 5
 
Cs8591 Computer Networks
Cs8591 Computer NetworksCs8591 Computer Networks
Cs8591 Computer Networks
 
Week13 lec2
Week13 lec2Week13 lec2
Week13 lec2
 
Week13 lec1
Week13 lec1Week13 lec1
Week13 lec1
 
Cnetwork
CnetworkCnetwork
Cnetwork
 
Module 3- transport_layer .pptx
Module 3- transport_layer           .pptxModule 3- transport_layer           .pptx
Module 3- transport_layer .pptx
 
4d routing
4d routing4d routing
4d routing
 
gofortution
gofortutiongofortution
gofortution
 
Week9 lec1
Week9 lec1Week9 lec1
Week9 lec1
 
module11-ospf.ppt
module11-ospf.pptmodule11-ospf.ppt
module11-ospf.ppt
 
module11-ospf(Open Shortest Path First).ppt
module11-ospf(Open Shortest Path First).pptmodule11-ospf(Open Shortest Path First).ppt
module11-ospf(Open Shortest Path First).ppt
 
module10-rip (1).ppt
module10-rip (1).pptmodule10-rip (1).ppt
module10-rip (1).ppt
 
ExOR Multihop Routing in Wireless Networks
ExOR Multihop Routing in Wireless NetworksExOR Multihop Routing in Wireless Networks
ExOR Multihop Routing in Wireless Networks
 
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
4af46e43-4dc7-4b54-ba8b-3a2594bb5269 j.pdf
 
Powerpoint one
Powerpoint onePowerpoint one
Powerpoint one
 
Powerpoint one
Powerpoint onePowerpoint one
Powerpoint one
 
Routing Algorithm
Routing AlgorithmRouting Algorithm
Routing Algorithm
 
Network layer
Network layerNetwork layer
Network layer
 
Chapter 3 slides (Distributed Systems)
Chapter 3 slides (Distributed Systems)Chapter 3 slides (Distributed Systems)
Chapter 3 slides (Distributed Systems)
 

Plus de syedhaiderraza (20)

Week16 lec1
Week16 lec1Week16 lec1
Week16 lec1
 
Week15 lec1
Week15 lec1Week15 lec1
Week15 lec1
 
Week14 lec2
Week14 lec2Week14 lec2
Week14 lec2
 
Week11 lec1
Week11 lec1Week11 lec1
Week11 lec1
 
Week10 lec1
Week10 lec1Week10 lec1
Week10 lec1
 
Week8 lec2-bscs1
Week8 lec2-bscs1Week8 lec2-bscs1
Week8 lec2-bscs1
 
Week8 lec1-bscs1
Week8 lec1-bscs1Week8 lec1-bscs1
Week8 lec1-bscs1
 
Week5 lec3-bscs1
Week5 lec3-bscs1Week5 lec3-bscs1
Week5 lec3-bscs1
 
Week5 lec2-bscs1
Week5 lec2-bscs1Week5 lec2-bscs1
Week5 lec2-bscs1
 
Week5 lec1-bscs1
Week5 lec1-bscs1Week5 lec1-bscs1
Week5 lec1-bscs1
 
Week4 lec2-bscs1
Week4 lec2-bscs1Week4 lec2-bscs1
Week4 lec2-bscs1
 
Week4 lec1-bscs1
Week4 lec1-bscs1Week4 lec1-bscs1
Week4 lec1-bscs1
 
Week3 lec3-bscs1
Week3 lec3-bscs1Week3 lec3-bscs1
Week3 lec3-bscs1
 
Week3 lec 2
Week3 lec 2Week3 lec 2
Week3 lec 2
 
Week3 lec 1
Week3 lec 1Week3 lec 1
Week3 lec 1
 
Week2 lec3-bscs1
Week2 lec3-bscs1Week2 lec3-bscs1
Week2 lec3-bscs1
 
Week2 lec2-bscs1
Week2 lec2-bscs1Week2 lec2-bscs1
Week2 lec2-bscs1
 
Week2 lec1-bscs1
Week2 lec1-bscs1Week2 lec1-bscs1
Week2 lec1-bscs1
 
Week1 lec2-bscs1
Week1 lec2-bscs1Week1 lec2-bscs1
Week1 lec2-bscs1
 
Week1 lec1-bscs1
Week1 lec1-bscs1Week1 lec1-bscs1
Week1 lec1-bscs1
 

Dernier

Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 

Dernier (20)

Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 

Classless Addressing and CIDR

  • 1. Chapter 4 Network Layer Computer Networking: A Top Down Approach 4th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
  • 2. Classless Addressing •To overcome address depletion •No classes, but the address are still granted in blocks. •The size of the block( the number of addresses) varies based on the nature and size of the entity. • Household: 2 addresses •Large organization: thousands of addresses • ISP: thousands or hundreds of thousands based on the number of customers it may serve. •The number of addresses in a block must be power of two (2,4,8…..). •Classless Inter Domain Routing (CIDR)
  • 3. Mask:Slash Notation • Each mask is made of some ones from the left and followed by some 0s. • Instead of 255.255.255.224 – Mask has 27 1s – Attach this number to a classless address –x.y.z.t/n • n defines the number of bits that are same in every block.
  • 4. Subnetting Home Assignment An organization is granted a block of addresses with the beginning address 14.24.74.0/24. There are 232−24= 256 addresses in this block. The organization needs to have 11 subnets as shown below: a. two subnets, each with 64 addresses. b. two subnets, each with 32 addresses. c. three subnets, each with 16 addresses. d. four subnets, each with 4 addresses. Design the subnets.
  • 5. Internet and Routing Basic function of the Internet  To allow any two hosts to talk to each other using IP packets Routing enables data packets to find the way through the Internet Depending on the locations of the two hosts, the delivery can be  Direct, or  Indirect
  • 8. How do hosts make routing decisions? When a host X receives a packet to be delivered to Y Host X checks whether Y is within the same subnet If yes, directly deliver the packet to host Y If no, deliver the packet to the appropriate router How can host X tell whether Y is in the same network?
  • 9. Exercise Host X with IP address 130.130.10.10 and network mask 255.255.255.128 receives the following two packets:  Packet A destined for 130.130.10.56  Packet B destined for 130.130.10.156 Determine whether they will be delivered directly or indirectly?.
  • 10. Solution Host IP address is 130.130.10.10 Subnet mask is 255.255.255.128 Network address is 130.130.10.0 Address range 130.130.10.0 to 130.130.10.127 Packet A will be delivered directly Packet B will be delivered indirectly
  • 11. CIDR and Routing Information Company X : ISP X owns: National ISP 206.0.68.0/22 206.0.64.0/18 204.188.0.0/15 209.88.232.0/21 ISP y : 209.88.237.0/24 Organization z1 : Organization z2 : 209.88.237.192/26 209.88.237.0/26
  • 12. CIDR and Routing Information Routers in National ISP do not know anything about Company X, ISP Y, or Organizations z1, z2. Company X : ISP X does not know about Organizations z1, z2. National ISP 206.0.68.0/22 ISP X owns: ISP y sends everything which matches the prefix: 206.0.64.0/18 209.88.237.192/26 to Organization z1 204.188.0.0/15 209.88.237.0/26 to Organization z2 209.88.232.0/21 ISP X sends everything which matches the prefix: 206.0.68.0/22 to Company X, 209.88.237.0/24 to ISP y National ISP sends everything which matches the prefixes 206.0.64.0/18, 204.188.0.0/15, 209.88.232.0/21 to ISP X. ISP y : 209.88.237.0/24 Organization z1 : Organization z2 : 209.88.237.192/26 209.88.237.0/26
  • 13. Routing Protocols • Define how routers exchange network information – What type of information – The format of information exchange – When to exchange – Which router to exchange information with • Examples – Routing Information Protocol (RIP) – Enhanced Interior Gateway Routing Protocol (EIGRP) – CISCO Proprietary – Open Shortest Path First (OSPF) – Border Gateway Protocol (BGP)
  • 14. Routing Algorithms Given a set of routers a routing algorithm finds a “Good” path from source router to destination router Least cost path routing algorithm local forwarding table header value output link 0100 0101 0111 1001 A graph is used to formulate routing problems A Graph G=(N,E) is a Set of N nodes and a collection E of edges Nodes in the graph represent Routers Edges represent physical links 3 2 2 1 packet’s header 0111 1 3 2
  • 15. Graph Abstraction 5 2 u v 2 1 x 3 w 3 1 5 z 1 y 2 Graph: G = (N,E) N = set of routers = { u, v, w, x, y, z } E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) }
  • 16. Graph Abstraction: costs 5 2 u v 2 1 x • c(x,x‟) = cost of link (x,x‟) 3 w 3 1 5 z 1 y 2 - e.g., c(w,z) = 5 • Cost can be •Physical length of the link •Delay etc. Cost of path (x1, x2, x3,…, xp) = c(x1,x2) + c(x2,x3) + … + c(xp-1,xp) Question: What‟s the least-cost path between u and z ? Routing algorithm: Algorithm that finds least-cost path
  • 17. Routing Algorithm Classification Global Routing Algorithm Decentralized Routing Algorithm  Computes least cost path  No node has complete     using complete global knowledge about the network. Takes connectivity between all nodes and all link costs as input. All routers have complete topology, link cost information Also called “Link State” Algorithms Used by Open Shortest Path First Protocol (OSPF)     information about the cost of all links. In the beginning knowledge of its own directly attached links. Computes least cost path by an iterative process of calculation and exchange of information. Also called Distance Vector (DV) Algorithm Used by Routing Information Protocol (RIP)
  • 18. Link-State Routing Algorithm  Network topology and link costs are known to all nodes  Each node broadcast link state packets to all other nodes in the network  Each link state packet contains the identities and cost of its attached links Dijkstra‟s Algorithm  Computes least cost paths from one node („source”) to all other nodes  Iterative: After k iterations, least cost paths to k destinations are known Notation:  D(v): Current value of least cost path from source to destination (v).  p(v): Predecessor node along path from source to v  N': Subset of nodes whose least cost path is definitively known
  • 19. Dijkstra‟s Algorithm: Example Step 0 1 2 3 4 5 N' u ux uxy uxyv uxyvw uxyvwz D(v),p(v) D(w),p(w) 2,u 5,u 2,u 4,x 2,u 3,y 3,y 5 2 u v 2 1 x D(x),p(x) 1,u D(y),p(y) ∞ 2,x D(z),p(z) ∞ ∞ 4,y 4,y 4,y Resulting forwarding table in u: 3 w 3 1 5 z 1 y destination 2 link x (u,x) y (u,x) v w z (u,v) (u,x) (u,x)
  • 20. Dijkstra‟s Algorithm 5 1 Initialization: 3 v w 2 N' = {u} 2 3 for all nodes v u 2 1 4 if v is a neighbor of u 3 1 5 then D(v) = c(u,v) x y 1 6 else D(v) = ∞ 7 8 Loop 9 find w not in N' such that D(w) is a minimum 10 add w to N' 11 update D(v) for each neighbor v of w and not in N' : 12 D(v) = min( D(v), D(w) + c(w,v) ) 13 /* new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v */ 15 until all nodes in N' 5 z 2
  • 21. Dijkstra‟s Algorithm-Example Find the shortest path from S to all nodes using Dijkstra‟s Algorithm?