CSN-s 5/1 College 5, Routing, Internet College stof 1 Inleiding: geschiedenis, OSI model, standaarden, ISOC/IETF/IRTF structuur Secties: 1.2, 1.3, 1.4, 1.5 2 Fysieke laag: Bandbreedte/bitrate Secties: 2.1, 2.2, 2.3, 2.4, 2.6 3 Datalink laag: Error corrrectie, sliding window protocol Secties:, 3.1, 3.2, 3.3, 3.4, 3.7 4 MAC sublaag: ALOHA, CSMA/CD, WLAN, Ethernet, bridges/switches Secties 4.1, 4.2, 4.3.1-4.3.4, 4.4, 4.5.1-4.5.2 5 Internet: Routing Secties: 5.1, 5.2, 5.3, 5.4, 5.5 6 Internet: IP, TCP/IP Secties: 5.5, 6.1, 6.2, 6.3, 6.4 7 Internet Applications Secties: 7.2, 7.3, 7.4, 7.5, 7.6, 7.7.5 Zie: www.cs.uu.nl/docs/vakken/csn CSN-s 5/2 7 Application 6 Presentation 5 Session 4 3 2 1 Physical Host A The OSI Reference Model Application Presentation Session Physical Physical Physical IMP IMP Subnet boundary Host B = data path IMP = interface message processor CSN-s 5/3The Layer: requirements CSN-s 5/4 The Layer: functions Layer requirements: Services should be independent of subnet technology, No knowledge if running on Ethernet, token ring,... transportlayer should be shielded from number, type and topology of subnets present no difference in working with next host compared to other end of world network addresses should be an uniform numbering plan one addressing scheme for entire universe Functions: controls operation of a subnet Routing: tables to know where to forward packets congestion control & handling Internetworking accounting protocol translation fragmentation of large packets CSN-s 5/5 layer playfield CSN-s 5/6 Connection (less)? Internet community: Subnet is unreliable Error correction is higher layers necessary Connectionless service (Datagram Service) Telephone Companies: Reliable network (more or less) Easier for users Quality of Service Connection Oriented (Virtual Circuits)
CSN-s 5/7 Layer Functions CSN-s 5/8 Forwarding / Switching Forwarding / Switching 'pushes' a packet (is a PDU) through a network. Routing: determines what the routes are for packets to follow. Congestion Handling: 'protects' the network when there are too many packets. Contention Handling: handles the packets that content for a 'port'. Addressing: To identify the system we want to reach we need its address (for instance: telephone number, IP address). Segmentation & Reassembly: Packet size may be larger than the DL frame size: So we need to split the packet (at the sender) and reassemble it again (at the receiver). #1 Routing Routing/switching table Forwarding/switching #2 #3 #4 #5 #6 Data-Link Service Data-Link Service PC/host router/switch PC/host CSN-s 5/9 Routing schemes Routing Algorithms requirements: - minimize mean packet delay - maximize total network throughput - reduce number of hops Routing algorithms grouped in two major classes: - Nonadaptive algorithms compute in advance, download -> static routing - Adaptive algorithms monitor traffic, topology changes get info from nearby or from all routers CSN-s 5/10 Routing: Connectionless #1 DL-Service Routing Address X Y Z SAP / Port 3 3 10 Forwarding/switching #10 DL-Service router/switch #n DL-Service CSN-s 5/11 Routing: Connectionless CSN-s 5/12 Routing: Connection Oriented Some properties: Each packet (this is a PDU) follows its own route Each packet contains the full source and destination address (this is part of the PCI) There is no in-sequence delivery guarantee! There is no error correction or retransmission in the network layer. The motto is: Keep the network as simple as possible Put intelligence in the hosts (PC's), because these are cheap and powerful. Properties: First set up a connection, Then transport data over the connection Release the connection All packets on a connection follow the same route The packets have a virtual circuit number in them Routing table indexed by virtual circuit number The motto is: Put the intelligence/complexity in the network Keep the hosts simple
CSN-s 5/13 Routing Function To be able to forward packets, we need a routing table. This table has be be filled. The routing function is responsible for filling the routing table. Filling is possible by gathering, storing and sharing topology information so that routes through a network can be determined. Information must be exchanged between systems to fill a routing table. Special routing protocols exists for this. See routing table in your computer with netstat -r CSN-s 5/14 The optimality Principle If router J is on the optimal path from I to K, then the optimal path J to K is along the same route Suppose there is a better route from J to K, concatenate that after I to J and I have a better route from I to K, so the first one was not optimal -> contradiction All optimal routes from sources to a destination form sink tree CSN-s 5/15 Nonadaptive (static routing) Shortest Path Routing define a metric or a "costfunction" distance, bandwidth, average traffic, communication cost, mean queue length, measured delay, number of hops, use an algorithm like Dijkstra's shortest path algorithm to compute shortest path to A for all nodes (fig 5.6) CSN-s 5/16 Dijkstra s algorithm CSN-s 5/17 Dijkstra s algorithm CSN-s 5/18 Nonadaptive (static routing) Flooding send all packets on all output ports except input port Used in transparent bridges Will replicate all packets indefinitely Limit e.g. with hop counter (decremented with each hop) Number the packets and let router keep a list of received packets Selective flooding: send packets only in the right direction, etc. For broadcast/multicast
CSN-s 5/19 Nonadaptive (static routing) Flow Based Routing take amount of traffic into account use queuing theory to determine the mean packet delay for each line from capacity and average flow From delay for each line find minimum average delay for the subnet CSN-s 5/20 Adaptive routing Two popular dynamic routing algorithms: Distance vector routing Link state routing Distance vector routing maintain a table with best known distance to each destination via which link distance by a metric tables are updated by exchanging information with neighbours old tables are not used in calculating new ones reacts fast to good news, slow on bad news used in RIP (Routing Information ) RFC 1723 CSN-s 5/21 Distance vector routing CSN-s 5/22 Link state routing 1) Discover neighbors and learn their network addresses - send hello packets on all outgoing point to point lines - special case LAN's with several routers, LAN = node CSN-s 5/23 Link state routing 2) measure delay or cost to each of neighbors - use echo packets RTT's - including or not the queue delays, -> oscillations 3) construct packet with the information of 1) and 2) - when building them? periodically, when there is a change 4) send this packet to all routers - not trivial - use flooding with 32 bit seq number and age 5) compute shortest path to all other routers - Dijkstra's algorithm - large tables - limit damage Used in OSPF (Open Shortest Path First) RFC 2178 CSN-s 5/24 Hierarchical Routing Divide network in regions Limits the size of routing tables Router knows Other routers/hosts in own region Destination for other regions Compare to telephone system: area code and subscriber number If necessary more levels
CSN-s 5/25 Mobile Routing Every mobile station has a Home Location Home location keeps track of the location where the station is CSN-s 5/26 Broadcast / multicast routing several types of broadcast routing: 1) send to every destination a packet - waste of resources 2) flooding 3) multi-destination routing - each packet contains list of destinations or bitmap representing destinations 4) use sink tree of router initiating the broadcast 5) reverse path forwarding - forward to all other outgoing lines only packets from a source coming from line, which would be used when sending packets to that source Multicast routing -> See MBONE.