source: trunk/minix/man/man8/serial-ip.8@ 11

Last change on this file since 11 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 5.5 KB
Line 
1.TH SERIAL-IP 8
2.SH NAME
3serial-ip \- Serial IP (SLIP or PPP) setup
4.SH DESCRIPTION
5.de SP
6.if t .sp 0.4
7.if n .sp
8..
9\-\-\-\-\-\-\-
10.br
11.B Note:
12This text and the serial IP code is not finished. Code needs to be added to
13.B nonamed
14to allow it to be used both with and without a connection to the Internet,
15and by now there is a PPP program for standard MINIX 3 "out there" that will
16change everything that is said in this text. So much to do, so little
17time...
18.br
19\-\-\-\-\-\-\-
20.PP
21This manual page describes the MINIX 3 network setup to use serial line IP.
22The serial IP protocol used can either be the older SLIP by means of the
23.BR slip (8)
24program, or PPP (Point-to-Point Protocol), the newer and better serial IP
25protocol implemented by the
26.BR ppp (8)
27program. Alas standard MINIX 3 only supports SLIP.
28.PP
29In the following text all descriptions and examples will name SLIP or the
30.BR slip
31program, but one may just as well read PPP or
32.BR ppp .
33Where necessary the differences will be noted.
34.PP
35A typical use of the
36.B slip
37program is like this:
38.PP
39.RS
40.B "slip /dev/psip2 </dev/tty01 >/dev/tty01"
41.RE
42.PP
43The argument of the program, the
44.B /dev/psip2
45device, is one of the so-called "Pseudo IP" devices that the MINIX 3 TCP/IP
46driver
47.BR inet (8)
48offers to implement a virtual network on. On an ethernet IP packets are
49received or transmitted by the ethernet card, but packets on a pseudo IP
50network are channeled back to or received from a program running in user
51space, such as
52.BR slip .
53Standard input and output are used by
54.B slip
55to exchange packets with another SLIP implementation. This is normally
56through an RS-232 serial line like the second serial line
57.B /dev/tty01
58as used in the example above.
59.PP
60If we look at the flow of data over normal ethernet then this is what a TCP
61connection between two MINIX 3 machines,
62.B telnet
63for instance, looks like:
64.PP
65.in 0
66.ce 13
67[telnet]
68|
69/dev/tcp0
70|
71inet
72|
73[ethernet]
74|
75inet
76|
77/dev/tcp0
78|
79[in.telnetd]
80.PP
81One-half (!) of a SLIP connection would look like this:
82.PP
83.in 0
84.ce 12
85[telnet]
86|
87/dev/tcp2
88|
89inet
90|
91/dev/psip2
92|
93slip
94|
95[serial line]
96\&...
97.SS "Configuration for a SLIP network only"
98It is important to know that as far as
99.B inet
100is concerned the pseudo IP network is just another network, nothing special.
101So you have to convince
102.B inet
103that it has to send packets out over that network. One does this by
104setting a default route that makes
105.B inet
106believe that there is a router somewhere on the pseudo-IP network.
107.PP
108Assume your machine has been given the IP address
109.B 192.168.0.13
110by your service provider. Let's choose another address on that network,
111.B 192.168.0.1
112for instance. (You can use the address of the SLIP gateway if you want
113to make it look pretty, but it doesn't really matter, anything "out there"
114is ok.)
115To make MINIX 3 aware of the situation you have to configure the pseudo IP
116network. For Minix-vmd you need to look for the
117.B if-then-else-fi
118code in
119.B /usr/etc/rc
120that tests if
121.B /etc/rc.net
122should be run. Copy the lines in the
123.B else
124clause that starts network daemons to
125.B /etc/rc.net
126and add the following lines to make it look like this:
127.PP
128.RS
129.nf
130# My SLIP interface address.
131ifconfig -h 192.168.0.13 -n 255.255.255.0
132.SP
133# Standard network daemons.
134daemonize rarpd $named irdpd rip inetd
135.SP
136# Default route to the outside world.
137add_route -g 192.168.0.1
138.fi
139.RE
140.PP
141For standard MINIX 3 one has to edit
142.B /etc/rc
143instead at the point of the XXX comments. The
144.B ifconfig
145goes at the first XXX, the
146.B add_route
147at the second XXX. The result is conceptually the same as the example
148above. The important thing is the order: Configuration, Daemons, Routes.
149(First give addresses to the networks, let the daemons meditate over the
150results and possibly configure more networks (rarpd), then add routes to
151the configured networks.)
152.PP
153Just one thing left to do. The system uses the first ethernet network
154.RB ( eth0 ,
155.BR ip0 ,
156.BR tcp0 ,
157and
158.BR udp0 )
159as the default network. With the program
160.BR netdefault (8)
161you have to change the links to the default devices
162.RB ( eth / psip ,
163.BR ip ,
164.BR tcp ,
165and
166.BR udp )
167to point to the first pseudo IP network
168.RB ( psip2 ,
169.BR ip2 ,
170.BR tcp2 ,
171and
172.BR udp2 ):
173.PP
174.RS
175.B "netdefault psip2"
176.RE
177.PP
178In
179.B /etc/hosts
180list at least
181.B localhost
182and the name of your machine with its SLIP address. This way your machine
183will boot and know its own name. Now you need to find a way to let your
184system know the addresses of other machines. There are three ways:
185.PP
186.RS
187List the names and addresses of any other machine you wish to talk
188to in
189.BR /etc/hosts .
190Drawback: This will quickly become a pretty long list.
191.SP
192Create an
193.B /etc/resolv.conf
194that lists a nameserver at your ISP and
195.B 127.0.0.1
196(localhost). Drawback: With the SLIP link down it takes 5 to 10 seconds for
197a name lookup to time out on the remote name server before the local name
198server is tried.
199.SP
200Install the above
201.B /etc/resolv.conf
202when
203.B slip
204is started, and remove it when
205.B slip
206exits. Drawback: Long running programs only read
207.B /etc/resolv.conf
208at startup, so they don't notice it changing.
209.SP
210Run a real Internet name daemon from the
211.B named
212package. Drawback: Nontrivial to set up.
213.SS "Configuration for a SLIP - Ethernet router (simple case)"
214XXX
215.SS "Configuration for a SLIP - Ethernet router (complex case)"
216XXX
217.SH FILES
218.TP \w'/dev/psip*'u+5n
219.B /dev/psip*
220Pseudo-IP devices for use by
221.BR slip
222and
223.BR ppp .
224.SH "SEE ALSO"
225.BR boot (8),
226.BR inet (8),
227.BR netdefault (8),
228.BR term (1),
229.BR chat (1).
230.SH BUGS
231.SH AUTHOR
232Kees J. Bot (kjb@cs.vu.nl)
Note: See TracBrowser for help on using the repository browser.