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