1 / 25

Computer Networks (CSE-4711) Lecture-Segment-5- Routing algorithms

Computer Networks (CSE-4711) Lecture-Segment-5- Routing algorithms. Instructor: Sazid Zaman Khan Lecturer, Department of Computer Science and Engineering, IIUC. Mainly from tanenbaum. Routing algortihms.

devona
Download Presentation

Computer Networks (CSE-4711) Lecture-Segment-5- Routing algorithms

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Networks (CSE-4711)Lecture-Segment-5- Routing algorithms Instructor: SazidZaman Khan Lecturer, Department of Computer Science and Engineering, IIUC

  2. Mainly from tanenbaum

  3. Routing algortihms • Routers use routing algorithms to find the best route to a destination. When we say "best route," we consider parameters like the number of hops (the trip a packet takes from one router or intermediate point to another in the network), time delay and communication cost of packet transmission.

  4. Routing algorithms

  5. Shortest Path Routing (See also the description from Tanenbaum’s book)

  6. Flooding • When a routing algorithm is implemented, each router must make decisions based on local knowledge, not the complete picture of the network. • A simple local technique is flooding, in which every incoming packet is sent out on every outgoing line except the one it arrived on. • Flooding obviously generates vast numbers of duplicate packets, in fact, an infinite number unless some measures are taken to damp the process.

  7. Distance vector routing • A routing table is used. It contains each router in the subnet and the preferred outgoing line for that router and an estimate for the time or distance to the destination at the end of that line. The metric might be number of hops, queue length, time delay, etc. Time delay can be measured by periodically sending special ECHO packets. • Once every T msec each router sends to its neighbors a list of estimated time delays to each destination. Router J then calculates that it can go to e.g. G via A in (8+18)=26, via I in 41 (31+10), via H in 18 and via K in 37 msec. The lowest (via H in 18 msec) is then chosen and put in the table.

  8. Distance vector routing

  9. Link State Routing • Link State Routing is performed in following steps: • 1. Discover its neighbors and learn their network addresses, by sending HELLO packets on each point-to-point line and receiving the reply messages. A LAN is often modeled here as an artificial node. • 2. Measuring the cost or delay (using ECHO packets) to each of its neighbors. The load can be taken into account or not by starting the round-trip timer when the packet is queued or when it is send. • 3. Construct a link state packet telling all it has just learned. This is done at regular time intervals, or when a significant event occurs. • 4. Send this packet to all other routers using flooding. • 5. Compute the shortest path to every other router. • The trickiest part is distributing the link state packages reliably, to assure that each router has basically the same view of the subnet.

  10. Link state routing (Link state packets)

  11. Link state packets Link state routing (Link state packets) • The packet starts with the identity of the sender, followed by a sequence number and age and a list of neighbors.

  12. Hierarchical routing • Figure 5-14 gives a quantitative example of routing in a two-level hierarchy with five regions. The full routing table for router 1A has 17 entries, as shown in Fig. 5-14(b). When routing is done hierarchically, as in Fig. 5-14(c), there are entries for all the local routers, as before, but all other regions are condensed into a single router, so all traffic for region 2 goes via the 1B-2A line, but the rest of the remote traffic goes via the 1C-3B line. Hierarchical routing has reduced the table from 17 to 7 entries. So the routing has become smaller.

  13. Hierarchical routing

  14. Broadcast routing • In some applications, hosts need to send messages to many or all other hosts.Forexample, a service distributing weather reports, stock market updates, or live radio programs might work best by sending to all machines and letting those that are interested read the data. Sending a packet to all destinations simultaneously is called broadcasting.

  15. Spanning tree • A spanning tree is a subset of the network that includes all the routers but contains no loops.

  16. Multicast routing • Broadcasting a packet is wasteful if the group consists of, say, 1000 machines on a million-node network, so that most receivers are not interested in the message (or worse yet, they are definitely interested but are not sup-posed to see it). • Thus, we need a way to send messages to well-defined groups that are numerically large in size but small compared to the network as a whole. Sending a message to such a group is called multicasting, and the routing algorithm used is called multicast routing.

  17. Anycast routing • Another delivery model, called anycastis sometimes also useful. In anycast, a packet is delivered to the nearest member of a group (Partridge et al., 1993). Schemes that find these paths are called anycast routing.

  18. Routing for Mobile hosts • As we discussed in Mobile IP

  19. Routing in Ad hoc networks • We have now seen how to do routing when the hosts are mobile but the routers are fixed. An even more extreme case is one in which the routers themselves are mobile. Among the possibilities are emergency workers at an earthquake site, military vehicles on a battlefield, a fleet of ships at sea, or a gathering of people with laptop computers in an area lacking 802.11. • In all these cases, and others, each node communicates wirelessly and acts as both a host and a router. Networks of nodes that just happen to be near each other are called ad hoc networks or MANETs (Mobile Ad hoc NETworks)

  20. AODV (Adhoc On-demand Distance Vector) algorithm for Ad hoc networks • Many, many routing algorithms for ad hoc networks have been proposed. • We will look at one of the most popular routing algorithms, AODV (Ad hoc On-demand Distance Vector) algorithm.

  21. AODV (Adhoc On-demand Distance Vector) algorithm for Ad hoc networks

  22. AODV (Adhoc On-demand Distance Vector) algorithm for Ad hoc networks • To describe the algorithm, consider the newly formed ad hoc network of Fig. 5-20. Suppose that a process at node A wants to send a packet to node I. The AODV algorithm maintains a distance vector table at each node, keyed by destination, giving information about that destination, including the neighbor to which to send packets to reach the destination. First, A looks in its table and does not find an entry for I. • It now has to discover a route to I. This property of discovering routes only when they are needed is what makes this algorithm ‘‘on demand.

  23. AODV (Adhoc On-demand Distance Vector) algorithm for Ad hoc networks • To locate I, A constructs a ROUTE REQUEST packet and broadcasts it using flooding. The transmission from A reaches B and D, as illustrated in Fig. 5-20(a). Each node rebroadcasts the request, which continues to reach nodes F, G, and C in Fig. 5-20(c) and nodes H, E, and I in Fig. 5-20(d). • A sequence number set at the source is used to weed out duplicates during the flood. For example, D discards the transmission from B in Fig. 5-20(c) because it has already forwarded the request.

  24. AODV • Eventually, the request reaches node I, which constructs a ROUTE REPLY packet. This packet is unicast to the sender along the reverse of the path followed by the request. For this to work, each intermediate node must remember the node that sent it the request. The arrows in Fig. 5-20(b)–(d) show the reverse route information that is stored. Each intermediate node also increments a hop count as it forwards the reply. This tells the nodes how far they are from the destination. The replies tell each intermediate node which neighbor to use to reach the destination.

  25. AODV • Intermediate nodes put the best route they hear into their routing tables as they process the reply. When the reply reaches A, a new route, ADGI, has been created.

More Related