36
1 Lecture #18: Lecture #18: Principles of Principles of Network Routing Network Routing C o n t e n t s C o n t e n t s Basic Routing Concepts Basic Routing Concepts Routing Features and Elements Routing Features and Elements Static Routing Static Routing Adaptive Routing Adaptive Routing Distance Vector and Link State Distance Vector and Link State Routing Routing Hierarchical Routing Hierarchical Routing Broadcasting and Multicasting Broadcasting and Multicasting 5 3 10 18 17 16 2 12

1 Lecture #18: Principles of Network Routing l Basic Routing Concepts l Routing Features and Elements l Static Routing l Adaptive Routing l Distance Vector

Embed Size (px)

Citation preview

1

Lecture #18: Lecture #18: Principles of Network Principles of Network

Routing RoutingC o n t e n t s C o n t e n t s Basic Routing ConceptsBasic Routing Concepts

Routing Features and ElementsRouting Features and Elements

Static RoutingStatic Routing

Adaptive RoutingAdaptive Routing

Distance Vector and Link State RoutingDistance Vector and Link State Routing

Hierarchical RoutingHierarchical Routing

Broadcasting and MulticastingBroadcasting and Multicasting

Routing in InternetRouting in Internet

5

3

10

18

17

16

2

12

2

Basic Routing ConceptsBasic Routing ConceptsNetwork layer functionsNetwork layer functions

• Connection controlConnection control:: ... ...• RoutingRouting: considerations associated with : considerations associated with hop-by-hop hop-by-hop

servicesservices transparent to the underlying resources such transparent to the underlying resources such

as data link connections.as data link connections.• AddressingAddressing: ...: ...

Basic ConceptsBasic Concepts• routing algorithms are main part of the NLrouting algorithms are main part of the NL• on local level routing consist of on local level routing consist of the decision the decision

• on which output line to transmit an arriving packet (by on which output line to transmit an arriving packet (by

datagramdatagram exchange model) exchange model)• which input/output pair to assign to a virtual circuit during which input/output pair to assign to a virtual circuit during

its set up (by VC model; its set up (by VC model; session routingsession routing))• broadcastingbroadcasting messages also require routing when the messages also require routing when the

destination is another networkdestination is another network• formal goal of routing algorithms: finding the formal goal of routing algorithms: finding the sink treesink tree for for

each routereach router

18/1

5/3

5/5

3

Routing Functions & Routing Functions & ElementsElements Routing FunctionsRouting Functions

– CorrectnessCorrectness– Simplicity Simplicity

– Robustness Robustness vs.vs. Stability Stability • too quick reflections of changed traffic conditions may cause too quick reflections of changed traffic conditions may cause

instabilityinstability

– Fairness Fairness vs.vs. Optimality Optimality • the optimization criteria may favor specific part of the traffic the optimization criteria may favor specific part of the traffic

(e.g. local traffic)(e.g. local traffic) Routing ElementsRouting Elements

– Performance Performance optimization criteriaoptimization criteria– Decision timeDecision time: :

• packet (datagram) or packet (datagram) or • session (vc)session (vc)

– Decision placeDecision place• Each node (distributed control)Each node (distributed control)• Central node (centralized control)Central node (centralized control)• Originating node (isolated control)Originating node (isolated control)

5/4

4

Routing ElementsRouting Elements (cont.) (cont.)– Status information source Status information source - options:- options:

• no status information is used no status information is used • local informationlocal information• adjacent nodesadjacent nodes• nodes along the routenodes along the route• all nodesall nodes

– Routing strategyRouting strategy• static routingstatic routing

– fixedfixed– floodingflooding– randomrandom

• adaptive (dynamic) - update periods:adaptive (dynamic) - update periods:– continuoscontinuos– periodicperiodic– considerable load change considerable load change – architecture updates (topology, throughput, etc.)architecture updates (topology, throughput, etc.)

Routing ElementsRouting Elements

5

FeaturesFeatures– fixed routes: no use of status variables; DGs and VCs fixed routes: no use of status variables; DGs and VCs

follow the same routefollow the same route– all static routs are maintained in Central Routing all static routs are maintained in Central Routing

Directory (Routing Control Center)Directory (Routing Control Center)– local part of the routes are stored at each node local part of the routes are stored at each node

directory (consists of destinations and next node to directory (consists of destinations and next node to them)them)

– simple, smallest overload, no flexibilitysimple, smallest overload, no flexibility– application for reliable networks with small variation application for reliable networks with small variation

of traffic parametersof traffic parameters ExamplesExamples

– Generic fixed routing (see 18/2)Generic fixed routing (see 18/2)– Shortest path routingShortest path routing– FloodingFlooding– Flow-based routingFlow-based routing– MultipathMultipath random routing random routing

Static RoutingStatic Routing

Single pathSingle path static routing static routing67

8

9

18/2

6

Shortest Path RoutingShortest Path Routing FeaturesFeatures– based on [weighted] graph representation of the based on [weighted] graph representation of the

subnet (node/router, arc/link)subnet (node/router, arc/link)– shortest path is based onshortest path is based on

• the number of arcs between two routers (i.e. number of hops) - uses the number of arcs between two routers (i.e. number of hops) - uses unmarked graphunmarked graph

• the accumulated “length” of links (length is measured by the the accumulated “length” of links (length is measured by the transmission time, transmission price, distance, etc.) - uses weighted transmission time, transmission price, distance, etc.) - uses weighted graph (labeled arcs)graph (labeled arcs)

– algorithms for shortest path from given node to ALL algorithms for shortest path from given node to ALL other:other:

• Dijkstra’s algorithmDijkstra’s algorithm - developing path in order of increasing path - developing path in order of increasing path length; each node is labeled with the couple (length; each node is labeled with the couple (SSLL, , NNii-1-1), iterations follow ), iterations follow the shortest path to the next node the shortest path to the next node

• Bellman-Ford algorithmBellman-Ford algorithm - iterative search for all the nodes that are - iterative search for all the nodes that are distanced by 0, 1, 2, … MAX hopsdistanced by 0, 1, 2, … MAX hops

– Dijkstra vs. Bellman-FordDijkstra vs. Bellman-Ford– Computational Complexity: Dijkstra’s O(Computational Complexity: Dijkstra’s O(NN22) computations, Bellman-) computations, Bellman-

Ford O(Ford O(NN33))– D’sD’s algorithm requires knowledge of all costs - better suited to algorithm requires knowledge of all costs - better suited to

centralized routing decisionscentralized routing decisions– BF’sBF’s only requires knowledge of link costs to neighboring nodes - may only requires knowledge of link costs to neighboring nodes - may

be implemented in a distributed waybe implemented in a distributed way– Both can adapt to slowly changing link costsBoth can adapt to slowly changing link costs

5/6

7

FloodingFlooding FeaturesFeatures

– based on propagation of every incoming packet to based on propagation of every incoming packet to each output line excluding the delivery lineeach output line excluding the delivery line

– modification: propagation is pointed to some “proper” modification: propagation is pointed to some “proper” subset of output lines - subset of output lines - selective floodingselective flooding

EffectsEffects::

exponential growth of the number of packetsexponential growth of the number of packets

duplicate packets duplicate packets hop limitation hop limitation

guaranteed finding of the shortest pathguaranteed finding of the shortest path

the flooding gives all the shortest paths in the graphthe flooding gives all the shortest paths in the graph ApplicationApplication::

– trouble sensitive applicationstrouble sensitive applications– concurrent updates in distributed databasesconcurrent updates in distributed databases

18/3

8

FeaturesFeatures– considers both network topology (+ link capacity!) and considers both network topology (+ link capacity!) and

some statistical some statistical steady-statesteady-state data (e.g. average flow, data (e.g. average flow, mean delay) about the traffic between hopsmean delay) about the traffic between hops

– the goal is minimization of the mean packet delay but not the goal is minimization of the mean packet delay but not number of hops, kilometers, etc., i.e. minimization in time, number of hops, kilometers, etc., i.e. minimization in time, not in spacenot in space

– requisites: requisites: • topology matrixtopology matrix• traffic matrixtraffic matrix• links’ capacity matrixlinks’ capacity matrix• some static routing some static routing

– method: check of all [finite number] possible routes by method: check of all [finite number] possible routes by calculation of mean residence time of the packets in the calculation of mean residence time of the packets in the subnetsubnet

Effects and ApplicationEffects and Application::– best static single-path routingbest static single-path routing– applicable always when requisite set is available and the applicable always when requisite set is available and the

temporary status of the network does not deviate temporary status of the network does not deviate substantially from a steady-statesubstantially from a steady-state

Flow-based RoutingFlow-based Routing

5/9

5/8

9

Multipath Random Multipath Random RoutingRouting FeaturesFeatures

– uses several paths when routing from source to uses several paths when routing from source to

destinationdestination

– splits the outgoing traffic under control of a splits the outgoing traffic under control of a probability probability

distribution functiondistribution function (PDF), which usually favors (PDF), which usually favors

one/some of paths according some metrics (“shortest”, one/some of paths according some metrics (“shortest”,

less delay, bigger capacity, lower price, etc.)less delay, bigger capacity, lower price, etc.)

– requisites: requisites:

• routing matrix for each node with one or more choice probabilities routing matrix for each node with one or more choice probabilities

Effects and ApplicationEffects and Application::

– higher reliability, better congestion control and higher reliability, better congestion control and

performanceperformance

– applicable by networks with bigger traffic variances and applicable by networks with bigger traffic variances and

when priority services have to be implementedwhen priority services have to be implemented

18/4

10

Dynamic [Adaptive] Dynamic [Adaptive] RoutingRouting•Dynamic routing Dynamic routing reflectsreflects the changesthe changes in in

traffic/network conditions (as stored in the status traffic/network conditions (as stored in the status variables)variables)

•EffectsEffects::• more complex more complex decision phasedecision phase of the algorithms of the algorithms• additional communication overhead due to additional communication overhead due to statusstatus

information gatheringinformation gathering [ [and exchangeand exchange]: depends on range ]: depends on range

and responsivenessand responsiveness

•Information and control typesInformation and control types depending on status depending on status

information gathering and connected decision making information gathering and connected decision making • isolatedisolated (closer to the static routing) (closer to the static routing)

local status informationlocal status information independent local decision makingindependent local decision making

• distributeddistributed (best applicable for(best applicable for moderate communication moderate communication

load)load) adjacent nodes status information (sometimes wider)adjacent nodes status information (sometimes wider) local decision making according common ruleslocal decision making according common rules

• centralizedcentralized (best applicable for heavy but stabile load)(best applicable for heavy but stabile load) global status gathering (i.e. subnet range or internet range)global status gathering (i.e. subnet range or internet range) decision making by devoted nodedecision making by devoted node

11

Dynamic Routing MethodsDynamic Routing Methods• Isolated routingIsolated routing

• ““Hot-potato”Hot-potato” algorithms (synonym algorithms (synonym JSQ JSQ - join shortest queue). - join shortest queue).

Extensions: table of associated biases to the routes (the Extensions: table of associated biases to the routes (the

biases act as delayed queue thresholds)biases act as delayed queue thresholds)

• suitable for heavy/oscillating communication load at the suitable for heavy/oscillating communication load at the

routersrouters

• Distributed routingDistributed routing

• local decision based on the neighbor/all routers’ statuslocal decision based on the neighbor/all routers’ status

• Example methods:Example methods:

• distance vector routingdistance vector routing

• link state routinglink state routing

• Centralized routingCentralized routing

• information and decision procedures are run by the network information and decision procedures are run by the network

RCC (RCC (Routing Control CenterRouting Control Center), which updates local routing ), which updates local routing

tablestables

• quasi-optimal routing decisions and simplified routers cost quasi-optimal routing decisions and simplified routers cost

communication overhead and fault/load-oscillation communication overhead and fault/load-oscillation

vulnerabilityvulnerability

1412

18/5

12

Distance Vector RoutingDistance Vector Routing• Each router maintains “vector”-table of the Each router maintains “vector”-table of the distances to the distances to the

rest of routers in its rest of routers in its ASAS; distances are measured in # of hops, ; distances are measured in # of hops,

mean transmission time delay (measured by ECHO packets), local mean transmission time delay (measured by ECHO packets), local

queue length to the remote router, monetary cost, etc. queue length to the remote router, monetary cost, etc.

SynonymSynonym: dynamic Bellman-Ford routing.: dynamic Bellman-Ford routing.

• In first step distances are predefined (e.g. In first step distances are predefined (e.g. ), estimated or ), estimated or

assumed to be known. assumed to be known.

• Each router Each router periodicallyperiodically (i.e. (i.e. time-driven control!time-driven control!) initiates ) initiates

transfer of his vector tabletransfer of his vector table to the to the immediate neighbor routers immediate neighbor routers

onlyonly. .

• Each recipient adds its own distance vector table and forwards it Each recipient adds its own distance vector table and forwards it

to its neighborsto its neighbors

• The step-by-step process continues until each node update its The step-by-step process continues until each node update its

distance vector table; i.e. distance vector table; i.e. information rangeinformation range is neighborhood; is neighborhood;

decision rangedecision range is local is local

• ApplicableApplicable for smaller networks and the results are suboptimal for smaller networks and the results are suboptimal

at best but often problematical at best but often problematical

5/10

13

Distance Vector Distance Vector ConvergenceConvergence

• Distance vector routing (the information gathering Distance vector routing (the information gathering

procedure) is vulnerable during the convergence procedure) is vulnerable during the convergence

process by process by failures/changesfailures/changes in the network - in the network -

inconsistent routing and infinite loops (inconsistent routing and infinite loops (““Count-to-Count-to-

infinityinfinity””).).

• Modifications - split horizon - forwarding to Modifications - split horizon - forwarding to

neighbors in unidirectional manner (the way back is neighbors in unidirectional manner (the way back is

reported infinity)reported infinity)

• Performance and implementationsPerformance and implementations• status propagation in status propagation in DD steps where steps where DD is the “diameter” i.e. the is the “diameter” i.e. the

longest distance in the connectivity graph longest distance in the connectivity graph

delay metric is distance but not the bandwidth delay metric is distance but not the bandwidth

• simple application but suitable for small networks with not more simple application but suitable for small networks with not more

than few redundant pathsthan few redundant paths

• RIPRIP

5/11

14

Link State RoutingLink State Routing• Synonym SPFSynonym SPF: : shortest path firstshortest path first

• Decision rangeDecision range is local and is local and information rangeinformation range covers all the AS covers all the AS

routersrouters

• Distance metrics considers the link bandwidthDistance metrics considers the link bandwidth

• Consists in development and maintaining of the extensive Consists in development and maintaining of the extensive

knowledge of the network routers via exchange of knowledge of the network routers via exchange of LSALSA (Link State (Link State

Advertisement)Advertisement)

• Phases:Phases: link metricslink metrics in neighborhood range (round trip ECHO packets with or in neighborhood range (round trip ECHO packets with or

without without load consideration load consideration depending on depending on stabilitystability requirements) requirements)

ASAS wide wide propagationpropagation of the results of of the results of in link state packets in link state packets

((forward floodingforward flooding method controlled by the 16b sequence number method controlled by the 16b sequence number

of current packet and its age)of current packet and its age)

local SPF computationlocal SPF computation to any of AS routers: to any of AS routers: reconstruction of the weighted net topology graph with averaged reconstruction of the weighted net topology graph with averaged

throughput arc labels according to the both ends’ states packetsthroughput arc labels according to the both ends’ states packets

Dijkstra’s SPF over the current topologyDijkstra’s SPF over the current topology

5/15

15

Link State and Hybrid RoutingLink State and Hybrid Routing• Link State Routing Performance:Link State Routing Performance:

complexcomplex link-, memory- and processor-intensive algorithm. link-, memory- and processor-intensive algorithm.

Internal link data presentation is of Internal link data presentation is of RR**LLii dimension dimension

(#routers by #links). (#routers by #links). performance degradationperformance degradation during during initialinitial floodingflooding of of

routing state packets, esp. in large networks with small routing state packets, esp. in large networks with small

bandwidth linksbandwidth links event drivenevent driven control: convergence process begins and control: convergence process begins and

proceeds quickly after the change event without waiting proceeds quickly after the change event without waiting

timeouts; no overhead due to periodical routines timeouts; no overhead due to periodical routines

best best scalabilityscalability algorithm algorithm

• Hybrid versions Hybrid versions of distributed protocols (Distance of distributed protocols (Distance

Vector and Link State) family of protocols that use Vector and Link State) family of protocols that use

extended version of DV metrics, event driven control extended version of DV metrics, event driven control

like LS like LS • implementations: Cisco firmware EIGRP (Enhanced Interior implementations: Cisco firmware EIGRP (Enhanced Interior

Gateway Routing Protocol)Gateway Routing Protocol)

• performance:performance: better information convergence than DV and better information convergence than DV and

better bulk overhead than LSbetter bulk overhead than LS

16

Hierarchical RoutingHierarchical Routing• Routing algorithms’ Routing algorithms’ scalabilityscalability limits the range of limits the range of

effective (or tolerably ineffective) routing effective (or tolerably ineffective) routing • Hierarchical approach divides the network in Hierarchical approach divides the network in

regionsregions that are ranges of the network graph i.e. in that are ranges of the network graph i.e. in

related subsets of routersrelated subsets of routers• Each local routing table includes:Each local routing table includes:

• all the links to the routers in the regionall the links to the routers in the region• one or few links to node[s] in the neighbor one or few links to node[s] in the neighbor

regions regions • Multilevel hierarchy possibleMultilevel hierarchy possible• Iterregion routing may be distributed or centralizedIterregion routing may be distributed or centralized• Hierarchy optimization (Kleinrock) for Hierarchy optimization (Kleinrock) for NN-router -router

network:network:• optimal # of levels optimal # of levels LL = ln = lnNN• required # of table entries required # of table entries t t = = e e lnlnNN = = e e LL• for 5/17 examplefor 5/17 example L =L = ln17 = 2.83 ln17 = 2.83, t = , t = 7.7017.701

5/17

17

Broadcasting and Broadcasting and MulticastingMulticasting

• Broadcast Broadcast routing methods:routing methods: Separate packets to all destinationsSeparate packets to all destinations FloodingFlooding Multi-Multi- or or omni-destination routingomni-destination routing::

• Packets contain enumeration of addresses or address mask over the multi-Packets contain enumeration of addresses or address mask over the multi-

destination fielddestination field• The router propagates such packet to each output line locally known as The router propagates such packet to each output line locally known as

best route for some subset of the destinations; the destination best route for some subset of the destinations; the destination

enumeration/mask is reduced to the destinations reachable on that lineenumeration/mask is reduced to the destinations reachable on that line• Splitting continues until each packet has single destinationSplitting continues until each packet has single destination

Spanning treeSpanning tree broadcasting: moderated flooding to all routers broadcasting: moderated flooding to all routers

without loops. Applicable by LSR but not by DVRwithout loops. Applicable by LSR but not by DVR Reverse path forwardingReverse path forwarding. Topology information of . Topology information of is replaced by is replaced by

keeping history track of routers’ keeping history track of routers’ receivingreceiving link with exclusive link with exclusive

propagation or discarding. propagation or discarding.

• Multicast Routing:Multicast Routing:• Groups’ spanning tree Groups’ spanning tree method: method:

• each router maintains and propagate dynamically list of groups’ members each router maintains and propagate dynamically list of groups’ members

among adjacent hostsamong adjacent hosts• a a pruned spanning treepruned spanning tree is calculated for each group and the traffic is is calculated for each group and the traffic is

rerouted to and by the root node of the treererouted to and by the root node of the tree

5/21

18

TCP/IP Routing TCP/IP Routing ProtocolsProtocols• Internet routing conceptsInternet routing concepts

• Autonomous systems (AS)Autonomous systems (AS)

• internal and external routing - standardization and code internal and external routing - standardization and code

reusability: interior and exterior gateway routing protocolsreusability: interior and exterior gateway routing protocols

• Internet IGRPsInternet IGRPs• RIPRIP (obsolete) - Bellman-Ford DVRP, time-driven: updates in 30 (obsolete) - Bellman-Ford DVRP, time-driven: updates in 30

sec sec

• OSPFOSPF (Open SPF) - multimetric, adaptive, LS method, event- (Open SPF) - multimetric, adaptive, LS method, event-

driven:driven:• service oriented (consider real-time and priority of the IP datagrames)service oriented (consider real-time and priority of the IP datagrames)• congestion control (load balancing) considerationscongestion control (load balancing) considerations• conservativeconservative: frequent alternative events are ignored!: frequent alternative events are ignored!• support of hierarchical routing: splitting of AS in areas and backbonessupport of hierarchical routing: splitting of AS in areas and backbones• security: routing table protectionsecurity: routing table protection• tunneling and transparent service to the outside network requeststunneling and transparent service to the outside network requests

• OSPF application:OSPF application:• Point-to-point networksPoint-to-point networks• multiaccess networks with broadcasting (LANs) and packet-switchingmultiaccess networks with broadcasting (LANs) and packet-switching• 2 modes of OSPF application:2 modes of OSPF application:

• intra-area routingintra-area routing• inter-area routinginter-area routing• backbone routersbackbone routers• inter-AS routing - interfacing some EGRPinter-AS routing - interfacing some EGRP

5/52

18/6

5/53

19

TCP/IP Routing TCP/IP Routing ProtocolsProtocols• OSPF (cont.):OSPF (cont.):

• message exchange in local range (between adjacent message exchange in local range (between adjacent

designated routers - one in a LAN if more presented)designated routers - one in a LAN if more presented)

• EGRPEGRPs: Border Gateway Protocol (s: Border Gateway Protocol (BGPBGP))

• extends the principle of hierarchical routing in Internetextends the principle of hierarchical routing in Internet

• applies different kind of routing considerations on inter-AS applies different kind of routing considerations on inter-AS

levellevel

• any pair of BGPs is interfaced via TCP connection by at any pair of BGPs is interfaced via TCP connection by at

least one common network that can beleast one common network that can be

• common multiconnected networkcommon multiconnected network

• devoted transit networkdevoted transit network

• stub networks have single connection to some BGP router stub networks have single connection to some BGP router

• hybrid algorithm: applies DV information/propagation hybrid algorithm: applies DV information/propagation

strategy but keeping and propagating the exact route to strategy but keeping and propagating the exact route to

each destination. each destination.

5/79

20

18/118/1

ping,traceroute

21

5/35/3

22

5/45/4

5/55/5

Resource conflict

Sink tree

23

1 2 3 4 5 61 * 2 3 4 4 32 1 * 3 4 4 43 1 2 * 4 5 64 1 2 5 * 5 55 4 4 3 4 * 66 3 5 3 5 5 *

Central Routing Directory

Node 6 DirectoryNode 5 Directory

Node 4 DirectoryNode 3 Directory

Node 2 DirectoryNode 1 Directory

2 3 4 5 61 2 3 4 4 3

18/218/2 18/318/3

24

5/65/6Shortest Path Routing

25

5/85/8

26

5/95/9

27

JG new route calculation

via J via via G comul.

A 8 18 26

I 10 31 41

H 12 6 18

K 6 31 37

5/105/10

28

5/115/11

29

18/4/518/4/5

Routing probability matrix for node 4.

Dest. via q4i bias q+b

1. 1. q41 0 q41+0

3. q43 2 q43+2

2. 2. q42 0 q42+0

1. q41 4 q41+4

… … … … …

6. 5. q43 0 q43+0

3. q45 2 q45+2

1. q41 5 q43+5

JSQ biased matrix for node 4.

Dest. Ist choice IInd choice IIIrd choice

1. 1. 0.63 2. 0.37

2. 2. 0.63 1. 0.20 3. 0.17

3. 3. 0.50 1. 0.30 2. 0.20

5. 5. 0.70 3. 0.30

6. 3. 0.66 5. 0.22 1. 0.12

30

5/155/15

Link states table

31

5/175/17

Hierarchical routing

32

5/215/21

33

18/618/6

34

5/525/52

35

5/535/53

36

BGPBGP

(a) A set of BGP routers. (b) Information sent to F.(a) A set of BGP routers. (b) Information sent to F.

5/795/79