# Common Interface Settings Common interface settings include `name`, `type`, `enabled`, `description`, and custom MAC address. Type-specific settings are covered in the dedicated sections for [Bridging](bridging.md), [Link Aggregation](lag.md), [Ethernet](ethernet.md), [IP Addressing](ip.md), and [Routing](routing.md). ## Interface Name The interface name is limited to 1-15 characters due to Linux kernel constraints. Physical interfaces use their system-assigned names (e.g., `eth0`, `eth1`), while user-created interfaces can be named freely within this limit. > [!TIP] > Naming conventions like `br0`, `lag0`, `vlan10`, or `eth0.20` allow > the CLI to automatically infer the interface type. ## Interface Type The `type` setting defines what kind of interface this is: `bridge`, `lag`, `vlan`, `veth`, etc. When configuring via the CLI, the type is often inferred from the interface name. However, when configuring remotely via NETCONF or RESTCONF, the type *must* be set explicitly.
admin@example:/config/> edit interface br0
admin@example:/config/interface/br0/> set type bridge
Available types can be listed from the CLI:
admin@example:/config/interface/br0/> set type ?
bridge IEEE bridge interface.
dummy Linux dummy interface. Useful mostly for testing.
ethernet Any Ethernet interfaces, regardless of speed, RFC 3635.
gre GRE tunnel interface.
gretap GRETAP (Ethernet over GRE) tunnel interface.
lag IEEE link aggregate interface.
loopback Linux loopback interface.
other Other interface, i.e., unknown.
veth Linux virtual Ethernet pair.
vlan Layer 2 Virtual LAN using 802.1Q.
vxlan Virtual eXtensible LAN tunnel interface.
wifi WiFi (802.11) interface
wireguard WireGuard VPN tunnel interface.
## Enable/Disable
An interface can be administratively disabled using the `enabled` setting.
By default, interfaces are enabled (`true`).
admin@example:/config/> edit interface eth0
admin@example:/config/interface/eth0/> set enabled false
admin@example:/config/interface/eth0/> leave
The operational status can be inspected to see both administrative and
actual link state:
admin@example:/> show interface
INTERFACE PROTOCOL STATE DATA
eth0 ethernet DISABLED 02:00:00:00:00:00
eth1 1000baseT UP duplex: full
ethernet 02:00:00:00:00:01
...
The rows are layered bottom-up by protocol: a physical-medium row (only
emitted when the link is up) on top, then the ethernet row carrying the
bare MAC, then any ipv4/ipv6 sub-rows. See [Ethernet](ethernet.md) for the
full set of summary fields.
## Description
The `description` is a free-form text string (max 64 characters) saved
as the Linux interface alias (`ifalias`). Use it to document an interface's
purpose or add notes for remote debugging.
admin@example:/config/> edit interface eth0
admin@example:/config/interface/eth0/> set description "Uplink to core switch"
admin@example:/config/interface/eth0/> leave
The description is visible in the operational datastore and in `show`
commands:
admin@example:/> show interface eth0
name : eth0
description : Uplink to core switch
index : 2
...
## Custom MAC Address
The `custom-phys-address` can be used to set an interface's MAC address.
This is an extension to the ietf-interfaces YANG model, which defines
`phys-address` as read-only[^1].
> [!CAUTION]
> There is no validation or safety checks performed by the system when
> using `custom-phys-address`. In particular the `offset` variant can
> be dangerous to use -- pay attention to the meaning of bits in the
> upper-most octet: local bit, multicast/group, etc.
### Fixed custom MAC
Use a fixed custom MAC address when the interface must present a
specific, deterministic identity on the network. This option bypasses
any chassis-derived logic and applies the configured address verbatim.
admin@example:/config/> edit interface veth0a
admin@example:/config/interface/veth0a/> set custom-phys-address static 00:ab:00:11:22:33
=> 00:ab:00:11:22:33
### Chassis MAC
Chassis MAC, sometimes also referred to as base MAC. In these two
examples it is `00:53:00:c0:ff:ee`.
admin@example:/config/> edit interface veth0a
admin@example:/config/interface/veth0a/> set custom-phys-address chassis
=> 00:53:00:c0:ff:ee
### Chassis MAC, with offset
When constructing a derived address it is recommended to set the locally
administered bit. Same chassis MAC as before.
admin@example:/config/> edit interface veth0a
admin@example:/config/interface/veth0a/> set custom-phys-address chassis offset 02:00:00:00:00:02
=> 02:53:00:c0:ff:f0
## Dummy Interface
A dummy interface is a virtual interface that is always administratively
and operationally UP, regardless of any physical link state. It can
hold IP addresses just like any other interface.
The two most common uses are:
- **Stable OSPF router-ID**: OSPF picks its router-ID from an interface
address. If that interface goes down, adjacencies can flap. Binding
the router-ID to a /32 address on a dummy avoids this.
- **Stable management address**: A /32 on a dummy gives the device a
permanent identity on the network, reachable as long as at least one
uplink is up and the address is redistributed into the routing domain.
> [!TIP]
> WiFi interfaces also use dummies as placeholders when the radio
> hardware is not detected at boot (e.g., a USB dongle that was
> unplugged). See [WiFi](wifi.md) for details.
### Example: Stable OSPF Router-ID
Create a dummy interface with a /32 address and use it as the OSPF
router-ID so that the ID never changes when physical ports bounce:
admin@example:/> configure
admin@example:/config/> edit interface lo0
admin@example:/config/interface/lo0/> set type dummy
admin@example:/config/interface/lo0/> set ipv4 address 192.0.2.1 prefix-length 32
admin@example:/config/interface/lo0/> leave
admin@example:/config/> edit routing control-plane-protocol ospfv2 name default ospf
admin@example:/config/routing/…/ospf/> set explicit-router-id 192.0.2.1
admin@example:/config/routing/…/ospf/> leave
admin@example:/> copy running-config startup-config
To also make the address reachable by other routers, redistribute
connected routes (or add `lo0` as an OSPF interface):
admin@example:/config/routing/…/ospf/> set redistribute connected
[^1]: A YANG deviation was previously used to make it possible to set
`phys-address`, but this has been replaced with the more flexible
`custom-phys-address`.