1.\" $OpenBSD: netstart.8,v 1.31 2022/10/25 17:10:13 kn Exp $ 2.\" 3.\" Copyright (c) 2002, Miodrag Vallat. 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25.\" 26.\" @(#)rc.8 8.2 (Berkeley) 12/11/93 27.\" 28.Dd $Mdocdate: October 25 2022 $ 29.Dt NETSTART 8 30.Os 31.Sh NAME 32.Nm netstart 33.Nd network startup script 34.Sh SYNOPSIS 35.Cm sh Pa /etc/netstart 36.Op Fl n 37.Op Ar interface ... 38.Sh DESCRIPTION 39.Nm 40is a 41.Xr sh 1 42script invoked by 43.Xr rc 8 44during an automatic reboot and after single-user mode is exited; 45it performs network initialization. 46.Pp 47.Nm 48can also be used to start newly created interfaces. 49Its behaviour is controlled to some extent by variables defined in 50.Xr rc.conf 8 . 51.Pp 52During the system boot, 53.Nm 54is executed. 55.Nm 56performs the following operations, in the sequence given: 57.Pp 58.Bl -bullet -compact -offset indent 59.It 60Configure the loopback interface. 61.It 62Configure all physical interfaces. 63.It 64Configure non-physical interfaces that can provide the default gateway, 65such as 66.Xr aggr 4 , 67.Xr trunk 4 , 68.Xr svlan 4 , 69.Xr vlan 4 , 70.Xr carp 4 , 71and 72.Xr pppoe 4 . 73.It 74Initialize the routing table and set up the default routes. 75.It 76Configure tunnel interfaces that require a working network 77to reach the other end of the tunnel, 78such as 79.Xr tun 4 , 80.Xr tap 4 , 81.Xr gif 4 , 82.Xr etherip 4 , 83.Xr gre 4 , 84.Xr egre 4 , 85.Xr pflow 4 , 86and 87.Xr wg 4 . 88.El 89.Pp 90After the system is completely initialized, it is possible to start 91newly created interfaces or apply configuration from 92.Xr hostname.if 5 93files to an existing interfaces. 94.Pp 95The options are as follows: 96.Bl -tag -width Ds 97.It Fl n 98Reports the steps that would be taken, 99without actually configuring anything. 100.El 101.Sh SEE ALSO 102.Xr multicast 4 , 103.Xr defaultdomain 5 , 104.Xr hostname.if 5 , 105.Xr mygate 5 , 106.Xr ifconfig 8 , 107.Xr rc 8 , 108.Xr rc.conf 8 109.Sh HISTORY 110The 111.Nm 112command first appeared in 113.Bx 4.0 . 114