1
0
mirror of https://github.com/rtbrick/bngblaster.git synced 2024-05-06 15:54:57 +00:00
2022-11-02 17:52:51 +01:00

736 lines
35 KiB
HTML

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>API/CLI &mdash; BNG Blaster 0.8 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/tabs.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></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="Controller" href="../controller.html" />
<link rel="prev" title="Configuration" href="../configuration/index.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" />
<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"><a class="reference internal" href="../routing/index.html">Routing Protocols</a></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="../reports.html">Reports</a></li>
<li class="toctree-l1"><a class="reference internal" href="../configuration/index.html">Configuration</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">API/CLI</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#bng-blaster-cli">BNG Blaster CLI</a></li>
<li class="toctree-l2"><a class="reference internal" href="#interfaces">Interfaces</a></li>
<li class="toctree-l2"><a class="reference internal" href="#sessions">Sessions</a></li>
<li class="toctree-l2"><a class="reference internal" href="#ppp">PPP</a></li>
<li class="toctree-l2"><a class="reference internal" href="#l2tp">L2TP</a></li>
<li class="toctree-l2"><a class="reference internal" href="#igmp">IGMP</a></li>
<li class="toctree-l2"><a class="reference internal" href="#traffic">Traffic</a></li>
<li class="toctree-l2"><a class="reference internal" href="#streams">Streams</a></li>
<li class="toctree-l2"><a class="reference internal" href="#isis">ISIS</a></li>
<li class="toctree-l2"><a class="reference internal" href="#bgp">BGP</a></li>
<li class="toctree-l2"><a class="reference internal" href="#cfm">CFM</a></li>
<li class="toctree-l2"><a class="reference internal" href="#legal-interception-li">Legal Interception (LI)</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../controller.html">Controller</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="../reference/index.html">Reference</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"></a> &raquo;</li>
<li>API/CLI</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/api/index.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="api-cli">
<span id="api"></span><h1>API/CLI<a class="headerlink" href="#api-cli" title="Permalink to this headline"></a></h1>
<p>The control socket is an unix domain stream socket that
allows interacting with the BNG Blaster using JSON RPC.</p>
<p>We developed this interface for the BNG Blaster Controller
but it can be also used by other tools. One example is the
included CLI tool <code class="docutils literal notranslate"><span class="pre">bngblaster-cli</span></code>. You can use this for
interactive communication with the BNG Blaster.</p>
<p>You need to enable the control socket by providing the path to
the socket file with the argument <code class="docutils literal notranslate"><span class="pre">-S</span></code> (<code class="docutils literal notranslate"><span class="pre">bngblaster</span> <span class="pre">-S</span> <span class="pre">run.sock</span></code>).</p>
<p>Each request must contain at least the <code class="docutils literal notranslate"><span class="pre">command</span></code> element which carries
the actual command with optional arguments.</p>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;command&quot;</span><span class="p">:</span><span class="w"> </span><span class="nt">&quot;&lt;command&gt;&quot;</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;arguments&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;&lt;argument-key&gt;&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;&lt;argument-value&gt;&quot;</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
<p>Following an example RPC request with corresponding response.</p>
<p><code class="docutils literal notranslate"><span class="pre">$</span> <span class="pre">cat</span> <span class="pre">command.json</span> <span class="pre">|</span> <span class="pre">jq</span> <span class="pre">.</span></code></p>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;command&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;session-counters&quot;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">$</span> <span class="pre">cat</span> <span class="pre">command.json</span> <span class="pre">|</span> <span class="pre">sudo</span> <span class="pre">nc</span> <span class="pre">-U</span> <span class="pre">run.sock</span> <span class="pre">|</span> <span class="pre">jq</span> <span class="pre">.</span></code></p>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;status&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;ok&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">200</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;session-counters&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;sessions&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;sessions-established&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;sessions-flapped&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;dhcpv6-sessions-established&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
<p>The response contains at least the status element with the
value <code class="docutils literal notranslate"><span class="pre">ok</span></code> and status code <code class="docutils literal notranslate"><span class="pre">2xx</span></code> if request was successfully.
The status can be also set to <code class="docutils literal notranslate"><span class="pre">warning</span></code> or <code class="docutils literal notranslate"><span class="pre">error</span></code> with
corresponding error code and an optional error message.</p>
<p><code class="docutils literal notranslate"><span class="pre">$</span> <span class="pre">cat</span> <span class="pre">command.json</span> <span class="pre">|</span> <span class="pre">sudo</span> <span class="pre">nc</span> <span class="pre">-U</span> <span class="pre">test.socket</span> <span class="pre">|</span> <span class="pre">jq</span> <span class="pre">.</span></code></p>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;status&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;warning&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">404</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;session not found&quot;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
<p>The <code class="docutils literal notranslate"><span class="pre">session-id</span></code> is the same as used for <code class="docutils literal notranslate"><span class="pre">{session-global}</span></code> in the
configuration. This number starts with 1 and is increased
per session added. In example if username is configured as
<code class="docutils literal notranslate"><span class="pre">user{session-global}&#64;rtbrick.com</span></code> and logged in user is
<code class="docutils literal notranslate"><span class="pre">user10&#64;rtbrick.com</span></code> the <code class="docutils literal notranslate"><span class="pre">session-id</span></code> of this user is <code class="docutils literal notranslate"><span class="pre">10</span></code>.</p>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>The argument <code class="docutils literal notranslate"><span class="pre">session-id</span></code> can be alternatively replaced
with interface index and VLAN of the session. The interface
index (<code class="docutils literal notranslate"><span class="pre">ifindex</span></code>) can be requested using the <code class="docutils literal notranslate"><span class="pre">interfaces</span></code>
command or skipped. The first access interface is automatically
used if the argument <code class="docutils literal notranslate"><span class="pre">ifindex</span></code> is not present in the command.</p>
<p>This is not supported for N:1 sessions because multiple
sessions can be assigned to a single VLAN.</p>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;command&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;session-info&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;arguments&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;ifindex&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">10</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;outer-vlan&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;inner-vlan&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</div>
<section id="bng-blaster-cli">
<h2>BNG Blaster CLI<a class="headerlink" href="#bng-blaster-cli" title="Permalink to this headline"></a></h2>
<p>The python script <code class="docutils literal notranslate"><span class="pre">bngblaster-cli</span></code> provides a simple CLI tool
for interactive communication with the BNG Blaster.</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ sudo bngblaster-cli
BNG Blaster Control Socket Client
bngblaster-cli &lt;socket&gt; &lt;command&gt; [arguments]
Examples:
bngblaster-cli run.sock session-info session-id 1
bngblaster-cli run.sock igmp-join session-id 1 group 239.0.0.1 source1 1.1.1.1 source2 2.2.2.2 source3 3.3.3.3
bngblaster-cli run.sock igmp-info session-id 1
bngblaster-cli run.sock l2tp-csurq tunnel-id 1 sessions [1,2]
</pre></div>
</div>
<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">session-counters</span> <span class="pre">|</span> <span class="pre">jq</span> <span class="pre">.</span></code></p>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;status&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;ok&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;code&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">200</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;session-counters&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;sessions&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;sessions-established&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;sessions-flapped&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;dhcpv6-sessions-established&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</section>
<section id="interfaces">
<h2>Interfaces<a class="headerlink" href="#interfaces" title="Permalink to this headline"></a></h2>
<table class="docutils align-default">
<colgroup>
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Attribute</p></th>
<th class="head"><p>Description</p></th>
<th class="head"><p>Mandatory Arguments</p></th>
<th class="head"><p>Optional Arguments</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><cite>interfaces</cite></p></td>
<td><p>List all interfaces with index</p></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</section>
<section id="sessions">
<h2>Sessions<a class="headerlink" href="#sessions" title="Permalink to this headline"></a></h2>
<table class="docutils align-default">
<colgroup>
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Attribute</p></th>
<th class="head"><p>Description</p></th>
<th class="head"><p>Mandatory Arguments</p></th>
<th class="head"><p>Optional Arguments</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><cite>session-info</cite></p></td>
<td><p>Display session information</p></td>
<td></td>
<td><p><cite>session-id</cite></p></td>
</tr>
<tr class="row-odd"><td><p><cite>session-counters</cite></p></td>
<td><p>Display session counters</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-even"><td><p><cite>sessions-pending</cite></p></td>
<td><p>List all sessions not established</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><cite>session-traffic</cite></p></td>
<td><p>Display session traffic statistics</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-even"><td><p><cite>session-traffic-start</cite></p></td>
<td><p>Enable/start session traffic</p></td>
<td></td>
<td><p><cite>session-id</cite></p></td>
</tr>
<tr class="row-odd"><td><p><cite>session-traffic-stop</cite></p></td>
<td><p>Disable/stop session traffic</p></td>
<td></td>
<td><p><cite>session-id</cite></p></td>
</tr>
<tr class="row-even"><td><p><cite>session-streams</cite></p></td>
<td><p>Display session streams</p></td>
<td><p><cite>session-id</cite></p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><cite>terminate</cite></p></td>
<td><p>Terminate session</p></td>
<td></td>
<td><p><cite>session-id</cite>, <cite>reconnect-delay</cite></p></td>
</tr>
<tr class="row-even"><td><p><cite>session-start</cite></p></td>
<td><p>Start session manually</p></td>
<td><p><cite>session-id</cite></p></td>
<td></td>
</tr>
</tbody>
</table>
<p>The argument <code class="docutils literal notranslate"><span class="pre">reconnect-delay</span></code> is only applicable in combination with <code class="docutils literal notranslate"><span class="pre">session-id</span></code>
and reconnect enabled in configuration. This argument allows to delay the session
reconnect by the defined amount of seconds.</p>
</section>
<section id="ppp">
<h2>PPP<a class="headerlink" href="#ppp" title="Permalink to this headline"></a></h2>
<table class="docutils align-default">
<colgroup>
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Attribute</p></th>
<th class="head"><p>Description</p></th>
<th class="head"><p>Mandatory Arguments</p></th>
<th class="head"><p>Optional Arguments</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><cite>ipcp-open</cite></p></td>
<td><p>Open IPCP</p></td>
<td></td>
<td><p><cite>session-id</cite></p></td>
</tr>
<tr class="row-odd"><td><p><cite>ipcp-close</cite></p></td>
<td><p>Close IPCP</p></td>
<td></td>
<td><p><cite>session-id</cite></p></td>
</tr>
<tr class="row-even"><td><p><cite>ip6cp-open</cite></p></td>
<td><p>Open IP6CP</p></td>
<td></td>
<td><p><cite>session-id</cite></p></td>
</tr>
<tr class="row-odd"><td><p><cite>ip6cp-close</cite></p></td>
<td><p>Close IP6CP</p></td>
<td></td>
<td><p><cite>session-id</cite></p></td>
</tr>
</tbody>
</table>
</section>
<section id="l2tp">
<h2>L2TP<a class="headerlink" href="#l2tp" title="Permalink to this headline"></a></h2>
<table class="docutils align-default">
<colgroup>
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Attribute</p></th>
<th class="head"><p>Description</p></th>
<th class="head"><p>Mandatory Arguments</p></th>
<th class="head"><p>Optional Arguments</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><cite>l2tp-tunnels</cite></p></td>
<td><p>Display all L2TP tunnels</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><cite>l2tp-sessions</cite></p></td>
<td><p>L2TP all matching sessions</p></td>
<td></td>
<td><p><cite>tunnel-id</cite>, <cite>session-id</cite></p></td>
</tr>
<tr class="row-even"><td><p><cite>l2tp-csurq</cite></p></td>
<td><p>Send L2TP CSURQ</p></td>
<td><p><cite>tunnel-id</cite></p></td>
<td><p><cite>sessions</cite> (list of remote session-id)</p></td>
</tr>
<tr class="row-odd"><td><p><cite>l2tp-tunnel-terminate</cite></p></td>
<td><p>Terminate L2TP tunnel</p></td>
<td><p><cite>tunnel-id</cite></p></td>
<td><p><cite>result-code</cite>, <cite>error-code</cite>, <cite>error-message</cite></p></td>
</tr>
<tr class="row-even"><td><p><cite>l2tp-session-terminate</cite></p></td>
<td><p>Terminate L2TP session</p></td>
<td><p><cite>session-id</cite></p></td>
<td><p><cite>result-code</cite>, <cite>error-code</cite>, <cite>error-message</cite>, <cite>disconnect-code</cite>, <cite>disconnect-protocol</cite>, <cite>disconnect-direction</cite>, <cite>disconnect-message</cite></p></td>
</tr>
</tbody>
</table>
<p>The L2TP CSURQ command expects the local tunnel-id and a list of remote
session-id for which a connect speed update is requested.</p>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;command&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;l2tp-csurq&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;arguments&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;tunnel-id&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;sessions&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="mi">3</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="mi">4</span><span class="w"></span>
<span class="w"> </span><span class="p">]</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
<p>This command can be executed as shown below using the CLI tool.</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">l2tp-csurq</span> <span class="pre">tunnel-id</span> <span class="pre">1</span> <span class="pre">sessions</span> <span class="pre">[1,2,3,4]</span></code></p>
<p>The L2TP session terminate command allows to test result (RFC2661) and disconnect (RFC3145) codes.</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">l2tp-session-terminate</span> <span class="pre">session-id</span> <span class="pre">1</span> <span class="pre">result-code</span> <span class="pre">2</span> <span class="pre">error-message</span> <span class="pre">&quot;LCP</span> <span class="pre">request&quot;</span> <span class="pre">disconnect-code</span> <span class="pre">3</span> <span class="pre">disconnect-message</span> <span class="pre">&quot;LCP</span> <span class="pre">terminate</span> <span class="pre">request&quot;</span></code></p>
</section>
<section id="igmp">
<h2>IGMP<a class="headerlink" href="#igmp" title="Permalink to this headline"></a></h2>
<table class="docutils align-default">
<colgroup>
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Attribute</p></th>
<th class="head"><p>Description</p></th>
<th class="head"><p>Mandatory Arguments</p></th>
<th class="head"><p>Optional Arguments</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><cite>igmp-join</cite></p></td>
<td><p>Join group</p></td>
<td><p><cite>session-id</cite>, <cite>group</cite></p></td>
<td><p><cite>source1</cite>, <cite>source2</cite>, <cite>source3</cite></p></td>
</tr>
<tr class="row-odd"><td><p><cite>igmp-join-iter</cite></p></td>
<td><p>Join multiple groups over all sessions</p></td>
<td><p><cite>group</cite></p></td>
<td><p><cite>group-iter</cite>, <cite>group-count</cite>, <cite>source1</cite>, <cite>source2</cite>, <cite>source3</cite></p></td>
</tr>
<tr class="row-even"><td><p><cite>igmp-leave</cite></p></td>
<td><p>Leave group</p></td>
<td><p><cite>session-id</cite>, <cite>group</cite></p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><cite>igmp-leave-all</cite></p></td>
<td><p>Leave all groups from all sessions</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-even"><td><p><cite>igmp-info</cite></p></td>
<td><p>Display group information</p></td>
<td><p><cite>session-id</cite></p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><cite>zapping-start</cite></p></td>
<td><p>Start IGMP zapping test</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-even"><td><p><cite>zapping-stop</cite></p></td>
<td><p>Stop IGMP zapping test</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><cite>zapping-stats</cite></p></td>
<td><p>Return IGMP zapping stats</p></td>
<td></td>
<td><p><cite>reset</cite></p></td>
</tr>
</tbody>
</table>
</section>
<section id="traffic">
<h2>Traffic<a class="headerlink" href="#traffic" title="Permalink to this headline"></a></h2>
<table class="docutils align-default">
<colgroup>
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Attribute</p></th>
<th class="head"><p>Description</p></th>
<th class="head"><p>Mandatory Arguments</p></th>
<th class="head"><p>Optional Arguments</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><cite>traffic-start</cite></p></td>
<td><p>Start all traffic (session and streams)</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><cite>traffic-stop</cite></p></td>
<td><p>Stop all traffic (session and streams)</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-even"><td><p><cite>multicast-traffic-start</cite></p></td>
<td><p>Start multicast traffic</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><cite>multicast-traffic-stop</cite></p></td>
<td><p>Stop multicast traffic</p></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</section>
<section id="streams">
<h2>Streams<a class="headerlink" href="#streams" title="Permalink to this headline"></a></h2>
<table class="docutils align-default">
<colgroup>
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Attribute</p></th>
<th class="head"><p>Description</p></th>
<th class="head"><p>Mandatory Arguments</p></th>
<th class="head"><p>Optional Arguments</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><cite>stream-stats</cite></p></td>
<td><p>Display stream traffic statistics</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><cite>stream-info</cite></p></td>
<td><p>Display stream/flow information</p></td>
<td></td>
<td><p><cite>flow-id</cite></p></td>
</tr>
<tr class="row-even"><td><p><cite>stream-traffic-start</cite></p></td>
<td><p>Enable/start traffic streams</p></td>
<td></td>
<td><p><cite>session-id</cite></p></td>
</tr>
<tr class="row-odd"><td><p><cite>stream-traffic-stop</cite></p></td>
<td><p>Disable stop traffic streams</p></td>
<td></td>
<td><p><cite>session-id</cite></p></td>
</tr>
<tr class="row-even"><td><p><cite>stream-reset</cite></p></td>
<td><p>Reset all traffic streams</p></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</section>
<section id="isis">
<h2>ISIS<a class="headerlink" href="#isis" title="Permalink to this headline"></a></h2>
<table class="docutils align-default">
<colgroup>
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Attribute</p></th>
<th class="head"><p>Description</p></th>
<th class="head"><p>Mandatory Arguments</p></th>
<th class="head"><p>Optional Arguments</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><cite>isis-adjacencies</cite></p></td>
<td><p>Display ISIS adjacencies</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><cite>isis-database</cite></p></td>
<td><p>Display ISIS database (LSDB)</p></td>
<td><p><cite>instance</cite>, <cite>level</cite></p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><cite>isis-load-mrt</cite></p></td>
<td><p>Load ISIS MRT file</p></td>
<td><p><cite>instance</cite>, <cite>file</cite></p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><cite>isis-lsp-update</cite></p></td>
<td><p>Update ISIS LSP</p></td>
<td><p><cite>instance</cite>, <cite>pdu</cite></p></td>
<td></td>
</tr>
<tr class="row-even"><td><p><cite>isis-teardown</cite></p></td>
<td><p>Teardown ISIS</p></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</section>
<section id="bgp">
<h2>BGP<a class="headerlink" href="#bgp" title="Permalink to this headline"></a></h2>
<table class="docutils align-default">
<colgroup>
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Attribute</p></th>
<th class="head"><p>Description</p></th>
<th class="head"><p>Mandatory Arguments</p></th>
<th class="head"><p>Optional Arguments</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><cite>bgp-sessions</cite></p></td>
<td><p>Display all matching BGP sessions</p></td>
<td></td>
<td><p><cite>local-ipv4-address</cite>, <cite>peer-ipv4-address</cite></p></td>
</tr>
<tr class="row-odd"><td><p><cite>bgp-disconnect</cite></p></td>
<td><p>Disconnect all matching BGP sessions</p></td>
<td></td>
<td><p><cite>local-ipv4-address</cite>, <cite>peer-ipv4-address</cite></p></td>
</tr>
<tr class="row-even"><td><p><cite>bgp-teardown</cite></p></td>
<td><p>Teardown BGP</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-odd"><td><p><cite>bgp-raw-update-list</cite></p></td>
<td><p>List all loaded BGP RAW update files</p></td>
<td></td>
<td></td>
</tr>
<tr class="row-even"><td><p><cite>bgp-raw-update</cite></p></td>
<td><p>Update all matching BGP session</p></td>
<td><p><cite>file</cite></p></td>
<td><p><cite>local-ipv4-address</cite>, <cite>peer-ipv4-address</cite></p></td>
</tr>
</tbody>
</table>
</section>
<section id="cfm">
<h2>CFM<a class="headerlink" href="#cfm" title="Permalink to this headline"></a></h2>
<table class="docutils align-default">
<colgroup>
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Attribute</p></th>
<th class="head"><p>Description</p></th>
<th class="head"><p>Mandatory Arguments</p></th>
<th class="head"><p>Optional Arguments</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><cite>cfm-cc-start</cite></p></td>
<td><p>Start EOAM CFM CC</p></td>
<td></td>
<td><p><cite>session-id</cite></p></td>
</tr>
<tr class="row-odd"><td><p><cite>cfm-cc-stop</cite></p></td>
<td><p>Stop EOAM CFM CC</p></td>
<td></td>
<td><p><cite>session-id</cite></p></td>
</tr>
<tr class="row-even"><td><p><cite>cfm-cc-rdi-on</cite></p></td>
<td><p>Set EOAM CFM CC RDI</p></td>
<td></td>
<td><p><cite>session-id</cite></p></td>
</tr>
<tr class="row-odd"><td><p><cite>cfm-cc-rdi-off</cite></p></td>
<td><p>Unset EOAM CFM CC RDI</p></td>
<td></td>
<td><p><cite>session-id</cite></p></td>
</tr>
</tbody>
</table>
</section>
<section id="legal-interception-li">
<h2>Legal Interception (LI)<a class="headerlink" href="#legal-interception-li" title="Permalink to this headline"></a></h2>
<p>This is explained detailed in the
<a class="reference internal" href="../access/li.html#li"><span class="std std-ref">Legal Interception (LI)</span></a> section.</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
<col style="width: 25%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Attribute</p></th>
<th class="head"><p>Description</p></th>
<th class="head"><p>Mandatory Arguments</p></th>
<th class="head"><p>Optional Arguments</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><cite>li-flows</cite></p></td>
<td><p>List all LI flows with detailed statistics</p></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../configuration/index.html" class="btn btn-neutral float-left" title="Configuration" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="../controller.html" class="btn btn-neutral float-right" title="Controller" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2020-2022, 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>