.. _clicmd_src_plugins_nsim_nsim_c:

===============================================================
Network Delay Simulator
===============================================================

nsim cross-connect enable-disable
-------------------------------------------------------------------------

.. code-block:: console

    nsim cross-connect enable-disable <interface-name-1> <interface-name-2> [disable]



Enable or disable network simulation cross-connect on two interfaces
The network simulator must have already been configured, see
the "nsim_configure" command.

Place the interfaces into a bridge group, to ensure that
interfaces are in promiscuous mode.

To enable or disable network simulation cross-connect


.. code-block:: console

    
    nsim cross-connect enable-disable TenGigabitEthernet2/0/0 TenGigabitEthernet2/0
    nsim cross-connect enable-disable TenGigabitEthernet2/0/0 TenGigabitEthernet2/0 disable
    




.. code-block:: console

    nsim enable-disable <intfc> <intfc> [disable]



Declaration: ``nsim_enable_disable_command`` `src/plugins/nsim/nsim.c line 338 <https://github.com/FDio/vpp/blob/master//src/plugins/nsim/nsim.c#L338>`_

Implementation: ``nsim_cross_connect_enable_disable_command_fn``


nsim output-feature enable-disable
-------------------------------------------------------------------------

.. code-block:: console

    nsim output-feature enable-disable <interface-name> [disable]



Enable or disable network simulation output feature on an interface
The network simulator must have already been configured, see
the "nsim_configure" command.

To enable or disable network simulation output feature


.. code-block:: console

    
    nsim output-feature enable-disable TenGigabitEthernet2/0/0
    nsim output-feature enable-disable TenGigabitEthernet2/0/0 disable
    




.. code-block:: console

    nsim output-feature enable-disable <intfc> [disable]



Declaration: ``nsim_output_feature_enable_disable_command`` `src/plugins/nsim/nsim.c line 527 <https://github.com/FDio/vpp/blob/master//src/plugins/nsim/nsim.c#L527>`_

Implementation: ``nsim_output_feature_enable_disable_command_fn``


set nsim
-------------------------------------------------------------------------

.. code-block:: console

    set nsim delay <time> bandwidth <bps> packet-size <nbytes>
        [packets-per-drop <nn>][drop-fraction <f64: 0.0 - 1.0>]



Configure the network simulation cross-connect
Once the simulator is configured, use the "nsim enable-disable" command
to set up a cross-connect with the supplied delay characteristics.

The cross connect configuration may be changed without restarting vpp
but it is good practice to shut down the interfaces.

To configure the network delay simulator:


.. code-block:: console

    
    set nsim delay 10.0 ms bandwidth 5.5 gbit packet-size 128
    
    




.. code-block:: console

    set nsim delay <nn> bandwidth <bb> packet-size <nn>



Declaration: ``set_nsim_command`` `src/plugins/nsim/nsim.c line 801 <https://github.com/FDio/vpp/blob/master//src/plugins/nsim/nsim.c#L801>`_

Implementation: ``set_nsim_command_fn``


show nsim
-------------------------------------------------------------------------

.. code-block:: console

    Display network delay simulator configuration



Display state info for the network delay simulator.

To display the state of the network simulator


.. code-block:: console

    
    show nsim verbose
    Network simulator cross-connects TenGigabitEthernet2/0/0 and TenGigabitEthernet2/0/1
    ...inserting link delay of 10.00 ms, 20.00 ms round-trip
     Configured bandwidth: 10.10 gbit/sec
     Configured packet size: 128
     Sim uses 157814784 bytes total
    




.. code-block:: console

    show nsim



Declaration: ``show_nsim_command`` `src/plugins/nsim/nsim.c line 846 <https://github.com/FDio/vpp/blob/master//src/plugins/nsim/nsim.c#L846>`_

Implementation: ``show_nsim_command_fn``