SlideShare a Scribd company logo
1 of 109
4

Tutun Juhana
Telecommunication Engineering

Network Layer (Part 7)

School of Electrical Engineering & Informatics
Institut Teknologi Bandung

Computer Networks
UNICAST ROUTING PROTOCOLS
(RIP, OSPF, AND BGP)
INTRODUCTION

3
Cost or Metric
• A router is usually attached to several networks
 when it receives a packet, to which network
should it pass the packet?
• The decision is based on optimization: Which of
the available pathways is the optimum pathway?
What is the definition of the term optimum?
• One approach is to assign a cost for passing
through a network  We call this cost a metric
• High cost can be thought of as something bad;
low cost can be thought of something good
4
Static versus Dynamic Routing Tables
• A static table is one with manual entries
• A dynamic table, on the other hand, is one
that is updated automatically when there is
a change somewhere in the internet

5
Routing Protocol
• A routing protocol is a combination of rules and
procedures that lets routers in the internet inform
each other of changes
• It allows routers to share whatever they know
about the internet or their neighborhood
• The routing protocols also include procedures
for combining information received from other
routers
• Routing protocols can be either an interior
protocol or an exterior protocol
– An interior protocol handles intradomain routing
– an exterior protocol handles interdomain routing

6
INTRA- AND INTER-DOMAIN
ROUTING
7
a group of networks and routers under the authority of a single administration

intra-domain routing

inter-domain routing
AS Numbers is
assigned for each AS
Ex: ITB’s ASN is
4796
8
9
DISTANCE VECTOR ROUTING

10
• This method sees an AS, with all routers
and networks, as a graph, a set of nodes
and lines (edges) connecting the nodes
– A router normally be represented by a node
– A network be represented by a link
connecting two nodes

• The graph theory used Bellman-Ford (also
called Ford-Fulkerson) algorithm to find
the shortest path between nodes in a
graph given the distance between nodes

11
Bellman-Ford Algorithm

•
•

It looks circular
To solve the problem, we use iteration to create a shortest distance table
(vector) for each node using the following steps:
1.
2.
3.

The shortest distance and the cost between a node and itself is initialized to 0.
The shortest distance between a node and any other node is set to infinity. The cost between a
node and any other node should be given (can be infinity if the nodes are not connected)
The algorithm repeat as shown in Figure 11.4 until there is no more change in the shortest
distance vector.
12
13
Distance Vector Routing Algorithm

14
15
16
17
18
19
20
Count to Infinity

21
• In distance vector routing, any decrease in cost
(good news) propagates quickly, but any
increase in cost (bad news) propagates slowly
• For a routing protocol to work properly, if a link is
broken (cost becomes infinity), every other
router should be aware of it immediately, but in
distance vector routing, this takes some time.
• The problem is referred to as count to infinity 
takes several updates before the cost for a
broken link is recorded as infinity by all routers.
22
• Example of count to infinity
Two-Node Loop

23
A converged network

Source
http://technet.microsoft.com/en-s/library/cc940478.aspx
24

Another example
The solutions

25
Defining Infinity
• The first obvious
solution to count to
infinity is to redefine
infinity to a smaller
number
• Most implementations of the Distance Vector
Protocol define 16 as infinity
– However, this means that distance vector cannot be
used in large systems  The size of the network, in
each direction, can not exceed 15 hops
26
Split Horizon

Split horizon helps reduce convergence time by not
allowing routers to advertise networks in the
direction from which those networks were learned

27
Source
http://technet.microsoft.com/en-s/library/cc940478.aspx
28
Split Horizon and Poison Reverse
Iit announces all networks. However, those networks learned in a
given direction are announced with a hop count of 16, indicating
that the network is unreachable  It avoids the Distance Vector
Protocol deleting the route because it has no news about it during a
certain time duration (timer)

29
30
Three-Node Instability

31
RIP
Routing Information Protocol
32
RIP implements distance vector routing directly with some
considerations

33
34
RIP Message Format

35
Requests and Responses

36
Request
• A request message is sent by a router that
has just come up or by a router that has
some time-out entries.

37
Response
• A response can be :
– Solicited: sent only in answer to a request.
• It contains information about the destination
specified in the corresponding request

– Unsolicited: is sent periodically
• every 30 seconds or
• when there is a change in the routing table

• The response is sometimes called an
update packet
38
39
Timers in RIP

controls the
advertising of
regular update
messages

Governs the validity of a
route. If the timer is
reached, route is
declared unreachable,
but does not immediately
purge, instead, it
continues to advertise
the route with a metric
value of 16.

At the same time when a
route declared unreachable,
the garbage collection timer
is set to 120 s for that route.
When the count reaches
zero, the route is purged
from the table.

40
41
RIP Version 2

• It supports
– Classless Addressing
– Authentication
– Multicasting  uses the all-router multicast
address to send the RIP messages only to
RIP routers in the network.

42
Encapsulation

43
LINK STATE ROUTING

44
Each node in the domain
has the entire topology
of the domain  use
Dijkstra algorithm to
build a routing table
The routing table for
each node is unique
because the calculations
are based on different
interpretations of the
topology

45
The whole topology can be compiled from the partial knowledge of each
node (it knows the state (type, condition, and cost) of its links)

46
BUILDING ROUTING TABLES

47
48
Creation of Link State Packet (LSP)
• A link state packet (LSP) carries (among others
huge information)
1.
2.
3.
4.

The node identity
The list of links
A sequence number
Age

• The first two are needed to make the topology
• The third facilitates flooding and distinguishes
new LSPs from old ones
• The fourth prevents old LSPs from remaining in
the domain for a long time
49
• LSPs are generated on two occasions:
– When there is a change in the topology of the
domain
– On a periodic basis
• Much longer compared to distance vector
routing in the range of 60 minutes or 2 hours
based on the implementation

50
Flooding of LSPs

51
Formation of Shortest Path Tree:
Dijkstra Algorithm
• After receiving all LSPs, each node will
have a copy of the whole topology not
sufficient to find the shortest path to every
other node  a shortest path tree is
needed
• A shortest path tree is a tree in which the
path between the root and every other
node is the shortest
• What we need for each node is a shortest
path tree with that node as the root
52
Dijkstra algorithm

53
54
55
56
Calculation of Routing Table from
Shortest Path Tree

57
OSPF
Open Shortest Path First
58
Area
• OSPF divides an autonomous system into
areas
• An area is a collection of networks, hosts,
and routers all contained within an
autonomous system
• All networks inside an area must be
connected

59
• Routers inside an area flood the area with
routing information
• At the border of an area, special routers
called area border routers summarize the
information about the area and send it to
other areas

60
•

All of the areas inside an autonomous
system must be connected to a special
area called the backbone area
–

The backbone serves as a primary area and
the other areas as secondary areas

– This does not mean that the routers
within areas cannot be connected to
each other

• The routers inside the backbone are
called the backbone routers
– backbone router can also be an
area border router

• Each area has an area identification
• The area identification of the
backbone is zero
61
62
If, because of some problem, the
connectivity between a backbone and an
area is broken, a virtual link between routers
must be created by the administration to
allow continuity of the functions of the
backbone as the primary area

63
Metric
• The OSPF protocol allows the
administrator to assign a cost, called the
metric, to each route
• The metric can be based on a type of
service (minimum delay, maximum
throughput, and so on)
• As a matter of fact, a router can have
multiple routing tables, each based on a
different type of service
64
Types of Links
In OSPF terminology, a connection is called a link

65
Point-to-Point Link

There is no need to assign a network address to
this type of link

66
Transient Link
• A transient link is a network with several routers
attached to it

•
•

It is not efficient  each router needs
to advertise the neighborhood to four
other routers
It is not realistic there is no single
network (link) between each pair of
routers (there is only one network
(not router)that serves as a crossroad
between all five routers)

•

•
•

To show that each router is connected to
every other router through one single
network  the network itself is represented
by a node
A network is not a machine  it cannot
function as a router
So, one of the routers in the network takes
this responsibility  It is assigned a dual
purpose  it is a true router and a
67
designated router
• While there is a metric from each node to the designated
router, there is no metric from the designated router to
any other node  We can only assign a cost to a packet
that is passing through the network (We cannot charge
for this twice)
– When a packet enters a network, we assign a cost; when a
packet leaves the network to go to the router, there is no charge
68
Stub Link

• A special case of the transient network
• The link is only onedirectional, from the
router to the network
69
Virtual Link
When the link between two routers is
broken, the administration may create a
virtual link between them using a longer path
that probably goes through several routers

70
Graphical Representation

71
OSPF Packets

72
Common Header

73
Link State Update Packet

74
Router Link LSA

75
76
77
78
Network Link LSA

79
80
81
82
Summary Link to Network LSA

The summary link to network LSA is used by the area border router to
announce the existence of other networks outside the area
83
84
Summary Link to AS Boundary Router LSA

85
86
External Link LSA

87
Other Packets
• They are not used as LSAs, but are
essential to the operation of OSPF

88
Hello Message
• OSPF uses the hello message to create
neighborhood relationships and to test the
reachability of neighbors

89
Database Description Message

90
Link State Request Packet

91
Link State Acknowledgment Packet

92
Encapsulation

93
PATH VECTOR ROUTING

94
Path vector routing is exterior routing
protocol proved to be useful for interdomain
or inter-AS routing

95
Reachability

96
Routing Tables

• A path vector routing table for each router can
be created if ASs share their reachability list with
each other
97
Loop Prevention
The instability of distance vector routing and
the creation of loops can be avoided in path
vector routing. When a router receives a
reachability information, it checks to see if its
autonomous system is in the path list to any
destination. If it is, looping is involved and
that network-path pair is discarded.

98
Aggregation

99
Policy Routing
When a router receives a message, it can
check the path. If one of the autonomous
systems listed in the path is against its
policy, it can ignore that path and that
destination. It does not update its routing
table with this path, and it does not send this
message to its neighbors

100
BGP
Border Gateway Protocol
An interdomain routing protocol
101
Types of Autonomous Systems
• Stub AS
• Multihomed AS
• Transit AS

102
Stub AS
• A stub AS has only one connection to
another AS
• The hosts in the AS can send data traffic
to other Ass
• The hosts in the AS can receive data
coming from hosts in other Ass
• Data traffic cannot pass through a stub AS
• A stub AS is either a source or a sink
103
Multihomed AS
• A multihomed AS has more than one
connection to other ASs, but it is still only
a source or sink for data traffic
• It can receive data traffic from more than
one AS
• It can send data traffic to more than one
AS, but there is no transient traffic
• It does not allow data coming from one AS
and going to another AS to pass through
104
Transit AS
A transit AS is a multihomed AS that also
allows transient traffic. Good examples of
transit ASs are national and international
ISPs (Internet backbones)

105
CIDR
BGP uses classless interdomain routing
addresses. In other words, BGP uses a
prefix to define a destination address. The
address and the number of bits (prefix
length) are used in updating messages

106
Path Attributes
• Well-known attribute
– One that every BGP router must recognize
1. Well-known mandatory attribute
– one that must appear in the description of a route

2. well-known discretionary attribute
– one that must be recognized by each router, but is not required
to be included in every update message

• Optional attribute
– one that needs not be recognized by every router
1. optional transitive attribute
– one that must be passed to the next router by the router that
has not implemented this attribute

2. optional nontransitive attribute
– one that must be discarded if the receiving router has not implemented
107
it.
A session is a connection that is established between two BGP
routers only for the sake of exchanging routing information.

108
109

More Related Content

What's hot

Routing table and routing algorithms
Routing table and routing algorithmsRouting table and routing algorithms
Routing table and routing algorithms
lavanyapathy
 
Chapter 06 - Routing
Chapter 06 - RoutingChapter 06 - Routing
Chapter 06 - Routing
phanleson
 

What's hot (20)

Layer 3
Layer 3Layer 3
Layer 3
 
11 routing
11 routing11 routing
11 routing
 
Routing and routing algorithms
Routing and routing algorithmsRouting and routing algorithms
Routing and routing algorithms
 
Routing Protocols
Routing ProtocolsRouting Protocols
Routing Protocols
 
Ccna day3
Ccna day3Ccna day3
Ccna day3
 
Ospf
OspfOspf
Ospf
 
Network Routing | Computer Science
Network Routing | Computer ScienceNetwork Routing | Computer Science
Network Routing | Computer Science
 
Routing table and routing algorithms
Routing table and routing algorithmsRouting table and routing algorithms
Routing table and routing algorithms
 
Routing table
Routing tableRouting table
Routing table
 
Presentation Routing algorithm
Presentation Routing algorithmPresentation Routing algorithm
Presentation Routing algorithm
 
Routing algorithms
Routing algorithmsRouting algorithms
Routing algorithms
 
Computer networks network layer,routing
Computer networks network layer,routingComputer networks network layer,routing
Computer networks network layer,routing
 
Performance Analysis and Simulation of OLSR Routing Protocol in MANET
Performance Analysis and Simulation of  OLSR Routing Protocol in MANET Performance Analysis and Simulation of  OLSR Routing Protocol in MANET
Performance Analysis and Simulation of OLSR Routing Protocol in MANET
 
Routing
RoutingRouting
Routing
 
Routing protocols
Routing protocolsRouting protocols
Routing protocols
 
OLSR | Optimized Link State Routing Protocol
OLSR | Optimized Link State Routing ProtocolOLSR | Optimized Link State Routing Protocol
OLSR | Optimized Link State Routing Protocol
 
IP essentials
IP essentialsIP essentials
IP essentials
 
Ospf
OspfOspf
Ospf
 
Introduction to backwards learning algorithm
Introduction to backwards learning algorithmIntroduction to backwards learning algorithm
Introduction to backwards learning algorithm
 
Chapter 06 - Routing
Chapter 06 - RoutingChapter 06 - Routing
Chapter 06 - Routing
 

Similar to Network layer Part 7

Et3003 sem2-1314-9 network layers vi (routing protocols)
Et3003 sem2-1314-9 network layers vi (routing protocols)Et3003 sem2-1314-9 network layers vi (routing protocols)
Et3003 sem2-1314-9 network layers vi (routing protocols)
Tutun Juhana
 
Routing Protocols.pptx
Routing Protocols.pptxRouting Protocols.pptx
Routing Protocols.pptx
sazia7
 
Routing protocols-network-layer
Routing protocols-network-layerRouting protocols-network-layer
Routing protocols-network-layer
Nitesh Singh
 
06.CS2005-NetworkLayer-2021_22(1) (1).pptx
06.CS2005-NetworkLayer-2021_22(1) (1).pptx06.CS2005-NetworkLayer-2021_22(1) (1).pptx
06.CS2005-NetworkLayer-2021_22(1) (1).pptx
PocketRocketDC
 

Similar to Network layer Part 7 (20)

Et3003 sem2-1314-9 network layers vi (routing protocols)
Et3003 sem2-1314-9 network layers vi (routing protocols)Et3003 sem2-1314-9 network layers vi (routing protocols)
Et3003 sem2-1314-9 network layers vi (routing protocols)
 
DSR,LSR,IGMP,RIP,OSPF.ppt
DSR,LSR,IGMP,RIP,OSPF.pptDSR,LSR,IGMP,RIP,OSPF.ppt
DSR,LSR,IGMP,RIP,OSPF.ppt
 
Routing Protocols.pptx
Routing Protocols.pptxRouting Protocols.pptx
Routing Protocols.pptx
 
Routing.ppt
Routing.pptRouting.ppt
Routing.ppt
 
ROUTING PROTOCOLS new.pptx
ROUTING PROTOCOLS new.pptxROUTING PROTOCOLS new.pptx
ROUTING PROTOCOLS new.pptx
 
Computer networks unit iii
Computer networks    unit iiiComputer networks    unit iii
Computer networks unit iii
 
Routing protocols-network-layer
Routing protocols-network-layerRouting protocols-network-layer
Routing protocols-network-layer
 
Qs.pptx
Qs.pptxQs.pptx
Qs.pptx
 
Module 3 Part B - computer networks module 2 ppt
Module 3 Part B - computer networks module 2 pptModule 3 Part B - computer networks module 2 ppt
Module 3 Part B - computer networks module 2 ppt
 
Unit 4_Network Layer_Part II.pptx
Unit 4_Network Layer_Part II.pptxUnit 4_Network Layer_Part II.pptx
Unit 4_Network Layer_Part II.pptx
 
Unit 3_Network Layer_Part II.pptx
Unit 3_Network Layer_Part II.pptxUnit 3_Network Layer_Part II.pptx
Unit 3_Network Layer_Part II.pptx
 
Routing algorithms mehodology materials doc1
Routing algorithms mehodology materials doc1Routing algorithms mehodology materials doc1
Routing algorithms mehodology materials doc1
 
Ns lecture1: Introduction to Routing Protocol
Ns lecture1: Introduction to Routing ProtocolNs lecture1: Introduction to Routing Protocol
Ns lecture1: Introduction to Routing Protocol
 
routing
routingrouting
routing
 
NP - Unit 4 - Routing - RIP, OSPF and Internet Multicasting
NP - Unit 4 - Routing - RIP, OSPF and Internet MulticastingNP - Unit 4 - Routing - RIP, OSPF and Internet Multicasting
NP - Unit 4 - Routing - RIP, OSPF and Internet Multicasting
 
Lecture number 5 Theory.pdf(machine learning)
Lecture  number  5 Theory.pdf(machine learning)Lecture  number  5 Theory.pdf(machine learning)
Lecture number 5 Theory.pdf(machine learning)
 
06.CS2005-NetworkLayer-2021_22(1) (1).pptx
06.CS2005-NetworkLayer-2021_22(1) (1).pptx06.CS2005-NetworkLayer-2021_22(1) (1).pptx
06.CS2005-NetworkLayer-2021_22(1) (1).pptx
 
MOBILE COMPUTING Unit 4.pptx
 MOBILE COMPUTING Unit 4.pptx MOBILE COMPUTING Unit 4.pptx
MOBILE COMPUTING Unit 4.pptx
 
computer communications
computer communicationscomputer communications
computer communications
 
Experimental Analysis Of On Demand Routing Protocol
Experimental Analysis Of On Demand Routing ProtocolExperimental Analysis Of On Demand Routing Protocol
Experimental Analysis Of On Demand Routing Protocol
 

More from Tutun Juhana

Et3003 sem2-1314-8 network layers v (icmpv4)
Et3003 sem2-1314-8 network layers v (icmpv4)Et3003 sem2-1314-8 network layers v (icmpv4)
Et3003 sem2-1314-8 network layers v (icmpv4)
Tutun Juhana
 
Et3003 sem2-1314-7 network layers iv (ipv4)
Et3003 sem2-1314-7 network layers iv (ipv4)Et3003 sem2-1314-7 network layers iv (ipv4)
Et3003 sem2-1314-7 network layers iv (ipv4)
Tutun Juhana
 
Et3003 sem2-1314-4 network layers i (ipv4 addressing)
Et3003 sem2-1314-4 network layers i (ipv4 addressing)Et3003 sem2-1314-4 network layers i (ipv4 addressing)
Et3003 sem2-1314-4 network layers i (ipv4 addressing)
Tutun Juhana
 

More from Tutun Juhana (20)

What should you prepare for industry 4.0 era
What should you prepare for industry 4.0 eraWhat should you prepare for industry 4.0 era
What should you prepare for industry 4.0 era
 
Internet of Things Security
Internet of Things SecurityInternet of Things Security
Internet of Things Security
 
Et4045-3-attacks-2
Et4045-3-attacks-2Et4045-3-attacks-2
Et4045-3-attacks-2
 
ET4045-3-attacks-1
ET4045-3-attacks-1ET4045-3-attacks-1
ET4045-3-attacks-1
 
ET4045-2-cryptography-3
ET4045-2-cryptography-3ET4045-2-cryptography-3
ET4045-2-cryptography-3
 
ET4045-2-cryptography-2
ET4045-2-cryptography-2ET4045-2-cryptography-2
ET4045-2-cryptography-2
 
ET4045-2-cryptography-1-2014
ET4045-2-cryptography-1-2014ET4045-2-cryptography-1-2014
ET4045-2-cryptography-1-2014
 
ET4045-1-Introduction-2014
ET4045-1-Introduction-2014ET4045-1-Introduction-2014
ET4045-1-Introduction-2014
 
Underlying Technologies Part I (Lecture #4 ET3003 Sem1 2014/2015)
Underlying Technologies Part I (Lecture #4 ET3003 Sem1 2014/2015)Underlying Technologies Part I (Lecture #4 ET3003 Sem1 2014/2015)
Underlying Technologies Part I (Lecture #4 ET3003 Sem1 2014/2015)
 
OSI Reference Model and TCP/IP (Lecture #3 ET3003 Sem1 2014/2015)
OSI Reference Model and TCP/IP (Lecture #3 ET3003 Sem1 2014/2015)OSI Reference Model and TCP/IP (Lecture #3 ET3003 Sem1 2014/2015)
OSI Reference Model and TCP/IP (Lecture #3 ET3003 Sem1 2014/2015)
 
Switching Techniques (Lecture #2 ET3003 Sem1 2014/2015)
Switching Techniques (Lecture #2 ET3003 Sem1 2014/2015)Switching Techniques (Lecture #2 ET3003 Sem1 2014/2015)
Switching Techniques (Lecture #2 ET3003 Sem1 2014/2015)
 
Introduction to Computer Networks (Lecture #1 ET3003 Sem1 2014/2015)
Introduction to Computer Networks (Lecture #1 ET3003 Sem1 2014/2015)Introduction to Computer Networks (Lecture #1 ET3003 Sem1 2014/2015)
Introduction to Computer Networks (Lecture #1 ET3003 Sem1 2014/2015)
 
Et3003 sem2-1314-10 vlans
Et3003 sem2-1314-10 vlansEt3003 sem2-1314-10 vlans
Et3003 sem2-1314-10 vlans
 
Et3003 sem2-1314-8 network layers v (icmpv4)
Et3003 sem2-1314-8 network layers v (icmpv4)Et3003 sem2-1314-8 network layers v (icmpv4)
Et3003 sem2-1314-8 network layers v (icmpv4)
 
Et3003 sem2-1314-7 network layers iv (ipv4)
Et3003 sem2-1314-7 network layers iv (ipv4)Et3003 sem2-1314-7 network layers iv (ipv4)
Et3003 sem2-1314-7 network layers iv (ipv4)
 
Et3003 sem2-1314-6 network layers iii (arp)
Et3003 sem2-1314-6 network layers iii (arp)Et3003 sem2-1314-6 network layers iii (arp)
Et3003 sem2-1314-6 network layers iii (arp)
 
Et3003 sem2-1314-5 network layers ii (intro to routing)
Et3003 sem2-1314-5 network layers ii (intro to routing)Et3003 sem2-1314-5 network layers ii (intro to routing)
Et3003 sem2-1314-5 network layers ii (intro to routing)
 
Et3003 sem2-1314-4 network layers i (ipv4 addressing)
Et3003 sem2-1314-4 network layers i (ipv4 addressing)Et3003 sem2-1314-4 network layers i (ipv4 addressing)
Et3003 sem2-1314-4 network layers i (ipv4 addressing)
 
Et3003 sem2-1314-3 ethernets
Et3003 sem2-1314-3 ethernetsEt3003 sem2-1314-3 ethernets
Et3003 sem2-1314-3 ethernets
 
ET3003-1 introduction (Semester II 2013-2014)
ET3003-1 introduction (Semester II 2013-2014)ET3003-1 introduction (Semester II 2013-2014)
ET3003-1 introduction (Semester II 2013-2014)
 

Recently uploaded

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Recently uploaded (20)

2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 

Network layer Part 7

  • 1. 4 Tutun Juhana Telecommunication Engineering Network Layer (Part 7) School of Electrical Engineering & Informatics Institut Teknologi Bandung Computer Networks
  • 4. Cost or Metric • A router is usually attached to several networks  when it receives a packet, to which network should it pass the packet? • The decision is based on optimization: Which of the available pathways is the optimum pathway? What is the definition of the term optimum? • One approach is to assign a cost for passing through a network  We call this cost a metric • High cost can be thought of as something bad; low cost can be thought of something good 4
  • 5. Static versus Dynamic Routing Tables • A static table is one with manual entries • A dynamic table, on the other hand, is one that is updated automatically when there is a change somewhere in the internet 5
  • 6. Routing Protocol • A routing protocol is a combination of rules and procedures that lets routers in the internet inform each other of changes • It allows routers to share whatever they know about the internet or their neighborhood • The routing protocols also include procedures for combining information received from other routers • Routing protocols can be either an interior protocol or an exterior protocol – An interior protocol handles intradomain routing – an exterior protocol handles interdomain routing 6
  • 8. a group of networks and routers under the authority of a single administration intra-domain routing inter-domain routing AS Numbers is assigned for each AS Ex: ITB’s ASN is 4796 8
  • 9. 9
  • 11. • This method sees an AS, with all routers and networks, as a graph, a set of nodes and lines (edges) connecting the nodes – A router normally be represented by a node – A network be represented by a link connecting two nodes • The graph theory used Bellman-Ford (also called Ford-Fulkerson) algorithm to find the shortest path between nodes in a graph given the distance between nodes 11
  • 12. Bellman-Ford Algorithm • • It looks circular To solve the problem, we use iteration to create a shortest distance table (vector) for each node using the following steps: 1. 2. 3. The shortest distance and the cost between a node and itself is initialized to 0. The shortest distance between a node and any other node is set to infinity. The cost between a node and any other node should be given (can be infinity if the nodes are not connected) The algorithm repeat as shown in Figure 11.4 until there is no more change in the shortest distance vector. 12
  • 13. 13
  • 14. Distance Vector Routing Algorithm 14
  • 15. 15
  • 16. 16
  • 17. 17
  • 18. 18
  • 19. 19
  • 20. 20
  • 22. • In distance vector routing, any decrease in cost (good news) propagates quickly, but any increase in cost (bad news) propagates slowly • For a routing protocol to work properly, if a link is broken (cost becomes infinity), every other router should be aware of it immediately, but in distance vector routing, this takes some time. • The problem is referred to as count to infinity  takes several updates before the cost for a broken link is recorded as infinity by all routers. 22
  • 23. • Example of count to infinity Two-Node Loop 23
  • 26. Defining Infinity • The first obvious solution to count to infinity is to redefine infinity to a smaller number • Most implementations of the Distance Vector Protocol define 16 as infinity – However, this means that distance vector cannot be used in large systems  The size of the network, in each direction, can not exceed 15 hops 26
  • 27. Split Horizon Split horizon helps reduce convergence time by not allowing routers to advertise networks in the direction from which those networks were learned 27
  • 29. Split Horizon and Poison Reverse Iit announces all networks. However, those networks learned in a given direction are announced with a hop count of 16, indicating that the network is unreachable  It avoids the Distance Vector Protocol deleting the route because it has no news about it during a certain time duration (timer) 29
  • 30. 30
  • 33. RIP implements distance vector routing directly with some considerations 33
  • 34. 34
  • 37. Request • A request message is sent by a router that has just come up or by a router that has some time-out entries. 37
  • 38. Response • A response can be : – Solicited: sent only in answer to a request. • It contains information about the destination specified in the corresponding request – Unsolicited: is sent periodically • every 30 seconds or • when there is a change in the routing table • The response is sometimes called an update packet 38
  • 39. 39
  • 40. Timers in RIP controls the advertising of regular update messages Governs the validity of a route. If the timer is reached, route is declared unreachable, but does not immediately purge, instead, it continues to advertise the route with a metric value of 16. At the same time when a route declared unreachable, the garbage collection timer is set to 120 s for that route. When the count reaches zero, the route is purged from the table. 40
  • 41. 41
  • 42. RIP Version 2 • It supports – Classless Addressing – Authentication – Multicasting  uses the all-router multicast address to send the RIP messages only to RIP routers in the network. 42
  • 45. Each node in the domain has the entire topology of the domain  use Dijkstra algorithm to build a routing table The routing table for each node is unique because the calculations are based on different interpretations of the topology 45
  • 46. The whole topology can be compiled from the partial knowledge of each node (it knows the state (type, condition, and cost) of its links) 46
  • 48. 48
  • 49. Creation of Link State Packet (LSP) • A link state packet (LSP) carries (among others huge information) 1. 2. 3. 4. The node identity The list of links A sequence number Age • The first two are needed to make the topology • The third facilitates flooding and distinguishes new LSPs from old ones • The fourth prevents old LSPs from remaining in the domain for a long time 49
  • 50. • LSPs are generated on two occasions: – When there is a change in the topology of the domain – On a periodic basis • Much longer compared to distance vector routing in the range of 60 minutes or 2 hours based on the implementation 50
  • 52. Formation of Shortest Path Tree: Dijkstra Algorithm • After receiving all LSPs, each node will have a copy of the whole topology not sufficient to find the shortest path to every other node  a shortest path tree is needed • A shortest path tree is a tree in which the path between the root and every other node is the shortest • What we need for each node is a shortest path tree with that node as the root 52
  • 54. 54
  • 55. 55
  • 56. 56
  • 57. Calculation of Routing Table from Shortest Path Tree 57
  • 59. Area • OSPF divides an autonomous system into areas • An area is a collection of networks, hosts, and routers all contained within an autonomous system • All networks inside an area must be connected 59
  • 60. • Routers inside an area flood the area with routing information • At the border of an area, special routers called area border routers summarize the information about the area and send it to other areas 60
  • 61. • All of the areas inside an autonomous system must be connected to a special area called the backbone area – The backbone serves as a primary area and the other areas as secondary areas – This does not mean that the routers within areas cannot be connected to each other • The routers inside the backbone are called the backbone routers – backbone router can also be an area border router • Each area has an area identification • The area identification of the backbone is zero 61
  • 62. 62
  • 63. If, because of some problem, the connectivity between a backbone and an area is broken, a virtual link between routers must be created by the administration to allow continuity of the functions of the backbone as the primary area 63
  • 64. Metric • The OSPF protocol allows the administrator to assign a cost, called the metric, to each route • The metric can be based on a type of service (minimum delay, maximum throughput, and so on) • As a matter of fact, a router can have multiple routing tables, each based on a different type of service 64
  • 65. Types of Links In OSPF terminology, a connection is called a link 65
  • 66. Point-to-Point Link There is no need to assign a network address to this type of link 66
  • 67. Transient Link • A transient link is a network with several routers attached to it • • It is not efficient  each router needs to advertise the neighborhood to four other routers It is not realistic there is no single network (link) between each pair of routers (there is only one network (not router)that serves as a crossroad between all five routers) • • • To show that each router is connected to every other router through one single network  the network itself is represented by a node A network is not a machine  it cannot function as a router So, one of the routers in the network takes this responsibility  It is assigned a dual purpose  it is a true router and a 67 designated router
  • 68. • While there is a metric from each node to the designated router, there is no metric from the designated router to any other node  We can only assign a cost to a packet that is passing through the network (We cannot charge for this twice) – When a packet enters a network, we assign a cost; when a packet leaves the network to go to the router, there is no charge 68
  • 69. Stub Link • A special case of the transient network • The link is only onedirectional, from the router to the network 69
  • 70. Virtual Link When the link between two routers is broken, the administration may create a virtual link between them using a longer path that probably goes through several routers 70
  • 74. Link State Update Packet 74
  • 76. 76
  • 77. 77
  • 78. 78
  • 80. 80
  • 81. 81
  • 82. 82
  • 83. Summary Link to Network LSA The summary link to network LSA is used by the area border router to announce the existence of other networks outside the area 83
  • 84. 84
  • 85. Summary Link to AS Boundary Router LSA 85
  • 86. 86
  • 88. Other Packets • They are not used as LSAs, but are essential to the operation of OSPF 88
  • 89. Hello Message • OSPF uses the hello message to create neighborhood relationships and to test the reachability of neighbors 89
  • 91. Link State Request Packet 91
  • 95. Path vector routing is exterior routing protocol proved to be useful for interdomain or inter-AS routing 95
  • 97. Routing Tables • A path vector routing table for each router can be created if ASs share their reachability list with each other 97
  • 98. Loop Prevention The instability of distance vector routing and the creation of loops can be avoided in path vector routing. When a router receives a reachability information, it checks to see if its autonomous system is in the path list to any destination. If it is, looping is involved and that network-path pair is discarded. 98
  • 100. Policy Routing When a router receives a message, it can check the path. If one of the autonomous systems listed in the path is against its policy, it can ignore that path and that destination. It does not update its routing table with this path, and it does not send this message to its neighbors 100
  • 101. BGP Border Gateway Protocol An interdomain routing protocol 101
  • 102. Types of Autonomous Systems • Stub AS • Multihomed AS • Transit AS 102
  • 103. Stub AS • A stub AS has only one connection to another AS • The hosts in the AS can send data traffic to other Ass • The hosts in the AS can receive data coming from hosts in other Ass • Data traffic cannot pass through a stub AS • A stub AS is either a source or a sink 103
  • 104. Multihomed AS • A multihomed AS has more than one connection to other ASs, but it is still only a source or sink for data traffic • It can receive data traffic from more than one AS • It can send data traffic to more than one AS, but there is no transient traffic • It does not allow data coming from one AS and going to another AS to pass through 104
  • 105. Transit AS A transit AS is a multihomed AS that also allows transient traffic. Good examples of transit ASs are national and international ISPs (Internet backbones) 105
  • 106. CIDR BGP uses classless interdomain routing addresses. In other words, BGP uses a prefix to define a destination address. The address and the number of bits (prefix length) are used in updating messages 106
  • 107. Path Attributes • Well-known attribute – One that every BGP router must recognize 1. Well-known mandatory attribute – one that must appear in the description of a route 2. well-known discretionary attribute – one that must be recognized by each router, but is not required to be included in every update message • Optional attribute – one that needs not be recognized by every router 1. optional transitive attribute – one that must be passed to the next router by the router that has not implemented this attribute 2. optional nontransitive attribute – one that must be discarded if the receiving router has not implemented 107 it.
  • 108. A session is a connection that is established between two BGP routers only for the sake of exchanging routing information. 108
  • 109. 109