summaryrefslogtreecommitdiff
path: root/share/man/man8/netstart.8
blob: 29b97bc077bd61c7fed370b69535aafd144a3bad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
.\"	$OpenBSD: netstart.8,v 1.11 2005/11/10 10:36:59 jmc Exp $
.\"
.\" Copyright (c) 2002, Miodrag Vallat.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\"     @(#)rc.8	8.2 (Berkeley) 12/11/93
.\"
.Dd February 20, 2002
.Dt NETSTART 8
.Os
.Sh NAME
.Nm netstart
.Nd command scripts for network startup
.Sh SYNOPSIS
.Pa /etc/netstart
.Op Ar interface ...
.Sh DESCRIPTION
.Nm
is the command script that is invoked by
.Xr rc 8
during an automatic reboot and after single user mode is exited;
it performs network initialization.
.Pp
The
.Nm
script can also be used to start newly-created bridges or interfaces,
or reset existing interfaces to their default state.
The behaviour of this script is (or can be) controlled to some
extent by variables defined in
.Pa /etc/rc.conf ,
which specifies which daemons and services are to be run.
.Pp
During the system boot,
.Nm
is executed.
.Nm
performs the following operations, in the sequence given:
.Pp
.Bl -bullet -compact -offset indent
.It
Set the machine's name.
.It
Configure the loopback interface.
.It
Configure all the physical interfaces.
.It
Configure the following non-physical interfaces:
.Xr trunk 4 ,
.Xr vlan 4 ,
.Xr pfsync 4 ,
and
.Xr carp 4 .
.It
Initialize the routing table and set up the default routes.
.It
Configure the remaining non-physical interfaces:
.Xr pppoe 4 ,
.Xr gif 4 ,
and
.Xr gre 4 .
.It
Configure all
.Xr bridge 4
interfaces.
.El
.Pp
After the system is completely initialized, it is possible to start a
newly-created interface or
.Xr bridge 4 ,
or reset an existing interface to its default state, by invoking
the following, where
.Ar foo0
is the interface or bridge name:
.Pp
.D1 # sh /etc/netstart foo0
.Sh MULTICAST ROUTING
Routing to the 224.0.0.0/4 net is set up using values from
.Pa /etc/rc.conf
according to these rules:
.Bl -bullet
.It
If the multicast settings are as follows:
.Bd -literal -offset indent
multicast_host=NO
multicast_router=NO
.Ed
.Pp
then multicast routing will not be enabled.
.It
If the multicast settings are as follows:
.Bd -literal -offset indent
multicast_host=NO
multicast_router=YES
.Ed
.Pp
then multicast routing will be enabled, but no multicast route will be set up.
It is expected that a routing daemon, such as
.Xr mrouted 8 ,
will be started as well.
.It
If the multicast settings are as follows:
.Bd -literal -offset indent
multicast_host=YES
multicast_router=NO
.Ed
or:
.Bd -literal -offset indent -compact
multicast_host=foo0	# interface name
multicast_router=NO
.Ed
.Pp
then multicast routing will be enabled, using the default interface,
or the interface name specified by
.Va multicast_host .
.It
Other cases are configuration errors and will cause multicast routing not to be
enabled.
.El
.Sh SEE ALSO
.Xr bridge 4 ,
.Xr carp 4 ,
.Xr gif 4 ,
.Xr gre 4 ,
.Xr pfsync 4 ,
.Xr pppoe 4 ,
.Xr trunk 4 ,
.Xr vlan 4 ,
.Xr bridgename.if 5 ,
.Xr defaultdomain 5 ,
.Xr hostname.if 5 ,
.Xr myname 5 ,
.Xr dhcp 8 ,
.Xr mrouted 8 ,
.Xr rc 8 ,
.Xr rc.conf 8
.Sh HISTORY
The
.Nm
command first appeared in
.Bx 4.0 .