Presentation is loading. Please wait.

Presentation is loading. Please wait.

Routing Protocols Lecture # 6 Obaid Khan. Routed Protocol Definition Routed Protocol – used to transmit user data (packets) through an internetwork. Routed.

Similar presentations

Presentation on theme: "Routing Protocols Lecture # 6 Obaid Khan. Routed Protocol Definition Routed Protocol – used to transmit user data (packets) through an internetwork. Routed."— Presentation transcript:

1 Routing Protocols Lecture # 6 Obaid Khan

2 Routed Protocol Definition Routed Protocol – used to transmit user data (packets) through an internetwork. Routed protocols are assigned to an interface and determine the method of packet delivery. Examples: IP, IPX, AppleTalk, DECNet, Banyan Vines, SNMP.

3 Routing Protocol Definition: Defines Logical Addressing. Routing protocol – any protocol that defines algorithms to be used for updating routing tables between routers. Basically, a routing protocol determines the path of a packet through an internetwork. Examples: RIP, RIPv2, IGRP, EIGRP, OSPF, IS- IS, BGP

4 Approaches to Routing Distance Vector Routing protocol. Link State Routing Protocol.

5 Distance-vector Also known as Distributed Bellman-Ford or RIP (Routing Information Protocol) Each node (router or host) exchange information with neighboring nodes –Neighbors are both directly connected to same network Node maintains vector of link costs for each directly attached network and distance and next-hop vectors for each destination Requires transmission of lots of information by each router –Distance vector to all neighbors –Contains estimated path cost to all networks in configuration –Changes take long time to propagate

6 Distance Vector Algorithms (1) A B CD B DestNextMetric B1 CB2 DB3 A DestNextMetric A1 CC1 DC2 A DestNextMetric B2 BB1 DD1 A DestNextMetric C3 BC2 CC1

7 Distance Vector Algorithms (2) Node A will learn of Node C’s shorter path to Node D and update its routing table A B CD B DestNextMetric B1 CC1 DC2 A DestNextMetric A1 BB1 DD1

8 Link-State Algorithms Used Dijkstra’s Algorithm for shortest path. Each node shares its link information so that all nodes can build a map of the full network topology Link information is updated when a link changes state (goes up or down) – Link state determined by sending small “hello” packets to neighbors Given full topology information, a node can determine the next best hop or a route from the source

9 Link-State Algorithms (1) Assuming the topology is stable for a sufficiently long period, all nodes will have the same topology information A B CD A-B Link B-C C-D A-B Link B-C C-D A-B Link B-C C-D A-B Link B-C C-D

10 Link-State Algorithms (2) Nodes A and C propagate the existence of link A-C to their neighbors and, eventually, to the entire network A B CD A-B Link B-C C-D A-C A-B Link B-C C-D A-C A-B Link B-C C-D A-C A-B Link B-C C-D A-C

11 – Distance vector Entire routing table is sent as an update Distance vector protocol send periodic update at every 30 or 90 second Update are broadcasted Updates are sent to directly connected neighbor only Routers don't have end to end visibility of entire network. Routing Loops. – Link state Updates are incremental & entire routing table is not sent as update Updates are triggered not periodic Updates are multicast Update are sent to entire network & to just directly connected neighbor Routers have visibility of entire network. No routing loops Convergence is fast because of triggered updates. Comparison of Distance Vector & Link State Routing Protocols

12 Static Routing Typically used in hosts –Enter subnet mask, router (gateway), IP address –Perfect for cases with few connections, doesn’t change much E.g. host with a single router connecting to the rest of the Internet H1H2H3 R1 Internet For H1 Next Hop: IP:

13 Dynamic Routing Most routers use dynamic routing –Automatically build the routing tables –As we saw previously, there are two major approaches Link State Algorithms Distance Vector Algorithms First some terminology AS = Autonomous System –Contiguous set of networks under one administrative authority –Common routing protocol –A connected network There is at least one route between any pair of nodes

14 Application of IRP and ERP

15 Intra-AS Routing Also known as Interior Router Protocols (IRP) or Interior Gateway Protocols (IGP) Most common: –RIP: Routing Information Protocol –OSPF: Open Shortest Path First –IGRP: Interior Gateway Routing Protocol (Cisco proprietary)

16 Dijkstra’s Algorithm Shortest Path Algorithm Weighted Graphs

17    s zy x t -4 5 Bellman-Ford’s Algorithm Shortest Path Algorithm Negative Weighted Graphs    s zy x t -4 5    s zy x t -4 5

18    s zy x t -4 5    s zy x t -4 5 ………….Bellman-Ford’s Algorithm    s zy x t -4    s zy x t -4 5

19 Types Of Routing Protocol Reactive (On-demand) protocols –Discover routes when needed –Source-initiated route discovery –Example: Ad-hoc on demand distance vector (AODV), Dynamic Source Routing (DSR). Proactive protocols (Table Driven) –Traditional distributed shortest-path protocols –Based on periodic updates. High routing overhead –Example : Highly Dynamic Destination-Sequenced Distance Vector routing protocol (DSDV), Optimized Link State Routing Protocol (OLSR), Open Shortest path first (OSPF), RIP.

20 Routing Types Nodes must determine how to forward packets – Source routing – Routing decision is made at the sender. – In source routing complete route information from source to destination is included in the data packets. – Not feasible to the large scale network Hop-by-hop routing: Routing decision is made at each intermediate node. – Hop-by-hop Routing: – In hop-by-hop routing each data packet contains next hop address and destination address. – Routing decision is made at each intermediate node.

21 Proactive Routing Protocol –Table driven routing protocol

22 RIP ( Routing Information Protocol) Distance vector algorithm Proactive Routing Protocol Distance vectors: exchanged every 30 sec via Response Message (also called advertisement) Each advertisement: route to up to 25 destination nets

23 RIP (Routing Information Protocol) Destination Network Next Router Num. of hops to dest. wA2 yB2 zB7 x--1 ….…..... w xy z A C D B Routing table in D

24 RIP: Link Failure and Recovery If no advertisement heard after 180 sec  neighbor/link declared dead –routes via neighbor invalidated –new advertisements sent to neighbors –neighbors in turn send out new advertisements (if tables changed) –link failure info quickly propagates to entire net

25 OSPF (Open Shortest Path First) Uses Link State algorithm –LS packet dissemination –Topology map at each node –Route computation using Dijkstra’s algorithm OSPF advertisement carries one entry per neighbor router Advertisements disseminated to entire AS (via flooding) Conceived as a successor to RIP

26 Destination Sequence Distance Vector Routing (DSDV) DSDV is Proactive (Table Driven) DSDV is Destination Based Each node maintains routing information for all known destinations Routing information must be updated periodically Maintains routes which are never used Traffic overhead even if there is no change in network topology

27 DSDV FUNCTIONALITY Route Advertisements Advertise to each neighbor own routing information which consist of : –Destination Address –Metric = Number of Hops to Destination –Destination Sequence Number Rules to set sequence number information –On each advertisement increase own destination sequence number –If a node is no more reachable (timeout) increase sequence number of this node by 1 and set metric =  Route Selection Update information is compared to own routing table –Select route with higher destination sequence number (This ensure to use always newest information from destination) –Select the route with better metric when sequence numbers are equal. Respond to Topology Changes Immediate advertisements –Information on new Routes, broken Links, metric change is immediately propagated to neighbors. Full/Incremental Update: –Full Update: Send all routing information from own table. –Incremental Update: Send only entries that have changed. (Make it fit into one single packet)

28 DSDV (Tables) C Dest.NextMetricSeq AA1A-550 BB0B-100 CC2C-588 Dest.NextMetricSeq AA0A-550 BB1B-100 CB3C-586 Dest.NextMetricSeq. AB1A-550 BB2B-100 CC0C-588 BA 12

29 (A, 1, A-500) (B, 0, B-102) (C, 1, C-588) (A, 1, A-500) (B, 0, B-102) (C, 1, C-588) DSDV (Route Advertisement) CBA B increases Seq.Nr from 100 -> 102 B broadcasts routing information to Neighbors A, C including destination sequence numbers Dest.NextMetricSeq AA0A-550 BB1B-102 CB2C-588 Dest.NextMetricSeq AA1A-550 BB0B-102 CC1C-588 Dest.NextMetricSeq. AB2A-550 BB1B-102 CC0C

30 (D, 0, D-000) DSDV (New Node) CBAD Dest.NextMetricSeq. AA0A-550 BB1B-104 CB2C-590 Dest.NextMetricSeq. AA1A-550 BB0B-104 CC1C-590 Dest.NextMetricSeq. AB2A-550 BB1B-104 CC0C-590 DD1D D broadcast for first time Send Sequence number D Insert entry for D with sequence number D-000 Then immediately broadcast own table

31 (A, 2, A-550) (B, 1, B-102) (C, 0, C-592) (D, 1, D-000) (A, 2, A-550) (B, 1, B-102) (C, 0, C-592) (D, 1, D-000) DSDV (New Node cont.) CBAD Dest.NextMetricSeq. AA1A-550 BB0B-102 CC1C-592 DC2D-000 Dest.NextMetricSeq. AA0A-550 BB1B-104 CB2C-590 Dest.NextMetricSeq. AB2A-550 BB1B-102 CC0C-592 DD1D-000 ……… 3. C increases its sequence number to C-592 then broadcasts its new table. 4. B gets this new information and updates its table…….

32 (D, 2, D-100) DSDV (no loops, no count to infinity) CBA D Dest.cNextMetricSeq. ……… DC2D-100 Dest.NextMetricSeq. ……… DB3D-100 Dest.NextMetricSeq. ……… DD  D Node C detects broken Link: -> Increase Seq. Nr. by 1 (only case where not the destination sets the sequence number -> odd number) 2. B does its broadcast -> no affect on C (C knows that B has stale information because C has higher seq. number for destination D) -> no loop -> no count to infinity

33 (D, , D-101) DSDV (Immediate Advertisement) CBA D Dest.cNextMetricSeq. ……… DC3D-100 Dest.NextMetricSeq. ……… DB4D-100 Dest.NextMetricSeq. ……… DB 1 D-100 Dest.NextMetricSeq. ……… DD 1 D-100 DD  D Node C detects broken Link: -> Increase Seq. Nr. by 1 (only case where not the destination sets the sequence number -> odd number) 3. Immediate propagation B to A: (update information has higher Seq. Nr. -> replace table entry) 2. Immediate propagation C to B: (update information has higher Seq. Nr. -> replace table entry) Dest.cNextMetricSeq. ………... DC 2 D-100 DC  D-101 Dest.NextMetricSeq. ………... DB 3 D-100 DB  D-101

34 Reactive Routing Protocol –On-Demand routing protocol

35 AODV Concepts (1) AODV: Ad hoc On-demand Distance Vector routing protocol Pure on-demand routing protocol – A node does not perform route discovery or maintenance until it needs a route to another node or it offers its services as an intermediate node – Nodes that are not on active paths do not maintain routing information and do not participate in routing table exchanges Uses a broadcast route discovery mechanism Uses hop-by-hop routing – Routes are based on dynamic table entries maintained at intermediate nodes – Similar to Dynamic Source Routing (DSR), but DSR uses source routing

36 AODV Concepts (2) Local HELLO messages are used to determine local connectivity – Can reduce response time to routing requests – Can trigger updates when necessary Sequence numbers are assigned to routes and routing table entries – Used to maintain freshness of route Every node maintains two counters – Node sequence number – Broadcast ID

37 AODV Route Request (1) Initiated when a node wants to communicate with another node, but does not have a route to that node Source node broadcasts a route request (RREQ) packet to its neighbors broadcast_id dest_addr typeflagshopcntresvd dest_sequence_# source_addr source_sequence_#

38 AODV Route Request (2) Sequence numbers – Source sequence indicates “freshness” of reverse route to the source – Destination sequence number indicates freshness of route to the destination Every neighbor receives the RREQ and either … – Returns a route reply (RREP) packet, or – Forwards the RREQ to its neighbors (source_addr, broadcast_id) uniquely identifies the RREQ – broadcast_id is incremented for every RREQ packet sent – Receivers can identify and discard duplicate RREQ packets

39 AODV Route Request (3) If a node cannot respond to the RREQ – The node increments the hop count – The node saves information to implement a reverse path set up (AODV assumes symmetrical links) Neighbor that sent this RREQ packet Destination IP address Source IP address Broadcast ID Source node’s sequence number Expiration time for reverse path entry (to enable garbage collection)

40 AODV Example (1) Node 1 needs to send a data packet to Node 7 Assume Node 6 knows a current route to Node 7 Assume that no other route information exists in the network (related to Node 7)

41 AODV Example (2) Node 1 sends a RREQ packet to its neighbors – source_addr = 1 – dest_addr = 7 – broadcast_id = broadcast_id + 1 – source_sequence_# = source_sequence_# + 1 – dest_sequence_# = last dest_sequence_# for Node

42 AODV Example (3) Nodes 2 and 4 verify that this is a new RREQ and that the source_sequence_# is not stale with respect to the reverse route to Node 1 Nodes 2 and 4 forward the RREQ – Update source_sequence_# for Node 1 – Increment hop_cnt in the RREQ packet

43 AODV Example (4) RREQ reaches Node 6, which knows a route to 7 – Node 6 must verify that the destination sequence number is less than or equal to the destination sequence number it has recorded for Node 7 Nodes 3 and 5 will forward the RREQ packet, but the receivers recognize the packets as duplicates

44 AODV Route Reply (1) If a node receives an RREQ packet and it has a current route to the target destination, then it unicasts a route reply packet (RREP) to the neighbor that sent the RREQ packet dest_addr typeflagshopcntrsvd dest_sequence_# source_addr lifetime prsz

45 AODV Route Reply (2) Intermediate nodes propagate the first RREP for the source towards the source using cached reverse route entries Other RREP packets are discarded unless… – dest_sequence_# number is higher than the previous, or – destination_sequence_# is the same, but hop_cnt is smaller (i.e., there’s a better path) RREP eventually makes it to the source, which can use the neighbor sending the RREP as its next hop for sending to the destination Cached reverse routes will timeout in nodes not seeing a RREP packet

46 AODV Example (5) Node 6 knows a route to Node 7 and sends an RREP to Node 4 – source_addr = 1 – dest_addr = 7 – dest_sequence_# = maximum(own sequence number, dest_sequence_# in RREQ) – hop_cnt =

47 AODV Example (6) Node 4 verifies that this is a new route reply (the case here) or one that has a lower hop count and, if so, propagates the RREP packet to Node 1 – Increments hop_cnt in the RREP packet

48 AODV Example (7) Node 1 now has a route to Node 7 in three hops and can use it immediately to send data packets Note that the first data packet that prompted path discovery has been delayed until the first RREP was returned DestNextHops 743

49 AODV Route Maintenance Route changes can be detected by… – Failure of periodic HELLO packets – Failure or disconnect indication from the link level – Failure of transmission of a packet to the next hop (can detect by listening for the retransmission if it is not the final destination) The upstream (toward the source) node detecting a failure propagates an route error (RERR) packet with a new destination sequence number and a hop count of infinity (unreachable) The source (or another node on the path) can rebuild a path by sending a RREQ packet

50 AODV Example (8) Assume that Node 7 moves and link 6-7 breaks Node 6 issues an RERR packet indicating the broken path The RERR propagates back to Node 1 Node 1 can discover a new route

51 Dynamic Source Routing (DSR)

52 Hierarchical Algorithms (1) Scalability – MANET protocols often do not perform well for large networks (especially if not dense) –Global topology is based on the connectivity of each mobile node Clusters can be used to provide scalability –Clusters are formed (dynamically, of course) to provide hierarchy –Global routing is done to clusters –Local routing is done to nodes within a cluster –Clusters of clusters (super-clusters) can be formed to extend hierarchy –Similar in principle to IP subnets

53 Hierarchical Algorithms (2) A special node, called the cluster-head, is designated in each cluster –Responsible for routing data to or from other clusters –May be a special node, or may be designated through a clustering algorithm Algorithms –Clustering -- form clusters –Cluster-head identification -- may be an integral part of the clustering algorithm –Routing -- some routing algorithm is still needed Applied at each level of the hierarchy

54 Hierarchical Algorithm Example Cluster 1 Cluster 3 Cluster 2

Download ppt "Routing Protocols Lecture # 6 Obaid Khan. Routed Protocol Definition Routed Protocol – used to transmit user data (packets) through an internetwork. Routed."

Similar presentations

Ads by Google