Course 6 Internetworking Routing 1/33
Routing The main function of the network layer is routing packets from the source machine to the destination machine. Along the way, at least one intermediate node typically is encountered Difference between routing and bridging Bridging occurs at Layer 2 (the link layer) of the OSI model Routing occurs at Layer 3 (the network layer). This distinction provides routing and bridging with different information to use in the process of moving information, so different ways of accomplishment. The routing algorithm is that part of the network layer software responsible for deciding which output line an incoming line packet should be transmitted on. This decision is done: for each packet in case of Connectionless packet switching for ex. In datagram networks once per session for Connection Oriented service. 2/33
two basic activities: Routing components determining optimal routing paths transporting information groups (typically called packets) through an internetwork, using a variety of protocols and data structures (known as routing tables)- referred to as packet switching Having acquired a router s address by some means, the source host sends a packet addressed specifically to a router s physical address (Media Access Control [MAC]-layer), together with the protocol address (network layer) of the destination host. 3/33
Numerous Routers May Come into Play During the Switching Process 4/33
Routing in a datagram network. Two packets of the same user pair can travel along different routes. A routing decision is required for each individual packet. 5/33
Contrary to the bridges, a router MUST be configured. Routers must know the networks on which they are connected and Next Hop (NH) router address on which they can forward packets. The connected prefixes MUST be entered manually, prefixes and NEXT HOP can be entered manually for static routing learned from other routers in dynamic routing protocols. In this case routers can detect failures or news of neighbors and modify routing tables. 6/33
Connectionless Internetworking The internet protocol (IP) was developed as part of the DARPA internet project. Later the IS0 connectionless network protocol (CLNP) was standardized. The functionality of IP and CLNP is very similar; they differ in the formats used and in some minor functional features. The narrative in this section applies to both IP and CLNP. IP provides a connectionless, or datagram, service between end systems. 7/33
Operation of a Connectionless Internetworking Scheme Advantages of connectionless approach: A connectionless internet facility is flexible. It can deal with a variety of networks, some of which are themselves connectionless. In essence, IP requires very little from the constituent networks. A connectionless internet service can be made highly robust. This is basically the same argument made for a datagram network service versus a virtual circuit service. A connectionless internet service is best for connectionless transport protocols. 8/33
Next figure depicts a typical example of IP, in which two LANs are interconnected by an X.25 packet-switched WAN. The end systems and routers must all share a common internet protocol. In addition, the end systems must share the same protocols above IP. The intermediate routers need only implement up through IP. 9/33
The operation of the internet protocol for data exchange between host A on one LAN (subnetwork 1) and host B on another departmental LAN (subnetwork 2) through the WAN. 10/33
The IP at A receives blocks of data to be sent to B from the higher layers of software in A. IP attaches a header specifying, among other things, the global internet address of B. That address is logically in two parts: network identifier and end system identifier. The result is called an internet-protocol data unit, or simply a datagram. The datagram is then encapsulated with the LAN protocol and sent to the router, which strips off the LAN fields to read the IP header. The router then encapsulates the datagram with the X.25 protocol fields and transmits it across the WAN to another router. This router strips off the X.25 fields and recovers the datagram, which it then wraps in LAN fields appropriate to LAN 2 and sends it to B. 11/33
In more detail pa End system A has a datagram to transmit to end system B; the datagram includes the internet address of B. The IP module in A recognizes that the destination (B) is on another subnetwork. So, the first step is to send the data to a router X. IP passes the datagram down to the next lower layer (LLC) with instructions to send it to router X. LLC passes this information down to the MAC layer, which inserts the MAC-level address of router X into the MAC header. The data block transmitted onto LAN 1 includes data from a layer or layers above TCP. plus a TCP header, an IP header, and LLC header, and a MAC header and trailer. Next, the packet travels through subnetwork 1 to router X. The router removes MAC and LLC fields and analyzes the IP header to determine the ultimate destination of the data, in this case B. The router must now make a routing decision. 12/33
There are three possibilities: 1. The destination station Y is connected directly to one of the subnetworks to which the router is attached. In this case, the router sends the datagram directly to the destination. 2. To reach the destination, one or more additional routers must be traversed. In this case, a routing decision must be made: In both cases, the IP module in the router sends the datagram down to the next lower layer with the destination subnetwork address. 3. The router does not know the destination address. In this case, the router returns an error message to the source of the datagram. 13/33
In this example, the data must pass through router Y before reaching the destination. Router X, then, constructs a new packet by appending an X.25 header, containing the address of router Y, to the IP data unit. When this packet arrives at router Y, the packet header is stripped off. The router determines that this IP data unit is destined for B, which is connected directly to a network to which this router is attached. The router therefore creates a frame with a destination address of B and sends it out onto LAN 2. The data finally arrive at B, where the LAN and IP headers can be stripped off. 14/33
At each router, before the data can be forwarded, the router may need to segment the data unit to accommodate a smaller maximum packet-size limitation on the outgoing network. The data unit is split into two or more segments, each becoming an independent IP data unit. Each new data unit is wrapped in a lower-layer packet and queued for transmission. The router may also limit the length of its queue for each network to which it attaches so as to avoid having a slow network penalize a faster one. Once the queue limit is reached, additional data units are simply dropped 15/33
The process described above continues through as many routers as it takes for the data unit to reach its destination. The destination end system recovers the IP data unit from its network wrapping. If segmentation has occurred, the IP module in the destination end system buffers the incoming data until the entire original data field can be reassembled. This block of data is then passed to a higher layer in the end system. This service offered by the internet protocol is an unreliable one. The IP does not guarantee that all data will be delivered or that the data that are delivered will arrive in the proper order. It is the responsibility of the next higher layer (e.g., TCP) to recover from any errors that occur. 16/33
each unit of data is passed from router to router from source to destination. Because delivery is not guaranteed- no particular reliability requirement on subnetworks. IP works with any combination of subnetwork types. Since the sequence of delivery is not guaranteed, successive data units can follow different paths through the internet; this allows the protocol to react to both congestion and failure in the internet by changing routes. 17/33
Routing and performance measures Two main perfomance measures that are substantially affected by the routing: algorithm-throughput (quantity of service) average packet delay (quality of service). Routing interacts with flow control in detemining these perfomance measures by means of a feedback mechanism shown in figure below. 18/33
Interaction of routing and flow control. As good routing keeps delay low, flow control allows more traffic into the network. 19/33
When the traffic load offered by the external sites to the subnet is relatively low, it will be fully accepted into the network throughput = offered load When the offered load is excessive, a portion will be rejected by the flow control algorithm throughput = offered load - rejected load The traffic accepted into the network will experience an average delay per packet that depend on the chosen routes Throughput is greatly affected (if only indirectly) by the routing algorithm because typical flow control schemes operate on the basis of striking a balance between throughput and delay (i.e., they start rejecting offered load when delay starts getting excessive). As the routing algorithm is more successful in keeping delay low, the flow control algorithm allows more traffic into the network. 20/33
E.g. All links have a capacity of 10 units. If all traffic is routed through the middle link (4,6), congestion occurs. If, instead, paths (I --> 3 --> 6) and (2 --> 5 --> 6) are used, the average delay is small. 21/33
Delay-throughput operating curves for good and bad routing The effect of good routing is to increase throughput/or the same value of average delay per packet under high offered load conditions and to decrease average delay per packet under low and moderate offered load conditions. 22/33
Performance Criteria The simplest criterion is to choose the minimum-hop route (one that passes through the least number of nodes) through the network- should minimize the consumption of network resources shortest path routing A generalization of the minimum-hop criterion is least-cost routing. A cost is associated with each link and for any pair of attached stations, the route through the network that accumulates the least cost is followed. 23/33
Example packet-switched network - the two arrowed lines between a pair of nodes represent a link between this nodes and the corresponding numbers represent the current link cost in each direction. The shortest path (fewest hops) from node 1 to node 6 is 1-3-6 (cost = 5 + 5 = 10), but the least-cost path is 1-4-5-6 (cost = 1 + 1 + 2 = 4). 24/33
Costs are assigned to links to support one or more design objectives. For example, the cost could be: - inversely related to the data rate (i.e., the higher the data rate on a link, the lower the assigned cost) -the least-cost route -> the highest throughput - inversely related to the current queuing delay on the link - the least-cost route should minimize delay. In either the minimum-hop or least-cost approach, the algorithm for determining the optimum route for any pair of stations is relatively straightforward and the processing time is about the same The least-cost criterion is more flexible, it is more common than the minimum-hop criterion. 25/33
Decision Time and Place The decision time and decision place are independent design variables. Decision time is determined by the operation mode. When the internal operation of the network is datagram, a routing decision is made individually for each packet. For internal virtual- circuit operation, a routing decision is made at the time the virtual circuit is established. In the simplest case, all subsequent packets using that virtual circuit follow the same route. In more sophisticated network designs, the network may dynamically change the route assigned to a particular virtual circuit in response to changing conditions (e.g., overload or failure of a portion of the network). 26/33
Decision place refers to which node or nodes in the network are responsible for the routing decision. Most common is distributed routing, each node selects output link for routing packets as they arrive. It is perhaps more complex, but is also more robust. For centralized routing, the decision is made by a some designated node, network control center. The danger is that the loss of the network control center may block operation of the network. Source routing -the routing decision is made by the source station and is then communicated to the network; this allows the user to dictate a route that meets his criteria. 27/33
For example, in the previous figure, the costs may change. If a packet is to be delivered from node 1 to node 6, it might follow the route 1-4-5-6, with each leg of the route determined locally by the transmitting node. Now let the values change such that 1-4-5-6 is no longer the optimum route. In a datagram network, the next packet may follow a different route, again determined by each node along the way. In a virtual-circuit network, each node will remember the routing decision that was made when the virtual circuit was established, and will simply pass on the packets without making a new decision. 28/33
Routing Techniques Routing requires a router to have a routing table. Several techniques are employed to make the size of the routing table manageable and handle issues such as security. NEXT-HOP ROUTING NETWORK-SPECIFIC ROUTING HOST-SPECIFIC ROUTING NEXT-HOP ROUTING the routing table only holds the information that leads to the next hop instead of holding the complete information 29/33
NETWORK-SPECIFIC ROUTING instead of having an entry for every host connected to the same physical network, we have only one entry to define the address of the network itself. all hosts connected to the same network treated as one single entity. HOST-SPECIFIC ROUTING the destination address of the host is given in the routing table. This concept is opposite to the Network-specific routing technique -leads to loss of efficiency. method is used for specific purposes such as checking the route or providing security measures. 30/33
Path Determination routing algorithms (RA) initialize and maintain routing tables, which contain route information. Route information varies depending on the RA Destination/next hop associations tell a router that a particular destination can be reached optimally by sending the packet to a particular router representing the next hop on the way to the final destination When a router receives an incoming packet, it checks the destination address and attempts to associate this address with a next hop. 31/33
Destination/Next Hop Associations Determine the Data s Optimal Path 32/33
Routing tables also can contain other information, such as data about the desirability of a path. Routers compare metrics to determine optimal routes depending on the RA design. Routers communicate with one another and maintain their routing tables through messages, as e.g: -routing update message consists all or a portion of a routing table. By analyzing routing updates from all other routers, a router can build a detailed picture of network topology. - link-state advertisement informs other routers of the state of the sender s links. Link information also can be used to build a complete picture of network topology to enable routers to determine optimal routes to network destinations. 33/33