Internetworking There is more than One Network � Simple Internetworking � Two issues to be addressed when � Best Effort Service Model � Global Addressing Scheme connecting networks � Datagram Forwarding in IP � Address Translation (ARP) � Heterogeneity: connectivity between hosts from � ICMP- Error Reporting different network types (Ethernet, token rings, � Routing in IP � RIP point-to-point links, switch networks, etc.), � OSPF involving different addressing scheme, media � Global Internet access protocols, service model… � Subnetting � Classless Routing � Scalability: Explosive growth of end users -> � Interdomain Routing � Multicast routing, addressing � Link State Multicast � Distance Vector Multicast Spring 2004 Spring 2004 EE4272 EE4272 IP : An example of Internetwork Best Effort Service Model Ideas: Undmanding � Concatenation of � IP Service Model: “Addressing scheme” + “datagram model of data delivery” � Networks Connectionless (datagram-based): simplest service -> fundamental to IP � � Keeping the router as simple as possible is one of the design goals of IP � network of networks � The ability of “run over anything”: most important characteristics Best-effort delivery (unreliable service) : no failure recovery effort � “physical networks” � � packets are lost; packets are delivered out of order; duplicate copies of a packet are � IP: “a single logical delivered; packets can be delayed for a long time Datagram packet format � internetwork” –Version (4): currently 4 –Hlen (4): number of 32-bit words in header � Logical Protocol Stack –TOS (8): type of service (not widely used) –Length (16): number of bytes in this datagram –Ident (16): used by fragmentation –Flags/Offset (16): used by fragmentation –TTL (8): number of hops this datagram has traveled –Protocol (8): demux key (TCP=6, UDP=17) –Checksum (16): of the header only (Section 2.4) –DestAddr & SrcAddr (32) EE4272 Spring 2004 EE4272 Spring 2004 1
Fragmentation and Reassembly Example Start of header Ident = x 0 Offset = 0 � Each network has some MTU (Maximum Transmission Unit) Rest of header -e.g., Ethernet:1500; FDDI:4500 1400 data bytes � Strategy � fragment when necessary (MTU < Datagram) � try to avoid fragmentation at source host � Re-fragmentation is possible Start of header � fragments are self-contained datagrams Ident = x 1 Offset = 0 Rest of header � use CS-PDU (not cells) for ATM 512 data bytes � delay reassembly until destination host � do not recover from lost fragments Start of header Ident = x 1 Offset = 512 H1 H8 Rest of header TCP TCP R1 R2 R3 512 data bytes Note: Offset field counts 8-byte units of data, not IP IP IP IP IP Start of header individual bytes Ident = x 0 Offset = 1024 ETH ETH FDDI FDDI PPP PPP ETH ETH Rest of header MTU=1500 MTU=4500 MTU=532 MTU=1500 376 data bytes Spring 2004 Spring 2004 EE4272 EE4272 Datagram Forwarding in IP Global Addresses � Properties � Forwarding: The process of taking a packet from an input & sending it out on � globally unique the appropriate output ; � Routing: the process of building up the tables that allow the correct output for a � hierarchical: network + host packet to be determined � Strategy � every datagram contains destination’s address � Dot Notation � if directly connected to destination network, then forward to host (check network part of the IP address) � 10.3.2.4 � if not directly connected to destination network, then forward to some router � 128.96.33.81 � forwarding table maps network number into next hop router � each host has a default router � 192.12.69.77 Benefits of hierarchical � each router maintains a forwarding table IP address->scalability � Example (R2) Network Number Next Hop 1 R3 2 R1 Note: It is more precise to think of 3 interface 1 Class D address specify a multicast group IP address as belonging to 4 interface 0 interfaces than to hosts Class E are currently unused Forwarding table of R2 EE4272 Spring 2004 EE4272 Spring 2004 2
Address Translation ARP Details � Request Packet Format � Problem: IP datagrams contain IP address, but physical interface � Hardware Type: type of physical network (e.g., Ethernet) hardware on the host or router only understand the address scheme of � Protocol Type: type of higher layer protocol (e.g., IP) the particular network � HLEN & PLEN: length of physical and protocol addresses � Map IP addresses into physical ( link level ) addresses of � Operation: request or response � Source/Target-Physical/Protocol addresses � destination host � next hop router � Techniques � encode physical address in host part of IP address � table-based: table of address pairs � ARP (Address Resolution Protocol): � table of IP to physical address bindings � broadcast request (link level network’s feature) if IP address not in table � target machine responds with its physical address � table entries are discarded if not refreshed (every 15 minutes) Spring 2004 Spring 2004 EE4272 EE4272 Routing in IP Internet Control Message Protocol (ICMP) � IP is always configured with a companion protocol, � Intradomain Routing ICMP - Distance Vector (RIP): Bellman-Ford algorithm � ICMP defines a collection of error messages that - Link State (OSPF): Dijkstra’s shortest path algorithm are sent back to source host. Note: Routing domain is an internetwork in which all the � Destination unreachable (protocol, port, or host) routers are under the same administrative control (e.g., a � TTL exceeded (so datagrams don’t cycle forever) single university campus) � Checksum failed � Reassembly failed � Routing of Global Internet � Cannot fragment - Classless Routing - Interdomain Routing (BGP) � Redirect (from router to source host): for better route control message EE4272 Spring 2004 EE4272 Spring 2004 3
Intradomain Routing: Overview Distance Vector Routing � Forwarding vs Routing Idea: each node constructs a one-dimensional array (vector) containing the distance/cost � to all other nodes and distributed that vector to its neighbors � forwarding: to select an output port based on destination address Each node maintains a set of triples and routing table � (Destination, Cost, NextHop) � � routing: process by which routing table is built ∞ Initially, each node sets a cost of 1 to the direct link, to others � � Network as a Graph Exchange of distance vectors between neighbors � A 6 � Each update is a list of pairs: ( Destination, Cost) 1 3 periodically (on the order of several seconds) � 2 F whenever table changes (called triggered update) 1 � E B � Update the path based on whether its path to the destination via the these neighbors 4 improves the cost. 1 For fixed topology: few exchanges of information between neighbors provides each � 9 node a complete routing table -> convergence C D Keep updating till converge: more iterations bring no improvement � Periodically refresh existing routes: failure can be detected; delete if they time out � � Objective: Find lowest cost path between two nodes Note: assume each node knows the cost of links to its neighbors � Static routing: centralized, failure unaware, fixed edge cost, non-scalable � Distributed dynamic: running on each node -> e.g., stuck in loop Spring 2004 Spring 2004 EE4272 EE4272 Example Count to infinity problem & Loop-Breaking Heuristics B � Count to infinity problem for distance vector C A algorithm: the routing tables for the network do not stabilize D ->“ split horizon ” (reading assignment: p278) E � Set infinity to 16 � Split horizon: when a node sends a routing update to its neighbors, it F G does not send those routes it learned from back to that neighbor � Split horizon with poison reverse � Routing Information Protocol (RIP) � A widely used routing protocols in IP networks based on distance- vector algorithm EE4272 Spring 2004 EE4272 Spring 2004 4
Bellman-Ford Algorithm Bellman-Ford Algorithm Idea: Find the shortest paths from a given source node subject to the constraint that the paths contain at most one link; then find the shortest paths with a constraint of at most two links, and so on. Algorithm terminates when the increase of the maximum link number brings no improvement. Define: S: source node W(i,j): link cost from node i to node j; W(i,i)=0; w(i,j)= ∞ for two none directly connected nodes w(i,j) =c L h (n): least cost path from node s to node n under the constraint of no more than h links Spring 2004 Spring 2004 EE4272 EE4272 Bellman-Ford Algorithm Algorithm: Step 1: Initialization L 0 (n) = ∞ , for all n ≠ s L h (s) = 0, for all h Step 1: Update when L h+1 (n) less than L h (n) For each successive h ≥ 0: For each n ≠ s, compute L h+1 (n) = min [ L h (j) + w(j,n)] for all predecessor node j Step 3: Terminate when increase of h brings no improvement EE4272 Spring 2004 EE4272 Spring 2004 5
Recommend
More recommend