Difference between revisions of "ONE/Command-line Interface CLI Guide"

From fd.io
< ONE
Jump to: navigation, search
Line 4: Line 4:
 
== Introduction ==
 
== Introduction ==
 
The vpp contain a set of commands to set and debug LISP.
 
The vpp contain a set of commands to set and debug LISP.
One way to access the CLI (with proper permissions) is to use the <tt>vpp_api_test</tt> command or use telnet CLI:
+
One way to access the CLI (with proper permissions) is use telnet CLI:
 
+
<pre>
+
sudo vpp_api_test
+
</pre>
+
 
+
  
 
== Telnet LISP CLI ==
 
== Telnet LISP CLI ==
  
=== Lisp GPE enable ===
+
=== Lisp enable ===
To enable lisp, use "lisp gpe":
+
To enable lisp, use "lisp":
 
<pre>
 
<pre>
vpp# lisp gpe enable
+
vpp# lisp enable
 
</pre>
 
</pre>
  
 
To disable lisp
 
To disable lisp
 
<pre>
 
<pre>
vpp# lisp gpe disable
+
vpp# lisp disable
 
</pre>
 
</pre>
  
Line 70: Line 65:
 
<pre>
 
<pre>
 
vpp# lisp map-resolver del 6.0.3.100
 
vpp# lisp map-resolver del 6.0.3.100
</pre>
 
 
== LISP VAT commands ==
 
 
=== Lisp GPE enable ===
 
To enable lisp, use "lisp_gpe_enable_disable":
 
<pre>
 
vat# lisp_gpe_enable_disable enable
 
</pre>
 
 
To disable lisp.
 
<pre>
 
vat# lisp_gpe_enable_disable disable
 
</pre>
 
 
To display lisp status
 
<pre>
 
vat# lisp_gpe_enable_disable_status_dump
 
    lisp gpe
 
    enable
 
</pre>
 
 
=== Locator_set ===
 
To add new locator_set, use "lisp_add_del_locator_set". This command also "reset" exist locator_set in vpp:
 
<pre>
 
vat# lisp_add_del_locator_set locator-set ls1
 
</pre>
 
 
To delete a specific locator_set, use "lisp_add_del_locator_set locator-set <name> del":
 
<pre>
 
vat# lisp_add_del_locator_set locator-set ls1 del
 
</pre>
 
When delete locator_set, then also delete all locator which are assigned to locator_set
 
 
To add new locator to locator_set, use "lisp_add_del_locator":
 
<pre>
 
vat# lisp_add_del_locator locator-set  ls1 iface GigabitEthernet0/a/0 p 1 w 2
 
</pre>
 
Where <tt>p</tt> is <tt>priority</tt> and <tt>w</tt> is <tt>weight</tt>.
 
 
Locator API also support sw_if_index instead of interface name:
 
<pre>
 
lisp_add_del_locator locator-set  ls1 sw_if_index 6 p 1 w 2
 
</pre>
 
 
To delete specific locator, use "lisp_add_del_locator locator-set  <name> iface <interface> p <priority> w <weight> del"
 
<pre>
 
vat# lisp_add_del_locator locator-set  ls1 iface GigabitEthernet0/a/0 p 1 w 2 del
 
</pre>
 
 
To display locator_set and locator:
 
<pre>
 
vat# lisp_locator_set_dump                                                                                                                                                                                                                                                                 
 
    Locator-set        Locator        Priority        Weight                                                                                                                                                                                                                             
 
        ls1                6              1              2
 
</pre>
 
 
=== Eid ===
 
To add new Eid address, use "lisp_add_del_local_eid"
 
<pre>
 
vat# lisp_add_del_local_eid eid 6:0:1::0/64 locator-set ls1
 
</pre>
 
There must exist locator_set, before add new eid address.
 
 
To delete specific eid address, use "isp_add_del_local_eid eid <address>/<prefix> locator-set <name>"
 
<pre>
 
vat# lisp_add_del_local_eid eid 6:0:1::0/64 locator-set ls1 del
 
</pre>
 
 
To display Eid table:
 
<pre>
 
vat# lisp_local_eid_table_dump
 
    Locator-set                  Eid           
 
        ls1                  6.0.1.0/24         
 
        ls1                  6:0:1::/64
 
</pre>
 
 
=== Map resolver ===
 
To add new map resolver, use "lisp_add_del_map_resolver"
 
<pre>
 
vat# lisp_add_del_map_resolver 6:0:3::100
 
</pre>
 
 
To delete specific map resolver, use "lisp_add_del_map_resolver <ip address> del"
 
<pre>
 
vat# lisp_add_del_map_resolver 6:0:3::100 del
 
</pre>
 
 
To display map resolver:
 
<pre>
 
vat# lisp_map_resolver_dump
 
    Map resolver   
 
    6:0:3::100
 
 
</pre>
 
</pre>

Revision as of 09:05, 11 May 2016

TBD


Introduction

The vpp contain a set of commands to set and debug LISP. One way to access the CLI (with proper permissions) is use telnet CLI:

Telnet LISP CLI

Lisp enable

To enable lisp, use "lisp":

vpp# lisp enable

To disable lisp

vpp# lisp disable

Locator_set

To add new locator_set and locator, use "lisp locator-set add":

vpp# lisp locator-set add ls1 iface host-intervpp1 p 1 w 1

Where p is priority and w is weight.

To delete a specific locator_set, use "lisp locator-set del"

vpp# lisp locator-set del ls1

To display locator_set and locator:

vpp# show lisp locator-set
     Locator-set         Locator        Priority         Weight     
     ls1                      6               1               1

Eid

To add new Eid address, use "lisp eid-table":

vpp# lisp eid-table add eid 6.0.1.0/24 locator-set ls1

To delete a specific eid address, use "lisp eid-table del"

vpp# lisp eid-table del eid 6.0.1.0/24 locator-set ls1

To display eid table:

vpp# show lisp eid-table
         EID             Locator    
6.0.2.0/24                   ls1

Map resolver

To add new map resolver, use "lisp map-resolver":

vpp# lisp map-resolver add 6.0.3.100

To delete a specific map resolver address, use "lisp map-resolver del":

vpp# lisp map-resolver del 6.0.3.100