QoS routing extensions to link state routing for ns -------------------------------------------------- This work extends linkstate routing code in ns-2.1b8 to support QoS Routing based on RFC 2676 - QoS Routing Mechanisms and OSPF Extensions [1]. It supports precomputation of QoS routes and returns explicit-route to a given destination with desired bandwith ----------------------------------------------------------------------------- 1. Installation Untar in ns 2.1b8a directory make clean make ----------------------------------------------------------------------------- 2. API *QoS routing can be enabled with $ns rtproto LS *QoS routing needs to know the current available bandwidth on the link. For this it calls Link instproc get-bw This procedure has to be implemented. *Whenever available bandwidth on a link changes, LS routing agent should be informed by the following call. Agent/rtProto/LS bw-changed this triggers linkstate updates and new route calculations *Agent/rtProto/LS get-explicit-route dest bw returns the explicit route to $dest with $bw available ----------------------------------------------------------------------------- 3. Example an example script is provided in tcl/ex/qosr-simple.tcl ----------------------------------------------------------------------------- 4. Internals files: ~ns/linkstate/ls.h, ls.cc, rtProtoLS.h, rtProtoLS.cc ~ns/tcl/rtglib/ns-rtProtoLS.tcl * an additional field bw_ representing available bandwidth value as a double is added to struct LsLinkState. (Note: this is different from RFC 2676. RFC 2676 uses quantized bandwidth values which fit in 16 bits word. ) * the qos routing table is kept as a map where map(nodeid, numhops).bw = maximum bandwith available on a path of maximum hops $numhops and destination node $nodeid. map(nodeid, numhops).prevnodeid holds id of previous node along this path struct NHTuple { int nodeid; int numhops; } is used as key of this map and struct NHInfo { double bw; // bandwith int prevnodeid; // id of previous node } is used as value stl map is used for the implementation as typedef map QOSPaths; * QOSPaths* _computeQOSRoutes() is implemented which computed QoS routes using the bellman-ford algo. as outlined in the rfc. * when bw-changed is called, at present the implementation calls intf-changed which recomputes routes and sends LSA updates * LSA interval is changed from 1800 sec. to 300 sec. Additional changes made for the qosr-simple example. * change ~ns/adc.cc so that admit-flow procedure can be called from tcl * change ~ns/param-adc.cc so that it binds oresv_rate_ so that it can be accessed from tcl. ----------------------------------------------------------------------------- TODO * better error checking * change so that LS agent can run in both normal and QoS routing mode by toggling a variable * add on-demand route computation * change so that it uses quantized bandwith value as in rfc (is there any need to do so?) * make LSA algorithm more robust as in the rfc (using hold-down timers and sending updates only when bw changes by a certain threshhold) * think of an api for node so that more qosr agents can be added and can run in parallel * better comments and better documentation :) ----------------------------------------------------------------------------- References: [1] http://www.ietf.org/rfc/rfc2676.txt