DRCL J-Sim API

drcl.inet.protocol.ospf
Class OSPF_QoS

java.lang.Object
  extended bydrcl.DrclObj
      extended bydrcl.comp.Component
          extended bydrcl.net.Module
              extended bydrcl.inet.Protocol
                  extended bydrcl.inet.protocol.Routing
                      extended bydrcl.inet.protocol.ospf.OSPF
                          extended bydrcl.inet.protocol.ospf.OSPF_QoS
All Implemented Interfaces:
java.lang.Cloneable, InetConstants, ObjectCloneable, ObjectDuplicable, java.io.Serializable, UnicastRouting

public class OSPF_QoS
extends OSPF

QoS extension to OSPF. Mainly based on RFC 2676 QoS Routing Mechanisms and OSPF Extensions. Without explicit indication. The following reference is from RFC 2676.

As described in sec. 1, the purpose of the extension is to "Obtain the information needed to compute QoS paths and select a path capable of meeting the QoS requirements of a given request" In this QoS extension, We use two kinds of mechanism to calculate the QoS routes. One is the on-demand calculation modified from the standard Dijkstra's algorithm. The QoS considered here is bandwidth requirement. When doing the calculation, we only consider the link with avail. bw larger than the requirement.

The second mechanism is the precomputation approach. It calculates the routes to each destination and obtains the max. bw on route and the next hop info, which are recorded in the routing table. Because of the changes in the link metric, the precomputation needs to be done periodically or by event trigger. The dynamic changes in the link metrics would trigger the recalculation of all paths. However, this requires the cooperations of other signalling protocols such as RSVP or MPLS LDP. Hence, in the current stage, the extension does not handle the dynamics of metrics. We only left the interface for the future exploration.

The implementation does support equal-cost paths for multiple nexthops

Author:
Wei-peng Chen
See Also:
OSPF, Serialized Form

Nested Class Summary
 
Nested classes inherited from class drcl.comp.Component
Component.Locks
 
Field Summary
static int DEBUG_QOS
          Redefine Debug level of handling timeout events.
 
Fields inherited from class drcl.inet.protocol.ospf.OSPF
debug, DEBUG_ACK, DEBUG_DETAIL, DEBUG_LSA, DEBUG_NEIGHBOR, DEBUG_REFRESH, DEBUG_SAMPLE, DEBUG_SEND, DEBUG_SPF, DEBUG_TIMEOUT, debug2
 
Fields inherited from class drcl.net.Module
downPort, PortGroup_DOWN, PortGroup_UP, upPort
 
Fields inherited from class drcl.comp.Component
FLAG_COMPONENT_NOTIFICATION, FLAG_DEBUG_ENABLED, FLAG_DIRECT_OUTPUT_ENABLED, FLAG_ENABLED, FLAG_ERROR_ENABLED, FLAG_EVENT_ENABLED, FLAG_GARBAGE_DISPLAY_ENABLED, FLAG_GARBAGE_ENABLED, FLAG_PORT_NOTIFICATION, FLAG_STARTED, FLAG_STOPPED, FLAG_TRACE_ENABLED, FLAG_UNDEFINED_START, id, infoPort, locks, name, parent, PortGroup_DEFAULT_GROUP, PortGroup_EVENT, PortGroup_SERVICE, Root, Trace_DATA, Trace_SEND
 
Fields inherited from interface drcl.inet.InetConstants
BYTE_MODE, DEFAULT_BANDWIDTH, DEFAULT_BUFFER_SIZE, DEFAULT_MTU, EVENT_ID_CHANGED_PORT_ID, EVENT_IDENTITY_ADDED, EVENT_IDENTITY_REMOVED, EVENT_IF_NEIGHBOR_DOWN, EVENT_IF_NEIGHBOR_UP, EVENT_IF_PORT_ID, EVENT_LINK_BROKEN, EVENT_LINK_BROKEN_PORT_ID, EVENT_MCAST_HOST_PORT_ID, EVENT_PKT_ARRIVAL, EVENT_PKT_ARRIVAL_PORT_ID, EVENT_RT_ENTRY_ADDED, EVENT_RT_ENTRY_MODIFIED, EVENT_RT_ENTRY_REMOVED, EVENT_RT_MCAST_CHANGED_PORT_ID, EVENT_RT_UCAST_CHANGED_PORT_ID, EVENT_VIF_NEIGHBOR_DOWN, EVENT_VIF_NEIGHBOR_UP, EVENT_VIF_PORT_ID, HOST_ENTRY_EXT, ID_CSL, ID_TRACE_RT, MCAST_QUERY_PORT_ID, PACKET_MODE, PID_AODV, PID_DV, PID_DVMRP, PID_HELLO, PID_IGMP, PID_OSPF, PID_RSVP, PID_TCP, PID_TRACE_RT, PID_UDP, SERVICE_CONFIGSW_PORT_ID, SERVICE_ID_PORT_ID, SERVICE_IF_PORT_ID, SERVICE_MCAST_PORT_ID, SERVICE_RT_PORT_ID, UCAST_QUERY_PORT_ID
 
Constructor Summary
OSPF_QoS()
          Constructor.
 
Method Summary
 int bw2metric(double bw)
           
 java.lang.String info()
          Returns information regarding this component.
 double metric2bw(int metric)
          transfer the value of the TOS metric (16 bits) to bandwidth value, units: bits/sec, ref: sec3.2.1
 java.util.Vector ospf_QoS_spf_on_demand_calculate(OSPF_Area area, int dest, double bw_)
          On-demand version of calculating a path satisying specified requirements to a destination.
 void reset()
          Resets the component for being used anew.
 void set_dynamic_precompute_options(boolean options_)
          Set the bit whether to execute precomputation according to dynamic changes, In this example, received lsa # is the reference
 void set_periodical_precompute_options(boolean options_, int period)
          Set the bit whether to enable precomputation periodically
 void set_QoS_options(int options_)
          Set value of TOS type, either 40( for bw) or 48 (for delay)
 void show_QoS_ondemand_nexthop_by_bw(int dest, double bw_)
          given a destination and the required the bw, print the nexthops, on-demand version
 void show_QoS_options()
           
 void show_QoS_precompute_nexthop_by_bw(int dest, double bw_)
          given a destination and the required the bw, print the nexthops, precompute version
 
Methods inherited from class drcl.inet.protocol.ospf.OSPF
dataArriveAtDownPort, duplicate, getDebugLevelNames, getName, ospf_set_area_id
 
Methods inherited from class drcl.inet.protocol.Routing
addRTEntry, addRTEntry, graftRTEntry, graftRTEntry, graftRTEntry, pruneRTEntry, pruneRTEntry, pruneRTEntry, removeAllRTEntries, removeRTEntry, removeRTEntry, retrieveAllRTEntries, retrieveBestRTEntryDest, retrieveRTEntry, retrieveRTEntryDest, retrieveRTEntrySrc
 
Methods inherited from class drcl.inet.Protocol
broadcast, broadcast, broadcast, broadcast, broadcast, broadcast, broadcast, createConfigSwitchPort, createIDChangedEventPort, createIDServicePort, createIFEventPort, createIFQueryPort, createLinkBrokenEventPort, createMcastHostEventPort, createMcastQueryPort, createMulticastRTChangedEventPort, createPktArrivalEventPort, createRTServicePort, createUcastQueryPort, createUnicastRTChangedEventPort, createVIFEventPort, forward, forward, forward, forward, forward, forward, LinkBrokenEventHandler
 
Methods inherited from class drcl.net.Module
cancelTimeout, setTimeout, setTimeoutAt
 
Methods inherited from class drcl.comp.Component
addComponent, addComponent, addEventPort, addEventPort, addForkPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addServerPort, addServerPort, cancelFork, connect, containsComponent, containsComponent, containsPort, debug, disconnectAll, disconnectAllPeers, disconnectAllPorts, drop, drop, error, error, expose, exposeEventPorts, exposePort, exposePort, exposePort, exposePort, exposePort, findAvailable, findAvailable, findAvailable, fork, forkAt, getAllComponents, getAllPorts, getAllPorts, getAllWiresInside, getAllWiresInsideOut, getAllWiresOut, getComponent, getComponentFlag, getComponentFlag, getContract, getContractHT, getContractHT, getDebugFlagsInBinary, getID, getParent, getPort, getPort, getRoot, getTime, iduplicate, isAncestorOf, isContainer, isDebugEnabled, isDebugEnabledAt, isDirectlyRelatedTo, isDirectOutputEnabled, isEnabled, isErrorNoticeEnabled, isEventExportEnabled, isGarbageDisplayEnabled, isGarbageEnabled, isPortRemovable, isStarted, isStopped, isTraceEnabled, lock, notify, notifyAll, operate, reboot, removeAll, removeAllComponents, removeAllPorts, removeAllPorts, removeComponent, removeComponent, removePort, removePort, removePort, resume, run, sduplicate, send, sendAt, setComponentFlag, setComponentFlag, setDebugEnabled, setDebugEnabled, setDebugEnabledAt, setDebugEnabledAt, setDebugEnabledAt, setDirectOutputEnabled, setDirectOutputEnabled, setEnabled, setErrorNoticeEnabled, setErrorNoticeEnabled, setEventExportEnabled, setEventExportEnabled, setExecutionBoundary, setGarbageDisplayEnabled, setGarbageDisplayEnabled, setGarbageEnabled, setGarbageEnabled, setID, setID, setName, setPort, setPort, setTraceEnabled, setTraceEnabled, sleepFor, sleepUntil, stop, toString, unexpose, unlock, useLocalForkManager, useLocalForkManager, wait
 
Methods inherited from class drcl.DrclObj
clone
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG_QOS

public static final int DEBUG_QOS
Redefine Debug level of handling timeout events.

See Also:
Constant Field Values
Constructor Detail

OSPF_QoS

public OSPF_QoS()
Constructor.

Method Detail

info

public java.lang.String info()
Description copied from class: Component
Returns information regarding this component. Subclasses should override this method to provide useful information at run time.

Overrides:
info in class OSPF

reset

public void reset()
Description copied from class: Component
Resets the component for being used anew. All the internal variables must be set to the initial state. All the ports and child components are reset as well.

Overrides:
reset in class OSPF

set_QoS_options

public void set_QoS_options(int options_)
Set value of TOS type, either 40( for bw) or 48 (for delay)


show_QoS_options

public void show_QoS_options()

set_periodical_precompute_options

public void set_periodical_precompute_options(boolean options_,
                                              int period)
Set the bit whether to enable precomputation periodically


set_dynamic_precompute_options

public void set_dynamic_precompute_options(boolean options_)
Set the bit whether to execute precomputation according to dynamic changes, In this example, received lsa # is the reference


show_QoS_ondemand_nexthop_by_bw

public void show_QoS_ondemand_nexthop_by_bw(int dest,
                                            double bw_)
given a destination and the required the bw, print the nexthops, on-demand version


show_QoS_precompute_nexthop_by_bw

public void show_QoS_precompute_nexthop_by_bw(int dest,
                                              double bw_)
given a destination and the required the bw, print the nexthops, precompute version


ospf_QoS_spf_on_demand_calculate

public java.util.Vector ospf_QoS_spf_on_demand_calculate(OSPF_Area area,
                                                         int dest,
                                                         double bw_)
On-demand version of calculating a path satisying specified requirements to a destination. return value: the nexthop list of the destination (interface from the src) Note that the type of elements in Vector is OSPF_SPF_vertex


metric2bw

public double metric2bw(int metric)
transfer the value of the TOS metric (16 bits) to bandwidth value, units: bits/sec, ref: sec3.2.1


bw2metric

public int bw2metric(double bw)

DRCL J-Sim API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~