DSDV algorithm simulating
get the UDP simulation IDEA from :https://github.com/DeividasZilinskas/DSDV
Create by liudongdong,Major in IOT,JLU.
DSDV Protocol briefly introduce
-
DSDV is Proactive (Table Driven)
-
Each node maintains routing information for all known destinations
-
Routing information must be updated periodically
-
Traffic overhead even if there is no change in network topology
-
Maintains routes which are never used
features
-
Keep the simplicity of Distance Vector
-
Guarantee Loop Freeness
​ New Table Entry for Destination Sequence Number
-
Allow fast reaction to topology changes Make immediate route advertisement on significant changes in routing table but wait with advertising of unstable routes(damping fluctuations)
RouteTableStructure
Destination | Next | Metric | Seq. Nr | Install Time | Stable Data |
---|---|---|---|---|---|
A | A | 0 | A-550 | 001000 | Ptr_A |
B | B | 1 | B-102 | 001200 | Ptr_B |
C | B | 3 | C-588 | 001200 | Ptr_C |
D | B | 4 | D-312 | 001200 | Ptr_D |
-
Sequence number originated from destination. Ensures loop freeness.
-
Install Time when entry was made (used to delete stale entries from table)
-
Stable Data Pointer to a table holding information on how stable a route is. Used to damp fluctuations in network.
RouteTableItemUpdateRules
-
Route Advertisements
-
Advertise to each neighbor own routing information 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 (use only even numbers) If a node is no more reachable (timeout) increase sequence number of this node by 1 (odd sequence number) 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.
-
For detail: https://github.com/liudongdong1/DSDV