Giter Club home page Giter Club logo

yabgp's Introduction

简体中文

YABGP

Docker Version License Build Status Code Health Documentation Status Test Coverage Downloads

What is yabgp?

YABGP is a yet another Python implementation for BGP Protocol. It can be used to establish BGP connections with all kinds of routers (include real Cisco/HuaWei/Juniper routers and some router simulators like GNS3) and receive/parse BGP messages for future analysis.

Support sending BGP messages(route refresh/update) to the peer through RESTful API. YABGP can't send any BGP update messages by itself, it's just a agent, so there can be many agents and they can be controlled by a contoller.

We write it in strict accordance with the specifications of RFCs.

This software can be used on Linux/Unix, Mac OS and Windows systems.

Features

  • It can establish BGP session based on IPv4 address (TCP Layer) in active mode(as TCP client);
  • Support TCP MD5 authentication(IPv4 and does not support Windows now);
  • BGP capabilities support: 4 Bytes ASN, Route Refresh(Cisco Route Refresh), Add Path send/receive;
  • Address family support:
    • IPv4/IPv6 unicast
    • IPv4/IPv6 Labeled Unicast
    • IPv4 Flowspec(limited)
    • IPv4 SR Policy(draft-previdi-idr-segment-routing-te-policy-07)
    • IPv4/IPv6 MPLSVPN
    • EVPN (partially supported)
  • Decode all BGP messages to json format and write them into files in local disk(configurable);
  • Support basic RESTFUL API for getting running information and sending BGP messages.

Quick Start

We recommend run yabgp through python virtual-env from source code or pip install

Use yabgp from source code:

$ virtualenv yabgp-virl
$ source yabgp-virl/bin/activate
$ git clone https://github.com/smartbgp/yabgp
$ cd yabgp
$ pip install -r requirements.txt
$ cd bin
$ python yabgpd -h

Use pip install

$ virtualenv yabgp-virl
$ source yabgp-virl/bin/activate
$ pip install yabgp
$ which yabgpd
/home/yabgp/yabgp-virl/bin/yabgpd
$ yabgpd -h

For example:

$ yabgpd --bgp-local_addr=1.1.1.1 --bgp-local_as=65001 --bgp-remote_addr=1.1.1.2 --bgp-remote_as=65001 --bgp-afi_safi=ipv4

Use Docker container

$ docker run -it smartbgp/yabgp:latest --bgp-afi_safi=ipv4 --bgp-local_as=65022 --bgp-remote_addr=10.75.44.219 --bgp-remote_as=65022

More docker image tags, please reference https://hub.docker.com/r/smartbgp/yabgp/tags/

Documentation

More information please see the documentation http://yabgp.readthedocs.org

Related Projects

Routewatch brings automated alerting to YABGP. https://github.com/nerdalize/routewatch

A BGP update generator based on YaBGP https://github.com/trungdtbk/bgp-update-gen

Support

Please join our Slack for questions, discussion, suggestions, etc

Send email to [email protected], or use GitHub issue system.

Contribute

Please create Github Pull Request https://github.com/smartbgp/yabgp/pulls

More details please read HACKING.rst.

Thanks

For core files like fsm, protocol, we copy some of the code from https://github.com/wikimedia/PyBal/blob/master/pybal/bgp.py,

and message parsing, we reference from https://github.com/Exa-Networks/exabgp

yabgp's People

Contributors

abn avatar alainmoretti avatar chenailin11 avatar dependabot[bot] avatar gitter-badger avatar imcom avatar jumeng avatar lupzhu avatar meidli avatar primary-student avatar sanjmonkey avatar shinn1982 avatar xiaopeng163 avatar yuangezhizao avatar zlpqingmei avatar

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.