mirror of
https://github.com/rtbrick/bngblaster.git
synced 2024-05-06 15:54:57 +00:00
473 lines
25 KiB
HTML
473 lines
25 KiB
HTML
<!DOCTYPE html>
|
||
<html class="writer-html5" lang="en" data-content_root="../">
|
||
<head>
|
||
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<title>BGP — BNG Blaster 0.8 documentation</title>
|
||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" />
|
||
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=19f00094" />
|
||
<link rel="stylesheet" type="text/css" href="../_static/tabs.css?v=a5c4661c" />
|
||
<link rel="stylesheet" type="text/css" href="../_static/custom.css?v=411f5019" />
|
||
|
||
|
||
<!--[if lt IE 9]>
|
||
<script src="../_static/js/html5shiv.min.js"></script>
|
||
<![endif]-->
|
||
|
||
<script src="../_static/jquery.js?v=5d32c60e"></script>
|
||
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
||
<script src="../_static/documentation_options.js?v=a0e24af7"></script>
|
||
<script src="../_static/doctools.js?v=888ff710"></script>
|
||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
|
||
<script src="../_static/js/theme.js"></script>
|
||
<link rel="index" title="Index" href="../genindex.html" />
|
||
<link rel="search" title="Search" href="../search.html" />
|
||
<link rel="next" title="LDP" href="ldp.html" />
|
||
<link rel="prev" title="MPLS" href="mpls.html" />
|
||
</head>
|
||
|
||
<body class="wy-body-for-nav">
|
||
<div class="wy-grid-for-nav">
|
||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||
<div class="wy-side-scroll">
|
||
<div class="wy-side-nav-search" >
|
||
|
||
|
||
|
||
<a href="../index.html" class="icon icon-home">
|
||
BNG Blaster
|
||
<img src="../_static/rtbrick_logo.png" class="logo" alt="Logo"/>
|
||
</a>
|
||
<div role="search">
|
||
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
||
<input type="hidden" name="check_keywords" value="yes" />
|
||
<input type="hidden" name="area" value="default" />
|
||
</form>
|
||
</div>
|
||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||
<ul class="current">
|
||
<li class="toctree-l1"><a class="reference internal" href="../install.html">Installation</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../quickstart.html">Quickstart Guide</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../interfaces.html">Interfaces</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../access/index.html">Access Protocols</a></li>
|
||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Routing Protocols</a><ul class="current">
|
||
<li class="toctree-l2"><a class="reference internal" href="isis.html">ISIS</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="ospf.html">OSPF</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="mpls.html">MPLS</a></li>
|
||
<li class="toctree-l2 current"><a class="current reference internal" href="#">BGP</a><ul>
|
||
<li class="toctree-l3"><a class="reference internal" href="#configuration">Configuration</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#bgp-sessions">BGP Sessions</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#limitations">Limitations</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#raw-update-files">RAW Update Files</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="#bgp-raw-update-generator">BGP RAW Update Generator</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l2"><a class="reference internal" href="ldp.html">LDP</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="lspgen.html">LSPGEN</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../streams.html">Traffic Streams</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../http.html">HTTP Emulation</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../nat.html">NAT / CGNAT</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../reports.html">Reports</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../configuration/index.html">Configuration</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../api/index.html">API/CLI</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../controller.html">Controller</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../performance.html">Performance Guide</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../troubleshooting.html">Troubleshooting</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="../faq.html">Frequently Asked Questions</a></li>
|
||
</ul>
|
||
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
|
||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
|
||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||
<a href="../index.html">BNG Blaster</a>
|
||
</nav>
|
||
|
||
<div class="wy-nav-content">
|
||
<div class="rst-content">
|
||
<div role="navigation" aria-label="Page navigation">
|
||
<ul class="wy-breadcrumbs">
|
||
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
|
||
<li class="breadcrumb-item"><a href="index.html">Routing Protocols</a></li>
|
||
<li class="breadcrumb-item active">BGP</li>
|
||
<li class="wy-breadcrumbs-aside">
|
||
<a href="../_sources/routing/bgp.rst.txt" rel="nofollow"> View page source</a>
|
||
</li>
|
||
</ul>
|
||
<hr/>
|
||
</div>
|
||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||
<div itemprop="articleBody">
|
||
|
||
<section id="bgp">
|
||
<span id="id1"></span><h1>BGP<a class="headerlink" href="#bgp" title="Link to this heading"></a></h1>
|
||
<p>The Border Gateway Protocol (BGP) is a standardized exterior gateway protocol
|
||
designed to exchange routing and reachability information among autonomous systems
|
||
(AS) on the internet. BGP is classified as a path-vector routing protocol, and it
|
||
makes routing decisions based on paths, network policies, or rule sets configured
|
||
by a network operator.</p>
|
||
<section id="configuration">
|
||
<h2>Configuration<a class="headerlink" href="#configuration" title="Link to this heading"></a></h2>
|
||
<p>Following is an example of a BGP configuration with one session.</p>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="w"> </span><span class="nt">"interfaces"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
|
||
<span class="w"> </span><span class="nt">"network"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
|
||
<span class="w"> </span><span class="p">{</span>
|
||
<span class="w"> </span><span class="nt">"interface"</span><span class="p">:</span><span class="w"> </span><span class="s2">"eth1"</span><span class="p">,</span>
|
||
<span class="w"> </span><span class="nt">"address"</span><span class="p">:</span><span class="w"> </span><span class="s2">"10.0.1.2/24"</span><span class="p">,</span>
|
||
<span class="w"> </span><span class="nt">"gateway"</span><span class="p">:</span><span class="w"> </span><span class="s2">"10.0.1.1"</span>
|
||
<span class="w"> </span><span class="p">}</span>
|
||
<span class="w"> </span><span class="p">]</span>
|
||
<span class="w"> </span><span class="p">},</span>
|
||
<span class="w"> </span><span class="nt">"bgp"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
|
||
<span class="w"> </span><span class="p">{</span>
|
||
<span class="w"> </span><span class="nt">"local-address"</span><span class="p">:</span><span class="w"> </span><span class="s2">"10.0.1.2"</span><span class="p">,</span>
|
||
<span class="w"> </span><span class="nt">"peer-address"</span><span class="p">:</span><span class="w"> </span><span class="s2">"10.0.1.1"</span><span class="p">,</span>
|
||
<span class="w"> </span><span class="nt">"raw-update-file"</span><span class="p">:</span><span class="w"> </span><span class="s2">"test.bgp"</span><span class="p">,</span>
|
||
<span class="w"> </span><span class="nt">"local-as"</span><span class="p">:</span><span class="w"> </span><span class="mi">65001</span><span class="p">,</span>
|
||
<span class="w"> </span><span class="nt">"peer-as"</span><span class="p">:</span><span class="w"> </span><span class="mi">65001</span><span class="p">,</span>
|
||
<span class="w"> </span><span class="nt">"family"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="s2">"ipv4-unicast"</span><span class="p">,</span><span class="w"> </span><span class="s2">"ipv6-unicast"</span><span class="w"> </span><span class="p">]</span>
|
||
<span class="w"> </span><span class="p">}</span>
|
||
<span class="w"> </span><span class="p">]</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"> </span><span class="nt">"bgp"</span><span class="p">:</span><span class="w"> </span><span class="p">{}</span><span class="w"> </span><span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
<table class="docutils align-default">
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>Attribute</p></th>
|
||
<th class="head"><p>Description</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p><strong>network-interface</strong></p></td>
|
||
<td><div class="line-block">
|
||
<div class="line">BGP local interface (source interface).</div>
|
||
<div class="line">Default: <cite>first network interface from configuration</cite></div>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p><strong>local-address</strong></p></td>
|
||
<td><div class="line-block">
|
||
<div class="line">BGP local IPv4/6 address (source address).</div>
|
||
<div class="line">Default: <cite>network interface address</cite></div>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"><td><p><strong>local-as</strong></p></td>
|
||
<td><div class="line-block">
|
||
<div class="line">BGP local AS.</div>
|
||
<div class="line">Default: 65000 Range: 0 - 4294967295</div>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p><strong>peer-address</strong></p></td>
|
||
<td><div class="line-block">
|
||
<div class="line">Mandatory BGP peer IPv4/6 address.</div>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"><td><p><strong>peer-as</strong></p></td>
|
||
<td><div class="line-block">
|
||
<div class="line">BGP peer AS.</div>
|
||
<div class="line">Default: <cite>local AS</cite> Range: 0 - 4294967295</div>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p><strong>hold-time</strong></p></td>
|
||
<td><div class="line-block">
|
||
<div class="line">BGP hold-time in seconds.</div>
|
||
<div class="line">Default: 90 Range: 0 - 65535</div>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"><td><p><strong>id</strong></p></td>
|
||
<td><div class="line-block">
|
||
<div class="line">BGP identifier.</div>
|
||
<div class="line">Default: 1.2.3.4</div>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p><strong>tos</strong></p></td>
|
||
<td><div class="line-block">
|
||
<div class="line">BGP IP TOS.</div>
|
||
<div class="line">Default: 0 Range: 0 - 255</div>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"><td><p><strong>ttl</strong></p></td>
|
||
<td><div class="line-block">
|
||
<div class="line">BGP IP TTL.</div>
|
||
<div class="line">Default: 255 Range: 0 - 255</div>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p><strong>reconnect</strong></p></td>
|
||
<td><div class="line-block">
|
||
<div class="line">Reconnect BGP session automatically.</div>
|
||
<div class="line">Default: true</div>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"><td><p><strong>start-traffic</strong></p></td>
|
||
<td><div class="line-block">
|
||
<div class="line">Start global traffic after RAW update finished.</div>
|
||
<div class="line">If enabled, the control command <strong>traffic-start</strong> is automatically</div>
|
||
<div class="line">executed as soon as the BGP RAW update has finished.</div>
|
||
<div class="line">Default: false</div>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p><strong>teardown-time</strong></p></td>
|
||
<td><div class="line-block">
|
||
<div class="line">BGP teardown time in seconds.</div>
|
||
<div class="line">Default: 5 Range: 0 - 65535</div>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"><td><p><strong>raw-update-file</strong></p></td>
|
||
<td><div class="line-block">
|
||
<div class="line">BGP RAW update file.</div>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p><strong>family</strong></p></td>
|
||
<td><div class="line-block">
|
||
<div class="line">BGP families to be send in open message.</div>
|
||
<div class="line">Default: ipv4/6-unicast, ipv4/6-labeled-unicast</div>
|
||
<div class="line">Values:</div>
|
||
<div class="line">ipv4-unicast, ipv6-unicast,</div>
|
||
<div class="line">ipv4-multicast, ipv6-multicast,</div>
|
||
<div class="line">ipv4-labeled-unicast, ipv6-labeled-unicast,</div>
|
||
<div class="line">ipv4-vpn-unicast, ipv6-vpn-unicast,</div>
|
||
<div class="line">ipv4-vpn-multicast, ipv6-vpn-multicast,</div>
|
||
<div class="line">ipv4-flow, ipv6-flow, evpn</div>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr class="row-even"><td><p><strong>extended-nexthop</strong></p></td>
|
||
<td><div class="line-block">
|
||
<div class="line">BGP extended-nexthop families to be send in open message.</div>
|
||
<div class="line">Default: None</div>
|
||
<div class="line">Values: ipv4-unicast, ipv4-vpn-unicast</div>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<section id="bgp-sessions">
|
||
<h2>BGP Sessions<a class="headerlink" href="#bgp-sessions" title="Link to this heading"></a></h2>
|
||
<p>BGP session are opened with the capabilities for the following
|
||
address families:</p>
|
||
<ul class="simple">
|
||
<li><p>IPv4 unicast</p></li>
|
||
<li><p>IPv4 labeled unicast</p></li>
|
||
<li><p>IPv6 unicast</p></li>
|
||
<li><p>IPv6 labeled unicast</p></li>
|
||
</ul>
|
||
<p>This can be changed using <cite>family</cite> configuration option.</p>
|
||
</section>
|
||
<section id="limitations">
|
||
<h2>Limitations<a class="headerlink" href="#limitations" title="Link to this heading"></a></h2>
|
||
<p>BGP authentication is currently not supported but already
|
||
planned as an enhancement in one of the next releases.</p>
|
||
</section>
|
||
<section id="raw-update-files">
|
||
<h2>RAW Update Files<a class="headerlink" href="#raw-update-files" title="Link to this heading"></a></h2>
|
||
<p>The BNG Blaster can inject BGP messages from a pre-compiled
|
||
RAW update file into the defined sessions. A RAW update file is not
|
||
more than a pre-compiled binary stream of BGP messages, typically
|
||
but not limited to update messages.</p>
|
||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span> 0 1 2 3
|
||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||
| |
|
||
+ +
|
||
| |
|
||
+ +
|
||
| Marker |
|
||
+ +
|
||
| |
|
||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||
| Length | Type | ...
|
||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++++
|
||
.
|
||
.
|
||
.
|
||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||
| |
|
||
+ +
|
||
| |
|
||
+ +
|
||
| Marker |
|
||
+ +
|
||
| |
|
||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||
| Length | Type | ...
|
||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++++
|
||
</pre></div>
|
||
</div>
|
||
<p>Those files can be created using the included BGP RAW update generator
|
||
script <code class="docutils literal notranslate"><span class="pre">bgpupdate</span></code> or manually using libraries like scapy or converters
|
||
from PCAP or MRT files.</p>
|
||
<p>The configured <code class="docutils literal notranslate"><span class="pre">raw-update-file</span></code> under the BGP session is loaded
|
||
during BNG Blaster startup phase and send it as soon as the session is
|
||
established.</p>
|
||
<p>The <code class="docutils literal notranslate"><span class="pre">bgp-raw-update</span></code> <a class="reference internal" href="../api/index.html#api"><span class="std std-ref">command</span></a> allows to send further updates during
|
||
the session lifetime.</p>
|
||
<p><code class="docutils literal notranslate"><span class="pre">$</span> <span class="pre">sudo</span> <span class="pre">bngblaster-cli</span> <span class="pre">run.sock</span> <span class="pre">bgp-raw-update</span> <span class="pre">file</span> <span class="pre">update1.bgp</span></code></p>
|
||
<p>This allows loading a full table after the BGP session has
|
||
started and manually trigger a series of changes using incremental
|
||
updates files.</p>
|
||
<p>All BGP RAW update files are loaded once and can then be used for
|
||
multiple sessions. Meaning if two or more sessions reference the
|
||
same file identified by file name, this file is loaded once into
|
||
memory and used by multiple sessions.</p>
|
||
<p>Therefore for incremental updates, it may make sense to pre-load
|
||
via <code class="docutils literal notranslate"><span class="pre">bgp-raw-update-files</span></code> configuration.</p>
|
||
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
|
||
<span class="w"> </span><span class="nt">"bgp"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
|
||
<span class="w"> </span><span class="p">{</span>
|
||
<span class="w"> </span><span class="nt">"local-address"</span><span class="p">:</span><span class="w"> </span><span class="s2">"10.0.1.2"</span><span class="p">,</span>
|
||
<span class="w"> </span><span class="nt">"peer-address"</span><span class="p">:</span><span class="w"> </span><span class="s2">"10.0.1.1"</span><span class="p">,</span>
|
||
<span class="w"> </span><span class="nt">"raw-update-file"</span><span class="p">:</span><span class="w"> </span><span class="s2">"start.bgp"</span><span class="p">,</span>
|
||
<span class="w"> </span><span class="nt">"local-as"</span><span class="p">:</span><span class="w"> </span><span class="mi">65001</span><span class="p">,</span>
|
||
<span class="w"> </span><span class="nt">"peer-as"</span><span class="p">:</span><span class="w"> </span><span class="mi">65001</span>
|
||
<span class="w"> </span><span class="p">}</span>
|
||
<span class="w"> </span><span class="p">],</span>
|
||
<span class="w"> </span><span class="nt">"bgp-raw-update-files"</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
|
||
<span class="w"> </span><span class="s2">"update1.bgp"</span><span class="p">,</span>
|
||
<span class="w"> </span><span class="s2">"update2.bgp"</span>
|
||
<span class="w"> </span><span class="p">]</span>
|
||
<span class="p">}</span>
|
||
</pre></div>
|
||
</div>
|
||
<p>Incremental updates not listed here will be loaded dynamically as soon
|
||
as referenced by the first session.</p>
|
||
</section>
|
||
<section id="bgp-raw-update-generator">
|
||
<h2>BGP RAW Update Generator<a class="headerlink" href="#bgp-raw-update-generator" title="Link to this heading"></a></h2>
|
||
<p>The BGP RAW update generator is a simple tool to generate BGP RAW update
|
||
streams for use with the BNG Blaster.</p>
|
||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ bgpupdate --help
|
||
usage: bgpupdate [-h] [-a ASN] -n ADDRESS [-N N] -p PREFIX [-P N] [-m LABEL]
|
||
[-M N] [-l LOCAL_PREF] [-f FILE] [-w] [-s STREAMS]
|
||
[--stream-tx-label LABEL] [--stream-tx-inner-label LABEL]
|
||
[--stream-rx-label LABEL] [--stream-rx-label-num N]
|
||
[--stream-threads N] [--stream-pps N]
|
||
[--stream-interface IFACE] [--stream-append] [--end-of-rib]
|
||
[--append] [--pcap FILE] [--log-level {warning,info,debug}]
|
||
|
||
The BGP RAW update generator is a simple tool to generate BGP RAW update
|
||
streams for use with the BNG Blaster.
|
||
|
||
optional arguments:
|
||
-h, --help show this help message and exit
|
||
-a ASN, --asn ASN autonomous system number
|
||
-n ADDRESS, --next-hop-base ADDRESS
|
||
next-hop base address (IPv4 or IPv6)
|
||
-N N, --next-hop-num N
|
||
next-hop count
|
||
-p PREFIX, --prefix-base PREFIX
|
||
prefix base network (IPv4 or IPv6)
|
||
-P N, --prefix-num N prefix count
|
||
-m LABEL, --label-base LABEL
|
||
label base
|
||
-M N, --label-num N label count
|
||
-l LOCAL_PREF, --local-pref LOCAL_PREF
|
||
local preference
|
||
-f FILE, --file FILE output file
|
||
-w, --withdraw withdraw prefixes
|
||
-s STREAMS, --streams STREAMS
|
||
generate BNG Blaster traffic stream file
|
||
--stream-tx-label LABEL
|
||
stream TX outer label
|
||
--stream-tx-inner-label LABEL
|
||
stream TX inner label
|
||
--stream-rx-label LABEL
|
||
stream RX label
|
||
--stream-rx-label-num N
|
||
stream RX label count
|
||
--stream-threads N stream TX threads
|
||
--stream-pps N stream packets per seconds
|
||
--stream-interface IFACE
|
||
stream interface
|
||
--stream-append append to stream file if exist
|
||
--end-of-rib add end-of-rib message
|
||
--append append to file if exist
|
||
--pcap FILE write BGP updates to PCAP file
|
||
--log-level {warning,info,debug}
|
||
logging Level
|
||
</pre></div>
|
||
</div>
|
||
<p>The python BGP RAW update generator is a python script that uses
|
||
scapy to build BGP messages. Therefore this tool can be easily
|
||
modified, extend or used as a blueprint for your own tools to generate
|
||
valid BGP update streams.</p>
|
||
<p>The following example shows how to generate a BGP update stream
|
||
with IPv4 and labeled IPv6 prefixes (6PE).</p>
|
||
<ul class="simple">
|
||
<li><p>100000 x IPv4 prefixes over 1000 next-hops</p></li>
|
||
<li><p>50000 x IPv6 prefixes over 1000 next-hops with 1000 different labels (label per next-hop)</p></li>
|
||
<li><p>50000 x IPv6 prefixes over 1000 next-hops with label 2</p></li>
|
||
</ul>
|
||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>bgpupdate -f test.bgp -a 65001 -l 100 -n 10.0.0.1 -N 1000 -p 10.1.0.0/24 -P 100000
|
||
bgpupdate -f test.bgp -a 65001 -l 100 -n 10.0.0.1 -N 1000 -m 20001 -M 1000 -p fc66:1::/48 -P 50000 --append
|
||
bgpupdate -f test.bgp -a 65001 -l 100 -n 10.0.0.1 -N 1000 -m 2 -p fc66:2::/48 -P 50000 --append --end-of-rib
|
||
</pre></div>
|
||
</div>
|
||
<p>Per default, the file is replaced but the option <cite>–append</cite> allows it to append to an existing file.
|
||
The last update to a file should include the option <cite>–end-of-rib</cite> (optional).</p>
|
||
<p>The option <cite>–streams <file></cite> (<cite>-s</cite>) automatically generates corresponding traffic streams
|
||
for all prefixes. Per default, this file is replaced but the option <cite>–stream-append</cite> allows
|
||
appending to an existing file.</p>
|
||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>bgpupdate -f test.bgp -a 65001 -l 100 -n 10.0.0.1 -N 1000 -p 10.1.0.0/24 -P 100000 -s streams.json
|
||
bgpupdate -f test.bgp -a 65001 -l 100 -n 10.0.0.1 -N 1000 -m 20001 -M 1000 -p fc66:1::/48 -P 50000 --append -s streams.json --stream-append
|
||
bgpupdate -f test.bgp -a 65001 -l 100 -n 10.0.0.1 -N 1000 -m 2 -p fc66:2::/48 -P 50000 --append --end-of-rib -s streams.json --stream-append
|
||
</pre></div>
|
||
</div>
|
||
<p>There are several options supported to further define the traffic streams like PPS and expected RX labels.</p>
|
||
</section>
|
||
</section>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
||
<a href="mpls.html" class="btn btn-neutral float-left" title="MPLS" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||
<a href="ldp.html" class="btn btn-neutral float-right" title="LDP" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<div role="contentinfo">
|
||
<p>© Copyright 2020-2024, RtBrick, Inc..</p>
|
||
</div>
|
||
|
||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||
|
||
|
||
</footer>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
<script>
|
||
jQuery(function () {
|
||
SphinxRtdTheme.Navigation.enable(true);
|
||
});
|
||
</script>
|
||
|
||
</body>
|
||
</html> |