1.\" $OpenBSD: netstart.8,v 1.7 2003/07/29 13:17:00 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 February 20, 2002 29.Dt NETSTART 8 30.Os 31.Sh NAME 32.Nm netstart 33.Nd command scripts for network startup 34.Sh SYNOPSIS 35.Nm /etc/netstart 36.Op Ar interface ... 37.Sh DESCRIPTION 38.Nm netstart 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 netstart 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.Nm rc.conf , 51which specifies which daemons and services are to be run. 52.Pp 53During the system boot, 54.Nm 55is executed. 56.Nm netstart 57will perform the following operations: 58.Pp 59.Bl -bullet -compact 60.It 61Set the machine's name. 62.It 63Configure the loopback interface. 64.It 65Configure all the physical interfaces. 66.It 67Initialize the routing table and set up the default routes. 68.It 69Configure all the 70.Xr gif 4 71and 72.Xr gre 4 73interfaces. 74.It 75Configure all the bridges. 76.El 77.Pp 78After the system is completely initialized, it is possible to start a 79newly-created interface or 80.Xr bridge 4 , 81or reset an existing interface to its default state, by invoking 82.Pp 83.D1 sh /etc/netstart foo0 84.Pp 85where 86.Ar foo0 87is the interface or bridge name. 88.Sh MULTICAST ROUTING 89Routing to the 224.0.0.0/4 net is set up using values from 90.Pa /etc/rc.conf 91according to these rules: 92.Bl -bullet 93.It 94If the multicast settings are as follows: 95.Bd -literal -offset indent 96multicast_host=NO 97multicast_router=NO 98.Ed 99.Pp 100then multicast routing will not be enabled. 101.It 102If the multicast settings are as follows: 103.Bd -literal -offset indent 104multicast_host=NO 105multicast_router=YES 106.Ed 107.Pp 108then multicast routing will be enabled, but no multicast route will be set up. 109It is expected that a routing daemon, such as 110.Xr mrouted 8 , 111will be started as well. 112.It 113If the multicast settings are as follows: 114.Bd -literal -offset indent 115multicast_host=YES 116multicast_router=NO 117.Ed 118or: 119.Bd -literal -offset indent -compact 120multicast_host=foo0 # interface name 121multicast_router=NO 122.Ed 123.Pp 124then multicast routing will be enabled, using the default interface, 125or the interface name specified by 126.Va multicast_host . 127.It 128Other cases are configuration errors and will cause multicast routing not to be 129enabled. 130.El 131.Sh SEE ALSO 132.Xr bridge 4 , 133.Xr gif 4 , 134.Xr gre 4 , 135.Xr bridgename.if 5 , 136.Xr hostname.if 5 , 137.Xr dhcp 8 , 138.Xr mrouted 8 , 139.Xr rc 8 , 140.Xr rc.conf 8 141.Sh HISTORY 142The 143.Nm 144command appeared in 145.Bx 4.0 . 146