1 .\" Copyright (c) 1986, 1991 The Regents of the University of California.
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)slattach.8 6.4 (Berkeley) 3/16/91
34 .\" $FreeBSD: src/sbin/slattach/slattach.8,v 1.16.2.6 2003/02/23 21:17:43 trhodes Exp $
35 .\" $DragonFly: src/sbin/slattach/slattach.8,v 1.4 2008/05/09 20:31:04 swildner Exp $
42 .Nd attach serial lines as network interfaces
47 .Op Fl e Ar exit-command
54 .Op Fl r Ar redial-command
56 .Op Fl u Ar unit-command
64 utility is used to assign a tty line to a network interface,
65 and to define the network source and destination addresses.
67 The following options are available:
68 .Bl -tag -width indent
70 Autoenable the VJ header compression option, if the other end of the link
71 is capable of VJ header compression then it will be used otherwise normal
74 Enable the VJ header compression option. Note that both ends of the link
75 must be able to use VJ header compression for this to work.
76 .It Fl e Ar exit-command
77 Specify a command to be invoked within a shell
78 .Ql sh \-c Ar exit-command
83 Disable the invocation of
89 Turn on cts/rts style flow control on the slip port, by default no flow
92 Disable modem control (CLOCAL) and ignore carrier detect on the slip
95 is invoked upon carrier drop and
101 Throw away ICMP packets. The slip interface will ignore ICMP packets
102 to prevent slow lines being saturated by ICMP responses.
103 .It Fl r Ar redial-command
104 Specify a command to be invoked within a shell
105 .Ql sh \-c Ar redial-command
106 whenever carrier is lost on the modem line.
111 cause connection reestablishing on leased line
112 without any external command invoked.
114 Specify the speed of the connection.
115 If not specified, the
116 default of 9600 is used.
117 .It Fl u Ar unit-command
118 When the line is switched to slip discipline, run
119 .Dq Nm "sh -c" Ar unit-command old new
124 are the slip unit numbers when the line was
125 last opened and the unit number of the current slip connection
126 respectively. The unit number can change after redialing if you are
127 using more than one slip line.
130 is connected for the first time,
131 .Dq Nm "sh -c" Ar unit-command \-1 new
136 .Dq Nm "sh -c" Ar unit-command old \-1
140 utility will abort if the unit number
142 .Dq Fl u Ar \%unit-command
147 upon startup irrespective of carrier.
149 Use uucp-style device locking.
150 You need it unless you start
152 from external program which already does uucp locking.
153 Default case is no uucp locking to satisfy such programs.
154 .It Fl K Ar keepalive
155 Set SLIP "keep alive" timeout in seconds.
156 If FRAME_END is not received in
157 this amount of time, re-connect occurs.
158 The default value is no timeout.
160 Set SLIP "out fill" timeout in seconds. It forces at least one FRAME_END
161 to be sent during this time period, which is necessary for the "keep alive"
162 timeout on the remote side.
163 The default value is no timeout.
165 Set the SLIP unit number directly.
166 Use with caution, because no check is made
167 for two interfaces with same number.
168 By default sliplogin dynamically assigns the unit number.
170 Specify the name of the tty device.
172 should be a string of the form
178 Only the super-user may attach a network interface.
180 To detach the interface, use
181 .Dq Li ifconfig interface-name down
182 after killing off the
187 is the name that is shown by
192 to redial the phone when carrier is lost, use the
193 .Fl r Ar redial-command
194 option to specify a script or executable that will reconnect the
195 serial line to the slip server. For example, the script could redial
196 the server and log in, etc.
198 To reconfigure the network interface in case the slip unit number
200 .Fl u Ar unit-command
201 option to specify a script or executable that will be invoked as
202 .Ql sh \-c Ar unit-command old new
207 are the slip unit numbers before and after
208 reconnecting the line. The unit number can change if you have more
209 than one line disconnect at the same time. The first to succeed in
210 reconnecting will get the lowest unit number.
217 which causes it to close the tty and exit.
219 To force a redial, use
224 to think carrier was lost and thus invoke
225 .Ql sh \-c Ar redial-command
226 to reconnect to the server.
228 If you use a hard-wired connection rather than a modem, invoke
232 option in order to ignore carrier on the slip line.
234 .Bl -tag -width /usr/share/examples/slattach/* -compact
235 .It Pa /var/run/slattach.<tty>.pid
238 replaced by the terminal path name component of
240 This file contains the numerical process ID of the
242 process and can be examined by scripts in order to send a signal to
244 .It Pa /usr/share/examples/slattach/*
247 .Bd -literal -offset indent -compact
249 slattach \-s 4800 /dev/ttyd1
250 slattach \-c \-s 38400 /dev/cuaa1
251 slattach \-r 'kermit -y dial.script >kermit.log 2>&1'
254 Look for error messages in
255 .Pa /var/log/messages
258 Messages indicating the specified interface does not exit, the
259 requested address is unknown, the user is not privileged and tried to
260 alter an interface's configuration are logged there.
264 also logs failure to set the controlling terminal or failure to install
265 signal handlers. Upon connection and redial the ttyname and baud rate
266 are logged and on shutdown the ttyname is logged.