Skip to content

interface

Thomas Mangin edited this page Apr 8, 2026 · 1 revision

Pre-Alpha. This page describes behavior that may change.

OS network interface monitoring and management. Discovers interfaces, manages units, addresses, bridges, VLANs, and sysctl settings, and publishes interface and address events to the bus.

Category

Core.

Configuration

Loaded automatically when an interface configuration block is present. The config root is interface.

interface {
    ethernet eth0 {
        mtu 9000;
        unit 0 {
            family inet {
                address 10.0.0.1/24;
            }
        }
    }
    dummy lo1 {
        unit 0 {
            family inet {
                address 10.255.0.1/32;
            }
        }
    }
}

The YANG schema supports ethernet, dummy, veth, bridge, and loopback interface types. Each interface carries physical properties (MTU, MAC address, disable) and a list of logical units with addresses, VLAN IDs, sysctl overrides, and traffic mirroring configuration.

Behaviour

On startup the plugin loads a backend (netlink on Linux by default), applies the declared interface configuration, and starts a monitor that watches for OS-level interface changes. The monitor publishes events to the bus:

  • interface/created and interface/deleted for link lifecycle.
  • interface/up and interface/down for link state transitions.
  • interface/addr/added and interface/addr/removed for IP address changes.
  • interface/dhcp/lease-acquired, interface/dhcp/lease-renewed, and interface/dhcp/lease-expired for DHCP events.

Configuration reloads use a journaled transaction. The apply phase records a rollback closure that re-applies the previous config, and emits an interface-rollback event if the transaction is rolled back.

The interface model follows a JunOS-style two-layer design: physical interface plus logical units.

Interactions

  • The BGP reactor subscribes to interface events to react to link-state changes.
  • iface-netlink is the default Linux backend that performs the actual netlink operations.
  • iface-dhcp is a separate plugin for DHCP client behaviour on managed interfaces.
  • fib-kernel consumes interface events to keep the Linux FIB consistent.

Source

main/internal/component/iface/

See also

Home

About

First Steps

Configuration

Operation

Interfaces

Plugins

Plugin Development

Chaos Testing

Blueprints

Development

Reference

Clone this wiki locally