Skip to main content
All interface configuration in OpenWrt lives in a single UCI file: /etc/config/network. The netifd daemon reads this file and maintains the corresponding kernel network state. You never edit /etc/network/interfaces or run ip commands directly to persist settings.

File structure

The file contains three types of UCI sections:
Section typePurpose
config interfaceA named logical interface (e.g. lan, wan)
config deviceA named device definition (bridge, alias, VLAN)
config bridge-vlanA DSA bridge VLAN membership rule
Each section begins with config <type> '<name>' followed by indented option and list directives.

Common interface options

OptionDescription
protoProtocol handler: static, dhcp, dhcpv6, pppoe, none, …
devicePhysical or virtual device name (e.g. eth0, br-lan)
ipaddrStatic IPv4 address
netmaskSubnet mask (or use CIDR notation in ipaddr, e.g. 192.168.1.1/24)
gatewayDefault gateway for this interface
dnsSpace-separated DNS servers
ip6addrStatic IPv6 address
ip6gwIPv6 default gateway
metricRouting metric (lower = preferred)
mtuMTU override
autoBring up automatically at boot (default: 1)
disabledSet to 1 to disable without removing

Configuration examples

Assign a fixed IPv4 address. Use this for the LAN-side interface of a router.
config interface 'lan'
    option device   br-lan
    option proto    static
    option ipaddr   192.168.1.1
    option netmask  255.255.255.0
    option dns      8.8.8.8 8.8.4.4
CIDR notation is also accepted:
option ipaddr   192.168.1.1/24

Logical interfaces vs physical devices

A key netifd concept is the separation between logical interfaces and physical devices:
  • A physical device is a kernel netdev: eth0, wlan0, br-lan, etc.
  • A logical interface is a netifd abstraction with a name like lan or wan. It has an IP address, a protocol, routing rules, and firewall zone membership.
One physical device can be referenced by only one logical interface at a time. Multiple IPv6 addresses or prefixes can coexist on a single logical interface. netifd automatically creates alias interfaces (e.g. wan_6) when a protocol handler needs to install additional addresses.

Interface management commands

After editing /etc/config/network, apply changes with:
# Bring up a specific logical interface
ifup wan

# Bring down a specific logical interface
ifdown wan

# Reload all interfaces (non-disruptive where possible)
ubus call network reload
ifup/ifdown are thin wrappers around ubus calls to netifd. They operate on logical interface names (e.g. wan), not kernel device names.
Inspect the current state with standard Linux tools:
# Show all IP addresses
ip addr show

# Show the routing table
ip route show

# Show IPv6 routes
ip -6 route show

# Show netifd interface status via ubus
ubus call network.interface dump
ubus call network.interface.wan status

Build docs developers (and LLMs) love