Formal verification of distance vector routing protocols.

Slides:



Advertisements
Similar presentations
Mobile and Wireless Computing Institute for Computer Science, University of Freiburg Western Australian Interactive Virtual Environments Centre (IVEC)
Advertisements

Chapter 4 Distributed Bellman-Ford Routing
MANETs Routing Dr. Raad S. Al-Qassas Department of Computer Science PSUT
Mobile and Wireless Computing Institute for Computer Science, University of Freiburg Western Australian Interactive Virtual Environments Centre (IVEC)
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #4 Mobile Ad-Hoc Networks AODV Routing.
Berkeley slides were used for this tutorial 1 Internet Networking Spring 2003 Tutorial 3 DUAL Algorithm.
1 Comnet 2010 Communication Networks Recitation 6 Routing.
Mobile and Wireless Computing Institute for Computer Science, University of Freiburg Western Australian Interactive Virtual Environments Centre (IVEC)
CSEE W4140 Networking Laboratory Lecture 4: IP Routing (RIP) Jong Yul Kim
Highly Dynamic Destination- Sequenced Distance-Vector Routing (DSDV) for Mobile Computers C. E. Perkins & P. Bhagwat Presented by Paul Ampadu.
Routing.
Spring Routing & Switching Umar Kalim Dept. of Communication Systems Engineering 06/04/2007.
1 Computer Networks Routing Algorithms. 2 IP Packet Delivery Two Processes are required to accomplish IP packet delivery: –Routing discovering and selecting.
Berkeley slides were used for this tutorial1 Internet Networking Spring 2006 Tutorial 2 DUAL Algorithm.
Highly Dynamic Destination- Sequenced Distance-Vector Routing Protocol (DSDV) for Mobile Computers Charles E. Perkins Pravin Bhagwat Mobile Computing,
Aodv. Distance vector routing Belman principle AODV - overview Similar to DSR –On demand –Route request when needed and route reply when a node knows.
© 2006 Cisco Systems, Inc. All rights reserved. ICND v2.3—3-1 Determining IP Routes Introducing Distance Vector Routing.
Ad Hoc Wireless Routing COS 461: Computer Networks
Distance Vector Routing Protocols Distance Vector Routing.
Routing Information Protocol (RIP). Intra-and Interdomain Routing An internet is divided into autonomous systems. An autonomous system (AS) is a group.
1 Computer Communication & Networks Lecture 22 Network Layer: Delivery, Forwarding, Routing (contd.)
Dynamic Routing Protocols  Function(s) of Dynamic Routing Protocols: – Dynamically share information between routers (Discover remote networks). – Automatically.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 14 Routing Protocols RIP, OSPF, BGP.
Slide /2009COMM3380 Routing Algorithms Distance Vector Routing Each node knows the distance (=cost) to its directly connected neighbors A node sends.
1 Routing Protocols and Configuration Instructor: Te-Lung Liu Program Associate Researcher NCHC, South Region Office.
Count to infinity problem
1 Chapter 22 Network layer Delivery, Forwarding and Routing (part2)
1 Spring Semester 2009, Dept. of Computer Science, Technion Internet Networking recitation #3 Mobile Ad-Hoc Networks AODV Routing.
Leader Election Algorithms for Mobile Ad Hoc Networks Presented by: Joseph Gunawan.
Ad-hoc On-Demand Distance Vector Routing (AODV) and simulation in network simulator.
RFC 3561 AODV Routing Protocol Mobile Ad Hoc Networking Working Group Charles E. Perkins INTERNET DRAFT Nokia Research Center 19 June 2002 Elizabeth M.
The Destination Sequenced Distance Vector (DSDV) protocol
1 Ad Hoc On-Demand Distance Vector Routing (AODV) Dr. R. B. Patel.
AODV: Introduction Reference: C. E. Perkins, E. M. Royer, and S. R. Das, “Ad hoc On-Demand Distance Vector (AODV) Routing,” Internet Draft, draft-ietf-manet-aodv-08.txt,
Network Layer4-1 Distance Vector: link cost changes Link cost changes: r node detects local link cost change r updates distance table (line 15) r if cost.
1 Computer Communication & Networks Lecture 21 Network Layer: Delivery, Forwarding, Routing Waleed.
Routing protocols. Static Routing Routes to destinations are set up manually Route may be up or down but static routes will remain in the routing tables.
Internet Routing r Routing algorithms m Link state m Distance Vector m Hierarchical routing r Routing protocols m RIP m OSPF m BGP.
Distance-Vector maintain distance and next hop information Also known as Distributed Bellman- Ford(DBF) algorithm used in RIP Cause Loop and Count to infinity.
DSDV Destination-Sequenced Distance-Vector Routing Protocol
Ad-hoc On Demand Distance Vector Protocol Hassan Gobjuka.
Spring 2000CS 4611 Routing Outline Algorithms Scalability.
Ad Hoc On-Demand Distance Vector Routing (AODV) ietf
Spring Routing: Part I Section 4.2 Outline Algorithms Scalability.
Improving Fault Tolerance in AODV Matthew J. Miller Jungmin So.
Lecture 7. Building Forwarding Tables There are several methods Static Method Dynamic Methods Centralized Distributed Distance Vector Link State.
CS 6401 Intra-domain Routing Outline Introduction to Routing Distance Vector Algorithm.
The network layer: routing
CS 5565 Network Architecture and Protocols
Verifying Stability of Network Protocols
DSDV Highly Dynamic Destination-Sequenced Distance-Vector Routing
(How the routers’ tables are filled in)
Routing Information Protocol (RIP)
COMP 3270 Computer Networks
Rip Routing Protocol.
Internet Networking recitation #4
Routing: Distance Vector Algorithm
UNICAST ROUTING PROTOCOLS
COS 561: Advanced Computer Networks
CS 3700 Networks and Distributed Systems
Intradomain Routing Outline Introduction to Routing
RFC 1058 & RFC 2453 Routing Information Protocol
CS 3700 Networks and Distributed Systems
COS 561: Advanced Computer Networks
Communication Networks
Routing.
COS 461: Computer Networks
Brad Karp UCL Computer Science
Communication Networks
DSDV Destination-Sequenced Distance-Vector Routing Protocol
Presentation transcript:

Formal verification of distance vector routing protocols

Routing in a network (Find the cheapest route from Source to Destination) Source Destination L(i, j) = Cost of direct link i --- j. R(a, b) = Cost of route from a to b. R(a, b) = min{ L(a, k) + R(k, b) }

Outline RIP (Routing Information Protocol) –Internet routing protocol AODV (Ad-hoc On-demand Distance Vector routing) –Used for mobile ad-hoc networking.

Distance-vector routing in RIP 57 ABC A: 0 B: 5 C: ∞ A: 5 B: 0 C: 7 A: ∞ B: 5 C: 0 Initially A: 0 B: 5 C: 12 A: 5 B: 0 C: 7 A: 12 B: 5 C: 0 After exchange

RIP Routing table: Each node maintains the cost of route to every other node Initially: All nodes know cost to neighbors Desired Final Goal: All nodes know cost to all other nodes while(1) { Nodes periodically send their routing table to every neighbor; R(a, b) = min{ L(a, k) + R(k, b) }; }

Count to Infinity 5 ABC A: 0 B: 5 C: 12 A: 5 B: 0 C: 7 A: 12 B: 5 C: 0 After exchange C: 12 C: 12+5=17 C: 17+5=22

Poisoned reverse 5 ABC C: ∞ Works for loops of two routers (adds more cases for Verification) RIP limitation: Doesn’t work for loops of three or more routers

Infinity = 16 Since we can’t solve the loop problem –Set Infinity to 16 RIP is not to be used in a network that has more than 15 hops.

Convergence Convergence: –All nodes eventually agree upon routes Divergence: –Nodes exchange routing messages indefinitely. Ignore topology changes –We are concerned only with the period between topology changes.

Some definitions Universe is modeled as a bipartite graph –Nodes are partitioned into routers and networks –Interfaces are edges. –Each routers connects to at least two networks. –Routers are neighbors if they connect to same network Actually, we can do away with bipartite graph by assuming that router = network (i.e. each network has one router). An entry for destination d at a router r has: –hops(r): Current distance estimate –nextR(r): next router on the route to d. –nextN(r): next network on route to d.

More definitions D(r) = 1 if r is connected to d = 1 + min{ D(s)| s is a neighbor of r } k-circle around d is the set of routers: C k = { r | D(r) ≤ k} Stability: For 1 ≤ k ≤ 15, universe is k-stable if: (S1): Every router r in C k has hops(r) = D(r) Also, D(nextR(r)) = D(r) – 1. (S2): For every router r outside C k, hops(r) > k.

Convergence Aim of routing protocol is to expand k-circle to include all routers A router r at distance k+1 from d is (k+1)- stable if it has an optimal route: –Hops(r)=k+1 and nextR(r) is in C k. Convergence theorem (Correctness of RIP) –For any k < 16, starting from an arbitrary state of the universe, for any fair sequence of messages, there is a time t k, such that the universe is k-stable at all times t ≥ t k.

Tools HOL (higher order logic) –Theorem prover (more expressive, more effort) SPIN –Model checker (less expressive, easier modeling) Number of routers is infinite –SPIN would have too many states –States reduced by using abstraction

Lemmas in convergence proof Proved by induction on k. –Lemma 1: Universe is initially 1-stable. (Proved in HOL). –Lemma 2: Preservation of Stability. For any k < 16, if the universe is k-stable at some time t, then it is k-stable at any time t’ ≥ t. (Proved in HOL). –Lemma 3: For any k < 15 and router r such that D(r)=k+1, if the universe is k-stable at some time t k, then there is a time t r,k ≥ t k such that r is (k+1)-stable at all times t ≥ t r,k. (Proved in SPIN) –Lemma 4: Progress. For any k < 15, if the universe is k- stable at some time t k, then there is a time t k+1 ≥ t k such that the universe is (k+1)-stable at all times t ≥ t k +1. (Proved in HOL).

Abstraction To reduce state-space for SPIN Abstraction examples: –If property P holds for two routers, then it will hold for arbitrarily many routers. –Advertisements of distances can be assumed to be k or k+1. Abstraction should be: –Finitary: should reduce system to finite number of states – Property-preserving: Whenever abstract system satisfies the property, concrete system also satisfies the property

Abstraction of universe Concrete system with many routers Router processes Updates Hop-count is {LT, EQ, GR} Advertiser send updates Abstract system with 3 routers hops > k+1 hops = k+1 hops < k+1

Bound on convergence time Theorem: A universe of radius R becomes 15-stable within time = min{15, R}* Δ. (Assuming there were no topology changes). After Δweakly 2-stable After 2Δweakly 3-stable After 3Δweakly 4-stable After 4Δweakly 5-stable… After (R-1)Δweakly R-stable After RΔR-stable

Weak stability Universe is weakly k-stable if: –Universe is k-1 stable –For all routers on k-circle: either r is k-stable or hops(r) > k. –For all routers r outside C k (D(r) > k), hops(r) > k. By using weak stability, we can prove a sharp bound

Lemmas in Proof of timing bound Lemma 5: Preservation of weak stability. For any 2 ≤ k ≤ 15, if the universe is weakly k- stable at some time t, then it is weakly k- stable at any time t’ ≥ t. Lemma 6: Initial Progress. If the topology does not change, the universe becomes weakly 2-stable after Δ time. Lemma 7: For any 2 ≤ k ≤ 15, if the universe is weakly k-stable at some time t, then it is k- stable at time t + Δ.

Proof continued Lemma 8: Progress. For any 2 ≤ k ≤ 15, if the universe is weakly k-stable at some time t, then it is weakly (k+1)-stable at time t + Δ.

AODV S D S D Routes are computed on-demand to save bandwidth.

AODV ABD Each route request has a sequence number for freshness. Among two routes of equal freshness, smaller hop-count is preferred. Property formally verified is loop freedom Above conditions mean a lot of cases need to be checked

Searching for loop formation The 3-node network shown previously, is run in SPIN. Ὼ (!((next D (A)==B) /\ (next D (B)==A))) Four ways of loop formation are found. Standard does not cover these cases. Formal verification can aid protocol design.

Ways of loop formation To get an idea of case-analysis required, loops can be formed by: Route reply from B to A getting dropped. B deleting route on expiry. B keeping route but marks it as expired. A not detecting a crash of B. Loop was avoided by: B keeping route as expired, incrementing the sequence number and never deleting it. Is a good indicator of a loop-free solution.

Guaranteeing AODV loop freedom Based on the avoidance of loops for 3 nodes, we assume: –Nodes never delete routes, incrment sequence number of expired routes, detect crashes immediately. Based on these assumptions, loop freedom is proved. Theorem: Consider an arbitrary network of nodes running AODVv2. If all nodes conform to above assumption, there will be no routing loops.

Abstraction Abstract sequence number is {GR, EQ, LT } Abstract hop count is {GR, EQ, LT } Abstract next pointer is {EQ, NE} Lemma 9: If t 1 ≤ t 2 and for all t: t 1 < t ≤ t 2. ¬ restart(n)(t), then: seqno d (n)(t 1 ) ≤ seqno d (n)(t 2 ) Lemma 10: If t 1 ≤ t 2 and seqno d (n)(t 1 )=seqno d (n)(t 2 ), and for all t: t 1 < t ≤ t 2. ¬ restart(n)(t), then hops d (n)(t 1 ) ≥ hops d (n)(t 2 )

Adding to abstraction The following lemma involves two nodes. Abstract sequence number is {GR, EQ, LT} x {EQ, NE} Abstract hop count is {GR, EQ, LT } x {EQ, NE} Abstract next pointer is {EQ, NE} x {EQ, NE} Lemma 11: If next d (n)(t)=n’, then there exists a time lut ≤ t, such that: –seqno d (n)(t) = seqno d (n)(lut) –1 + hops d (n)(t) = hops d (n’)(lut) –For all t’: lut < t’ ≤ t. ¬ restart(n’)(t’).

Conclusion Specific technical contributions –First proof of correctness of the RIP standard. –Statement and automated proof of a sharp real- time bound on RIP convergence –Automated proof of loop-freedom for AODV.