be.ac.ulg.montefiore.run.totem.trafficMatrix.generation
Class POPPOPTrafficMatrixGeneration

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.trafficMatrix.generation.POPPOPTrafficMatrixGeneration

public class POPPOPTrafficMatrixGeneration
extends java.lang.Object

This class generates a POP-POP XML intra-domain traffic matrix from an XML interdomain traffic matrix. In an XML inter-domain traffic matrix, we have for each node some destinations prefixes for which we need to know the corresponding egress node. For this, we replay BGP dumps in C-BGP.

Creation date: 04-03-2005

Author:
Olivier Delcourt (delcourt@run.montefiore.ulg.ac.be), Simon Balon (balon@run.montefiore.ulg.ac.be), Gael Monfort (monfort@run.montefiore.ulg.ac.be)

Field Summary
 double notRoutedTraffic
           
 
Constructor Summary
POPPOPTrafficMatrixGeneration(Domain domain)
           
 
Method Summary
 TrafficMatrix generatePOPPOPTrafficMatrix(java.lang.String trafficMatrixFileName)
          This method can be used to generate an XML traffic matrix from a text-file traffic matrix.
 TrafficMatrix generateTrafficMatrix(TrafficMatrix tm, java.util.HashMap<java.lang.String,java.lang.String> clusters, java.lang.String netflowXMLTrafficMatrixFileName)
          This methods takes a CBGP instance to which all messages (dumps & updates) have been passed and generates an intra-domain traffic matrix from an interdomain XML traffic matrix.
 TrafficMatrix generateTrafficMatrix(TrafficMatrix tm, java.util.HashMap<java.lang.String,java.lang.String> clusters, TrafficMatrixFileType interTm)
          This methods takes a CBGP instance to which all messages (dumps & updates) have been passed and generates an intra-domain traffic matrix from an interdomain XML traffic matrix.
 Domain getDomain()
           
 boolean isIdNaming(java.lang.String dir)
           
 boolean isMRTFile(java.lang.String filename)
           
 void loadDump(java.lang.String BGPbaseDirectory, java.lang.String BGPdirFileName, java.util.Collection<java.lang.String> prefixes)
          This method loads prefixes from BGP dumps into an existing CBGP instance.
 TrafficMatrixFileType loadInterDomainMatrix(java.lang.String netflowXMLTrafficMatrixFileName)
          Load an inter Domain traffic matrix
 void loadUpdates(java.lang.String updatesBaseDirectory, java.lang.String YYYYMMDDHHMM)
          This methods loads all the updates corresponding to a certain time interval into a specified CBGP instance.
 java.util.HashMap<java.lang.String,java.lang.String> readCluster(java.lang.String clusterFileName, java.lang.String BGPbaseDirectory, java.lang.String BGPdirFileName)
          This method reads a cluster file resulting from bgp- sum2.pl and loads all cluster prefixes in an existing C-BGP instance.
 void simRun()
          Run cbgp.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

notRoutedTraffic

public double notRoutedTraffic
Constructor Detail

POPPOPTrafficMatrixGeneration

public POPPOPTrafficMatrixGeneration(Domain domain)
Method Detail

isIdNaming

public boolean isIdNaming(java.lang.String dir)
                   throws InvalidFileException
Throws:
InvalidFileException

isMRTFile

public boolean isMRTFile(java.lang.String filename)

simRun

public void simRun()
            throws RoutingException
Run cbgp. Call this when you have done reading clusters, dump and updates.

Throws:
RoutingException

loadDump

public void loadDump(java.lang.String BGPbaseDirectory,
                     java.lang.String BGPdirFileName,
                     java.util.Collection<java.lang.String> prefixes)
              throws InvalidFileException
This method loads prefixes from BGP dumps into an existing CBGP instance.

Parameters:
BGPbaseDirectory - the directories containing dumps
BGPdirFileName - the directory and filename of the dumps found in BGPbaseDirectory/id/ or BGPbaseDirectory/rid/
prefixes - the list of prefixes that must be loaded. If null, all prefixes will be loaded.
Throws:
InvalidFileException - If the directories are not named by id or by rid

generatePOPPOPTrafficMatrix

public TrafficMatrix generatePOPPOPTrafficMatrix(java.lang.String trafficMatrixFileName)
                                          throws java.io.IOException
This method can be used to generate an XML traffic matrix from a text-file traffic matrix.

Typical format:
src_node dst_node flow_size
where src_node and dst_node must be IP addresses corresponding to RIDs in the XML topology format.

Parameters:
trafficMatrixFileName -
Returns:
Throws:
java.io.IOException

readCluster

public java.util.HashMap<java.lang.String,java.lang.String> readCluster(java.lang.String clusterFileName,
                                                                        java.lang.String BGPbaseDirectory,
                                                                        java.lang.String BGPdirFileName)
                                                                 throws java.io.IOException,
                                                                        InvalidFileException
This method reads a cluster file resulting from bgp- sum2.pl and loads all cluster prefixes in an existing C-BGP instance.

Parameters:
clusterFileName - The name of the clustering file resulting from the perl script.
BGPbaseDirectory -
BGPdirFileName -
Returns:
Throws:
java.io.IOException - If an IOException occurs when reading the cluster file.
InvalidFileException - If the directories are not named by id or by rid

loadInterDomainMatrix

public TrafficMatrixFileType loadInterDomainMatrix(java.lang.String netflowXMLTrafficMatrixFileName)
                                            throws InvalidTrafficMatrixException,
                                                   javax.xml.bind.JAXBException
Load an inter Domain traffic matrix

Parameters:
netflowXMLTrafficMatrixFileName -
Returns:
Throws:
InvalidTrafficMatrixException - If the matrix is not an inter domain one
javax.xml.bind.JAXBException - if JAXB cannot load the matrix

generateTrafficMatrix

public TrafficMatrix generateTrafficMatrix(TrafficMatrix tm,
                                           java.util.HashMap<java.lang.String,java.lang.String> clusters,
                                           TrafficMatrixFileType interTm)
                                    throws InvalidDomainException,
                                           InvalidTrafficMatrixException
This methods takes a CBGP instance to which all messages (dumps & updates) have been passed and generates an intra-domain traffic matrix from an interdomain XML traffic matrix.

Parameters:
tm - this parameter can be an existing traffic matrix to which you want to add new traffic (for example to generate a traffic matrix for two hours...)
clusters - an hashMap mapping a prefix to a cluster (which has been advertised in C-BGP)
interTm - the inter-domain traffic matrix
Returns:
Throws:
InvalidDomainException
InvalidTrafficMatrixException

generateTrafficMatrix

public TrafficMatrix generateTrafficMatrix(TrafficMatrix tm,
                                           java.util.HashMap<java.lang.String,java.lang.String> clusters,
                                           java.lang.String netflowXMLTrafficMatrixFileName)
                                    throws InvalidDomainException,
                                           InvalidTrafficMatrixException
This methods takes a CBGP instance to which all messages (dumps & updates) have been passed and generates an intra-domain traffic matrix from an interdomain XML traffic matrix.

Parameters:
tm - this parameter can be an existing traffic matrix to which you want to add new traffic (for example to generate a traffic matrix for two hours...)
clusters - an hashMap mapping a prefix to a cluster (which has been advertised in C-BGP)
netflowXMLTrafficMatrixFileName - the inter-domain XML traffic matrix generated using NetFlow
Returns:
Throws:
InvalidDomainException
InvalidTrafficMatrixException

loadUpdates

public void loadUpdates(java.lang.String updatesBaseDirectory,
                        java.lang.String YYYYMMDDHHMM)
                 throws java.lang.Exception
This methods loads all the updates corresponding to a certain time interval into a specified CBGP instance. // TODO: update this method to get it working

Parameters:
updatesBaseDirectory - the base directory containing updates, then stored in subdirectories according routers names
YYYYMMDDHHMM - updates should be stored in files updatesYYYYMMDDHHMM
Throws:
java.lang.Exception

getDomain

public Domain getDomain()


Copyright © 2004-2006 Research Unit in Networking, All Rights Reserved.