Sei sulla pagina 1di 46

Faculty of

Engineering

Computer Network
Routing Protocols

Computer Network
Dr. Ahmed Abdel Halim @ Helwan University
Fall 2018
Dr. Ahmed M. Abd El-Haleem
Assistant Professor in
Communication and Electronic Department
Faculty of Engineering, Helwan University

E-mail: dr.ahmed.m.abd.elhaleem@gmail.com
Routing Protocols
3

 Internet routing protocols employ one of


three approaches to gathering and using
routing information:
 Distance Vector Routing Protocols IRP.
 Link State Routing Protocols IRP.
 Path-vector Routing Protocols ERP.
Approaches to Routing: Distance-vector
4

 First generation routing algorithm for ARPANET


 e.g. used by Routing Information Protocol (RIP)
 Each node (router or host) exchange information
with neighboring nodes.
 Each node maintains vector of link costs for each
directly attached network and, distance and next-
hop vectors for each destination.
 Generally, periodic updates: Changes take long time
to propagate.
 Nodes have an incomplete view of network topology.
Approaches to Routing: Link-state
5

 Designed to overcome drawbacks of distance-vector


1) When a router is initialized, it determines link cost
on each interface.
2) Router then advertises this set of link costs to all
other routers in topology.
3) If link costs change, router advertises new values
4) Each router constructs topology of entire
configuration
 Can calculate shortest path to each destination
 Use to construct routing table with first hop to
each destination
What Exterior Routing Protocols are not
6

 Link-state and distance-vector not effective for


exterior router protocol
 Distance-vector
 Assumes routers share a common distance metric.
 But different AS’s may have different priorities &
needs.
 A distance-vector algorithm gives no information
about the AS’s visited along route.
 Link-state
 Different AS’s may use different metrics and have
different restrictions.
 Flooding of link state information to all routers
unmanageable.
Exterior Router Protocols: Path-vector
7

 Alternative path-vector routing protocol.


 Provides info about which networks can be reached
by a given router and ASs crossed to get there.
 Does not include distance or cost estimate.

 Hence dispenses with concept of routing metrics.

 Have list of all ASs visited on a route.


 Enables router to perform policy routing.
 e.g. avoid path to avoid transiting particular AS.
 e.g. minimizing number of transit ASs.
Routing Protocol: Characteristics
8

 Criteria used to compare routing protocols


includes:
 Time to convergence: how quickly the routers
share routing information and reach a state of
consistent knowledge.
 Scalability: defines how large a network can
become based on the routing protocol that is
deployed.
 Classless (Use of VLSM) or Classful.
 Resource usage: the requirements of a routing
protocol such as memory space, CPU utilization,
and link bandwidth utilization.
9 Distance Vector Routing Protocols
Distance Vector Routing Protocols
10

 Distance Vector Technology - the Meaning


of Distance Vector
– A router using distance vector routing
protocols knows 2 things:
• Distance to final destination or how far it is
to the destination network (hop count).
• Vector, or direction (next-hop), traffic
should be directed (forwarded)
D.V Protocol Characteristics
11

 Periodic updates, even if the topology has not changed.


 Neighbors are routers that share a link and are configured
to use the same routing protocol.
 The router is only aware of the network addresses of
its own interfaces and the remote network addresses
it can reach through its neighbors (not aware of the
network topology).
 Broadcast updates to neighboring routers, that will process
the update. And all other devices will discarding it.
 Some distance vector routing protocols use multicast
addresses instead of broadcast addresses.
 Entire routing table is included with routing update.
D.V Routing Table Maintenance
12

 Periodic Updates:
 A node sends its routing table, normally every 30 s, in
a periodic update. The period depends on the protocol
that is using distance vector routing.

 Triggered Updates:
 A node sends its two-column routing table to its
neighbors anytime there is a change in its routing
table.
 Interface changes state or Route becomes
unreachable or Route is placed in routing table
 The receiving routers, in turn, generate triggered
updates that notify their neighbors of the change.
Distance Vector Routing: Example
13

 In distance vector routing, the least-cost route between any two


nodes is the route with minimum distance.
 Protocol phases: 1. Initialization 2. Sharing 3. Updating
1. Distance Vector Routing (Initialization)
Distance Vector Routing: Example
14

First updating of tables in distance vector routing.


Distance Vector Routing: Example
15

 2. Distance Vector Routing (Updating)

Updating of tables in distance vector routing.


Routing Information Protocol RIPv1
16

 A classful, Distance Vector (DV) routing protocol.


 The destination in a routing table is a network.
 Uses the Bellmann-Ford algorithm for determining
the best route.
 Metric = hop count
 Routes with a hop count > 15 are unreachable
(Infinity is defined as 16)
 any route in an autonomous system using RIP
cannot have more than 15 hops
 Updates are broadcast every 30 seconds
 Capable of load balancing
RIP Operation
17

 RIP uses 2 message types:


 Request message
 This is sent out on startup by each RIP
enabled interface.
 Requests all RIP enabled neighbors to send
routing table.
 Response message
 Message sent to requesting router
containing routing table.
RIP Operation (Cont.)
18

 When the requesting router receives the


responses, it evaluates each route entry.
 If a route entry is new, the receiving router
installs the route in the routing table.
 If the route is already in the table, the existing
entry is replaced if the new entry has a better
hop count.
 The startup router sends a triggered update out
all RIP-enabled interfaces containing its own
routing table so that RIP neighbors can be
informed of any new routes.
RIPv1Message Format (Cont.)
19

 RIP header - divided into 3 fields


– Command field
– Version field
– Must be zero
 Route Entry -
composed of 3
fields
– Address family
identifier
– IP address
– Metric
Difference between RIPv1 &
20
RIPv2
 RIPv1
 A classful distance vector routing protocol
 Does not support VLSM
 Does not send subnet mask in routing update
 Routing updates are broadcast.

 RIPv2
 A classless distance vector routing protocol that is an
enhancement of RIPv1’s features
 Next hop address is included in updates
 Routing updates are multicast
 The use of authentication is an option
RIPv1 vs. RIPv2 Message Formats
21

– RIPv2 Message format is similar to RIPv1 but has


2 extensions
• 1st extension is the subnet mask field
• 2nd extension is the addition of next hop address
22 Link-State Routing
Link-State Routing
23

 Also known as shortest path first (SPF)


algorithms
 These protocols built around Dijkstra’s (SPF)
algorithm
 The shortest path to a destination is not
necessarily the path with the least number of
hops.
Link State Routing
24

Definitions:
Link: is the interface on a router.
Link state: describes of an interface and of its
relationship to its neighboring routers, or this is
the information about the state of the links
including:
- IP address/mask of the interface.
- The type of network it is connected to.
- The routers connected to that network
- The metric (cost) of that link.
Link-State Data-Base (LSDB): is the collection of
all the link-states.
Link-State Routing Process
25

 How routers using Link State Routing Protocols to


reach convergence:-
1) Each router learns about its own directly connected
networks.
2) Link state routers exchange hello packets to discover
neighbors.
3) Each router building its own Link State Packet (LSP).
4) Each router floods its LSP to Neighbors.
5) Each router construct a link state database (LSDB) –
topological map of the network.
6) Each router determine the shortest path Tree using
SPF (Dijkstra) Algorithm.
7) Each router constructing its Routing Table.
Link-State Routing: Operations
26

 Sending Hello Packets to Neighbors


– Purpose of a hello protocol:
• To discover neighbors (that use the same link state
routing protocol) on its link.
• These packets will serve as a keep alive function
Link-State Routing: Operations
27

 Building the Link State Packet


– Each router builds its own Link State Packet
(LSP)
– Contents of LSP:
• State of each directly connected link
• The interface's IP address and subnet
mask.
• Network type, link type.
• Link cost & bandwidth.
• Includes information about neighbors
such as neighbor ID
Link-State Routing: Operations
28
Link-State Routing: Operations
29

 Flooding LSPs to Neighbors


– Once LSP are created they are forwarded out to
neighbors
– After receiving the LSP the neighbor continues to
forward it throughout routing area, without any
intermediate calculations
– Unlike distance vector routing protocols that must
first run the Bellman-Ford algorithm to process
routing updates before sending them to other
routers, link-state routing protocols calculate the
SPF algorithm after the flooding is complete.
– As a result, link-state routing protocols reach
convergence much faster than distance vector
routing protocols.
Link-State Routing: Operations
30

 LSPs are sent out under the following


conditions:
– Initial router start up or routing process
– When there is a change in topology
Link-State Routing: Operations
31

LSPs
 In addition to the link-state information, LSP
includes other information such as:
 Sequence numbers and
 Aging information.

 This information is used by each router to determine


if it has already received the LSP from another
router or if the LSP has newer information than what
is already contained in the link-state database.
 This process allows a router to keep only the most
current information in its link-state database.
Link-State Routing: Operations
32

 Constructing a link state data base


– After each router has propagated its own LSPs using
the link-state flooding process,
– each router will then have an LSP from every link-
state router in the routing area.
– These LSPs are stored in the link-state database.
– Routers use a database to construct a topology map
of the network.
– Each router in the routing area can now use the SPF
algorithm to construct the SPF trees that you saw
earlier.
Link-State Routing: Operations
33
Link-State Routing: Operations
34

 Shortest Path First (SPF) Tree


– Building a portion of the SPF tree
– Process begins by examining R2’s LSP information
Link-State Routing: Operations
35

 Building a portion of the SPF tree


– R1 uses 2nd LSP
• Reason: R1 can create a link from R2 to R5 - this information
is added to R1’s SPF tree
•R1 ignores 1st LSP
• Reason: R1
already knows it’s
connected to R2
 R1 uses 3rd LSP
• Reason: R1 learns
that R2 is
connected to
10.5.0.0/16
• This link is added
to R1’s LSPF
database.
36
Link-State Routing: Operations
 Building a portion of the SPF tree
– R1 examining R3’s LSP information
37
Link-State Routing: Operations
 Building a portion of the SPF tree
– R1 examining R4’s LSP information
Link-State Routing: Operations
38

 Building a portion of the SPF tree


– R1 examining R5’s LSP information
Link-State Routing: Operations
39

 Determining the shortest path


– The shortest path to a destination
determined by adding the costs & finding the
lowest cost
Link-State Routing: Operations
40

 Once the SPF algorithm has determined the


shortest path routes, these routes are placed in
the routing table.
Link-State Routing Protocols
41

 Requirements for using a link state routing protocol


– Memory requirements

• Typically link state routing protocols use more


memory.
• The memory requirements are due to the use of link-
state databases and the creation of the SPF tree.
– Processing Requirements

• More CPU processing is required of link state routing


protocols, because link-state protocols build a
complete map of the topology.
– Bandwidth Requirements

• Initial startup of link state routing protocols can


consume lots of bandwidth, but can also be an issue
on unstable networks.
Open Shortest Path First (OSPF)
Routing Protocol
42

 Link-state routing protocol.


 Use Shortest path first (SPF) algorithm.
 Administrative Distance = 110.
 Hop-count is unlimited.
 Classless routing protocol
 OSPF supports VLSM.
OSPF Routing Protocol
43

 It divides Autonomous Systems (AS’s) into areas


for efficiency.
 Area routers connect its networks.
 Between areas, border routers connect different
areas.
 OSPF builds tables based on cost (metric) e.g.
delay, throughput, etc.
 A router may have several routing tables, each
based on a different metric
OSPF Areas
44
OSPF Areas
45

 Two-level hierarchical routing scheme through


the use of areas
 areas identified by 32-bit id
 each area has its own link state database
which is a collection of Link State
Advertisement (LSA).
 area’s topology hidden from all other areas
 interconnection of areas through Area Border
Routers (ABRs)
 ABR leaks IP addressing information to other
areas through summary LSAs
OSPF Metric
46

 OSPF uses cost as the metric for


determining the best route
– The best route will have the lowest cost
– Cost is based on bandwidth of an interface
• Cost is calculated using the formula
– 108 / bandwidth
– Reference bandwidth
• Defaults to 100Mbps
• Cost is the
Accumulated value
from one router to the
next

Potrebbero piacerti anche