125
8.+15. Mar. 2006 1 INF-3190: Switching and Routing Switching and Routing Foreleser: Carsten Griwodz Email: [email protected]

Switching and Routing

  • Upload
    minya

  • View
    84

  • Download
    1

Embed Size (px)

DESCRIPTION

Switching and Routing. Foreleser: Carsten Griwodz Email: [email protected]. company. ISP. Motivation. one frame at a time, Min 512 bits. It is desirable to connect networks (instead of using a single large one): Limits in physical size and number of nodes per network - PowerPoint PPT Presentation

Citation preview

Page 1: Switching and Routing

8.+15. Mar. 2006 1INF-3190: Switching and

Routing

Switching and Routing

Foreleser: Carsten GriwodzEmail: [email protected]

Page 2: Switching and Routing

8.+15. Mar. 2006 2INF-3190: Switching and

Routing

Motivation It is desirable to connect networks (instead of using a

single large one): Limits in physical size and number of nodes per network Limits in amount of concurrent traffic per network Different kinds of network for different needs Separate networks for increased availability Administrative boundaries

WAN-WAN802.5

802.3802.3 LAN

SNA-WAN

ATM WAN

LAN-WANLAN-LAN LAN-WAN-LAN

Host

LAN

LAN

802.11 LAN

G

G

GGG

Max 500m

one frame at a time,Min 512 bits

wirelessnetwork

ISPcompany

Page 3: Switching and Routing

8.+15. Mar. 2006 3INF-3190: Switching and

Routing

Connecting Networks by Relays

1

2

3

4

5

1

2

3

4

5

Physical layer

Data link layer

Network layer

Transport layer

Application layer

Repeater

Bridge

Router

Gateway

End system End systemIntermediatesystem

Page 4: Switching and Routing

8.+15. Mar. 2006 4INF-3190: Switching and

Routing

Connecting Networks by Relays Layer 1: Repeater / Hub

copies all bits between cable segments

works solely as a repeater does not influence the

traffic between networks Layer 2: Bridge / Switch

relays frames between LANs (MAC level)

minor frame modifications, increases the number of stations

Layer 3: Router (or Layer 3 Gateway)

relays packets between different networks

modifies the packets converts different

addressing concepts Layer 4 - 5: Gateway

(or Protocol Converter)

converts one protocol into another

usually no 1-to-1 mapping of functions

Note: names (in products) are often confused e. g. bridge and switch

Page 5: Switching and Routing

8.+15. Mar. 2006 5INF-3190: Switching and

Routing

Layer 1: Physical Layer

Page 6: Switching and Routing

8.+15. Mar. 2006 6INF-3190: Switching and

Routing

Repeater and Hub

Repeater

Function To amplify the electrical signals To increase the range

Limitation Extends the broadcast medium: every bit is copied One collision domain

Repeater ex.:IEEE 802.3“Thinwire”

A B C D

E F G H

H ubHub ex.:IEEE 802.3Twisted Pair

Page 7: Switching and Routing

8.+15. Mar. 2006 7INF-3190: Switching and

Routing

Layer 2: Data Link Layer

Page 8: Switching and Routing

8.+15. Mar. 2006 8INF-3190: Switching and

Routing

Bridges, Switches

Bridges vs. Switches Sometimes difference seems to be more a marketing

issue than technical one

A B C D

E F G H

B r idge

LAN

Host

A B C D

E F G H

Sw itch

Bridges Connects two or more LANs

(potentially different types) Each line is its own collision domain Traditionally: store-and-forward and

CPU-based Switches

Typically connects two or more computers

Each port / line is its own collision domain (no collisions)

Typically cut-through switching devices

begin forwarding as soon as possible when destination header has been

detected, before rest of frame arrived Hardware-based

Page 9: Switching and Routing

8.+15. Mar. 2006 9INF-3190: Switching and

Routing

Bridge Tasks

Coupling of different LANs Scalability of networks To increase capacity To increase reliability To improve security To cover large distances

To offer independence from protocols

IP OSI layer 2 protocols Ethernet versions

B B B B Backbone-LAN

LAN

FileServer

2,5km2,5km

B802.3 LAN

Important goal: to achieve transparency Change attachment point without changes to HW, SW,

configuration Hide different types of LAN to communicating machines

Page 10: Switching and Routing

8.+15. Mar. 2006 10INF-3190: Switching and

Routing

Bridge Connecting 2 Different Networks

Approach LLC as common layer Frames are routed to the respective MAC Bridge contains

Its own implementation for each MAC For each to it belonging physical layer the corresponding

implementation

Host A

Network

LLC

MAC

Physical

Pkt

Pkt

Pkt802.3

802.3 Pkt

Host B

BridgePkt

Pkt

Pkt802.4

802.4 Pkt

802.3

802.3 Pkt

Pkt

802.3 Pkt

802.4 Pkt

802.4 Pkt

802.4 PktPkt

CSMA/CD LAN Token bus LAN

Example:Bridge betweenIEEE 802.3 (CSMA/CD) andIEEE 802.4 (Token Bus)

Page 11: Switching and Routing

8.+15. Mar. 2006 11INF-3190: Switching and

Routing

802.x 802.y Bridging Some different 802.x frame formats:

There are even more different frame formats ... Some fields are technically necessary in one case but

useless in another e.g. duration of 802.11

802.3

802.4

802.5

P ream ble

Access

control

Frame

control Length Pad Checksum

End

delimiter

Frame

statusData

Destination

address

Start

delimite r

802.11 DataFramecon trol

Du r-ation Addr 1 Addr 2 Add r 3 Addr 4Seq

Che ck-sum

Source

address

Page 12: Switching and Routing

8.+15. Mar. 2006 12INF-3190: Switching and

Routing

802.x 802.y Bridging Different transmission rates (4/10/11/16/100/1000/... Mbps)

Bridge between fast LAN and slow LAN (or several LANs to one) Buffering frames which cannot be transmitted immediately Potentially many frames must be buffered within bridge

If bridge is out of memory, frames are dropped

Different frame lengths 802.3: 1518 bytes, 802.4: 8191 bytes, 802.5: unlimited,

802.11: 2346 bytes 802.x protocols do not support reassembly

Bridge must not segment frames that are too large Frames that are too long are dropped Implies a loss of transparency Special case 802.6 – DQDB transmits each frame in several cells

Different features Priorities

Supported (in various forms) from both 802.4 and 802.5 Not supported by 802.3

Page 13: Switching and Routing

8.+15. Mar. 2006 13INF-3190: Switching and

Routing

802.x 802.y Bridging Different checksum calculations

Means conversion, delay, buffering

Security 802.11 provides some data link layer encryption 802.3 does not

Quality of Service / Priorities Supported (in various forms) by both 802.4 and 802.5 Not supported by 802.3 ’Kind of’ in 802.11 (PCF / DCF)

Acknowledgements Supported by 802.4 (temporary token handoff) Supported by 802.5 (C+A bits) Not supported by 802.3

Page 14: Switching and Routing

8.+15. Mar. 2006 14INF-3190: Switching and

Routing

Self–Learning Bridges Also called Transparent Bridges Transparency

Bridges not visible for the other components of the network simplifies other components

Bridge 1 Bridge 2

LAN 1 LAN 2 LAN 4

A B D

CLAN 3

Transparent bridge Bridge works in

promiscuous mode(receives every frame of each connected LAN)

Bridge manages table: station LAN(output line)

Decision procedure Destination unknown: flooding Source and destination LANs identical: frame dropped Source and destination LANs differ: frame rerouted to

destination LAN

address LAN

A 1

B 2

C 2

D 2

Page 15: Switching and Routing

8.+15. Mar. 2006 15INF-3190: Switching and

Routing

Self–Learning Bridges Learning procedure

Bridge table initially empty Use flooding for unknown destination

Backward learning Bridge works in promiscuous mode:

Receives any frame on any of its LANs Bridge receives frames from source address Q on LAN L

Q can be reached over L Create table entry accordingly

Adaptation to changes in topology Entry associated with timestamp (last frame arrival

time) Timestamp of an entry (Z, LAN, TS) is updated when

frame received from Z Entries that are not updated are purged

Page 16: Switching and Routing

8.+15. Mar. 2006 16INF-3190: Switching and

Routing

Self–Learning Bridges: Spanning Tree Increase reliability

Connect LANs via various bridges in parallel Problem

This creates a loop in the topology Frames with unknown destination are flooded

Frame is copied again and again

F

F 1 F 2LAN 2

LAN 1

Frame copied by B2

Initial frame

Bridge

Frame copied by B1

B1 B2

Solution Communication among bridges Overlay actual topology by spanning tree reaching every LAN

Exactly one path from any LAN to every other LAN

Page 17: Switching and Routing

8.+15. Mar. 2006 17INF-3190: Switching and

Routing

Self–Learning Bridges: Spanning Tree

Drawback Ignores some potential connections between LANs

i.e., not all bridges are necessarily present in the tree

LANLAN

1 2

5

8 9

6 7

3 4A B C

D

H I J

E F

Bridge

G

Bridges between LANs A Spanning Tree

1 2 3

5 6

8 9

7

A B C

D E

H J

F

Bridge that is part of the

spanning tree

Bridge that is not part of the spanning tree

4

Algorithm Choose a bridge as root of tree

All bridges broadcast their serial number, lowest wins Generation of spanning tree

Configured with bridges representing the edges within the tree Thereby avoiding loops

Adaptation if configuration is changed

Page 18: Switching and Routing

8.+15. Mar. 2006 18INF-3190: Switching and

Routing

Source Routing Bridges Alternative to self-learning bridges

Principle The frame’s sender defines path Bridge routes the frame

Prerequisite LAN has a unique address Bridge at the respective LAN is also unique Then

Sender flags the frame (top bit of its own address = 1),if destination address is not reachable in LAN

Bridge routes only frames that have been flagged in such a way Determining Path

Sender sends discovery frames as broadcast Each bridge forwards on all attached LANs Each bridge on the path adds own address to return packet Problem: high traffic

Page 19: Switching and Routing

8.+15. Mar. 2006 19INF-3190: Switching and

Routing

Connecting Equal Networks: Encapsulation

Principle1. Incoming data unit is packaged as payload,2. Transmitted and3. Then fed into the destination network

Properties Certain protocol on connecting route

e.g. PPPi.e. MAC frames encapsulated in PPP

Only bridge at the destination network can be reached Simple

LAN 1 LAN 2

LAN 3

Bridge

Point-to-point lineExample: remote bridge

Page 20: Switching and Routing

8.+15. Mar. 2006 20INF-3190: Switching and

Routing

Layer 3: Network Layer

Page 21: Switching and Routing

8.+15. Mar. 2006 21INF-3190: Switching and

Routing

Network Layer Goal

Enable data transfer fromend system to end system

Several hops, (heterogeneous) subnetworks

Compensate for differences between end systems during transmission

The provided services are Standardized for end systems Independent from network technology Independent from number, type and topology of the

subnetworks Subnetworks (ISO definition):

A multiple of one or several intermediary systems that provide switching functionalities and through which open end systems can establish network connections

Routers are such Intermediate Systems

Subnetworks

End systems Intermediate systems

Page 22: Switching and Routing

8.+15. Mar. 2006 22INF-3190: Switching and

Routing

Network Layer Primary task from a layer model

perspective To provide service to the transport layer

Connectionless or connection-oriented service Uniform addressing Internetworking: provide transitions between

networks Routing Congestion control Quality of Service (QoS)

Page 23: Switching and Routing

8.+15. Mar. 2006 23INF-3190: Switching and

Routing

Inside: Types of Switching

Physical copperconnection set upwhen call is made

circuit switching

Packet queued upfor subsequenttransmission

packet switching

Circuit switching Switching a physical connection

Packet switching Store-and-forward, but transmissions packets limited in size

Message switching Message is stored and passed one by one hop

Page 24: Switching and Routing

8.+15. Mar. 2006 24INF-3190: Switching and

Routing

Circuit Switching Connection exists physically for the duration of

the conversation

Refers to Switching centers Connections between switching centers

(frequency spectrum, dedicated ports)

Implementation examples Historically: on switching boards Mechanical positioning of the dialers Setting coupling points in circuits

Page 25: Switching and Routing

8.+15. Mar. 2006 25INF-3190: Switching and

Routing

Packet SwitchingLayer Data entity

Transport …

Network Packet

Data link Frame

Physical Bit/byte (bit stream)

Datagrams Every packet chooses its path

Virtual circuits Packets (or cells) over a pre-defined path

Page 26: Switching and Routing

8.+15. Mar. 2006 26INF-3190: Switching and

Routing

Packet Switching Packets of limited size Dynamic route search (no connect phase) No dedicated path from source to destination

Node D

Node E

Node G Node C

Node A

Node B

Destination

Source

DataFrom

MultipleUsers

Data toMultipleUsers

: Packets

Node F

Page 27: Switching and Routing

8.+15. Mar. 2006 27INF-3190: Switching and

Routing

Message Switching All data to be sent are treated as a "message"

“Store and forward" network1. Accept2. Treat of possible errors3. Store4. Forward

Page 28: Switching and Routing

8.+15. Mar. 2006 28INF-3190: Switching and

Routing

Comparison: Temporal Performance

A B C D

Data

Tim

eCall request signal

Time spenthunting foran outgoingtrunk

Call acceptsignal

A B C D

Msg

Msg

Msg

Propagation

Queueingdelay

delay

A B C D

Pkt 1

Pkt 2

Pkt 3

Pkt 1

Pkt 2

Pkt 3

Pkt 1

Pkt 2

Pkt 3

Circuit switching Message switching Packet switchingVirtual circuit

Page 29: Switching and Routing

8.+15. Mar. 2006 29INF-3190: Switching and

Routing

Comparison: Properties Circuit switching

Connection has to occur before transmission Establishing a connection takes time Resource allocation too rigid (possibly waste of resources) Once connection is established it cannot be blocked

anymore Packet switching

Possibly only reservation of average bandwidth (static reservation)

Possibility of congestion High utilization of resources

Message switching High memory requirements at the node (switching centers) Node may be used to its full capacity over a longer period

of time by one message

Page 30: Switching and Routing

8.+15. Mar. 2006 30INF-3190: Switching and

Routing

Comparison: Circuit and Packet Switching Circuit switching

Connection establishment can take a long time

Bandwidth is reserved No danger of

congestion Possibly poor

bandwidth utilization (burst traffic)

Continuous transmission time

all data is transmitted over the same path

Packet switching Connect phase not

absolutely necessary Dynamic allocation of

bandwidth Danger of congestion Optimized bandwidth

utilization Varying transmission

time packets between

same end systems may use different paths

Page 31: Switching and Routing

8.+15. Mar. 2006 31INF-3190: Switching and

Routing

Virtual Circuits and Datagrams

Page 32: Switching and Routing

8.+15. Mar. 2006 32INF-3190: Switching and

Routing

Virtual Circuits Connection set-up phase

Select a path Intermediate systems store path information Network reserves all resources required for the

connection

Data transfer phase All packets follow the selected path Packet contains VC’s number

Identification of connection, no address information IS uses the stored path information to determine the

successor

Disconnect phase Network forgets the path Releases reserved resources

Page 33: Switching and Routing

8.+15. Mar. 2006 33INF-3190: Switching and

Routing

Implementation Virtual Circuit

Solution: allocate VC-numbers for virtual circuit segments

IS differentiates between incoming and outgoing VC-number

IS receives incoming VC-number when connect request arrives IS creates outgoing VC-number

(unique between IS and successor(IS)) IS sends outgoing VC-number in connect request

?

11

1 1

1

A

B

C

D

ISIS

1

2

End systems ES allocate VC-numbers independentlyProblem: the same VC-identifiers may be allocated to different paths

Page 34: Switching and Routing

8.+15. Mar. 2006 34INF-3190: Switching and

Routing

Implementation Virtual Circuit

Originating at A

Originating at B

A

HC

H

B

H

E

H

F

H

D

H

IMP

Host

8 Simplex virtual circuits

H 0 B 0H 1 E 0B 0 E 1H 2 B 1H 3 E 2H 4 E 3

A 0 C 0H 0 C 1H 1 A 0A 1 F 0H 2 F 1F 0 H 0

C 0 H 0C 1 H 1F 0 H 2F 1 H 3C 2 F 0

B 0 D 0B 1 D 1E 0 H 0E 1 D 2

A 0 F 0A 1 H 0A 2 C 0A 3 C 1

E 0 D 0B 0 D 1B 1 H 0D 0 B 0

A

B

C

D

E F

IN OUT

0 - ABCD

1 - AEFD

2 - ABFD

3 - AEC

4 - AECDFB

0 - BCD

1 - BAE

2 - BF

Page 35: Switching and Routing

8.+15. Mar. 2006 35INF-3190: Switching and

Routing

Implementation Datagram Datagram passes through the network as an

isolated unit Has complete source and destination addresses Individual route selection for each datagram Generally no resource reservation Correct sequence not guaranteed

Page 36: Switching and Routing

8.+15. Mar. 2006 36INF-3190: Switching and

Routing

Datagram vs. Virtual Circuit Datagram: IS routing table

specifies possible path(s) No connection setup delay Less sensible to IS and link

failures Route selection for each

datagram: quick reaction to failures

but Each packet contains the

full destination and source address

Route selection for each datagram: overhead

QoS guarantees hardly possible

Virtual Circuit: destination address defined by connection

Packets contain short VC-number only

Low overhead during transfer phase

“Perfect" channel throughout the net

Resource reservation: "Quality of Service" guarantees possible

but Overhead for connection

setup Memory for VC tables and

state information needed in every IS

Sensible to IS and link failures

Resource reservation: potentially poor utilization

Page 37: Switching and Routing

8.+15. Mar. 2006 37INF-3190: Switching and

Routing

Services of the Network Layer

Page 38: Switching and Routing

8.+15. Mar. 2006 38INF-3190: Switching and

Routing

Services of the Network Layer Concepts

Connection oriented vs. connectionless communication

Connection oriented Error free communication channel Usually error control, flow control, ... Usually duplex communication More favorable for real-time communications Favored by telephone and telecommunication companies

Connectionless Unreliable communication Hardly any error control: left to layer 4 or higher Simplex communication More favorable for simple data communication: Favored by Internet community

Page 39: Switching and Routing

8.+15. Mar. 2006 39INF-3190: Switching and

Routing

Connection Oriented Communication Connection Oriented Communication

3-phase interaction Connect Data transfer Disconnect

(allows for) Quality of Service Negotiation (typically) Reliable Communication in both directions Flow Control Relatively complex protocols

Connection-Oriented Service Service provider offers

Queues in both directions Ordered transmission of objects Delivery of objects at most once

Page 40: Switching and Routing

8.+15. Mar. 2006 40INF-3190: Switching and

Routing

Connectless communication Connectionless Communication

Network transmits packets as isolated Units (datagram)

Unreliable Communication loss, duplication, modification, sequence errors possible

No flow control Comparatively simple protocols

Connectionless Service Service provider can

Delete objects in a queue Duplicate objects in a queue Change the object sequence within a queue

Page 41: Switching and Routing

8.+15. Mar. 2006 41INF-3190: Switching and

Routing

Comparison of Concepts Arguments pro a connection

oriented service Simple, powerful paradigm Simplification of the higher

layers Relieves end systems For some applications

efficiency in time is more important than error-free transmission

e. g. real-time applications, digital voice transmission)

suitable for a wide range of applications

Arguments pro a connectionless service

High flexibility and low complexity

Costs for connects and disconnects are high for transaction oriented applications

Easier to optimize the network load

Compatibility and costs IP common, can’t change

now ‘End-to-End Arguments’

secure communication requires error control within the application but error control in one layer can replace the error control in the layer underneath it

Page 42: Switching and Routing

8.+15. Mar. 2006 42INF-3190: Switching and

Routing

Routing

Page 43: Switching and Routing

8.+15. Mar. 2006 43INF-3190: Switching and

Routing

Routing: Foundations Task

To define the route of packets through the network From the source To the destination system

Routing algorithm Defines on which outgoing line an incoming packet will

be transmitted

Route determination Datagram

Routing algorithm makes individual decision for each packet

Virtual circuit Routing algorithm runs only during connect (session

routing)

Page 44: Switching and Routing

8.+15. Mar. 2006 44INF-3190: Switching and

Routing

Routing: Routing and Forwarding Distinction can be made

Routing: makes decision which route to use Forwarding: what happens when a packet arrives

desti-nation

link

A 0

B 3

C 1

D 4

RoutingProcess

Topology, link utilization, etc.information

Fills & Updates

Uses & Looks up

Data packets

Incominglines

Outgoinglines

ForwardingProcess

Routingtable

Router

Page 45: Switching and Routing

8.+15. Mar. 2006 45INF-3190: Switching and

Routing

Good Properties for Routing Algorithms Correctness Simplicity

Minimize load of routers Robustness

Compensation for IS and link failures Handling of topology and traffic changes

Stability Consistent results No volatile adaptations to new conditions

Fairness Among different sources compared to each

other Optimality

Page 46: Switching and Routing

8.+15. Mar. 2006 46INF-3190: Switching and

Routing

Routing Algorithms: Conflicting Properties Often conflicting: fairness and optimization

A B C

A’ B’ C’

X X’

Some different optimization criteria

Average packet delay Total throughput Individual delay

Conflict

Example: Communication among A A’, B B’, C C’ uses full

capacity of horizontal line Optimized throughput, but No fairness for X and X’

Tradeoff between fairness and optimization

Therefore often Hop minimization per packet

It tends to reduce delays and decreases required bandwidth Also tends to increase throughput

Page 47: Switching and Routing

8.+15. Mar. 2006 47INF-3190: Switching and

Routing

Classes of Routing Algorithms Class Non-adaptive Algorithms

Current network state not taken into consideration Assume average values All routes are defined off-line before the network is put into

operation No change during operation (static routing)

With knowledge of the overall topology Spanning tree Flow-based routing

Without knowledge of the overall topology Flooding

Class Adaptive Algorithms Decisions are based on current network state

Measurements / estimates of the topology and the traffic volume Further sub-classification into

Centralized algorithms Isolated algorithms Distributed algorithms

Page 48: Switching and Routing

8.+15. Mar. 2006 48INF-3190: Switching and

Routing

Optimality Principle and Sink Tree General statement about optimal routes

If router J is on optimal path from router I to router K Then the optimal path from router J to router K uses the

same route Example:

r1: route from I to J r2: route from J to K If better route r2’ from J to K

would exist Then

Concatenation of r1 and r2’ would improve route from I to K

Set of optimal routes From all sources To a given destination form a tree rooted at the destination: Sink Tree

I J Kr1

r1

r2’

Page 49: Switching and Routing

8.+15. Mar. 2006 49INF-3190: Switching and

Routing

Sink Tree

Comments Tree: no loops

Each optimal route is finite with bounded number of hops Not necessarily unique

Other trees with same path lengths may exist Goal of all routing algorithms

Discover and use the sink trees for all routers Not realistic to use Sink Trees as real-life routing algorithm

Need complete information about topology Sink Tree is only a benchmark for routing algorithms

A

BC

D E

FG

HI

J

K L

M

N

O

SubnetSink Tree forDestination B

Page 50: Switching and Routing

8.+15. Mar. 2006 50INF-3190: Switching and

Routing

Methodology & Metrics Networks represented as graphs:

Node represents a router Edge represents a communication line (link)

Compute the shortest path between a given pair of routers

Different metrics for path lengths can be used Can lead to different results Sometime even combined (but this leads to computational

problems)

Metrics for the "ideal" route, e.g., a "short" route Number of hops Geographical distance Bandwidth Average data volume Cost of communication Delay in queues ...

Page 51: Switching and Routing

8.+15. Mar. 2006 51INF-3190: Switching and

Routing

Non-Adaptive Routing

Shortest Path Routing

Page 52: Switching and Routing

8.+15. Mar. 2006 52INF-3190: Switching and

Routing

Non-Adaptive Shortest Path Routing Static Procedure

Network operator generates tables Tables

Are loaded when IS operation is initiated and Will not be changed any more

Characteristics Simple Good results with relatively consistent topology

and traffic But

Poor performance if traffic volume or topologies change over time

Page 53: Switching and Routing

8.+15. Mar. 2006 53INF-3190: Switching and

Routing

Non-Adaptive Shortest Path Routing Spanning Tree and Optimized Route

Information about the entire network has to be available

i. e. application actually as a benchmark comparison Example

Link is labeled with distance / weight Node is labeled with distance from source node

along best known path (in parentheses) Find the shortest path from A to D

A

B C

DE

F

G H

2

2

7

2

2

61 2

4

33

2

A

B (●,-) C (●,-)

D (●,-)E (●,-)

F (●,-)

G (●,-) H (●,-)

Page 54: Switching and Routing

8.+15. Mar. 2006 54INF-3190: Switching and

Routing

Non-Adaptive Shortest Path Routing Procedure: e. g. according to Dijkstra

Find the shortest path from A to D Labels may be permanent or tentative Initially, no paths are known

All nodes are labeled with infinity (tentative) Discover the labels that represent shortest possible path

from source to any node Make those labels permanent

1. Node A labeled as permanent (filled-in circle)2. Relabel all directly adjacent nodes with the distance to A

(path length, nodes adjacent to source)3. Examine all tentatively labeled nodes, make the node

with the smallest label permanent4. This node will be the new working node for the iterative

procedure(i.e., continue with step 2.)

Page 55: Switching and Routing

8.+15. Mar. 2006 55INF-3190: Switching and

Routing

Non-Adaptive Shortest Path Routing

Procedure: e. g. according to Dijkstra Find the shortest path from A to D:

1. A flagged as permanent (filled-in circle)2. Relabel all directly adjacent nodes with the distance

to A (path length, IS adjacent to the source):

2

7

2

2

61 2

4

33

2

A

B (●,-) C (●,-)

D (●,-)E (●,-)

F (●,-)

G (●,-) H (●,-)

B (2,A)

G (6,A)

Page 56: Switching and Routing

8.+15. Mar. 2006 56INF-3190: Switching and

Routing

Non-Adaptive Shortest Path Routing

Procedure: e. g. according Dijkstra Find the shortest path from A to D:

...3. Compare all recent, not firmly flagged IS;

flag the one with the lowest number as fixed4. This IS is the origin of the iterative procedure

(i. e. continue with item 2.)

2

7

2

2

61 2

4

33

2

A

C (●,-)

D (●,-)E (●,-)

F (●,-)

H (●,-)

B (2,A)

G (6,A)

Page 57: Switching and Routing

8.+15. Mar. 2006 57INF-3190: Switching and

Routing

Non-Adaptive Shortest Path Routing

Procedure: e.g., according to Dijkstra Find the shortest path from A to D:

1. Node B has been labeled as permanent (filled-in circle)2. relabel all directly adjacent nodes with the distance to B

(path length, nodes adjacent to source): A (does not apply, because it is the origin),

2

7

2

2

61 2

4

33

2

A

C (●,-)

D (●,-)F (●,-)

H (●,-)

B (2,A)

E (4,B)

G (6,A)

C (9,B)

E (●,-)

Page 58: Switching and Routing

8.+15. Mar. 2006 58INF-3190: Switching and

Routing

Non-Adaptive Shortest Path Routing

Procedure: e.g., according to Dijkstra find the shortest path from A to D:

1. …2. …3. examine all tentatively labeled nodes;

make the node with the smallest label permanent4. this node will be the new working node for the

iterative procedure ...

2

7

2

2

61 2

4

33

2

A D (●,-)F (●,-)

H (●,-)

B (2,A) C (9,B)

E (4,B)

F (6,E)

G (6,A) H (9,G)G (5,E)

D (10,H)

H (8,F)

Page 59: Switching and Routing

8.+15. Mar. 2006 59INF-3190: Switching and

Routing

Non-Adaptive Routing

Flooding

Page 60: Switching and Routing

8.+15. Mar. 2006 60INF-3190: Switching and

Routing

Flooding Principle

IS transmits the received packet to all adjacent IS

But generates "an infinite amount" of packets Flood limitations

Hop counter in the packet header Initialize to destination’s distance, or subnet diameter

is unknown Decrement per hop, discard packet at 0

Keeping history of transferred packets in ISs, delete copies

Source router inserts sequence number into each packet

ISs keeps per-router history of sequence numbers Old packets are dropped

Page 61: Switching and Routing

8.+15. Mar. 2006 61INF-3190: Switching and

Routing

Selective Flooding Approach

Do not send out on every line IS transmits received packet to adjacent

stations,located in the Direction of the Destination

With ’regular’ topologies this makes sense and is an optimization

But some topologies do not fit well to this approach

Comment Geographically-oriented routing got recent

interest for mobile scenarios

Page 62: Switching and Routing

8.+15. Mar. 2006 62INF-3190: Switching and

Routing

Flooding Evaluation and use

In most scenarios impractical because of overhead

Extremely robust Reaches all ISs Does not need topology information,

no bootstrap Always finds the shortest path

Page 63: Switching and Routing

8.+15. Mar. 2006 63INF-3190: Switching and

Routing

Adaptive Routing

Page 64: Switching and Routing

8.+15. Mar. 2006 64INF-3190: Switching and

Routing

Adaptive Routing Class Adaptive Algorithms

Decisions are based on current network state

Measurements / estimates of the topology and the traffic volume

Further sub-classification into Centralized algorithms Isolated algorithms Distributed algorithms

Page 65: Switching and Routing

8.+15. Mar. 2006 65INF-3190: Switching and

Routing

Adaptive Routing

Centralized Routing

Page 66: Switching and Routing

8.+15. Mar. 2006 66INF-3190: Switching and

Routing

Adaptive Centralized Routing Principle

One routing control center (RCC) exists in the network

Each IS sends periodically status updates to the RCC

Available neighbors Current queue length Line utilization …

RCC Collects information Computes the optimal path each IS pair Forms routing tables Distributes tables to ISs

Page 67: Switching and Routing

8.+15. Mar. 2006 67INF-3190: Switching and

Routing

Adaptive Centralized Routing Characteristics

RCC has complete information

IS is free of routing calculations

But Re-calculations quite often

necessary (approx. once/min or more often)

Low robustness No correct decisions if

network is partitioned ISs receive tables at

different times Traffic concentration in RCC

proximity

RCC

Page 68: Switching and Routing

8.+15. Mar. 2006 68INF-3190: Switching and

Routing

Adaptive Routing

Isolated Routing

Page 69: Switching and Routing

8.+15. Mar. 2006 69INF-3190: Switching and

Routing

Adaptive Isolated Routingthrough Backward Learning Isolated routing

Every IS makes decision based on locally gathered information only

No exchange of routing information among nodes

Only limited adaptation possibility to changed traffic or topology

IS ‘learns’ from received packets Source IS Distance estimate by hop count

Page 70: Switching and Routing

8.+15. Mar. 2006 70INF-3190: Switching and

Routing

Adaptive Isolated Routingthrough Backward Learning Packet

From source S received on line L after C hops

S is reachable on L within C hops

Routing table in IS L - table (destination - IS, outgoing line, Cmin) Update of the routing table

IS receives packet ( ..., S, C, ... ) on Lif not (S in L-Table)then Add(S,L,C)else if C < Cmin

then Update(S,L,C)

Page 71: Switching and Routing

8.+15. Mar. 2006 71INF-3190: Switching and

Routing

Adaptive Isolated Routingthrough Backward Learning Example: D learns about A

packet ( ..., source - IS, section counter, ...)

P1 ( ..., A, 4, ... ) Add ( A, l1, 4 ) P2 ( ..., A, 3, ... ) Update ( A, l2, 3 )

A D

I1

I2? ?

? ?

Page 72: Switching and Routing

8.+15. Mar. 2006 72INF-3190: Switching and

Routing

Adaptive Isolated Routingthrough Backward Learning Problem

Packets use a different route, e. g. because of failures, high load

Algorithm retains only the old value (because it was "better"),

i. e. algorithm does not react to deteriorations

Solution Periodic deletion of routing tables

(new learning period) Table deletion

Too often: mainly during the learning phase Not often enough: reaction to deteriorations too

slow

Page 73: Switching and Routing

8.+15. Mar. 2006 73INF-3190: Switching and

Routing

Adaptive Routing

Distributed RoutingDistance Vector

Page 74: Switching and Routing

8.+15. Mar. 2006 74INF-3190: Switching and

Routing

Distance Vector Routing Distance-Vector Routing

Group of Distance Vector Routing Algorithms Also known as

Distributed Bellman-Ford algorithm, Ford-Fulkerson algorithm

Use Was the original ARPANET routing algorithm Has been used in the Internet as RIP (Routing

Information Protocol)

Basic principle IS maintains table (i.e., vector) stating

Best known distance to destinations And line to be used

ISs update tables By exchanging routing information with their neighbors

Page 75: Switching and Routing

8.+15. Mar. 2006 75INF-3190: Switching and

Routing

Distance Vector Routing Each IS

maintains routing table with one entry per router in the subnet is assumed to know the ‘distances’ to each neighbor

IS sends list with estimated distances to each destination periodically to its neighbors

X receives list E(Z) from neighbor Y Distance X to Y: e Distance Y to Z: E(Z) Distance X to Z via Y: E(Z)+e

IS computes new routing table from the received listscontaining

Destination IS Preferred outgoing path Distance

Page 76: Switching and Routing

8.+15. Mar. 2006 76INF-3190: Switching and

Routing

Distance Vector Routing

Previous routing table will not be taken into account Reaction to deteriorations

A B C D

EF

GH

I J K L

A 0B 12C 25D 40E 14F 23G 18H 17I 21J 9K 24L 29

A2436182772031200112233

I2031198301960147229

H2128362422403119221009

K

2820173018

0

15

8 A20 A

IHIIH

12 H10 I

-6 K

K

line

JA8

delay JI10

JH12

JK6

Page 77: Switching and Routing

8.+15. Mar. 2006 77INF-3190: Switching and

Routing

Distance Vector Routing Fast route improvement

Fast distribution of information about new short paths (with few hops)

Example initially A unknown later: A connected with

distance 1 to B, this will be announced

Distribution proportional to topological spread

Synchronous (stepwise) update is a simplification

A B C D E

∞ ∞ ∞ ∞

1 ∞ ∞ ∞

1 2 ∞ ∞

1 2 3 ∞

1 2 3 4

Page 78: Switching and Routing

8.+15. Mar. 2006 78INF-3190: Switching and

Routing

Distance Vector Routing Slow distribution of information about new

long paths (with many hops) “Count to Infinity” problem of DVR

Example: deterioration Here: connection destroyed A previously known, but now

detached The values are derived from

(incorrect) connections of distant IS

Comment Limit "infinite" to a finite value,

depending on the metrics, e.g. ‘infinite’ = maximum path

length+1

A B C D E

∞ ∞ ∞ ∞

1 2 3 4

3 2 3 4

3 4 3 4

5 4 5 6

5 6 5 6

7 6 7 6

7 8 7 8

Page 79: Switching and Routing

8.+15. Mar. 2006 79INF-3190: Switching and

Routing

Distance Vector Routing Variant: ‘Split Horizon Algorithm’ Objective: improve the "count to infinity" problem Principle

In general, to publicize the "distance" to each neighbour If neighbor Y exists on the reported route, X reports the

response "false" to Y distance X (via Y) according to arbitrary i:

Example: deterioration (connection destroyed)

B to C: A = (real),C to B: A = (because A is on path), ...

But: still poor, depending on topology, example

Connection CD is removed A receives "false information" via B B receives "false information" via A

Slow distribution (just as before)

A B C D E

1 2 3 4

∞ 2 3 4

∞ ∞ 3 4

∞ ∞ ∞ 4

∞ ∞ ∞ ∞

A

B

C D

Page 80: Switching and Routing

8.+15. Mar. 2006 80INF-3190: Switching and

Routing

Adaptive Routing

Distributed RoutingLink State Routing

Page 81: Switching and Routing

8.+15. Mar. 2006 81INF-3190: Switching and

Routing

Link State Routing Basic principle

IS measures the "distance" to the directly adjacent IS Distributes information Calculates the ideal route

Procedure1. Determine the address of adjacent IS2. Measure the "distance" (delay, ...) to neighbouring IS 3. Organize the local link state information in a packet4. Distribute the information to all IS5. Calculate the route based on the information of all IS

Use Introduced into the ARPANET in 1979, nowadays most prevalent IS-IS (Intermediate System-Intermediate System)

developed by DECNET also used as ISO CLNP in NSFNET Novell Netware developed its own variation from this (NLSP)

OSPF (Open Shortest Path First) since 1990 Internet RFC 1247

Page 82: Switching and Routing

8.+15. Mar. 2006 82INF-3190: Switching and

Routing

Link State Routing1. Phase: gather information about the adjacent

intermediate systems

A F

B

C

LAN

D E G

H

I

A

F

B

C

D E G

H

I

Page 83: Switching and Routing

8.+15. Mar. 2006 83INF-3190: Switching and

Routing

Link State Routing1. Phase: gather information about the adjacent

intermediate systems

A F

B

C

LAN

D E G

H

I

N

A F

B

C

D E G

H

I

Initialization procedure New IS

Sends a HELLO message over each L2 channel Adjacent IS

Responds with its own address, unique within the network

Page 84: Switching and Routing

8.+15. Mar. 2006 84INF-3190: Switching and

Routing

Link State Routing2. Phase: measure the "distance" Definition of distance needed

Usually delay Where to measure?

Uses & Looks up

Data packets

Incominglines

Outgoinglines

ForwardingProcess

RoutingProcess

Topology, link utilization, etc.information

Fills & Updates

desti-nation

link

A 0

B 3

C 1

D 4

Routingtable

Router

HELLOECHOQueues

When to start timer?

Page 85: Switching and Routing

8.+15. Mar. 2006 85INF-3190: Switching and

Routing

Link State Routing

West East

B

A

D

E

C F

G

H

J

I

2. Phase: measure the "distance“ Queuing delay

Measuring without does not take load into account Measuring with does usually better

But Possibility for oscillations (route flapping) Once per routing table update

Page 86: Switching and Routing

8.+15. Mar. 2006 86INF-3190: Switching and

Routing

Link State Routing3. Phase: organizing the information as link state packet Including own address, sequence number, age, "distance" Timing problems: validity and time of sending

Periodically In case of major changes

B C

E F

A D61

2

8

5 7

4 3A

Seq.Age

B C D E F

B 4E 5

Seq.AgeA 4C 2

Seq.AgeB 2D 3

Seq.AgeC 3F 7

Seq.AgeA 5C 1

Seq.AgeB 6D 7

F 6 E 1 F 8 E 8

Link S tate Packets:

Page 87: Switching and Routing

8.+15. Mar. 2006 87INF-3190: Switching and

Routing

Link State Routing4. Distributing the local information to all IS By applying the flooding procedure (very robust)

Therefore sequence number in packets Problem: inconsistency

Varying states simultaneously available in the network Indicate and limit the age of packet,

i. e. IS removes packets that are too old

5. Computing new routes Each IS for itself Possibly larger amount of data available

Page 88: Switching and Routing

8.+15. Mar. 2006 88INF-3190: Switching and

Routing

Adaptive Routing

Distributed RoutingDistance Vector

Page 89: Switching and Routing

8.+15. Mar. 2006 89INF-3190: Switching and

Routing

Distance Vector Routing A B C D

EF

GH

I J K L

A 0B 12C 25D 40E 14F 23G 18H 17I 21J 9K 24L 29

A2436182772031200112233

I2031198301960147229

H2128362422403119221009

K

2820173018

0

15

8 A20 A

IHIIH

12 H10 I

-6 K

K

line

JA8

delay JI10

JH12

JK6

Each node Maintains own routing table knows distances to every

neighbor sends its estimated distances

to the neighbors periodically

Node X estimates distance to node Z through neighbor Y

Add estimated distance to Y and Y’s estimated distance to Y

Node computes new routing table from the received listscontaining

Destination node Preferred outgoing path Distance

Page 90: Switching and Routing

8.+15. Mar. 2006 90INF-3190: Switching and

Routing

Distance Vector Routing

Fast route improvement

Fast distribution of information about new short paths (with few hops)

Example initially A unknown later: A connected with

distance 1 to B, this will be announced

Distribution proportional to topological spread

Synchronous (stepwise) update is a simplification

A B C D E

∞ ∞ ∞ ∞

1 ∞ ∞ ∞

1 2 ∞ ∞

1 2 3 ∞

1 2 3 4

Page 91: Switching and Routing

8.+15. Mar. 2006 91INF-3190: Switching and

Routing

Distance Vector Routing

Slow distribution of information about new long paths (with many hops)

“Count to Infinity” problem of DVR

Deterioration Connection destroyed A previously known New estimates derived from old

estimates of distant nodes

Comment Limit "infinite" to a finite value

A B C D E

∞ ∞ ∞ ∞

1 2 3 4

3 2 3 4

3 4 3 4

5 4 5 6

5 6 5 6

7 6 7 6

7 8 7 8

Page 92: Switching and Routing

8.+15. Mar. 2006 92INF-3190: Switching and

Routing

Distance Vector Routing

Split Horizon Algorithm Objective to improve the "count to infinity" problem In general, as before Report to best route neighbor (“poisoned reverse”)

Deterioration B to C: A = (real),

C to B: A = (because A is on path), ...

Still poor, depending on topology

Connection CD is removed A receives "false information"

via B B receives "false information"

via A

A B C D E

1 2 3 4

∞ 2 3 4

∞ ∞ 3 4

∞ ∞ ∞ 4

∞ ∞ ∞ ∞

A

B

C D

Page 93: Switching and Routing

8.+15. Mar. 2006 93INF-3190: Switching and

Routing

Adaptive Routing

Distributed RoutingLink State Routing

Page 94: Switching and Routing

8.+15. Mar. 2006 94INF-3190: Switching and

Routing

Link State Routing Node measures the "distance" to the directly

adjacent node Distributes information Calculates the ideal route

Procedure1. Determine the address of adjacent node2. Measure the "distance" (delay, ...) to neighboring

node3. Organize the local link state information in a

packet4. Distribute the information to all nodes5. Calculate the route based on the information of all

nods

Page 95: Switching and Routing

8.+15. Mar. 2006 95INF-3190: Switching and

Routing

Link State Routing1. Gather information about the adjacent nodes

New node Sends a HELLO message over each L2 channel

Adjacent node Responds with its own address, unique within the

network

2. Measure the distance Definition of distance needed

Often delay Two approaches to measuring the delay

Page 96: Switching and Routing

8.+15. Mar. 2006 96INF-3190: Switching and

Routing

Link State Routing2. Phase: measure the "distance"

Uses & Looks up

Data packets

Incominglines

Outgoinglines

ForwardingProcess

RoutingProcess

Topology, link utilization, etc.information

Fills & Updates

desti-nation

link

A 0

B 3

C 1

D 4

Routingtable

Router

HELLOECHOQueues

When to start timer?

Queuing delay Measuring without does not take load into account Measuring with does

often better performance possibility for oscillations (route flapping)

once per routing table update

Page 97: Switching and Routing

8.+15. Mar. 2006 97INF-3190: Switching and

Routing

Link State Routing3. Organizing the information as a link state packet

Including own address, sequence number, age, "distance“

Send periodically and in case of major changes Timing problems: validity and time of sending

4. Distributing the local information to all nodes By applying the flooding procedure Problem: inconsistency

Varying states simultaneously available in the network Indicate and limit the age of packet,

i. e. node removes packets that are too old

5. Computing new routes Each node for itself Possibly larger amount of data available

Page 98: Switching and Routing

8.+15. Mar. 2006 98INF-3190: Switching and

Routing

Other routing approachesSnapshot DVR and LSR are basic routing algorithms

Unicast communication No node mobility Flat structure

Why is that insufficient? Increasing number of applications

have use for Multi-homing Multicast Anycast

More and more mobile nodes Too many nodes

Continuation Multicast routing Routing in mobile and ad hoc networks The Internet protocols (IPv4 and IPv6) and routing in the

Internet

Courses that go deeper into routing

• INF5050

• INF5070

• INF5090

• UNIK4200

• UNIK4290

Page 99: Switching and Routing

8.+15. Mar. 2006 99INF-3190: Switching and

Routing

Broadcast Routing

Controlled Flooding

Page 100: Switching and Routing

8.+15. Mar. 2006 100

INF-3190: Switching and Routing

Reverse Path Forwarding When a multicast packet arrives at a node

from origin S on an interface I

Test whether it would send unicast packets to S via I

Yes Deliver multicast packet to all connected end systems Forward multicast packet on all interfaces to other

routers except I No

It does not arrive on the shortest path from S Assume it’s a duplicate Drop packet

Page 101: Switching and Routing

8.+15. Mar. 2006 101

INF-3190: Switching and Routing

Multicast Routing

Shared TreeCore-Based Tree

Page 102: Switching and Routing

8.+15. Mar. 2006 102

INF-3190: Switching and Routing

Core-Based Tree

Also known as "Trees with Rendezvous Points“ Principle

Select a core node (a node which is central to the group) Determine spanning tree of the core node Sender transmits a packet to core node Core node transmits packet via the spanning tree

Properties+ Simple central calculation+ One tree common to all n senders (instead of n trees)- Route to the core node may not be optimized

Core node

Non-Core node

Page 103: Switching and Routing

8.+15. Mar. 2006 103

INF-3190: Switching and Routing

Multicast Routing

Source-based Tree

Page 104: Switching and Routing

8.+15. Mar. 2006 104

INF-3190: Switching and Routing

Spanning Tree

Principle Every node maintains a spanning tree to all other nodes in

the network: their spanning tree

A subset of all nodes is a multicast group Node does initially not know about groups of receivers

Distribution of this information depends on the underlying routing protocol

Prune the spanning tree to include only group nodes

22

2

22

11

1 1

1Multicast source node

Spanning tree for source node

Spanning tree for group 2

Spanning tree for group 1

Page 105: Switching and Routing

8.+15. Mar. 2006 105

INF-3190: Switching and Routing

Multicast Routing

Spanning Treewith Link State Routing

Page 106: Switching and Routing

8.+15. Mar. 2006 106

INF-3190: Switching and Routing

Spanning Tree with LSR All nodes send link state packets periodically

Containing information Distance to neighbors End-systems connected to a node and belonging to a group

Broadcast to all other nodes

Each node calculates a multicast tree From the current locally available and complete state

information Decide locally whether neighboring node needs a packet

Based on the information about the multicast tree Node determines the outgoing lines

on which packets have to be transmitted

Page 107: Switching and Routing

8.+15. Mar. 2006 107

INF-3190: Switching and Routing

Multicast Routing

Reverse Path Forwardingwith Pruning

Page 108: Switching and Routing

8.+15. Mar. 2006 108

INF-3190: Switching and Routing

Reverse Path Forwarding with Pruning Used together with DVR as unicast routing

protocol

Use DVR routing tables to determine whether packet arrives on shortest path from direct neighbor

Principle Sender sends first multicast packet to everybody Use Reverse Path Forwarding Then prune the tree

Page 109: Switching and Routing

8.+15. Mar. 2006 109

INF-3190: Switching and Routing

Reverse Path Forwarding with Pruning Pruning

When a multicast packet arrives from S on interface I If

No directly connected end system is registered, or Non-Membership-Reports are received from all nodes

reachable via interfaces other than I Then

Send a Non-Membership-Report to the previous node that forwarded the packet

Do not forward messages for the group any more

Flooding and pruning must be repeated after some time To find end-systems that have joined

Benefit Pruning only trees that are actually used Unused trees are cut coarsely

Optimized for many receivers

Page 110: Switching and Routing

8.+15. Mar. 2006 110

INF-3190: Switching and Routing

Summary: Multicast Routing Save network resources: send same data to

many hosts with fewer packets Pay with router resources: Routers need to

know group members

All algorithms aim at maintaining a spanning tree from the sending node

Can rely on unicast routing or on broadcast

A bit more multicast in conjunction with IP multicast

Page 111: Switching and Routing

8.+15. Mar. 2006 111

INF-3190: Switching and Routing

Ad hoc Routing

Page 112: Switching and Routing

8.+15. Mar. 2006 112

INF-3190: Switching and Routing

Ad hoc Routing Protocols Outside the Internet world Infrastructure-less networks, often with mobile

nodes

Reactive protocols Determine route if and when needed Source initiates route discovery

Proactive protocols Traditional distributed shortest-path protocols Maintain routes between every host pair at all times Based on periodic updates High routing overhead

Page 113: Switching and Routing

8.+15. Mar. 2006 113

INF-3190: Switching and Routing

Ad hoc Routing

Reactive Routing

Page 114: Switching and Routing

8.+15. Mar. 2006 114

INF-3190: Switching and Routing

Ad Hoc On-Demand Distance Vector Routing (AODV) AODV assumes symmetric (bi-directional) links Every node maintains a routing table

When source S wants to send to D, but route to D is not known

S initiates a route discovery S floods Route Request (RREQ)

When a node re-broadcasts a RREQ Adds the reverse path to its routing table Local routing table grows

When D receives RREQ D replies with Route Reply (RREP)

RREP travels along the reverse path Using routing table

Page 115: Switching and Routing

8.+15. Mar. 2006 115

INF-3190: Switching and Routing

Route Requests in AODV

B

A

S E

F

H

J

D

C

G

IK

Z

Y

Represents a node that has received RREQ for D from S

M

N

L

Page 116: Switching and Routing

8.+15. Mar. 2006 116

INF-3190: Switching and Routing

Route Requests in AODV

B

A

S E

F

H

J

D

C

G

IK

Represents transmission of RREQ

Z

YBroadcast transmission

M

N

L

Page 117: Switching and Routing

8.+15. Mar. 2006 117

INF-3190: Switching and Routing

Route Requests in AODV

B

A

S E

F

H

J

D

C

G

IK

Represents links on Reverse Path

Z

Y

M

N

L

Page 118: Switching and Routing

8.+15. Mar. 2006 118

INF-3190: Switching and Routing

Reverse Path Setup in AODV

B

A

S E

F

H

J

D

C

G

IK

• Node C receives RREQ from G and H, but does not forward it again, because node C has already forwarded RREQ once

Z

Y

M

N

L

Page 119: Switching and Routing

8.+15. Mar. 2006 119

INF-3190: Switching and Routing

Reverse Path Setup in AODV

B

A

S E

F

H

J

D

C

G

IK

Z

Y

M

N

L

Page 120: Switching and Routing

8.+15. Mar. 2006 120

INF-3190: Switching and Routing

Reverse Path Setup in AODV

B

A

S E

F

H

J

D

C

G

IK

Z

Y

• Node D does not forward RREQ, because node D is the intended target of the RREQ

M

N

L

Page 121: Switching and Routing

8.+15. Mar. 2006 121

INF-3190: Switching and Routing

Forward Path Setup in AODV

B

A

S E

F

H

J

D

C

G

IK

Z

Y

M

N

L

Forward links are setup when RREP travels alongthe reverse path

Represents a link on the forward path

Page 122: Switching and Routing

8.+15. Mar. 2006 122

INF-3190: Switching and Routing

AODV Only last node must be included in RREQ packets

Nodes maintain routing tables containing entries only for routes that are in active use

At most one next-hop per destination maintained at each node

Sequence numbers are used to avoid old/broken routes Sequence numbers prevent formation of routing loops

Unused routes expire even if topology does not change

Page 123: Switching and Routing

8.+15. Mar. 2006 123

INF-3190: Switching and Routing

Ad hoc Routing

Proactive Routing

Page 124: Switching and Routing

8.+15. Mar. 2006 124

INF-3190: Switching and Routing

Destination-Sequenced Distance Vector Routing (DSDV) Each node maintains a routing table which stores

Next hop for each destination Cost metric towards each destination A sequence number that is created by the destination itself

Each node periodically forwards routing table to neighbors

Increases sequence number each time Includes it in routing table update

A node that receives a routing table for a destination Overwrites the old table when the sequence number is

higher

When a node decides that a route is broken It increments the sequence number of the route Advertises it with infinite metric

Destination advertises new sequence number

Page 125: Switching and Routing

8.+15. Mar. 2006 125

INF-3190: Switching and Routing

Reactive vs. Proactive Routing Reactive protocols

Lower overhead since routes are determined on demand

Significant delay in route determination Employ flooding (global search) Control traffic may be bursty

Proactive protocols Always maintain routes Little or no delay for route determination Consume bandwidth to keep routes up-to-date Maintain routes which may never be used

Which approach achieves a better trade-off depends on the traffic and mobility patterns