J-Sim v1.2.1-p7 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, 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

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
area_list, DATABASE, debug, DEBUG_ACK, DEBUG_DETAIL, DEBUG_LSA, DEBUG_NEIGHBOR, DEBUG_REFRESH, DEBUG_SAMPLE, DEBUG_SEND, DEBUG_SPF, DEBUG_TIMEOUT, debug2, HELLO, LS_ACK, LS_REQUEST, LS_UPDATE, ospf_if_list, router_id
 
Fields inherited from class drcl.inet.protocol.Routing
queryPort, rtconfigPort
 
Fields inherited from class drcl.net.Module
address, downPort, PortGroup_DOWN, PortGroup_UP, timerPort, 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_EXPOSED, FLAG_GARBAGE_DISPLAY_ENABLED, FLAG_GARBAGE_ENABLED, FLAG_HAS_EXPOSED_CHILD, 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, MCAST_QUERY_PORT_ID, PACKET_MODE, PID_AODV, PID_DV, PID_DVMRP, PID_HELLO, PID_IGMP, PID_OSPF, PID_RSVP, PID_TCP, 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
protected  void ospf_lsdb_install(OSPF_LSA new_lsa, OSPF_LSA old_lsa, OSPF_Area area)
          Besides the normal operations, record the special metrics recorded in LSA for QoS path calculation
protected  Router_LSA ospf_make_router_lsa(OSPF_Area area)
          make router lsa pkt to describe its neighbor LSA which supports QoS may carry more than one tos metric
 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.
protected  void ospf_QoS_spf_precompute(OSPF_Area area)
          Appendex A.
 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
protected  void timeout(java.lang.Object evt_)
          Handling timeout event.
 
Methods inherited from class drcl.inet.protocol.ospf.OSPF
dataArriveAtDownPort, delayed_acknowledge, direct_acknowledge, duplicate, getDebugLevelNames, getName, inactivity_timer, lsa_receive, neighborDownEventHandler, neighborUpEventHandler, ospf_area_rt_install, ospf_dbdesc_seqnum_init, ospf_if_lookup_by_addr, ospf_install_candidate, ospf_lsa_flood, ospf_lsa_flood, ospf_lsa_has_link, ospf_lsdb_install, ospf_lsdb_install, ospf_lsdb_install, ospf_lsdb_lookup, ospf_message_broadcast, ospf_message_send, ospf_nexthop_calculation, ospf_possible_ack, ospf_route_add, ospf_router_lsa_flood, ospf_send_dbdesc, ospf_send_hello, ospf_send_lsreq, ospf_send_single_hello, ospf_set_area_id, ospf_spf_init, ospf_vertex_lookup, ospf_vertex_lookup, process, transit_vertex_rtable_install
 
Methods inherited from class drcl.inet.protocol.Routing
addRTEntry, addRTEntry, addRTEntry, addRTEntry, addRTEntry, addRTEntry, addRTEntry, graftRTEntry, graftRTEntry, graftRTEntry, pruneRTEntry, pruneRTEntry, pruneRTEntry, removeAllRTEntries, removeRTEntry, removeRTEntry, replaceRTEntry, replaceRTEntry, retrieveAllRTEntries, retrieveBestRTEntryDest, retrieveRTEntry, retrieveRTEntryDest, retrieveRTEntrySrc
 
Methods inherited from class drcl.inet.Protocol
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, idAddedEventHandler, idRemovedEventHandler, LinkBrokenEventHandler, mcastHostJoinEventHandler, mcastHostLeaveEventHandler, pktArrivalHandler, processOther, routeQueryHandler, routeQueryHandler, rtAddedEventHandler, rtModifiedEventHandler, rtRemovedEventHandler, vNeighborDownEventHandler, vNeighborUpEventHandler
 
Methods inherited from class drcl.net.Module
cancelTimeout, dataArriveAtUpPort, deliver, getAddress, removeDefaultDownPort, removeDefaultUpPort, removeTimerPort, setAddress, setTimeout, setTimeoutAt
 
Methods inherited from class drcl.comp.Component
_resume, _start, _stop, addComponent, addComponent, addEventPort, addEventPort, addForkPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addPort, addServerPort, addServerPort, cancelFork, componentAdded, componentRemoved, connect, containsComponent, containsComponent, containsPort, debug, disconnectAll, disconnectAllPeers, disconnectAllPorts, drop, drop, error, error, expose, exposeEventPorts, exposePort, exposePort, exposePort, exposePort, exposePort, findAvailable, findAvailable, findAvailable, finishing, fork, forkAt, getAllComponents, getAllPorts, getAllPorts, getAllWiresInside, getAllWiresInsideOut, getAllWiresOut, getComponent, getComponentFlag, getComponentFlag, getContract, getContractHT, getContractHT, getDebugFlagsInBinary, getForkManager, getID, getParent, getPort, getPort, getRoot, getRuntime, getTime, iduplicate, isAncestorOf, isComponentNotificationEnabled, isContainer, isDebugEnabled, isDebugEnabledAt, isDirectlyRelatedTo, isDirectOutputEnabled, isEnabled, isErrorNoticeEnabled, isEventExportEnabled, isGarbageDisplayEnabled, isGarbageEnabled, isPortNotificationEnabled, isPortRemovable, isStarted, isStopped, isTraceEnabled, lock, notify, notifyAll, operate, portAdded, portRemoved, reboot, removeAll, removeAllComponents, removeAllPorts, removeAllPorts, removeComponent, removeComponent, removePort, removePort, removePort, resume, run, sduplicate, send, sendAt, setComponentFlag, setComponentFlag, setComponentNotificationEnabled, setContract, setDebugEnabled, setDebugEnabled, setDebugEnabledAt, setDebugEnabledAt, setDebugEnabledAt, setDirectOutputEnabled, setDirectOutputEnabled, setEnabled, setErrorNoticeEnabled, setErrorNoticeEnabled, setEventExportEnabled, setEventExportEnabled, setExecutionBoundary, setGarbageDisplayEnabled, setGarbageDisplayEnabled, setGarbageEnabled, setGarbageEnabled, setID, setID, setName, setPort, setPort, setPortNotificationEnabled, setPortRemovable, setRuntime, setTraceEnabled, setTraceEnabled, sleepFor, sleepUntil, stop, toString, unexpose, unlock, useLocalForkManager, useLocalForkManager, wait, yield
 
Methods inherited from class drcl.DrclObj
clone
 
Methods inherited from class java.lang.Object
equals, finalize, 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

timeout

protected void timeout(java.lang.Object evt_)
Description copied from class: OSPF
Handling timeout event. According to the timeout event which can be obtained from evt_, there are different handling functions.

Overrides:
timeout in class OSPF
Parameters:
evt_ - event object got from the timer port

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_make_router_lsa

protected Router_LSA ospf_make_router_lsa(OSPF_Area area)
make router lsa pkt to describe its neighbor LSA which supports QoS may carry more than one tos metric

Overrides:
ospf_make_router_lsa in class OSPF

ospf_lsdb_install

protected void ospf_lsdb_install(OSPF_LSA new_lsa,
                                 OSPF_LSA old_lsa,
                                 OSPF_Area area)
Besides the normal operations, record the special metrics recorded in LSA for QoS path calculation

Overrides:
ospf_lsdb_install in class OSPF

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


ospf_QoS_spf_precompute

protected void ospf_QoS_spf_precompute(OSPF_Area area)
Appendex A. Pseudocode for the BF Based Pre-Computation Algorithm - assumes a hop-by-hop forwarding approach - does not handle equal cost multi-paths for simplicity - ***Note***: Here we only consider the bidirectional links. During the LSA exchange process, if we have received a LSA from a node, say A, we don't know its existence and would not calculate a route to it. Local Variable: - TT[n][h]: n:index in QoS_V_list; h:hop num storing the max. bw and the next hop info. to this node n in the hth iteration. After calculation TT will be stored in QoS_RT - S_prev: list of vertices that changed a bw value in the TT table in the previous iteration. - S_new: list of vertices that changed a bw value (in the TT table etc.) in the current iteration. Each link info. (n,m) is required during the computation can be obtained by first retrieve the router LSA from n check each LSA link in this router LSA and get the link info. To ensure the bidirection connectivity, we need to check the router LSA from m


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)

J-Sim v1.2.1-p7 API

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