========================================
Adding, editing, and deleting interfaces
========================================

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

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

Adding an interface
===================

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

Name *
------

The name of the interface. This must match the interface name on the device,
such as ``eth0`` or ``enp2s0``.

Aliases
-------

Any alternative names you would like to assign to the interface (aka
"altnames").

VRF
---

The VRF assigned to this interface. Traffic entering this interface will enter
this VRF. If the interface is defined without a VRF, this interface will only
be used for establishing SD-WAN tunnels and not for client traffic.

DHCP
----

Enabled
+++++++

Whether or not DHCP is enabled on this interface.

Keep on shutdown
++++++++++++++++

When toggled on, any DHCP addresses assigned to this interface will persist
even if the SD-WAN service is shutdown. This allows the node to maintain
network connectivity regardless of whether SD-WAN is running.

Addresses
---------

Any static addresses you would like to assign to this interface. The following
values are supported:

Address *
+++++++++

A CIDR-formatted static address.

Peer address
++++++++++++

An optional CIDR-formatted address indicating the address on the peer remote
that will be used to reach the remote. Most configurations can omit this field,
as it is only used in rare configurations.

Gateway address
+++++++++++++++

An optional host address indicating the gateway for the static address. If a
gateway is defined and there is no VRF on the interface, a default route to the
gateway will be created in a private, non-VRF routing table. If there is a VRF
on the interface, the default route will be in the VRF's routing table.

Keep on shutdown
++++++++++++++++

When toggled on, this address will persist even if the SD-WAN service is
shut down. This allows the node to maintain network connectivity regardless of
whether the SD-WAN service is running.

DNS servers
-----------

Any upstream DNS servers needed for DNS resolution on the interface. If not
given, a list of public DNS servers will be used.

Editing an interface
====================

To edit an interface, click the |edit| button in the ``Actions`` column of the
corresponding row in the **Interfaces** table. This will open the **Edit
interface** modal.

Deleting an interface
=====================

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