=================
Managing nexthops
=================

Nexthops are displayed in a table on the node details page.

.. contents::
    :local:
    :depth: 1

Adding a nexthop
================

To add a nexthop, click the |add| button next to the header on the **Nexthops**
table. This will open the **Add nexthop** modal. From here you can specify the
following information. Fields marked with an asterisk are required.

Type *
------

The nexthop's type. This can be one of four options. Depending on which type is
selected, you may be given different customization options. This is explained
in the following table:

+---------------+---------------------------------+-----------------------------------------------+
| **Type**      | **Description**                 | **Optional settings**                         |
+===============+=================================+===============================================+
| **Peer**      | A peer (tunnel) on the device.  | **Encryption**: Enable to encrypt traffic.    |
+---------------+---------------------------------+-----------------------------------------------+
| **Gateway**   | A gateway IP.                   | **Interface**: Specify the local interface    |
|               |                                 | used to reach the gateway.                    |
+---------------+---------------------------------+-----------------------------------------------+
| **Interface** | A local device interface.       |                                               |
+---------------+---------------------------------+-----------------------------------------------+
| **Blackhole** | Discards all traffic.           |                                               |
+---------------+---------------------------------+-----------------------------------------------+

.. tip::

    If **Blackhole** is selected, all nexthop traffic will be discarded. This
    allows you to block traffic in certain situations. See the general `nexthop
    documentation <index.html>`__ for more information.

Editing a nexthop
=================

To edit a nexthop, click the |edit| button in the ``Actions`` column of the
corresponding row in the **Nexthops** table. This will open the **Edit
nexthop** modal.

Deleting a nexthop
==================

To delete a nexthop, click the |delete| button in the ``Actions`` column. This
will ask you to confirm before the nexthop is **permanently** deleted.

.. |add| image:: /attachments/laywire/add.svg
    :width: 20px
.. |edit| image:: /attachments/laywire/edit.svg
    :width: 20px
.. |delete| image:: /attachments/laywire/delete.svg
    :width: 20px
