netstart(8)

netstart8

Network startup script

Usage

sh /etc/netstart [-n] [interface ...]

Overview

netstart is a sh(1) script invoked by rc(8) during an automatic reboot and after single-user mode is exited; it performs network initialization.

netstart can also be used to start newly created interfaces. Its behaviour is controlled to some extent by variables defined in rc.conf(8).

During the system boot, netstart is executed. netstart performs the following operations, in the sequence given:

  • Configure the loopback interface.

  • Configure all physical interfaces.

  • Configure non-physical interfaces that can provide the default gateway, such as aggr(4), trunk(4), svlan(4), vlan(4), carp(4), and pppoe(4).

  • Initialize the routing table and set up the default routes.

  • Configure tunnel interfaces that require a working network to reach the other end of the tunnel, such as tun(4), tap(4), gif(4), etherip(4), gre(4), egre(4), pflow(4), and wg(4).

After the system is completely initialized, it is possible to start newly created interfaces or apply configuration from hostname.if(5) files to an existing interfaces.

The options are as follows:

-n

Reports the steps that would be taken, without actually configuring anything.

Releases

57 releases since OpenBSD 2.5; the text changed 22 times.

  1. 2.5
  2. 2.6
  3. 2.7
  4. 2.8
  5. 2.9
  6. 3.0
  7. 3.1
  8. 3.2
  9. 3.3
  10. 3.4
  11. 3.5
  12. 3.6–3.8
  13. 3.9–4.0
  14. 4.1
  15. 4.2–4.8
  16. 4.9–5.0
  17. 5.1–5.8
  18. 5.9–6.0
  19. 6.1–6.2
  20. 6.3–6.8
  21. 6.9–7.1
  22. 7.2
  23. 7.3–8.0

-n since OpenBSD 7.3.

History

The netstart command first appeared in 4.0BSD.

From man 8.0-current-20261101 in OpenBSD 8.0-current (2026-11-01). Parsed by carta from the page's mdoc source.