xref: /openbsd-src/share/man/man8/netstart.8 (revision 8fa42865e8616f759f50031a8010faf7cb4461d8)
1*8fa42865Skn.\"	$OpenBSD: netstart.8,v 1.31 2022/10/25 17:10:13 kn Exp $
2313075d7Smiod.\"
3313075d7Smiod.\" Copyright (c) 2002, Miodrag Vallat.
4313075d7Smiod.\" All rights reserved.
5313075d7Smiod.\"
6313075d7Smiod.\" Redistribution and use in source and binary forms, with or without
7313075d7Smiod.\" modification, are permitted provided that the following conditions
8313075d7Smiod.\" are met:
9313075d7Smiod.\" 1. Redistributions of source code must retain the above copyright
10313075d7Smiod.\"    notice, this list of conditions and the following disclaimer.
11313075d7Smiod.\" 2. Redistributions in binary form must reproduce the above copyright
12313075d7Smiod.\"    notice, this list of conditions and the following disclaimer in the
13313075d7Smiod.\"    documentation and/or other materials provided with the distribution.
14313075d7Smiod.\"
15313075d7Smiod.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16313075d7Smiod.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17313075d7Smiod.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18313075d7Smiod.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19313075d7Smiod.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20313075d7Smiod.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21313075d7Smiod.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22313075d7Smiod.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23313075d7Smiod.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24313075d7Smiod.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25313075d7Smiod.\"
26313075d7Smiod.\"     @(#)rc.8	8.2 (Berkeley) 12/11/93
27313075d7Smiod.\"
28c1b0f01fSkn.Dd $Mdocdate: October 25 2022 $
29313075d7Smiod.Dt NETSTART 8
30313075d7Smiod.Os
31313075d7Smiod.Sh NAME
32313075d7Smiod.Nm netstart
33*8fa42865Skn.Nd network startup script
34313075d7Smiod.Sh SYNOPSIS
35f2bb6261Skn.Cm sh Pa /etc/netstart
36f2e685faSkn.Op Fl n
37f2e685faSkn.Op Ar interface ...
38313075d7Smiod.Sh DESCRIPTION
391f44957fSmiod.Nm
40*8fa42865Sknis a
41*8fa42865Skn.Xr sh 1
42*8fa42865Sknscript invoked by
43313075d7Smiod.Xr rc 8
449910a9dfSjmcduring an automatic reboot and after single-user mode is exited;
45313075d7Smiodit performs network initialization.
46313075d7Smiod.Pp
471f44957fSmiod.Nm
48*8fa42865Skncan also be used to start newly created interfaces.
49*8fa42865SknIts behaviour is controlled to some extent by variables defined in
50*8fa42865Skn.Xr rc.conf 8 .
51313075d7Smiod.Pp
52313075d7SmiodDuring the system boot,
53313075d7Smiod.Nm
54313075d7Smiodis executed.
551f44957fSmiod.Nm
56f72f35eaSjmcperforms the following operations, in the sequence given:
57f159a733Sjmc.Pp
58f72f35eaSjmc.Bl -bullet -compact -offset indent
59313075d7Smiod.It
60313075d7SmiodConfigure the loopback interface.
61313075d7Smiod.It
62f608b36aSjmcConfigure all physical interfaces.
63313075d7Smiod.It
64f608b36aSjmcConfigure non-physical interfaces that can provide the default gateway,
65f608b36aSjmcsuch as
66f608b36aSjmc.Xr aggr 4 ,
67f72f35eaSjmc.Xr trunk 4 ,
68f608b36aSjmc.Xr svlan 4 ,
69f72f35eaSjmc.Xr vlan 4 ,
70f608b36aSjmc.Xr carp 4 ,
71f72f35eaSjmcand
72f608b36aSjmc.Xr pppoe 4 .
73f72f35eaSjmc.It
74313075d7SmiodInitialize the routing table and set up the default routes.
75313075d7Smiod.It
76f608b36aSjmcConfigure tunnel interfaces that require a working network
77f608b36aSjmcto reach the other end of the tunnel,
78f608b36aSjmcsuch as
79f608b36aSjmc.Xr tun 4 ,
80f608b36aSjmc.Xr tap 4 ,
81f72f35eaSjmc.Xr gif 4 ,
82f608b36aSjmc.Xr etherip 4 ,
83f608b36aSjmc.Xr gre 4 ,
84f608b36aSjmc.Xr egre 4 ,
85f608b36aSjmc.Xr pflow 4 ,
86313075d7Smiodand
87f608b36aSjmc.Xr wg 4 .
88313075d7Smiod.El
89313075d7Smiod.Pp
90c1b0f01fSknAfter the system is completely initialized, it is possible to start
91c1b0f01fSknnewly created interfaces or apply configuration from
92d313916eSsthen.Xr hostname.if 5
93c1b0f01fSknfiles to an existing interfaces.
94f72f35eaSjmc.Pp
95c1b0f01fSknThe options are as follows:
96c1b0f01fSkn.Bl -tag -width Ds
97c1b0f01fSkn.It Fl n
98c1b0f01fSknReports the steps that would be taken,
99c1b0f01fSknwithout actually configuring anything.
100c1b0f01fSkn.El
101313075d7Smiod.Sh SEE ALSO
10248789b90Sjmc.Xr multicast 4 ,
10334449cf9Sjaredy.Xr defaultdomain 5 ,
104313075d7Smiod.Xr hostname.if 5 ,
1054f9a4669Sderaadt.Xr mygate 5 ,
1062a4dbd9fSjmc.Xr ifconfig 8 ,
107705b9f84Sjmc.Xr rc 8 ,
108705b9f84Sjmc.Xr rc.conf 8
109313075d7Smiod.Sh HISTORY
110313075d7SmiodThe
111313075d7Smiod.Nm
112f72f35eaSjmccommand first appeared in
113313075d7Smiod.Bx 4.0 .
114