Skip to content

interface

Thomas Mangin edited this page Aug 16, 2026 · 2 revisions

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.
  • iface-ra sends IPv6 Router Advertisements on the units that enable them. The component parses the configuration and decides which senders run; the plugin owns the socket and the timers. Remove the plugin and no sender starts.
  • fib-kernel consumes interface events to keep the Linux FIB consistent.

Every route this component installs in the kernel carries rtm_protocol 253, which show route renders as ze-iface, and a removal matches on that protocol. This covers the DHCPv4 client, the IPv6 RA default-route manager, the PPPoE client, and the PPP NCPs.

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