introduction to routing protocols and routing algorithms million … · routing information...

48
Introduction to Routing Protocols and Routing Algorithms Million Aregawi

Upload: others

Post on 12-Mar-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Introduction to Routing Protocols and

Routing Algorithms

Million Aregawi

Page 2: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Routing

• IP routing is the process of moving packets from one network to another network using routers

• A routing protocol is a tool used by routers to dynamically find all the networks in the internetwork, as well as to ensure that all routers have the same routing table. Ex: RIP, OSPF

Page 3: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

• Once all routers know about all networks, a routed protocol can be used to send user data (packets) through the established internetwork. Routed protocols are assigned to an interface and determine the method of packet delivery.

• Examples of routed protocols are Internet Protocol (IP) and IPv6.

Page 4: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Routing Basic

• Routers don’t really care about hosts—they only care about networks and the best path to each network

• The logical network address of the destination host is used to get packets to a network through a routed network

• Hardware address of the host is used to deliver the packet from a router to the correct destination host.

Page 5: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

What should router knows ?

• Destination address• Neighbor routers from which it can learn about

remote networks• Possible routes to all remote networks• The best route to each remote network• How to maintain and verify routing

information

Page 6: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Learn about remote networks

• From neighbor routers or from an administrator.

• The router then builds a routing table

• If a network is directly connected, then the router already knows how to get to it.

Page 7: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

OSI Routing Scheme

A set of Routing Protocols Allows end systems and intermediate

systems to collect and distribute information necessary to determine routes

Routing Information base Table containing all routing relevant

connectivityRouting Algorithms

Uses information in routing information base to derive routes between end systems.

Page 8: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Static and Dynamic Routing

• Static routing, someone hand-type all network locations into the routing table

• In dynamic routing, a protocol on one router communicates with the same protocol running on neighbor routers.

• The routers then update each other about all the networks they know about and place this information into the routing table.

• If a change occurs in the network, the dynamic routing protocols automatically inform all routers about the event

Page 9: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Routing Strategies - Static(Fixed) Routing

• use a single permanent route for each source to destination pair

• determined using a least cost algorithm• route is fixed

– at least until a change in network topology– hence cannot respond to traffic changes

• advantage is simplicity• disadvantage is lack of flexibility

Page 10: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Routing is…

The process of determining, selecting the best outgoing path that a packet has to take in a Internetwork.

Page 11: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Design Goals

OptimalitySimplicitySimplicity and low OverheadRobustness and stabilityRapid ConvergenceFlexibility

Page 12: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Performance Criteria

• used for selection of route

• simplest is “minimum hop”

• can be generalized as “least cost”

Page 13: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Routing Metrics

Path LengthReliabilityDelayBandwidthLoadCommunication cost

Page 14: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Static Routing

• Typically used in hosts– Enter subnet mask, router (gateway), IP address

– Perfect for cases with few connections, doesn’t change much

• E.g. host with a single router connecting to the rest of the Internet

H1 H2 H3

R1Internet

For H1Next Hop: 128.1.1.100

IP: 128.1.1.100

Page 15: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Dynamic Routing• Most routers use dynamic routing

– Automatically build the routing tables– As we saw previously, there are two major approaches

• Link State Algorithms• Distance Vector Algorithms

• First some terminology• AS = Autonomous System

– Contiguous set of networks under one administrative authority– Common routing protocol– E.g. University of Alaska Statewide, Washington State University– E.g. Intel Corporation– A connected network

• There is at least one route between any pair of nodes

Page 16: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Routing Protocols

• Distance Vector Routing Protocols– Each node sends its routing table (dest, distance) to

all neighbors every 30 seconds– Lower distances are updated with the neighbor as

next hop– cannot scale– cannot resolve routing loops quickly

– RIP is the main offender

Page 17: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

17

Distance Vector Algorithm

• Distance vector algorithms (also known as Bellman-Ford algorithms) call for each router to send all or some portion of its routing table only to its neighbors.

• Distance vector algorithms perform routing decisions based upon information provided by neighboring routers.

• Distance vector protocols use fewer system resources but can suffer from slow convergence and may use metrics that do not scale well to larger systems.

Page 18: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Distance Vector Routing Bellman Ford/ Ford Fulkerson Algorithm - Original ARPANET

routing algorithm AppleTalk and CISCO routers use improves distance vector

protocols Each router knows the id of every other router in the

network. Each router maintains a vector with an entry for every

destination that contains: The cost to reach the destination from this router. The direct link that is on that least cost path.

Each router, periodically sends its vector to his direct neighbors.

Upon receiving a vector a router updates the local vector based on the direct link’s cost and the received vector.

Page 19: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Routing Protocols

• Link State Routing Protocols– Each link, the connected nodes and the metric is

flooded to all routers– Each link up/down status change is incrementally

flooded– Each router re-computes the routing table in

parallel using the common link state database

– OSPF is the main protocol in use today

Page 20: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

20

Link State Algorithm

• Link-state algorithms (also known as shortest path first algorithms) flood routing information to all routers in the internetwork that creates a map of the entire network.

• Misinformation, this is not the reason why. – “Because they converge more quickly than distance vector protocols, link-state algorithms are less prone to routing loops.”

Page 21: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Link State Routing

Discover the neighbors and learn the network addresses

Measure the delay or cost to each of the neighbors

Construct a packet telling all it has just learnt

Send this packet to all other routersCompute the shortest path to every

other router

Page 22: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Link State Routing contd..

Each router knows the id of every other router in the network.

Each router maintains a topology map of the whole network.

Each router, periodically floods its link state updates (with its direct connectivity information).

Upon receiving a vector, a router updates the local topology map and re-calculates shortest paths.

Page 23: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Increasing Network Size

Router memory requirements increase.

More CPU time for look up and more bandwidth needed to send status reports.

Routing table size increases with increase in network size.

Page 24: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Hierarchical Routing

Routers divided into Regions.

Regions > Clusters > Zones > Groups >

Internal structure of a region known only to routers within that region.

Different networks do not need to know the topological structure of other ones.

Page 25: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Internet Control Protocols

Routing Information Protocol

Open Shortest Path First

Interior Gateway Routing Protocol

Exterior Gateway protocol

Border Gateway Protocol

Page 26: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

26

Routing Protocols

• RIP – A distance vector interior routing protocol

• IGRP – Cisco's distance vector interior routing protocol

• OSPF – A link-state interior routing protocol

• EIGRP – Cisco’s advanced distance vector interior routing protocol

• BGP – A distance vector exterior routing protocol

Page 27: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

27

Routing ProtocolsRouting Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing protocol. • Hop count is used as the metric for path selection. • If the hop count is greater than 15, the packet is discarded. • Routing updates are broadcast every 30 seconds, by default. Interior Gateway Routing Protocol (IGRP) is a proprietary protocol developed by

Cisco. • It is a distance vector routing protocol. • Bandwidth, load, delay and reliability are used to create a composite metric. • Routing updates are broadcast every 90 seconds, by default. EIGRP is a Cisco proprietary enhanced distance vector routing protocol. • It is an enhanced distance vector routing protocol. • Uses unequal-cost and equal-cost load balancing. • Uses a combination of distance vector and link-state features. • Uses Diffused Update Algorithm (DUAL) to calculate the shortest path. • NO! – [Routing updates are broadcast every 90 seconds or] as triggered by topology

changes.

Page 28: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

28

Routing ProtocolsOpen Shortest Path First (OSPF) is a nonproprietary link-state routing

protocol.

• It is a link-state routing protocol.

• Open standard routing protocol described in RFC 2328.

• Uses the SPF algorithm to calculate the lowest cost to a destination.

• Routing updates are flooded as topology changes occur.

Intermediate System to Intermediate System (IS-IS)

• IS-IS is an Open System Interconnection (OSI) routing protocol originally specified by International Organization for Standardization (ISO) 10589.

• It is a link-state routing protocol.

Border Gateway Protocol (BGP) is an exterior routing protocol.

• It is a distance vector (or path vector) exterior routing protocol

• Used between ISPs or ISPs and clients.

• Used to route Internet traffic between autonomous systems.

Page 29: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

29

IGP vs EGP

• Much of this information is too early to discuss.

• Interior routing protocols are designed for use in a network whose parts are under the control of a single organization.

• An exterior routing protocol is designed for use between two different networks that are under the control of two different organizations.

Page 30: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Routing Information Protocol

The protocol is limited to networks whose longest path is 15 hops.

Inappropriate for larger networks.

Uses fixed metrics to compare alternative routes.

Not appropriate for routing based on dynamic parameters.

Cannot operate within a hierarchical structure.

Page 31: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Open Shortest Path First

OSPF is a link-state routing protocol that calls for the sending of link-state advertisements to all other routers within the same hierarchical area.

As OSPF routers accumulate link-state information, they use the SPF algorithm to calculate the shortest path to each node using Dijkstra’s Shortest Path Algorithm .

Can operate in a hierarchy.Supports multi-path routing and type of service

based routing.

Page 32: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Interior Gateway Routing Protocol

A distance-vector routing protocol.Replaced RIP

Network SizeSingle Metric

IGRP uses five criteria to determine the best path: the link's speed, delay, packet size, loading and reliability.

The weighting factors for each of these metrics can be fixed up by Network Administrators.

Permits multi-path routing.

Page 33: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Exterior Gateway Protocol

First exterior routing protocol to gain widespread accepted on the internet.

Dynamic routing protocol with a very simple design used for communication of reachability information.

It does not use metrics and therefore cannot make intelligent routing decisions

Page 34: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Border Gateway ProtocolInternet standard for inter-domain exterior routing.BGP is used to exchange routing information between Internet

service providers (ISP). External / Interior BGPExtremely robust and scalableSupports classless inter-domain routing.BGP-4, the latest version, lets administrators configure cost

metrics based on policy statements.Routers using BGP, exchange routing information using TCP

connection.

Page 35: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

BGP contd.

BGP communicates with autonomous (local) networks using Internal BGP (IBGP) since it doesn't work well with IGP. The routers inside the autonomous network thus maintain two routing tables: one for the interior gateway protocol and one for IBGP.

Policies are manually configured into each BGP router.Never put Iraq on a route starting at Pentagon.Traffic starting and ending at IBM should not transit

Microsoft.

Page 36: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Routing in an AS

• IRP = Interior Routing Protocol– Also IGP ; Interior Gateway Protocol

– Passes routing information between routers within AS

– Can use routing metric, e.g. hop count or administrative cost

• E.g. two paths from accounting to payroll, a 2 hop path for customers, and a 3 hop path for internal corporate

– Shortest path violates corporate policy for internal employees, so administrator can override the actual cost to 4 hops

– Customers still get the 2 hop path so they pick this route

Page 37: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Routing in an AS

• ERP = Exterior Routing Protocol– Also EGP; Exterior Gateway Protocol

– Passes routing information between routers across AS

– May be more than one AS in internet

– Routing algorithms and tables may differ between different AS

– Finds a path, but can’t find an optimal path since it can’t compare routing metrics via multiple AS

Page 38: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Application of IRP and ERP

Page 39: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Intra-AS Routing

• Also known as Interior Router Protocols (IRP) or Interior Gateway Protocols (IGP)

• Most common:

– RIP: Routing Information Protocol

– OSPF: Open Shortest Path First

– IGRP: Interior Gateway Routing Protocol (Cisco proprietary)

Page 40: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Least Cost Algorithms

• basis for routing decisions– can minimize hop with each link cost 1

– or have link value inversely proportional to capacity

• defines cost of path between two nodes as sum of costs of links traversed– in network of nodes connected by bi-directional links

– where each link has a cost in each direction

• for each pair of nodes, find path with least cost– nb. link costs in different directions may be different

• alternatives: Dijkstra or Bellman-Ford algorithms

Page 41: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Dijkstra’s Algorithm

• finds shortest paths from given source node s to all other nodes

• by developing paths in order of increasing path length

• algorithm runs in stages (next slide)– each time adding node with next shortest path

• algorithm terminates when all nodes processed by algorithm (in set T)

Page 42: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Dijkstra’s Algorithm Method• Step 1 [Initialization]

– T = {s} Set of nodes so far incorporated

– L(n) = w(s, n) for n ≠ s

– initial path costs to neighboring nodes are simply link costs

• Step 2 [Get Next Node]– find neighboring node not in T with least-cost path from s

– incorporate node into T

– also incorporate the edge that is incident on that node and a node in T that contributes to the path

• Step 3 [Update Least-Cost Paths]– L(n) = min[L(n), L(x) + w(x, n)] for all n T

– f latter term is minimum, path from s to n is path from s to x concatenated with edge from x to n

Page 43: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Dijkstra’s Algorithm Example

Page 44: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Bellman-Ford Algorithm

• find shortest paths from given node subject to constraint that paths contain at most one link

• find the shortest paths with a constraint of paths of at most two links

• and so on

Page 45: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Bellman-Ford Algorithm

• step 1 [Initialization]– L0(n) = , for all n s– Lh(s) = 0, for all h

• step 2 [Update] – for each successive h 0

• for each n ≠ s, compute: Lh+1(n)=minj[Lh(j)+w(j,n)]

– connect n with predecessor node j that gives min– eliminate any connection of n with different predecessor

node formed during an earlier iteration– path from s to n terminates with link from j to n

Page 46: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Example of Bellman-Ford Algorithm

Page 47: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Comparison• results from two algorithms agree• Bellman-Ford

– calculation for node n needs link cost to neighbouring nodes plus total cost to each neighbour from s

– each node can maintain set of costs and paths for every other node

– can exchange information with direct neighbors– can update costs and paths based on information from

neighbors and knowledge of link costs

• Dijkstra– each node needs complete topology– must know link costs of all links in network– must exchange information with all other nodes

Page 48: Introduction to Routing Protocols and Routing Algorithms Million … · Routing Information Protocol (RIP) was originally specified in RFC 1058. • It is a distance vector routing

Evaluation

• dependent on – processing time of algorithms

– amount of information required from other nodes

• implementation specific

• both converge under static topology and costs

• both converge to same solution

• if link costs change, algs attempt to catch up

• if link costs depend on traffic, which depends on routes chosen, may have feedback instability