Switching and Routing Foreleser Carsten Griwodz Email griffifi

  • Slides: 125
Download presentation
Switching and Routing Foreleser: Carsten Griwodz Email: griff@ifi. uio. no 8. +15. Mar. 2006

Switching and Routing Foreleser: Carsten Griwodz Email: griff@ifi. uio. no 8. +15. Mar. 2006 1 INF-3190: Switching and Routing

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

Motivation n It is desirable to connect networks (instead of using a single large one): n n n 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 one frame at a time, Min 512 bits wireless network company 8. +15. Mar. 2006 ISP Max 500 m 2 INF-3190: Switching and Routing

Connecting Networks by Relays End system Intermediate system End system 5 4 Gateway 5

Connecting Networks by Relays End system Intermediate system End system 5 4 Gateway 5 Application layer 4 Transport layer 3 Router 3 Network layer 2 Bridge 2 Data link layer 1 Repeater 1 Physical layer 8. +15. Mar. 2006 3 INF-3190: Switching and Routing

Connecting Networks by Relays n Layer 1: Repeater / Hub n n n copies

Connecting Networks by Relays n Layer 1: Repeater / Hub n n n copies all bits between cable segments works solely as a repeater does not influence the traffic between networks Layer 3: Router (or Layer 3 Gateway) n n n Layer 2: Bridge / Switch n n relays frames between LANs (MAC level) minor frame modifications, increases the number of stations n relays packets between different networks modifies the packets converts different addressing concepts Layer 4 - 5: Gateway (or Protocol Converter) n n converts one protocol into another usually no 1 -to-1 mapping of functions Note: n n names (in products) are often confused e. g. bridge and switch 8. +15. Mar. 2006 4 INF-3190: Switching and Routing

Layer 1: Physical Layer 8. +15. Mar. 2006 5 INF-3190: Switching and Routing

Layer 1: Physical Layer 8. +15. Mar. 2006 5 INF-3190: Switching and Routing

Repeater and Hub ex. : IEEE 802. 3 Twisted Pair Repeater ex. : IEEE

Repeater and Hub ex. : IEEE 802. 3 Twisted Pair Repeater ex. : IEEE 802. 3 “Thinwire” n Function n To amplify the electrical signals To increase the range Limitation n n Extends the broadcast medium: every bit is copied One collision domain 8. +15. Mar. 2006 6 INF-3190: Switching and Routing

Layer 2: Data Link Layer 8. +15. Mar. 2006 7 INF-3190: Switching and Routing

Layer 2: Data Link Layer 8. +15. Mar. 2006 7 INF-3190: Switching and Routing

Bridges, Switches n Bridges n n Connects two or more LANs (potentially different types)

Bridges, Switches n Bridges n n Connects two or more LANs (potentially different types) Each line is its own collision domain Traditionally: store-and-forward and CPU -based Switches n n n Typically connects two or more computers Each port / line is its own collision domain (no collisions) Typically cut-through switching devices n n begin forwarding as soon as possible when destination header has been detected, before rest of frame arrived Hardware-based Bridges vs. Switches n Sometimes difference seems to be more a marketing issue than technical one 8. +15. Mar. 2006 8 INF-3190: Switching and Routing

Bridge n Tasks n n n n Coupling of different LANs Scalability of networks

Bridge n Tasks n n n n 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 n n n IP OSI layer 2 protocols Ethernet versions Important goal: to achieve transparency n n Change attachment point without changes to HW, SW, configuration Hide different types of LAN to communicating machines 8. +15. Mar. 2006 9 INF-3190: Switching and Routing

Bridge Connecting 2 Different Networks Example: Bridge between IEEE 802. 3 (CSMA/CD) and IEEE

Bridge Connecting 2 Different Networks Example: Bridge between IEEE 802. 3 (CSMA/CD) and IEEE 802. 4 (Token Bus) n Approach n n n LLC as common layer Frames are routed to the respective MAC Bridge contains n n Its own implementation for each MAC For each to it belonging physical layer the corresponding implementation 8. +15. Mar. 2006 10 INF-3190: Switching and Routing

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

802. x 802. y Bridging n Some different 802. x frame formats: n n There are even more different frame formats. . . Some fields are technically necessary in one case but useless in another n e. g. duration of 802. 11 8. +15. Mar. 2006 11 INF-3190: Switching and Routing

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

802. x 802. y Bridging n Different transmission rates (4/10/11/16/1000/. . . Mbps) n n n 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 n n Different frame lengths n n 802. 3: 1518 bytes, 802. 4: 8191 bytes, 802. 5: unlimited, 802. 11: 2346 bytes 802. x protocols do not support reassembly n n n If bridge is out of memory, frames are dropped 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 n Priorities n n Supported (in various forms) from both 802. 4 and 802. 5 Not supported by 802. 3 8. +15. Mar. 2006 12 INF-3190: Switching and Routing

802. x 802. y Bridging n Different checksum calculations n n Security n n

802. x 802. y Bridging n Different checksum calculations n n Security n n n 802. 11 provides some data link layer encryption 802. 3 does not Quality of Service / Priorities n n Means conversion, delay, buffering Supported (in various forms) by both 802. 4 and 802. 5 Not supported by 802. 3 ’Kind of’ in 802. 11 (PCF / DCF) Acknowledgements n n n Supported by 802. 4 (temporary token handoff) Supported by 802. 5 (C+A bits) Not supported by 802. 3 8. +15. Mar. 2006 13 INF-3190: Switching and Routing

Self–Learning Bridges n n Also called Transparent Bridges Transparency n n Transparent bridge n

Self–Learning Bridges n n Also called Transparent Bridges Transparency n n Transparent bridge n n n Bridges not visible for the other components of the network simplifies other components Bridge works in promiscuous mode (receives every frame of each connected LAN) Bridge manages table: station LAN (output line) address LAN A 1 B 2 C 2 Decision procedure n n n Destination unknown: flooding Source and destination LANs identical: frame dropped Source and destination LANs differ: frame rerouted to destination LAN 8. +15. Mar. 2006 14 INF-3190: Switching and Routing

Self–Learning Bridges n Learning procedure n Bridge table initially empty n n Use flooding

Self–Learning Bridges n Learning procedure n Bridge table initially empty n n Use flooding for unknown destination Backward learning n Bridge works in promiscuous mode: n n Bridge receives frames from source address Q on LAN L n n n Receives any frame on any of its LANs Q can be reached over L Create table entry accordingly Adaptation to changes in topology n n n 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 8. +15. Mar. 2006 15 INF-3190: Switching and Routing

Self–Learning Bridges: Spanning Tree n Increase reliability n n Connect LANs via various bridges

Self–Learning Bridges: Spanning Tree n Increase reliability n n Connect LANs via various bridges in parallel Problem n n This creates a loop in the topology Frames with unknown destination are flooded n n Frame is copied again and again Solution n n Communication among bridges Overlay actual topology by spanning tree reaching every LAN n Exactly one path from any LAN to every other LAN 8. +15. Mar. 2006 16 INF-3190: Switching and Routing

Self–Learning Bridges: Spanning Tree n Algorithm n Choose a bridge as root of tree

Self–Learning Bridges: Spanning Tree n Algorithm n Choose a bridge as root of tree n n Generation of spanning tree n n All bridges broadcast their serial number, lowest wins Configured with bridges representing the edges within the tree Thereby avoiding loops Adaptation if configuration is changed Drawback n Ignores some potential connections between LANs i. e. , not all bridges are necessarily present in the tree 8. +15. Mar. 2006 17 INF-3190: Switching and Routing

Source Routing Bridges n Alternative to self-learning bridges n Principle n n n The

Source Routing Bridges n Alternative to self-learning bridges n Principle n n n The frame’s sender defines path Bridge routes the frame Prerequisite n n n LAN has a unique address Bridge at the respective LAN is also unique Then n 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 n n 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 8. +15. Mar. 2006 18 INF-3190: Switching and Routing

Connecting Equal Networks: Encapsulation Example: remote bridge n Principle 1. 2. 3. n Incoming

Connecting Equal Networks: Encapsulation Example: remote bridge n Principle 1. 2. 3. n Incoming data unit is packaged as payload, Transmitted and Then fed into the destination network Properties n Certain protocol on connecting route n n n e. g. PPP i. e. MAC frames encapsulated in PPP Only bridge at the destination network can be reached Simple 8. +15. Mar. 2006 19 INF-3190: Switching and Routing

Layer 3: Network Layer 8. +15. Mar. 2006 20 INF-3190: Switching and Routing

Layer 3: Network Layer 8. +15. Mar. 2006 20 INF-3190: Switching and Routing

Network Layer n Goal n End systems Enable data transfer from end system to

Network Layer n Goal n End systems Enable data transfer from end system to end system n n n Subnetworks Standardized for end systems Independent from network technology Independent from number, type and topology of the subnetworks Subnetworks (ISO definition): n n Several hops, (heterogeneous) subnetworks Compensate for differences between end systems during transmission The provided services are n Intermediate systems 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 8. +15. Mar. 2006 21 INF-3190: Switching and Routing

Network Layer n Primary task from a layer model perspective n To provide service

Network Layer n Primary task from a layer model perspective n To provide service to the transport layer n n n Connectionless or connection-oriented service Uniform addressing Internetworking: provide transitions between networks Routing Congestion control Quality of Service (Qo. S) 8. +15. Mar. 2006 22 INF-3190: Switching and Routing

Inside: Types of Switching n Circuit switching n n Packet switching n n Switching

Inside: Types of Switching n Circuit switching n n Packet switching n n Switching a physical connection Store-and-forward, but transmissions packets limited in size Message switching n Message is stored and passed one by one hop 8. +15. Mar. 2006 23 INF-3190: Switching and Routing

Circuit Switching n Connection exists physically for the duration of the conversation n Refers

Circuit Switching n Connection exists physically for the duration of the conversation n Refers to n n n Switching centers Connections between switching centers (frequency spectrum, dedicated ports) Implementation examples n n n Historically: on switching boards Mechanical positioning of the dialers Setting coupling points in circuits 8. +15. Mar. 2006 24 INF-3190: Switching and Routing

Packet Switching n Data entity Transport … Network Packet Data link Frame Physical Bit/byte

Packet Switching n Data entity Transport … Network Packet Data link Frame Physical Bit/byte (bit stream) Datagrams n n Layer Every packet chooses its path Virtual circuits n Packets (or cells) over a pre-defined path 8. +15. Mar. 2006 25 INF-3190: Switching and Routing

Packet Switching n n n Packets of limited size Dynamic route search (no connect

Packet Switching n n n Packets of limited size Dynamic route search (no connect phase) No dedicated path from source to destination 8. +15. Mar. 2006 26 INF-3190: Switching and Routing

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

Message Switching n All data to be sent are treated as a "message" n “Store and forward" network 1. 2. 3. 4. Accept Treat of possible errors Store Forward 8. +15. Mar. 2006 27 INF-3190: Switching and Routing

Comparison: Temporal Performance Circuit switching 8. +15. Mar. 2006 Message switching 28 Packet switching

Comparison: Temporal Performance Circuit switching 8. +15. Mar. 2006 Message switching 28 Packet switching Virtual circuit INF-3190: Switching and Routing

Comparison: Properties n Circuit switching n n n Packet switching n n Connection has

Comparison: Properties n Circuit switching n n n Packet switching n n 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 Possibly only reservation of average bandwidth (static reservation) Possibility of congestion High utilization of resources Message switching n n 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 8. +15. Mar. 2006 29 INF-3190: Switching and Routing

Comparison: Circuit and Packet Switching n Circuit switching n n Connection establishment can take

Comparison: Circuit and Packet Switching n Circuit switching n n Connection establishment can take a long time Bandwidth is reserved n n n No danger of congestion Possibly poor bandwidth utilization (burst traffic) Continuous transmission time n Packet switching n n n 30 Danger of congestion Optimized bandwidth utilization Varying transmission time n all data is transmitted over the same path 8. +15. Mar. 2006 Connect phase not absolutely necessary Dynamic allocation of bandwidth packets between same end systems may use different paths INF-3190: Switching and Routing

Virtual Circuits and Datagrams 8. +15. Mar. 2006 31 INF-3190: Switching and Routing

Virtual Circuits and Datagrams 8. +15. Mar. 2006 31 INF-3190: Switching and Routing

Virtual Circuits n Connection set-up phase n n Select a path Intermediate systems store

Virtual Circuits n Connection set-up phase n n Select a path Intermediate systems store path information Network reserves all resources required for the connection Data transfer phase n n All packets follow the selected path Packet contains VC’s number n n n Identification of connection, no address information IS uses the stored path information to determine the successor Disconnect phase n n Network forgets the path Releases reserved resources 8. +15. Mar. 2006 32 INF-3190: Switching and Routing

Implementation Virtual Circuit End systems ES allocate VCnumbers independently Problem: the same VCidentifiers may

Implementation Virtual Circuit End systems ES allocate VCnumbers independently Problem: the same VCidentifiers may be allocated to different paths n Solution: allocate VC-numbers for virtual circuit segments n IS differentiates between incoming and outgoing VC-number n n n 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 8. +15. Mar. 2006 33 INF-3190: Switching and Routing

Implementation Virtual Circuit B A IN OUT H H B H H H 0

Implementation Virtual Circuit B A IN OUT H H B H H H 0 1 0 2 3 4 B E E A H H A H F 0 0 1 1 2 0 C C A F F H 0 1 0 C B B E E 0 1 D D H D 0 1 0 2 D 0 0 1 1 2 3 C C F F C E A A 0 1 2 H H F 0 1 2 3 0 8 Simplex virtual circuits Originating at A B F 0 1 2 3 F H C C 0 0 0 1 E B B D 0 0 1 0 D D H B 0 1 0 0 0 - ABCD 0 - BCD 1 - AEFD 1 - BAE 2 - ABFD 2 - BF 3 - AEC 4 - AECDFB 8. +15. Mar. 2006 34 INF-3190: Switching and Routing

Implementation Datagram passes through the network as an isolated unit n n Has complete

Implementation Datagram passes through the network as an isolated unit n n Has complete source and destination addresses Individual route selection for each datagram Generally no resource reservation Correct sequence not guaranteed 8. +15. Mar. 2006 35 INF-3190: Switching and Routing

Datagram vs. Virtual Circuit n Datagram: IS routing table specifies possible path(s) n n

Datagram vs. Virtual Circuit n Datagram: IS routing table specifies possible path(s) n n but n n No connection setup delay Less sensible to IS and link failures Route selection for each datagram: quick reaction to failures Virtual Circuit: destination address defined by connection n n Each packet contains the full destination and source address Route selection for each datagram: overhead Qo. S guarantees hardly possible n but n n 8. +15. Mar. 2006 36 Packets contain short VCnumber only Low overhead during transfer phase “Perfect" channel throughout the net Resource reservation: "Quality of Service" guarantees possible 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 INF-3190: Switching and Routing

Services of the Network Layer 8. +15. Mar. 2006 37 INF-3190: Switching and Routing

Services of the Network Layer 8. +15. Mar. 2006 37 INF-3190: Switching and Routing

Services of the Network Layer n Concepts n n Connection oriented n n n

Services of the Network Layer n Concepts n n Connection oriented n n n Connection oriented vs. connectionless communication 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 n n n Unreliable communication Hardly any error control: left to layer 4 or higher Simplex communication More favorable for simple data communication: Favored by Internet community 8. +15. Mar. 2006 38 INF-3190: Switching and Routing

Connection Oriented Communication n 3 -phase interaction n n n n Connect Data transfer

Connection Oriented Communication n 3 -phase interaction n n n n Connect Data transfer Disconnect (allows for) Quality of Service Negotiation (typically) Reliable Communication in both directions Flow Control Relatively complex protocols Connection-Oriented Service n Service provider offers n n n Queues in both directions Ordered transmission of objects Delivery of objects at most once 8. +15. Mar. 2006 39 INF-3190: Switching and Routing

Connectless communication n Connectionless Communication n n Network transmits packets as isolated Units (datagram)

Connectless communication n Connectionless Communication n n Network transmits packets as isolated Units (datagram) Unreliable Communication n n loss, duplication, modification, sequence errors possible No flow control Comparatively simple protocols Connectionless Service n Service provider can n Delete objects in a queue Duplicate objects in a queue Change the object sequence within a queue 8. +15. Mar. 2006 40 INF-3190: Switching and Routing

Comparison of Concepts n Arguments pro a connection oriented service n n n Simple,

Comparison of Concepts n Arguments pro a connection oriented service n n n Simple, powerful paradigm Simplification of the higher layers Relieves end systems For some applications efficiency in time is more important than error-free transmission n n Arguments pro a connectionless service n n n e. g. real-time applications, digital voice transmission) suitable for a wide range of applications n 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 n n ‘End-to-End Arguments’ n 8. +15. Mar. 2006 41 IP common, can’t change now secure communication requires error control within the application but error control in one layer can replace the error control in the layer underneath it INF-3190: Switching and Routing

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

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

Routing: Foundations n Task n To define the route of packets through the network

Routing: Foundations n Task n To define the route of packets through the network n n n Routing algorithm n n From the source To the destination system Defines on which outgoing line an incoming packet will be transmitted Route determination n Datagram n n Routing algorithm makes individual decision for each packet Virtual circuit n Routing algorithm runs only during connect (session routing) 8. +15. Mar. 2006 43 INF-3190: Switching and Routing

Routing: Routing and Forwarding n Distinction can be made n n Routing: makes decision

Routing: Routing and Forwarding n Distinction can be made n n Routing: makes decision which route to use Forwarding: what happens when a packet arrives Topology, link utilization, etc. information Router Routing Process destination A Fills & Updates Uses & Looks up link 0 B 3 C 1 D 4 Routing table Data packets Incoming lines 8. +15. Mar. 2006 Forwarding Process 44 Outgoing lines INF-3190: Switching and Routing

Good Properties for Routing Algorithms n n Correctness Simplicity n n Robustness n n

Good Properties for Routing Algorithms n n Correctness Simplicity n n Robustness n n Consistent results No volatile adaptations to new conditions Fairness n n Compensation for IS and link failures Handling of topology and traffic changes Stability n n Minimize load of routers Among different sources compared to each other Optimality 8. +15. Mar. 2006 45 INF-3190: Switching and Routing

Routing Algorithms: Conflicting Properties n n Often conflicting: fairness and optimization Some different optimization

Routing Algorithms: Conflicting Properties n n Often conflicting: fairness and optimization Some different optimization criteria n n n Average packet delay Total throughput Individual delay n n Example: n n n Communication among A A’, B B’, C C’ uses full capacity of horizontal line Optimized throughput, but No fairness for X and X’ n n Conflict Tradeoff between fairness and optimization Therefore often n Hop minimization per packet n n It tends to reduce delays and decreases required bandwidth Also tends to increase throughput 8. +15. Mar. 2006 46 INF-3190: Switching and Routing

Classes of Routing Algorithms n Class Non-adaptive Algorithms n Current network state not taken

Classes of Routing Algorithms n Class Non-adaptive Algorithms n Current network state not taken into consideration n n With knowledge of the overall topology n n n Spanning tree Flow-based routing Without knowledge of the overall topology n n Assume average values All routes are defined off-line before the network is put into operation No change during operation (static routing) Flooding Class Adaptive Algorithms n Decisions are based on current network state n n Measurements / estimates of the topology and the traffic volume Further sub-classification into n n n Centralized algorithms Isolated algorithms Distributed algorithms 8. +15. Mar. 2006 47 INF-3190: Switching and Routing

Optimality Principle and Sink Tree n General statement about optimal routes n n n

Optimality Principle and Sink Tree n General statement about optimal routes n n n Example: n n 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 r 1: route from I to J r 1 r 2: route from J to K I If better route r 2’ from J to K would exist n Then n Concatenation of r 1 and r 2’ would improve route from I to K r 1 J K r 2’ Set of optimal routes From all sources n To a given destination form a tree rooted at the destination: Sink Tree n 8. +15. Mar. 2006 48 INF-3190: Switching and Routing

Sink Tree B C A Subnet D E G F J I K H

Sink Tree B C A Subnet D E G F J I K H L Comments n Tree: no loops n n Other trees with same path lengths may exist Goal of all routing algorithms n n Each optimal route is finite with bounded number of hops Not necessarily unique n n N O M n Sink Tree for Destination B Discover and use the sink trees for all routers Not realistic to use Sink Trees as real-life routing algorithm n n Need complete information about topology Sink Tree is only a benchmark for routing algorithms 8. +15. Mar. 2006 49 INF-3190: Switching and Routing

Methodology & Metrics n Networks represented as graphs: n n Node represents a router

Methodology & Metrics n Networks represented as graphs: n n Node represents a router Edge represents a communication line (link) n Compute the shortest path between a given pair of routers n Different metrics for path lengths can be used n n n Can lead to different results Sometime even combined (but this leads to computational problems) Metrics for the "ideal" route, e. g. , a "short" route n n n n Number of hops Geographical distance Bandwidth Average data volume Cost of communication Delay in queues. . . 8. +15. Mar. 2006 50 INF-3190: Switching and Routing

Non-Adaptive Routing Shortest Path Routing 8. +15. Mar. 2006 51 INF-3190: Switching and Routing

Non-Adaptive Routing Shortest Path Routing 8. +15. Mar. 2006 51 INF-3190: Switching and Routing

Non-Adaptive Shortest Path Routing n Static Procedure n n Network operator generates tables Tables

Non-Adaptive Shortest Path Routing n Static Procedure n n Network operator generates tables Tables n n n Are loaded when IS operation is initiated and Will not be changed any more Characteristics n n n Simple Good results with relatively consistent topology and traffic But n Poor performance if traffic volume or topologies change over time 8. +15. Mar. 2006 52 INF-3190: Switching and Routing

Non-Adaptive Shortest Path Routing n Spanning Tree and Optimized Route n Information about the

Non-Adaptive Shortest Path Routing n Spanning Tree and Optimized Route n Information about the entire network has to be available n n i. e. application actually as a benchmark comparison Example n n n 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 B (●, -) 2 2 A E (●, -) 1 6 G (●, -) C (●, -) 7 3 3 D (●, -) 2 F (●, -) 2 4 2 H (●, -) 2 8. +15. Mar. 2006 53 INF-3190: Switching and Routing

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

Non-Adaptive Shortest Path Routing n Procedure: e. g. according to Dijkstra n Find the shortest path from A to D n n Labels may be permanent or tentative Initially, no paths are known n 1. 2. 3. 4. All nodes are labeled with infinity (tentative) Discover the labels that represent shortest possible path from source to any node Make those labels permanent Node A labeled as permanent (filled-in circle) Relabel all directly adjacent nodes with the distance to A (path length, nodes adjacent to source) Examine all tentatively labeled nodes, make the node with the smallest label permanent This node will be the new working node for the iterative procedure (i. e. , continue with step 2. ) 8. +15. Mar. 2006 54 INF-3190: Switching and Routing

Non-Adaptive Shortest Path Routing B (2, A) (●, -) 2 2 A E (●,

Non-Adaptive Shortest Path Routing B (2, A) (●, -) 2 2 A E (●, -) 1 6 G (6, A) (●, -) n n C (●, -) 7 3 3 D (●, -) 2 F (●, -) 2 4 2 H (●, -) Procedure: e. g. according to Dijkstra Find the shortest path from A to D: 1. 2. A flagged as permanent (filled-in circle) Relabel all directly adjacent nodes with the distance to A n 8. +15. Mar. 2006 (path length, IS adjacent to the source): 55 INF-3190: Switching and Routing

Non-Adaptive Shortest Path Routing B (2, A) 2 2 A E (●, -) 1

Non-Adaptive Shortest Path Routing B (2, A) 2 2 A E (●, -) 1 6 G (6, A) n n C (●, -) 7 3 3 D (●, -) 2 F (●, -) 2 4 2 H (●, -) Procedure: e. g. according Dijkstra Find the shortest path from A to D: n 3. . Compare all recent, not firmly flagged IS; n 4. flag the one with the lowest number as fixed This IS is the origin of the iterative procedure n (i. e. continue with item 2. ) 8. +15. Mar. 2006 56 INF-3190: Switching and Routing

Non-Adaptive Shortest Path Routing B (2, A) 2 2 A E (●, -) (4,

Non-Adaptive Shortest Path Routing B (2, A) 2 2 A E (●, -) (4, B) 1 6 G (6, A) n n C (9, B) (●, -) 7 3 3 D (●, -) 2 F (●, -) 2 4 2 H (●, -) Procedure: e. g. , according to Dijkstra Find the shortest path from A to D: 1. 2. Node B has been labeled as permanent (filled-in circle) relabel all directly adjacent nodes with the distance to B (path length, nodes adjacent to source): n 8. +15. Mar. 2006 A (does not apply, because it is the origin), 57 INF-3190: Switching and Routing

Non-Adaptive Shortest Path Routing B (2, A) 2 2 A E (4, B) 1

Non-Adaptive Shortest Path Routing B (2, A) 2 2 A E (4, B) 1 6 G (5, E) (6, A) n n C (9, B) 7 3 3 D (10, H) (●, -) 2 F (●, -) (6, E) 2 4 2 H (8, F) (●, -) (9, G) Procedure: e. g. , according to Dijkstra find the shortest path from A to D: 1. 2. 3. … … examine all tentatively labeled nodes; n 4. make the node with the smallest label permanent this node will be the new working node for the iterative procedure. . . 8. +15. Mar. 2006 58 INF-3190: Switching and Routing

Non-Adaptive Routing Flooding 8. +15. Mar. 2006 59 INF-3190: Switching and Routing

Non-Adaptive Routing Flooding 8. +15. Mar. 2006 59 INF-3190: Switching and Routing

Flooding n Principle n IS transmits the received packet to all adjacent IS n

Flooding n Principle n IS transmits the received packet to all adjacent IS n n But generates "an infinite amount" of packets Flood limitations n Hop counter in the packet header n n n 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 n n n Source router inserts sequence number into each packet ISs keeps per-router history of sequence numbers Old packets are dropped 8. +15. Mar. 2006 60 INF-3190: Switching and Routing

Selective Flooding n Approach n n n Do not send out on every line

Selective Flooding n Approach n n n 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 n Geographically-oriented routing got recent interest for mobile scenarios 8. +15. Mar. 2006 61 INF-3190: Switching and Routing

Flooding n Evaluation and use n n n In most scenarios impractical because of

Flooding n Evaluation and use n n n In most scenarios impractical because of overhead Extremely robust Reaches all ISs Does not need topology information, no bootstrap Always finds the shortest path 8. +15. Mar. 2006 62 INF-3190: Switching and Routing

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

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

Adaptive Routing n Class Adaptive Algorithms n Decisions are based on current network state

Adaptive Routing n Class Adaptive Algorithms n Decisions are based on current network state n n Measurements / estimates of the topology and the traffic volume Further sub-classification into n n n Centralized algorithms Isolated algorithms Distributed algorithms 8. +15. Mar. 2006 64 INF-3190: Switching and Routing

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

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

Adaptive Centralized Routing n Principle n n One routing control center (RCC) exists in

Adaptive Centralized Routing n Principle n n One routing control center (RCC) exists in the network Each IS sends periodically status updates to the RCC n n n Available neighbors Current queue length Line utilization … RCC n n Collects information Computes the optimal path each IS pair Forms routing tables Distributes tables to ISs 8. +15. Mar. 2006 66 INF-3190: Switching and Routing

Adaptive Centralized Routing n Characteristics n n n RCC has complete information IS is

Adaptive Centralized Routing n Characteristics n n n RCC has complete information IS is free of routing calculations But n n n 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 8. +15. Mar. 2006 67 RCC INF-3190: Switching and Routing

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

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

Adaptive Isolated Routing through Backward Learning n Isolated routing n Every IS makes decision

Adaptive Isolated Routing through Backward Learning n Isolated routing n Every IS makes decision based on locally gathered information only n n n No exchange of routing information among nodes Only limited adaptation possibility to changed traffic or topology IS ‘learns’ from received packets n n Source IS Distance estimate by hop count 8. +15. Mar. 2006 69 INF-3190: Switching and Routing

Adaptive Isolated Routing through Backward Learning n Packet n n Routing table in IS

Adaptive Isolated Routing through Backward Learning n Packet n n Routing table in IS n n n From source S received on line L after C hops S is reachable on L within C hops L - table (destination - IS, outgoing line, Cmin) Update of the routing table IS receives packet (. . . , S, C, . . . ) on L if not (S in L-Table) then Add(S, L, C) else if C < Cmin then Update(S, L, C) 8. +15. Mar. 2006 70 INF-3190: Switching and Routing

Adaptive Isolated Routing through Backward Learning n Example: D learns about A n packet

Adaptive Isolated Routing through Backward Learning n Example: D learns about A n packet (. . . , source - IS, section counter, . . . ) n n P 1 (. . . , A, 4, . . . ) Add ( A, l 1, 4 ) P 2 (. . . , A, 3, . . . ) Update ( A, l 2, 3 ) ? ? I 1 A 8. +15. Mar. 2006 ? ? 71 I 2 D INF-3190: Switching and Routing

Adaptive Isolated Routing through Backward Learning n Problem n n Packets use a different

Adaptive Isolated Routing through Backward Learning n Problem n n Packets use a different route, e. g. because of failures, high load Algorithm retains only the old value (because it was "better"), n n i. e. algorithm does not react to deteriorations Solution n n Periodic deletion of routing tables (new learning period) Table deletion n n Too often: mainly during the learning phase Not often enough: reaction to deteriorations too slow 8. +15. Mar. 2006 72 INF-3190: Switching and Routing

Adaptive Routing Distributed Routing Distance Vector 8. +15. Mar. 2006 73 INF-3190: Switching and

Adaptive Routing Distributed Routing Distance Vector 8. +15. Mar. 2006 73 INF-3190: Switching and Routing

Distance Vector Routing n Distance-Vector Routing n n Group of Distance Vector Routing Algorithms

Distance Vector Routing n Distance-Vector Routing n n Group of Distance Vector Routing Algorithms Also known as n n Use n n n Distributed Bellman-Ford algorithm, Ford-Fulkerson algorithm Was the original ARPANET routing algorithm Has been used in the Internet as RIP (Routing Information Protocol) Basic principle n IS maintains table (i. e. , vector) stating n n n Best known distance to destinations And line to be used ISs update tables n By exchanging routing information with their neighbors 8. +15. Mar. 2006 74 INF-3190: Switching and Routing

Distance Vector Routing n Each IS n n maintains routing table with one entry

Distance Vector Routing n Each IS n n maintains routing table with one entry per router in the subnet is assumed to know the ‘distances’ to each neighbor n IS sends list with estimated distances to each destination periodically to its neighbors n X receives list E(Z) from neighbor Y n n 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 lists containing n n n Destination IS Preferred outgoing path Distance 8. +15. Mar. 2006 75 INF-3190: Switching and Routing

Distance Vector Routing A B C D G E H F I J K

Distance Vector Routing A B C D G E H F I J K L A B C D E F G H I J K L delay n A 0 12 25 40 14 23 18 17 21 9 24 29 I 24 36 18 27 7 20 31 20 0 11 22 33 H 20 31 19 8 30 19 6 0 14 7 22 9 K 21 28 36 24 22 40 31 19 22 10 0 9 JA 8 JI 10 JH 12 JK 6 8 20 28 20 17 30 18 12 10 0 6 15 line A A I H I I H H I K K Previous routing table will not be taken into account n Reaction to deteriorations 8. +15. Mar. 2006 76 INF-3190: Switching and Routing

Distance Vector Routing n n n Fast route improvement Fast distribution of information about

Distance Vector Routing n n n Fast route improvement Fast distribution of information about new short paths (with few hops) Example n n 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 8. +15. Mar. 2006 77 A B C D E ∞ ∞ 1 ∞ ∞ ∞ 1 2 3 4 INF-3190: Switching and Routing

Distance Vector Routing n n n Example: deterioration n n Slow distribution of information

Distance Vector Routing n n n Example: deterioration n n Slow distribution of information about new long paths (with many hops) “Count to Infinity” problem of DVR Here: connection destroyed A previously known, but now detached The values are derived from (incorrect) connections of distant IS Comment n Limit "infinite" to a finite value, depending on the metrics, e. g. n ‘infinite’ = maximum path length+1 8. +15. Mar. 2006 78 A B C D E 1 2 3 4 3 4 3 4 5 6 5 6 7 6 7 8 ∞ ∞ INF-3190: Switching and Routing

Distance Vector Routing n n n Variant: ‘Split Horizon Algorithm’ Objective: improve the "count

Distance Vector Routing n n n Variant: ‘Split Horizon Algorithm’ Objective: improve the "count to infinity" problem Principle n n In general, to publicize the "distance" to each neighbour If neighbor Y exists on the reported route, X reports the response "false" to Y n n Example: deterioration (connection destroyed) n n distance X (via Y) according to arbitrary i: A B to C: A = (real), C to B: A = (because A is on path), . . . But: still poor, depending on topology, example n n n Connection CD is removed A receives "false information" via B B receives "false information" via A n B C D E 1 2 3 4 ∞ ∞ ∞ ∞ A Slow distribution (just as before) C D B 8. +15. Mar. 2006 79 INF-3190: Switching and Routing

Adaptive Routing Distributed Routing Link State Routing 8. +15. Mar. 2006 80 INF-3190: Switching

Adaptive Routing Distributed Routing Link State Routing 8. +15. Mar. 2006 80 INF-3190: Switching and Routing

Link State Routing n Basic principle n n Procedure 1. 2. 3. 4. 5.

Link State Routing n Basic principle n n Procedure 1. 2. 3. 4. 5. n IS measures the "distance" to the directly adjacent IS Distributes information Calculates the ideal route Use n n Determine the address of adjacent IS Measure the "distance" (delay, . . . ) to neighbouring IS Organize the local link state information in a packet Distribute the information to all IS Calculate the route based on the information of all IS Introduced into the ARPANET in 1979, nowadays most prevalent IS-IS (Intermediate System-Intermediate System) n n developed by DECNET also used as ISO CLNP in NSFNET Novell Netware developed its own variation from this (NLSP) OSPF (Open Shortest Path First) n since 1990 Internet RFC 1247 8. +15. Mar. 2006 81 INF-3190: Switching and Routing

Link State Routing 1. Phase: gather information about the adjacent intermediate systems H H

Link State Routing 1. Phase: gather information about the adjacent intermediate systems H H D E B A G D B I A F C G I C F LAN 8. +15. Mar. 2006 E 82 INF-3190: Switching and Routing

Link State Routing 1. Phase: gather information about the adjacent intermediate systems H H

Link State Routing 1. Phase: gather information about the adjacent intermediate systems H H D E B A G D B I A F C E LAN G I F C N Initialization procedure n New IS n n Sends a HELLO message over each L 2 channel Adjacent IS n Responds with its own address, unique within the network 8. +15. Mar. 2006 83 INF-3190: Switching and Routing

Link State Routing 2. Phase: measure the "distance" n Definition of distance needed n

Link State Routing 2. Phase: measure the "distance" n Definition of distance needed n n Usually delay Where to measure? Topology, link utilization, etc. information Router Routing Process Fills & Updates Uses & Looks up destination A lines 8. +15. Mar. 2006 0 B 3 C 1 D 4 Data packets ECHO Incoming link Routing table Queues Forwarding Process When to start timer? HELLO Outgoing lines 84 INF-3190: Switching and Routing

Link State Routing 2. Phase: measure the "distance“ n Queuing delay n n n

Link State Routing 2. Phase: measure the "distance“ n Queuing delay n n n But n n Measuring without does not take load into account Measuring with does usually better Possibility for oscillations (route flapping) Once per routing table update 8. +15. Mar. 2006 85 INF-3190: Switching and Routing

Link State Routing 3. Phase: organizing the information as link state packet n Including

Link State Routing 3. Phase: organizing the information as link state packet n Including own address, sequence number, age, "distance" n Timing problems: validity and time of sending n n Periodically In case of major changes 8. +15. Mar. 2006 86 INF-3190: Switching and Routing

Link State Routing 4. Distributing the local information to all IS n By applying

Link State Routing 4. Distributing the local information to all IS n By applying the flooding procedure (very robust) n n Therefore sequence number in packets Problem: inconsistency n n 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 n Each IS for itself n Possibly larger amount of data available 8. +15. Mar. 2006 87 INF-3190: Switching and Routing

Adaptive Routing Distributed Routing Distance Vector 8. +15. Mar. 2006 88 INF-3190: Switching and

Adaptive Routing Distributed Routing Distance Vector 8. +15. Mar. 2006 88 INF-3190: Switching and Routing

Distance Vector Routing n n Maintains own routing table knows distances to every neighbor

Distance Vector Routing n n Maintains own routing table knows distances to every neighbor sends its estimated distances to the neighbors periodically A B C D E F G H I J K L Add estimated distance to Y and Y’s estimated distance to Y Node computes new routing table from the received lists containing n n n Destination node Preferred outgoing path Distance delay 8. +15. Mar. 2006 89 C D G H F I Node X estimates distance to node Z through neighbor Y n B E Each node n n A J A 0 12 25 40 14 23 18 17 21 9 24 29 I 24 36 18 27 7 20 31 20 0 11 22 33 H 20 31 19 8 30 19 6 0 14 7 22 9 K 21 28 36 24 22 40 31 19 22 10 0 9 JA 8 JI 10 JH 12 JK 6 K 8 20 28 20 17 30 18 12 10 0 6 15 L line A A I H I I H H I K K INF-3190: Switching and Routing

Distance Vector Routing n n n Fast route improvement Fast distribution of information about

Distance Vector Routing n n n Fast route improvement Fast distribution of information about new short paths (with few hops) Example n n 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 8. +15. Mar. 2006 90 A B C D E ∞ ∞ 1 ∞ ∞ ∞ 1 2 3 4 INF-3190: Switching and Routing

Distance Vector Routing n n n Slow distribution of information about new long paths

Distance Vector Routing n n n Slow distribution of information about new long paths (with many hops) “Count to Infinity” problem of DVR Deterioration n n A Connection destroyed A previously known New estimates derived from old estimates of distant nodes Comment n Limit "infinite" to a finite value 8. +15. Mar. 2006 91 B C D E 1 2 3 4 3 4 3 4 5 6 5 6 7 6 7 8 ∞ ∞ INF-3190: Switching and Routing

Distance Vector Routing n Split Horizon Algorithm n n Deterioration n n Objective to

Distance Vector Routing n Split Horizon Algorithm n n Deterioration n n Objective to improve the "count to infinity" problem In general, as before Report to best route neighbor (“poisoned reverse”) A B to C: A = (real), C to B: A = (because A is on path), . . . Still poor, depending on topology n n n Connection CD is removed A receives "false information" via B B receives "false information" via A 92 C D E 1 2 3 4 ∞ ∞ ∞ ∞ A C 8. +15. Mar. 2006 B D B INF-3190: Switching and Routing

Adaptive Routing Distributed Routing Link State Routing 8. +15. Mar. 2006 93 INF-3190: Switching

Adaptive Routing Distributed Routing Link State Routing 8. +15. Mar. 2006 93 INF-3190: Switching and Routing

Link State Routing n Node measures the "distance" to the directly adjacent node Distributes

Link State Routing n Node measures the "distance" to the directly adjacent node Distributes information Calculates the ideal route n Procedure n n 1. 2. 3. 4. 5. Determine the address of adjacent node Measure the "distance" (delay, . . . ) to neighboring node Organize the local link state information in a packet Distribute the information to all nodes Calculate the route based on the information of all nods 8. +15. Mar. 2006 94 INF-3190: Switching and Routing

Link State Routing 1. Gather information about the adjacent nodes n New node n

Link State Routing 1. Gather information about the adjacent nodes n New node n n Adjacent node n 2. Sends a HELLO message over each L 2 channel Responds with its own address, unique within the network Measure the distance n Definition of distance needed n n 8. +15. Mar. 2006 Often delay Two approaches to measuring the delay 95 INF-3190: Switching and Routing

Link State Routing 2. Phase: measure the "distance" Topology, link utilization, etc. information Router

Link State Routing 2. Phase: measure the "distance" Topology, link utilization, etc. information Router Routing Process Fills & Updates Uses & Looks up destination A 0 B 3 C 1 D 4 Data packets Routing table Queues ECHO Incoming Forwarding Process lines n link When to start timer? HELLO Outgoing lines Queuing delay n n Measuring without does not take load into account Measuring with does n n often better performance possibility for oscillations (route flapping) once per routing table update 8. +15. Mar. 2006 96 INF-3190: Switching and Routing

Link State Routing 3. Organizing the information as a link state packet n n

Link State Routing 3. Organizing the information as a link state packet n n n 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 n n By applying the flooding procedure Problem: inconsistency n n 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 n n Each node for itself Possibly larger amount of data available 8. +15. Mar. 2006 97 INF-3190: Switching and Routing

Other routing approaches Snapshot n DVR and LSR are basic routing algorithms n n

Other routing approaches Snapshot n DVR and LSR are basic routing algorithms n n Unicast communication No node mobility Flat structure Why is that insufficient? n Increasing number of applications have use for n n n Multi-homing Multicast Anycast Courses that go deeper into routing • INF 5050 • INF 5070 • INF 5090 More and more mobile nodes Too many nodes • UNIK 4200 • UNIK 4290 Continuation n Multicast routing n Routing in mobile and ad hoc networks n The Internet protocols (IPv 4 and IPv 6) and routing in the Internet 8. +15. Mar. 2006 98 INF-3190: Switching and Routing

Broadcast Routing Controlled Flooding 8. +15. Mar. 2006 99 INF-3190: Switching and Routing

Broadcast Routing Controlled Flooding 8. +15. Mar. 2006 99 INF-3190: Switching and Routing

Reverse Path Forwarding n When a multicast packet arrives at a node n n

Reverse Path Forwarding n When a multicast packet arrives at a node n n n from origin S on an interface I Test whether it would send unicast packets to S via I n Yes n n n No n n n Deliver multicast packet to all connected end systems Forward multicast packet on all interfaces to other routers except I It does not arrive on the shortest path from S Assume it’s a duplicate Drop packet 8. +15. Mar. 2006 100 INF-3190: Switching and Routing

Multicast Routing Shared Tree Core-Based Tree 8. +15. Mar. 2006 101 INF-3190: Switching and

Multicast Routing Shared Tree Core-Based Tree 8. +15. Mar. 2006 101 INF-3190: Switching and Routing

Core-Based Tree Core node Non-Core node n n Also known as "Trees with Rendezvous

Core-Based Tree Core node Non-Core node n n Also known as "Trees with Rendezvous Points“ Principle n n n 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 8. +15. Mar. 2006 102 INF-3190: Switching and Routing

Multicast Routing Source-based Tree 8. +15. Mar. 2006 103 INF-3190: Switching and Routing

Multicast Routing Source-based Tree 8. +15. Mar. 2006 103 INF-3190: Switching and Routing

Spanning Tree 1 2 Multicast source node 1 2 2 1 Spanning tree for

Spanning Tree 1 2 Multicast source node 1 2 2 1 Spanning tree for group 1 2 Spanning tree for group 2 1 Spanning tree for source node n Principle n n n 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 n n Distribution of this information depends on the underlying routing protocol Prune the spanning tree to include only group nodes 8. +15. Mar. 2006 104 INF-3190: Switching and Routing

Multicast Routing Spanning Tree with Link State Routing 8. +15. Mar. 2006 105 INF-3190:

Multicast Routing Spanning Tree with Link State Routing 8. +15. Mar. 2006 105 INF-3190: Switching and Routing

Spanning Tree with LSR n All nodes send link state packets periodically n Containing

Spanning Tree with LSR n All nodes send link state packets periodically n Containing information n Distance to neighbors End-systems connected to a node and belonging to a group Broadcast to all other nodes n n n Each node calculates a multicast tree n n n 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 n Node determines the outgoing lines on which packets have to be transmitted 8. +15. Mar. 2006 106 INF-3190: Switching and Routing

Multicast Routing Reverse Path Forwarding with Pruning 8. +15. Mar. 2006 107 INF-3190: Switching

Multicast Routing Reverse Path Forwarding with Pruning 8. +15. Mar. 2006 107 INF-3190: Switching and Routing

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

Reverse Path Forwarding with Pruning n n n Used together with DVR as unicast routing protocol Use DVR routing tables to determine whether packet arrives on shortest path from direct neighbor Principle n n n Sender sends first multicast packet to everybody Use Reverse Path Forwarding Then prune the tree 8. +15. Mar. 2006 108 INF-3190: Switching and Routing

Reverse Path Forwarding with Pruning n n When a multicast packet arrives from S

Reverse Path Forwarding with Pruning n n When a multicast packet arrives from S on interface I If n n n Then n To find end-systems that have joined Benefit n n n 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 n n No directly connected end system is registered, or Non-Membership-Reports are received from all nodes reachable via interfaces other than I Pruning only trees that are actually used Unused trees are cut coarsely Optimized for many receivers 8. +15. Mar. 2006 109 INF-3190: Switching and Routing

Summary: Multicast Routing n n Save network resources: send same data to many hosts

Summary: Multicast Routing n n Save network resources: send same data to many hosts with fewer packets Pay with router resources: Routers need to know group members n All algorithms aim at maintaining a spanning tree from the sending node Can rely on unicast routing or on broadcast n A bit more multicast in conjunction with IP multicast n 8. +15. Mar. 2006 110 INF-3190: Switching and Routing

Ad hoc Routing 8. +15. Mar. 2006 111 INF-3190: Switching and Routing

Ad hoc Routing 8. +15. Mar. 2006 111 INF-3190: Switching and Routing

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

Ad hoc Routing Protocols n Outside the Internet world Infrastructure-less networks, often with mobile nodes n Reactive protocols n n Determine route if and when needed Source initiates route discovery Proactive protocols n n Traditional distributed shortest-path protocols Maintain routes between every host pair at all times Based on periodic updates High routing overhead 8. +15. Mar. 2006 112 INF-3190: Switching and Routing

Ad hoc Routing Reactive Routing 8. +15. Mar. 2006 113 INF-3190: Switching and Routing

Ad hoc Routing Reactive Routing 8. +15. Mar. 2006 113 INF-3190: Switching and Routing

Ad Hoc On-Demand Distance Vector Routing (AODV) n AODV assumes symmetric (bi-directional) links Every

Ad Hoc On-Demand Distance Vector Routing (AODV) n AODV assumes symmetric (bi-directional) links Every node maintains a routing table n When source S wants to send to D, but route to D is not known n n When a node re-broadcasts a RREQ n n n Adds the reverse path to its routing table Local routing table grows When D receives RREQ n n S initiates a route discovery S floods Route Request (RREQ) D replies with Route Reply (RREP) RREP travels along the reverse path n Using routing table 8. +15. Mar. 2006 114 INF-3190: Switching and Routing

Route Requests in AODV Y Z S E F B C M J A

Route Requests in AODV Y Z S E F B C M J A L G H K I D N Represents a node that has received RREQ for D from S 8. +15. Mar. 2006 115 INF-3190: Switching and Routing

Route Requests in AODV Y Broadcast transmission Z S E F B C M

Route Requests in AODV Y Broadcast transmission Z S E F B C M J A L G H K I D N Represents transmission of RREQ 8. +15. Mar. 2006 116 INF-3190: Switching and Routing

Route Requests in AODV Y Z S E F B C M J A

Route Requests in AODV Y Z S E F B C M J A L G H K D I N Represents links on Reverse Path 8. +15. Mar. 2006 117 INF-3190: Switching and Routing

Reverse Path Setup in AODV Y Z S E F B C M J

Reverse Path Setup in AODV Y Z S E F B C M J A L G H K I D N • Node C receives RREQ from G and H, but does not forward it again, because node C has already forwarded RREQ once 8. +15. Mar. 2006 118 INF-3190: Switching and Routing

Reverse Path Setup in AODV Y Z S E F B C J A

Reverse Path Setup in AODV Y Z S E F B C J A L G H K I 8. +15. Mar. 2006 M D N 119 INF-3190: Switching and Routing

Reverse Path Setup in AODV Y Z S E F B C M J

Reverse Path Setup in AODV Y Z S E F B C M J A L G H K D I N • Node D does not forward RREQ, because node D is the intended target of the RREQ 8. +15. Mar. 2006 120 INF-3190: Switching and Routing

Forward Path Setup in AODV Y Z S E F B C M J

Forward Path Setup in AODV Y Z S E F B C M J A L G H K D I N Forward links are setup when RREP travels along the reverse path Represents a link on the forward path 8. +15. Mar. 2006 121 INF-3190: Switching and Routing

AODV n n n Only last node must be included in RREQ packets Nodes

AODV n n n 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 n Sequence numbers are used to avoid old/broken routes Sequence numbers prevent formation of routing loops n Unused routes expire even if topology does not change n 8. +15. Mar. 2006 122 INF-3190: Switching and Routing

Ad hoc Routing Proactive Routing 8. +15. Mar. 2006 123 INF-3190: Switching and Routing

Ad hoc Routing Proactive Routing 8. +15. Mar. 2006 123 INF-3190: Switching and Routing

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

Destination-Sequenced Distance Vector Routing (DSDV) n Each node maintains a routing table which stores n n Each node periodically forwards routing table to neighbors n n n Overwrites the old table when the sequence number is higher When a node decides that a route is broken n Increases sequence number each time Includes it in routing table update A node that receives a routing table for a destination n n Next hop for each destination Cost metric towards each destination A sequence number that is created by the destination itself It increments the sequence number of the route Advertises it with infinite metric Destination advertises new sequence number 8. +15. Mar. 2006 124 INF-3190: Switching and Routing

Reactive vs. Proactive Routing n Reactive protocols n n n Proactive protocols n n

Reactive vs. Proactive Routing n Reactive protocols n n n Proactive protocols n n n Lower overhead since routes are determined on demand Significant delay in route determination Employ flooding (global search) Control traffic may be bursty 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 8. +15. Mar. 2006 125 INF-3190: Switching and Routing