===============
Managing routes
===============

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

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

Adding a route
==============

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

Destination *
-------------

The CIDR-formatted network or host address that this route applies to. Traffic
matching this destination will be forwarded according to the route's
nexthop(s).

VRF *
-----

The VRF this route applies to. Traffic in a given VRF will only use this
route if the route is in the same VRF.

Nexthops *
----------

One or more nexthops used for the route. A route must have at least one nexthop
associated with it. All nexthops are weighted by preference.

Preference *
++++++++++++

The preference of the associated nexthop. Defaults to 500. Higher values have a
higher priority. It is not possible for multiple nexthops on a single route to
have the same preference.

Editing a route
===============

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

Deleting a route
================

To delete a route, click the |delete| button in the ``Actions`` column. This
will ask you to confirm before the route 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
