Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate local RC feeds (exabgp/hist) into ARTEMIS configuration primitives #254

Merged
merged 47 commits into from
Nov 4, 2019

Conversation

vkotronis
Copy link
Member

@vkotronis vkotronis commented Oct 14, 2019

Description of PR

What component(s) does this PR affect?

  • Back-End (Database, Microservices, Containers, etc)
  • Front-End (Flask, API, etc)
  • Docs
  • Build System

Configuration, Monitor, ExaBGP taps

Does the PR require changes on other components? If yes, please mark the components:

  • Back-End (Database, Microservices, Containers, etc)
  • Front-End (Flask, API, etc)
  • Docs
  • Build System

Related Issue

Resolves #253

Solution

Instruction to monitor (via configuration) to auto-update configuration based on local monitor feed.

Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Docs update
  • None of the above

Checklist:

  • I have read the contributing guide and my code conforms to the guidelines.
  • This change requires a change in the documentation.
  • I have updated the documentation accordingly.

Need to update https://github.com/FORTH-ICS-INSPIRE/artemis/wiki#receiving-bgp-feed-from-local-routerroute-reflectorbgp-monitor-via-exabgp and https://github.com/FORTH-ICS-INSPIRE/artemis/wiki/Configuration-file to let users know that they can use the autoconf flag for exabgp to auto-generate conf file entries. (after completion, testing and merging, ignore for now).

@vkotronis vkotronis changed the title step 1: instruct exabgp monitor to send updates also in autoconf exch… Translate local RC feeds (exabgp) into configuration primitives Oct 14, 2019
@vkotronis vkotronis changed the title Translate local RC feeds (exabgp) into configuration primitives [DRAFT] Translate local RC feeds (exabgp) into configuration primitives Oct 14, 2019
@vkotronis vkotronis changed the title [DRAFT] Translate local RC feeds (exabgp) into configuration primitives [DRAFT] Translate local RC feeds (exabgp) into ARTEMIS configuration primitives Oct 15, 2019
@slowr
Copy link
Member

slowr commented Oct 21, 2019

🏃 Benchmark Results 🏃

  • BGP Updates (updates/sec): 703
  • Hijacks Detected (hijacks/sec): 32

@vkotronis vkotronis force-pushed the exabgp-auto-conf branch 2 times, most recently from 9fc0f25 to a8ec7a5 Compare October 21, 2019 19:58
@vkotronis vkotronis changed the title [DRAFT] Translate local RC feeds (exabgp) into ARTEMIS configuration primitives [DRAFT] Translate local RC feeds (exabgp/hist) into ARTEMIS configuration primitives Oct 21, 2019
@vkotronis
Copy link
Member Author

vkotronis commented Oct 21, 2019

TODO:
[X] For already existing prefixes and asns, re-use them when learning (does not apply to original learn rule functionality)
[X] Make autoconf messaging RPC. The def handle_autoconf_updates(self, message):, should respond only after the conf is written to the file (and the next autoconf update can read it properly).
[X] Turn bgpstreamhist into a class (no global vars)
[X] Make sure that it works even when multiple autoconf streams at the same time (different sources) --> dealt with having single queue and consumer in configuration
[X] Handle withdrawals by removing the associated prefixes and rules (leave ASNs for reference)
[X] Test bgpstreamhist
[X] Test exabgp (GNS3)

.flake8 Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Nov 2, 2019

Codecov Report

Merging #254 into master will increase coverage by 1.04%.
The diff coverage is 82.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #254      +/-   ##
==========================================
+ Coverage   88.43%   89.48%   +1.04%     
==========================================
  Files           6        6              
  Lines        1652     1864     +212     
==========================================
+ Hits         1461     1668     +207     
- Misses        191      196       +5
Impacted Files Coverage Δ
backend/core/mitigation.py 96% <100%> (ø) ⬆️
backend/core/database.py 91.38% <100%> (+0.59%) ⬆️
backend/core/detection.py 95.19% <100%> (ø) ⬆️
backend/core/configuration.py 79.52% <81.89%> (+10.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd5babe...040aafd. Read the comment docs.

autoconf-tester/.coveragerc Outdated Show resolved Hide resolved
Copy link
Member

@slowr slowr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉 we can imporve the tester/autoconftester configuration afterwards

@slowr
Copy link
Member

slowr commented Nov 4, 2019

🏃 Benchmark Results 🏃

  • BGP Updates (updates/sec): 680
  • Hijacks Detected (hijacks/sec): 32

@slowr
Copy link
Member

slowr commented Nov 4, 2019

🏃 Benchmark Results 🏃

  • BGP Updates (updates/sec): 639
  • Hijacks Detected (hijacks/sec): 32

@slowr
Copy link
Member

slowr commented Nov 4, 2019

🏃 Benchmark Results 🏃

  • BGP Updates (updates/sec): 688
  • Hijacks Detected (hijacks/sec): 29

@slowr
Copy link
Member

slowr commented Nov 4, 2019

🏃 Benchmark Results 🏃

  • BGP Updates (updates/sec): 666
  • Hijacks Detected (hijacks/sec): 33

@slowr
Copy link
Member

slowr commented Nov 4, 2019

🏃 Benchmark Results 🏃

  • BGP Updates (updates/sec): 686
  • Hijacks Detected (hijacks/sec): 34

@vkotronis vkotronis merged commit 230e18e into master Nov 4, 2019
@vkotronis vkotronis deleted the exabgp-auto-conf branch November 4, 2019 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Env variable/configuration and functionality to translate exaBGP/hist feed from local RCs into configuration
2 participants