Coder Social home page Coder Social logo

vgiotsas / communitiesparser Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 2.0 1.76 MB

CommunityWatch is an open-source system that enables the detection of BGP anomalies and routing events by monitoring changes in the BGP Communities

Java 100.00%
bgp monitoring networking java-10 ixp

communitiesparser's Introduction

BGPCommunityWatch

BGPCommunityWatch can be used for the analysis of historical or real-time BGP data to detect routing events based on changes on the values of the BGP Commuinities attribute.

Usage:

java BGPCommunitiesMon.jar [options...] arguments...
 --collectors VAL  : Comma-separated list of BGP Collectors. (default: all)
 --communities VAL : Comma-separated list of 32-bit BGP Community values.
 --outdir VAL      : Path to the output directory. (default: .)
 --period VAL      : Time period for which BGP data will be collected.
                     Format: YYYYMMDD.hhmm,YYYYMMDD.hhmm
 --facilities VAL  : Comma-separated list of facility names to restrict the
                     scope of the analyzed AS links. (default: all)

  Example: java BGPCommunityWatch.jar --collectors rrc00 --communities 2914:1201 --outdir path/to/dir/ --period 20180407.0000,20180410.0001

How to set up

Required software

BGPCommunityWatch uses BGPReader v2.0 to obtain a stream of BGP data, therefore you need to install BGPStream.

Required input datasets

The parsing of the BGP paths requires the following CAIDA datasets as input:

  • AS relationships. Both serial-1 and serial-2 can be used, but serial-2 is more complete and therefore preferred.
  • IXPs Dataset, in particular the ixs.jsonl and ix-asns.jsonl files.

Sample files are included already in the data/ directory of this repository, but you should update them depending on the measurement period of your choice.

Configuration

Once you install BGPstream and download the required datasets, edit the resources/config.properties file to define the following properties:

  • bgpreader_bin: Filepath to the BGPReader binary
  • relationships_file: Filepath to the bzip'd AS relationships file
  • ix_dataset: Filepath to the ixs.jsonl file
  • ix_asn_dataset: Filepath to the ix-asns_201802.jsonl
  • pdb_netfac_url: The URL to the endpoint of the PeeringDB API that returns the AS-to-Facility memberships.
  • pdb_rsasn_url: The URL to the endpoint of the PeeringDB API that returns the ASNs of type Route Server.
  • euroix_url: The URL to the Euro-IX IXP Service Matrix. Note: At the moment the Euro-IX service matrix is not publicly available, so this property is more of a future placeholder.
  • stability_hours: The number of consecutive hours during which BGPCommunityWatch should not observe any change in the path between a given (BGP peer IP, prefix) pair, in order to consider the path 'stable'.

The default values in the resources/config.properties should work out-of-the-box, if you cloned this repository and didn't change the default BGPStream configuration.

Compile and Run

To compile the code you need to download three external libraries:

After you download the jar files, go to the src/main/java directory and compile the code specifying the classpath to the download jars:

javac -cp .:/<download_path>/args4j-2.33.jar:/<download_path>/json-simple-1.1.1.jar:/<download_path>/commons-compress-1.16.1.jar vgiotsas/Main.java

You can then execute the compiled code, including again the classpath to the jar files:

java -cp .:/<download_path>/args4j-2.33.jar:/<download_path>/json-simple-1.1.1.jar:/<download_path>/commons-compress-1.16.1.jar vgiotsas/Main --outdir output --collectors rrc00 --communities 2914:1201 --period 20180407.0000,20180410.0000 --facilities "Interxion Frankfurt (FRA1-12)"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.