Class MakeBBASTree

java.lang.Object
  |
  +--MakeBBASTree

public class MakeBBASTree
extends java.lang.Object

MakeBBASTree.java Jim Gast, jgast@cs.wisc.edu MakeBBASTree constructs a tree of Autonomous Systems based on assigning a set of BackBone nodes. The array bbNodes contains the list of ASNs that can see 90% of the Internet within 3 hops. See MakeBBASTree.loadBBNodes(). (AUGMENTED LIST added Mar 15, 2002 based on traceroutes - jgast) This program computes the distance to the backbone for all ASNs The output can be redirected to a file (typically BBDist.txt) MakeBBASTree is the main class which gets input from BGP routing tables and starts everything out. USAGE: java MakeBBASTree bgpTable


Field Summary
static ASN[] asnList
           
static int[] asnSeen
           
static int[] bbDist
           
static java.lang.String bgpFile
           
static int CLUSTERING_PASSES
           
static java.util.TreeMap hash
           
static int[] latitude
           
static int[] longitude
           
static java.lang.String[] name
           
static int NOT_REACHED
           
 
Constructor Summary
MakeBBASTree()
           
 
Method Summary
static void computeBBDist()
           
static void findParents()
           
static void findUphillParents()
          choose the uphill node that has the most neighbors in common to be the parent of each node.
static void incrCount(int from, int to)
           
static void loadBBNodes()
           
static void loadNamesFromOld(java.lang.String filename)
          fill in the names and longitudes of the ASTree from an old ASTree.txt file.
static void main(java.lang.String[] args)
          main method reads BGP table and counts distance to BB from every AS
static void printPairCounts()
           
static void printPairDistances()
           
static void printUniCounts()
           
static void readRoutingFile(BGPReader bReader)
          readRoutingFile reads lines of a BGP routing file until EOF.
static void readRoutingLine(java.lang.String str, IPRange dest)
          readRoutingLine finds all pairs of ASNumbers whether on best paths or worst.
static void showAncestries()
           
static void showClustering()
           
static void showClustering(int oneAS)
           
static void sortNeighbors()
           
static void writeASTree()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hash

public static java.util.TreeMap hash

asnSeen

public static int[] asnSeen

asnList

public static ASN[] asnList

name

public static java.lang.String[] name

longitude

public static int[] longitude

latitude

public static int[] latitude

bbDist

public static int[] bbDist

bgpFile

public static java.lang.String bgpFile

NOT_REACHED

public static final int NOT_REACHED
See Also:
Constant Field Values

CLUSTERING_PASSES

public static final int CLUSTERING_PASSES
See Also:
Constant Field Values
Constructor Detail

MakeBBASTree

public MakeBBASTree()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
main method reads BGP table and counts distance to BB from every AS

java.io.IOException

readRoutingFile

public static void readRoutingFile(BGPReader bReader)
readRoutingFile reads lines of a BGP routing file until EOF. The routing file is expected to have: # Lines that start with "#" are comments * Routings start with "*" *> Best routes start with "*>" The only tricky part is that the destination IP address is not repeated if it is the same as the prior line. Example: 24.0.101.0/24 193.0.0.56 0 3333 1103 6453 1239 6172 ? 134.55.24.6 0 293 1800 1239 6172 ? > 144.228.240.93 35 0 1239 6172 ? The example shows 3 routes to 24.0.101.0/24. The third is the "best route".


readRoutingLine

public static void readRoutingLine(java.lang.String str,
                                   IPRange dest)
readRoutingLine finds all pairs of ASNumbers whether on best paths or worst. This routine parses the line and prints out one line for each adjacent pair of ASNumbers. By implication, there is a route that directly connects those Autonomous Systems in a single hop.


printPairCounts

public static void printPairCounts()

printPairDistances

public static void printPairDistances()

findParents

public static void findParents()

findUphillParents

public static void findUphillParents()
choose the uphill node that has the most neighbors in common to be the parent of each node.


showClustering

public static void showClustering()

showClustering

public static void showClustering(int oneAS)

showAncestries

public static void showAncestries()

sortNeighbors

public static void sortNeighbors()

printUniCounts

public static void printUniCounts()

incrCount

public static void incrCount(int from,
                             int to)

loadNamesFromOld

public static void loadNamesFromOld(java.lang.String filename)
fill in the names and longitudes of the ASTree from an old ASTree.txt file.


loadBBNodes

public static void loadBBNodes()

computeBBDist

public static void computeBBDist()

writeASTree

public static void writeASTree()