Files

473 lines
25 KiB
HTML
Raw Permalink Normal View History

2022-04-01 12:16:46 +02:00
<!DOCTYPE html>
2024-03-25 22:01:36 +00:00
<html class="writer-html5" lang="en" data-content_root="../">
2022-04-01 12:16:46 +02:00
<head>
2024-03-25 22:01:36 +00:00
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
2022-04-01 12:16:46 +02:00
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
2022-10-31 23:26:32 +00:00
<title>BGP &mdash; BNG Blaster 0.8 documentation</title>
2024-03-25 22:01:36 +00:00
<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]-->
2022-04-01 12:16:46 +02:00
2024-03-25 22:01:36 +00:00
<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>
2022-04-01 12:16:46 +02:00
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
2023-01-13 16:02:11 +00:00
<link rel="next" title="LDP" href="ldp.html" />
<link rel="prev" title="MPLS" href="mpls.html" />
2022-04-01 12:16:46 +02:00
</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" >
2024-03-25 22:01:36 +00:00
<a href="../index.html" class="icon icon-home">
BNG Blaster
<img src="../_static/rtbrick_logo.png" class="logo" alt="Logo"/>
2022-04-01 12:16:46 +02:00
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
2024-03-25 22:01:36 +00:00
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
2022-04-01 12:16:46 +02:00
<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>
2023-09-04 14:55:57 +00:00
<li class="toctree-l2"><a class="reference internal" href="ospf.html">OSPF</a></li>
2023-01-13 16:02:11 +00:00
<li class="toctree-l2"><a class="reference internal" href="mpls.html">MPLS</a></li>
2022-04-01 12:16:46 +02:00
<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>
2023-01-13 16:02:11 +00:00
<li class="toctree-l2"><a class="reference internal" href="ldp.html">LDP</a></li>
2023-09-04 14:55:57 +00:00
<li class="toctree-l2"><a class="reference internal" href="lspgen.html">LSPGEN</a></li>
2022-04-01 12:16:46 +02:00
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../streams.html">Traffic Streams</a></li>
2023-06-30 11:07:35 +00:00
<li class="toctree-l1"><a class="reference internal" href="../http.html">HTTP Emulation</a></li>
2023-11-03 08:56:38 +00:00
<li class="toctree-l1"><a class="reference internal" href="../nat.html">NAT / CGNAT</a></li>
2022-04-01 12:16:46 +02:00
<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>
2022-05-02 17:40:37 +02:00
<li class="toctree-l1"><a class="reference internal" href="../controller.html">Controller</a></li>
2023-02-15 21:24:51 +00:00
<li class="toctree-l1"><a class="reference internal" href="../performance.html">Performance Guide</a></li>
2022-04-01 12:16:46 +02:00
<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">
2024-03-25 22:01:36 +00:00
<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>
2022-04-01 12:16:46 +02:00
<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">
2024-03-25 22:01:36 +00:00
<span id="id1"></span><h1>BGP<a class="headerlink" href="#bgp" title="Link to this heading"></a></h1>
2022-04-01 12:16:46 +02:00
<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
2022-10-31 23:26:32 +00:00
makes routing decisions based on paths, network policies, or rule sets configured
2022-04-01 12:16:46 +02:00
by a network operator.</p>
<section id="configuration">
2024-03-25 22:01:36 +00:00
<h2>Configuration<a class="headerlink" href="#configuration" title="Link to this heading"></a></h2>
2022-10-31 23:26:32 +00:00
<p>Following is an example of a BGP configuration with one session.</p>
2024-03-25 22:01:36 +00:00
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;interfaces&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;network&quot;</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">&quot;interface&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;eth1&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;address&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;10.0.1.2/24&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;gateway&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;10.0.1.1&quot;</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">&quot;bgp&quot;</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">&quot;local-address&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;10.0.1.2&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;peer-address&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;10.0.1.1&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;raw-update-file&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;test.bgp&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;local-as&quot;</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">&quot;peer-as&quot;</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">&quot;family&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w"> </span><span class="s2">&quot;ipv4-unicast&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;ipv6-unicast&quot;</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>
2022-04-01 12:16:46 +02:00
</pre></div>
</div>
2024-03-25 22:01:36 +00:00
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"> </span><span class="nt">&quot;bgp&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{}</span><span class="w"> </span><span class="p">}</span>
2022-04-01 12:16:46 +02:00
</pre></div>
</div>
2023-11-03 08:56:38 +00:00
<table class="docutils align-default">
2022-04-01 12:16:46 +02:00
<thead>
<tr class="row-odd"><th class="head"><p>Attribute</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
2023-11-03 08:56:38 +00:00
<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>
2022-04-01 12:16:46 +02:00
</tr>
2023-12-21 12:10:42 +00:00
<tr class="row-odd"><td><p><strong>local-address</strong></p></td>
2023-11-03 08:56:38 +00:00
<td><div class="line-block">
2023-12-21 12:10:42 +00:00
<div class="line">BGP local IPv4/6 address (source address).</div>
2023-11-03 08:56:38 +00:00
<div class="line">Default: <cite>network interface address</cite></div>
</div>
</td>
2022-04-01 12:16:46 +02:00
</tr>
2023-11-03 08:56:38 +00:00
<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>
2022-04-01 12:16:46 +02:00
</tr>
2023-12-21 12:10:42 +00:00
<tr class="row-odd"><td><p><strong>peer-address</strong></p></td>
2023-11-03 08:56:38 +00:00
<td><div class="line-block">
2023-12-21 12:10:42 +00:00
<div class="line">Mandatory BGP peer IPv4/6 address.</div>
2023-11-03 08:56:38 +00:00
</div>
</td>
2022-04-01 12:16:46 +02:00
</tr>
2023-11-03 08:56:38 +00:00
<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>
2022-04-01 12:16:46 +02:00
</tr>
2023-11-03 08:56:38 +00:00
<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>
2022-04-01 12:16:46 +02:00
</tr>
2023-11-03 08:56:38 +00:00
<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>
2022-04-01 12:16:46 +02:00
</tr>
2023-11-03 08:56:38 +00:00
<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>
2022-04-01 12:16:46 +02:00
</tr>
2023-11-03 08:56:38 +00:00
<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>
2022-04-01 12:16:46 +02:00
</tr>
2023-11-03 08:56:38 +00:00
<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>
2022-04-01 12:16:46 +02:00
</tr>
2023-11-03 08:56:38 +00:00
<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>
2022-04-01 12:16:46 +02:00
</tr>
2023-12-21 12:10:42 +00:00
<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>
2022-04-01 12:16:46 +02:00
</tbody>
</table>
</section>
<section id="bgp-sessions">
2024-03-25 22:01:36 +00:00
<h2>BGP Sessions<a class="headerlink" href="#bgp-sessions" title="Link to this heading"></a></h2>
2023-12-21 12:35:08 +00:00
<p>BGP session are opened with the capabilities for the following
2022-04-01 12:16:46 +02:00
address families:</p>
<ul class="simple">
<li><p>IPv4 unicast</p></li>
2022-10-31 23:26:32 +00:00
<li><p>IPv4 labeled unicast</p></li>
2022-04-01 12:16:46 +02:00
<li><p>IPv6 unicast</p></li>
2022-10-31 23:26:32 +00:00
<li><p>IPv6 labeled unicast</p></li>
2022-04-01 12:16:46 +02:00
</ul>
2023-12-21 12:35:08 +00:00
<p>This can be changed using <cite>family</cite> configuration option.</p>
2022-04-01 12:16:46 +02:00
</section>
<section id="limitations">
2024-03-25 22:01:36 +00:00
<h2>Limitations<a class="headerlink" href="#limitations" title="Link to this heading"></a></h2>
2022-04-01 12:16:46 +02:00
<p>BGP authentication is currently not supported but already
2022-10-31 23:26:32 +00:00
planned as an enhancement in one of the next releases.</p>
2022-04-01 12:16:46 +02:00
</section>
<section id="raw-update-files">
2024-03-25 22:01:36 +00:00
<h2>RAW Update Files<a class="headerlink" href="#raw-update-files" title="Link to this heading"></a></h2>
2022-10-31 23:26:32 +00:00
<p>The BNG Blaster can inject BGP messages from a pre-compiled
2022-04-01 12:16:46 +02:00
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>
2023-01-13 16:02:11 +00:00
<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
2022-04-01 12:16:46 +02:00
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ +
| |
+ +
| 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
2022-10-31 23:26:32 +00:00
during BNG Blaster startup phase and send it as soon as the session is
2022-04-01 12:16:46 +02:00
established.</p>
2022-04-01 16:40:47 +02:00
<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
2022-04-01 12:16:46 +02:00
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>
2022-10-31 23:26:32 +00:00
<p>This allows loading a full table after the BGP session has
2022-04-01 12:16:46 +02:00
started and manually trigger a series of changes using incremental
updates files.</p>
2022-10-31 23:26:32 +00:00
<p>All BGP RAW update files are loaded once and can then be used for
2022-04-01 12:16:46 +02:00
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>
2022-10-31 23:26:32 +00:00
<p>Therefore for incremental updates, it may make sense to pre-load
2022-04-01 12:16:46 +02:00
via <code class="docutils literal notranslate"><span class="pre">bgp-raw-update-files</span></code> configuration.</p>
2024-03-25 22:01:36 +00:00
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;bgp&quot;</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">&quot;local-address&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;10.0.1.2&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;peer-address&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;10.0.1.1&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;raw-update-file&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;start.bgp&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;local-as&quot;</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">&quot;peer-as&quot;</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">&quot;bgp-raw-update-files&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<span class="w"> </span><span class="s2">&quot;update1.bgp&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s2">&quot;update2.bgp&quot;</span>
<span class="w"> </span><span class="p">]</span>
<span class="p">}</span>
2022-04-01 12:16:46 +02:00
</pre></div>
</div>
<p>Incremental updates not listed here will be loaded dynamically as soon
2022-10-31 23:26:32 +00:00
as referenced by the first session.</p>
2022-04-01 12:16:46 +02:00
</section>
<section id="bgp-raw-update-generator">
2024-03-25 22:01:36 +00:00
<h2>BGP RAW Update Generator<a class="headerlink" href="#bgp-raw-update-generator" title="Link to this heading"></a></h2>
2022-04-01 12:16:46 +02:00
<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>
2022-10-31 23:26:32 +00:00
<p>The python BGP RAW update generator is a python script that uses
2022-04-01 12:16:46 +02:00
scapy to build BGP messages. Therefore this tool can be easily
2022-10-31 23:26:32 +00:00
modified, extend or used as a blueprint for your own tools to generate
2022-04-01 12:16:46 +02:00
valid BGP update streams.</p>
2022-05-09 11:07:29 +00:00
<p>The following example shows how to generate a BGP update stream
2022-10-31 23:26:32 +00:00
with IPv4 and labeled IPv6 prefixes (6PE).</p>
2022-05-09 11:07:29 +00:00
<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>
2023-11-24 18:05:05 +00:00
<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
2022-05-09 11:07:29 +00:00
</pre></div>
</div>
2022-10-31 23:26:32 +00:00
<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>
2022-05-09 11:07:29 +00:00
<p>The option <cite>streams &lt;file&gt;</cite> (<cite>-s</cite>) automatically generates corresponding traffic streams
2022-10-31 23:26:32 +00:00
for all prefixes. Per default, this file is replaced but the option <cite>stream-append</cite> allows
appending to an existing file.</p>
2023-11-24 18:05:05 +00:00
<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
2022-05-09 11:07:29 +00:00
</pre></div>
</div>
<p>There are several options supported to further define the traffic streams like PPS and expected RX labels.</p>
2022-04-01 12:16:46 +02:00
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
2023-01-13 16:02:11 +00:00
<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>
2022-04-01 12:16:46 +02:00
</div>
<hr/>
<div role="contentinfo">
2024-02-23 20:14:00 +00:00
<p>&#169; Copyright 2020-2024, RtBrick, Inc..</p>
2022-04-01 12:16:46 +02:00
</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>