2 <!-- The FreeBSD Documentation Project -->
4 <sect><heading>Setting up a SLIP client<label id="slipc"></heading>
6 <p><em>Contributed by &a.asami;<newline>8 Aug 1995.</em>
8 The following is one way to set up a FreeBSD machine for SLIP on a
9 static host network. For dynamic hostname assignments (i.e., your
10 address changes each time you dial up), you probably need to do
11 something much fancier.
14 This is just "what I did, and it worked for me". I am sharing this
15 just for your reference, I am no expert in SLIP nor networking so your
19 First, determine which serial port your modem is connected to. I have
20 a symbolic link <tt>/dev/modem -> cuaa1</tt>, and only use the modem name in my
21 configuration files. It can become quite cumbersome when you need to
22 fix a bunch of files in <tt>/etc</tt> and <tt>.kermrc</tt>'s all over the system! (Note
23 that <tt>/dev/cuaa0</tt> is COM1, <tt>cuaa1</tt> is COM2, etc.)
29 in your kernel's config file. It is included in the GENERIC kernel,
30 so this will not be a problem unless you deleted it.
32 <sect1><heading>Things you have to do only once</heading>
35 <item>Add your home machine, the gateway and nameservers to your
36 <tt>/etc/hosts</tt> file. Mine looks like this:
38 127.0.0.1 localhost loghost
39 136.152.64.181 silvia.HIP.Berkeley.EDU silvia.HIP silvia
41 136.152.64.1 inr-3.Berkeley.EDU inr-3 slip-gateway
42 128.32.136.9 ns1.Berkeley.edu ns1
43 128.32.136.12 ns2.Berkeley.edu ns2
45 By the way, silvia is the name of the car that I had when I was
46 back in Japan (it is called 2?0SX here in U.S.).
48 <item>Make sure you have "hosts" before "bind" in your <tt>/etc/host.conf</tt>.
49 Otherwise, funny things may happen.
51 <item>Edit the file <tt>/etc/sysconfig</tt>.
53 <item>Set your hostname by editing the line that says:
55 hostname=myname.my.domain
57 You should give it your full Internet hostname.
59 <item>Add sl0 to the list of network interfaces by changing the line
62 network_interfaces="lo0"
66 network_interfaces="lo0 sl0"
69 <item>Set the startup flags of sl0 by adding a line:
71 ifconfig_sl0="inet ${hostname} slip-gateway netmask 0xffffff00 up"
74 <item>Designate the default router by changing the line:
80 defaultrouter=slip-gateway
84 <item>Make a file <tt>/etc/resolv.conf</tt> which contains:
86 domain HIP.Berkeley.EDU
87 nameserver 128.32.136.9
88 nameserver 128.32.136.12
90 As you can see, these set up the nameserver hosts. Of course, the
91 actual domain names and addresses depend on your environment.
93 <item>Set the password for root and toor (and any other accounts that
94 does not have a password). Use passwd, do not edit the <tt>/etc/passwd</tt>
95 or <tt>/etc/master.passwd</tt> files!
97 <item>Reboot your machine and make sure it comes up with the correct
101 <sect1><heading>Making a SLIP connection</heading>
104 <item>Dial up, type "slip" at the prompt, enter your machine name and
105 password. The things you need to enter depends on your
106 environment. I use kermit, with a script like this:
114 set terminal bytesize 8
116 # The next macro will dial up and login
117 define slip dial 643-9600, input 10 =>, if failure stop, -
118 output slip\x0d, input 10 Username:, if failure stop, -
119 output silvia\x0d, input 10 Password:, if failure stop, -
120 output ***\x0d, echo \x0aCONNECTED\x0a
122 (of course, you have to change the hostname and password to fit
123 yours). Then you can just type "slip" from the kermit prompt to
126 <bf>Note</bf>: leaving your password in plain text anywhere in the
127 filesystem is generally a BAD idea. Do it at your own risk. I am
130 <item>Leave the kermit there (you can suspend it by "z") and as root,
133 slattach -h -c -s 115200 /dev/modem
135 if you are able to "ping" hosts on the other side of the router,
136 you are connected! If it does not work, you might want to try "-a"
137 instead of "-c" as an argument to slattach.
140 <sect1><heading>How to shutdown the connection</heading>
142 <p>Type "kill -INT `cat /var/run/slattach.modem.pid`" (as root) to
143 kill slattach. Then go back to kermit ("fg" if you suspended it)
144 and exit from it ("q").
146 The slattach man page says you have to use "ifconfig sl0 down" to
147 mark the interface down, but this does not seem to make any
148 difference for me. ("ifconfig sl0" reports the same thing.)
150 Some times, your modem might refuse to drop the carrier (mine
151 often does). In that case, simply start kermit and quit it again.
152 It usually goes out on the second try.
154 <sect1><heading>Troubleshooting</heading>
156 <p>If it does not work, feel free to ask me. The things that people
159 <item>Not using "-c" or "-a" in slattach (I have no idea why this can be
160 fatal, but adding this flag solved the problem for at least one
163 <item>Using "s10" instead of "sl0" (might be hard to see the difference on
166 <item>Try "ifconfig sl0" to see your interface status. I get:
169 sl0: flags=10<POINTOPOINT>
170 inet 136.152.64.181 --> 136.152.64.1 netmask ffffff00
173 <item>Also, <tt>netstat -r</tt> will give the routing table, in case you get
174 the "no route to host" messages from ping. Mine looks like:
178 Destination Gateway Flags Refs Use IfaceMTU Rtt
183 Route Tree for Protocol Family inet:
185 default inr-3.Berkeley.EDU UG 8 224515 sl0 - -
186 localhost.Berkel localhost.Berkeley UH 5 42127 lo0 - 0.438
187 inr-3.Berkeley.E silvia.HIP.Berkele UH 1 0 sl0 - -
188 silvia.HIP.Berke localhost.Berkeley UGH 34 47641234 lo0 - 0.438
191 (this is after transferring a bunch of files, your numbers should be