xref: /openbsd/share/man/man8/netstart.8 (revision 771fbea0)
1.\"	$OpenBSD: netstart.8,v 1.25 2020/11/29 20:14:06 deraadt 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: November 29 2020 $
29.Dt NETSTART 8
30.Os
31.Sh NAME
32.Nm netstart
33.Nd command script for network startup
34.Sh SYNOPSIS
35.Nm /etc/netstart
36.Op Oo Fl n Oc Ar interface ...
37.Sh DESCRIPTION
38.Nm
39is the command script that is invoked by
40.Xr rc 8
41during an automatic reboot and after single-user mode is exited;
42it performs network initialization.
43.Pp
44The
45.Nm
46script can also be used to start newly created bridges or interfaces,
47or reset existing interfaces to their default state.
48The behaviour of this script is (or can be) controlled to some
49extent by variables defined in
50.Xr rc.conf 8 ,
51which specifies which daemons and services are to be run.
52.Pp
53During the system boot,
54.Nm
55is executed.
56.Nm
57performs the following operations, in the sequence given:
58.Pp
59.Bl -bullet -compact -offset indent
60.It
61Configure the loopback interface.
62.It
63Configure all physical interfaces.
64.It
65Configure non-physical interfaces that can provide the default gateway,
66such as
67.Xr aggr 4 ,
68.Xr trunk 4 ,
69.Xr svlan 4 ,
70.Xr vlan 4 ,
71.Xr carp 4 ,
72and
73.Xr pppoe 4 .
74.It
75Initialize the routing table and set up the default routes.
76.It
77Configure tunnel interfaces that require a working network
78to reach the other end of the tunnel,
79such as
80.Xr tun 4 ,
81.Xr tap 4 ,
82.Xr gif 4 ,
83.Xr etherip 4 ,
84.Xr gre 4 ,
85.Xr egre 4 ,
86.Xr pflow 4 ,
87and
88.Xr wg 4 .
89.El
90.Pp
91After the system is completely initialized, it is possible to start a
92newly created interface or
93.Xr bridge 4 ,
94or reset an existing interface to its default state, by invoking
95the following, where
96.Ar foo0
97is the interface or bridge name:
98.Pp
99.D1 # sh /etc/netstart foo0
100.Pp
101Using the
102.Fl n
103option reports the steps that would be taken,
104without actually configuring the interface.
105.Sh SEE ALSO
106.Xr multicast 4 ,
107.Xr defaultdomain 5 ,
108.Xr hostname.if 5 ,
109.Xr mygate 5 ,
110.Xr ifconfig 8 ,
111.Xr rc 8 ,
112.Xr rc.conf 8
113.Sh HISTORY
114The
115.Nm
116command first appeared in
117.Bx 4.0 .
118