xref: /openbsd-src/share/man/man8/netstart.8 (revision a28daedfc357b214be5c701aa8ba8adb29a7f1c2)
1.\"	$OpenBSD: netstart.8,v 1.16 2007/05/31 19:19:59 jmc 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: May 31 2007 $
29.Dt NETSTART 8
30.Os
31.Sh NAME
32.Nm netstart
33.Nd command scripts for network startup
34.Sh SYNOPSIS
35.Pa /etc/netstart
36.Op 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.Pa /etc/rc.conf ,
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
61Set the machine's name.
62.It
63Configure the loopback interface.
64.It
65Configure all the physical interfaces.
66.It
67Configure the following non-physical interfaces:
68.Xr trunk 4 ,
69.Xr vlan 4 ,
70.Xr pfsync 4 ,
71and
72.Xr carp 4 .
73.It
74Initialize the routing table and set up the default routes.
75.It
76Configure the remaining non-physical interfaces:
77.Xr pppoe 4 ,
78.Xr gif 4 ,
79and
80.Xr gre 4 .
81.It
82Configure all
83.Xr bridge 4
84interfaces.
85.El
86.Pp
87After the system is completely initialized, it is possible to start a
88newly created interface or
89.Xr bridge 4 ,
90or reset an existing interface to its default state, by invoking
91the following, where
92.Ar foo0
93is the interface or bridge name:
94.Pp
95.D1 # sh /etc/netstart foo0
96.Sh MULTICAST ROUTING
97To enable
98.Xr multicast 4
99routing, the
100.Va net.inet.ip.mforwarding
101and/or
102.Va net.inet.ip6.mforwarding
103.Xr sysctl 8
104variables should be set to 1.
105Routing to the 224.0.0.0/4 net is set up using values from
106.Pa /etc/rc.conf
107according to these rules:
108.Bl -bullet
109.It
110The default.
111If the multicast settings are as follows
112then multicast routing will not be enabled.
113.Bd -literal -offset indent
114multicast_host=NO
115multicast_router=NO
116.Ed
117.It
118If the multicast settings are as follows
119then multicast routing will be enabled,
120but no multicast route will be set up.
121It is expected that a routing daemon, such as
122.Xr mrouted 8 ,
123will be started as well.
124.Bd -literal -offset indent
125multicast_host=NO
126multicast_router=YES
127.Ed
128.It
129If the multicast settings are as follows
130then multicast routing will be enabled,
131using the default interface,
132or the interface name specified by
133.Va multicast_host .
134.Bd -literal -offset indent
135multicast_host=YES
136multicast_router=NO
137.Ed
138or:
139.Bd -literal -offset indent -compact
140multicast_host=foo0	# interface name
141multicast_router=NO
142.Ed
143.It
144Other cases are configuration errors and will cause multicast routing not to be
145enabled.
146.El
147.Sh SEE ALSO
148.Xr multicast 4 ,
149.Xr defaultdomain 5 ,
150.Xr hostname.if 5 ,
151.Xr myname 5 ,
152.Xr ifconfig 8 ,
153.Xr rc 8 ,
154.Xr rc.conf 8
155.Sh HISTORY
156The
157.Nm
158command first appeared in
159.Bx 4.0 .
160