Layer 3: Network Layer 9. Mar. 2005 1 INF-3190: Switching and Routing
Network Layer Goal Enable data transfer from end system to end system End systems Several hops, (heterogeneous) subnetworks Compensate for differences between end systems during transmission The provided services are Standardized for end systems Independent from network technology Intermediate systems Subnetworks 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 9. Mar. 2005 2 INF-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) 9. Mar. 2005 3 INF-3190: Switching and Routing
Inside: Types of Switching Circuit switching Switching a physical connection circuit switching Physical copper connection set up when call is made Packet switching Store-and-forward, but transmissions packets limited in size Packet queued up for subsequent transmission packet switching Message switching Message is stored and passed one by one hop 9. Mar. 2005 4 INF-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 9. Mar. 2005 5 INF-3190: Switching and Routing
Packet Switching Layer Transport Network Data link Physical Data entity Packet Frame Bit/byte (bit stream) Datagrams Every packet chooses its path Virtual circuits Packets (or cells) over a pre-defined path 9. Mar. 2005 6 INF-3190: Switching and Routing
Packet Switching Packets of limited size Dynamic route search (no connect phase) No dedicated path from source to destination Data to Multiple Users Destination Node F Node D Node B Node E Node A Source Data From Multiple Users Node G Node C : Packets 9. Mar. 2005 7 INF-3190: Switching and Routing
Message Switching All data to be sent are treated as a "message" Store and forward" network 1. Accept 2. Treat of possible errors 3. Store 4. Forward 9. Mar. 2005 8 INF-3190: Switching and Routing
Comparison: Temporal Performance Time Call request signal Time spent hunting for an outgoing trunk Propagation delay Msg Msg Msg Queueing delay Pkt 1 Pkt 1 Pkt 2 Pkt 1 Pkt 2 Pkt 3 Pkt 2 Pkt 3 Pkt 3 Data Call accept signal A B C D A B C D A B C D Circuit switching Message switching Packet switching Virtual circuit 9. Mar. 2005 9 INF-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 9. Mar. 2005 10 INF-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 9. Mar. 2005 11 INF-3190: Switching and Routing
Virtual Circuits and Datagrams 9. Mar. 2005 12 INF-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 9. Mar. 2005 13 INF-3190: Switching and Routing
Implementation Virtual Circuit End systems ES allocate VCnumbers independently Problem: the same VCidentifiers may be allocated to different paths A B 1 2 1 1 IS IS 1 1 1 C? D 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 9. Mar. 2005 14 INF-3190: Switching and Routing
Implementation Virtual Circuit H H A IN OUT H 0 B 0 H 1 E 0 B 0 E 1 H 2 B 1 H 3 E 2 H 4 E 3 B A 0 C 0 H 0 C 1 H 1 A 0 A 1 F 0 H 2 F 1 F 0 H 0 E A 0 F 0 A 1 H 0 A 2 C 0 A 3 C 1 C B 0 D 0 B 1 D 1 E 0 H 0 E 1 D 2 F E 0 D 0 B 0 D 1 B 1 H 0 D 0 B 0 D C 0 H 0 C 1 H 1 F 0 H 2 F 1 H 3 C 2 F 0 H Host A H B E IMP 8 Simplex virtual circuits Originating Originating at A at B 0 - ABCD 1 - AEFD C F H D 0 - BCD 1 - BAE H 2 - ABFD 2 - BF 3 - AEC 4 - AECDFB 9. Mar. 2005 15 INF-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 9. Mar. 2005 16 INF-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 VCnumber 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 9. Mar. 2005 17 INF-3190: Switching and Routing
Services of the Network Layer 9. Mar. 2005 18 INF-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 9. Mar. 2005 19 INF-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 9. Mar. 2005 20 INF-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 9. Mar. 2005 21 INF-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 9. Mar. 2005 22 INF-3190: Switching and Routing
Routing 9. Mar. 2005 23 INF-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) 9. Mar. 2005 24 INF-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 Topology, link utilization, etc. information Router Routing Process Fills & Updates destination link A 0 B 3 Routing table C 1 Uses & Looks up D 4 Data packets Incoming lines Forwarding Process Outgoing lines 9. Mar. 2005 25 INF-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 9. Mar. 2005 26 INF-3190: Switching and Routing
Routing Algorithms: Conflicting Properties Often conflicting: fairness and optimization Some different optimization criteria Average packet delay Total throughput Individual delay Conflict Example: A B C X X A B C 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 9. Mar. 2005 27 INF-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 9. Mar. 2005 28 INF-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 r1 r1 I J K r2 9. Mar. 2005 29 INF-3190: Switching and Routing
Sink Tree Subnet Comments Tree: no loops F A K G L D B M H E 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 9. Mar. 2005 30 INF-3190: Switching and Routing I C J N O Sink Tree for Destination B
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... 9. Mar. 2005 31 INF-3190: Switching and Routing