?? serial-ip.8
字號:
.TH SERIAL-IP 8.SH NAMEserial-ip \- Serial IP (SLIP or PPP) setup.SH DESCRIPTION.de SP.if t .sp 0.4.if n .sp..\-\-\-\-\-\-\-.br.B Note:This text and the serial IP code is not finished. Code needs to be added to.B nonamedto allow it to be used both with and without a connection to the Internet,and by now there is a PPP program for standard MINIX 3 "out there" that willchange everything that is said in this text. So much to do, so littletime....br\-\-\-\-\-\-\-.PPThis manual page describes the MINIX 3 network setup to use serial line IP.The serial IP protocol used can either be the older SLIP by means of the.BR slip (8)program, or PPP (Point-to-Point Protocol), the newer and better serial IPprotocol implemented by the.BR ppp (8)program. Alas standard MINIX 3 only supports SLIP..PPIn the following text all descriptions and examples will name SLIP or the.BR slipprogram, but one may just as well read PPP or.BR ppp .Where necessary the differences will be noted..PPA typical use of the.B slipprogram is like this:.PP.RS.B "slip /dev/psip2 </dev/tty01 >/dev/tty01".RE.PPThe argument of the program, the.B /dev/psip2device, is one of the so-called "Pseudo IP" devices that the MINIX 3 TCP/IPdriver.BR inet (8)offers to implement a virtual network on. On an ethernet IP packets arereceived or transmitted by the ethernet card, but packets on a pseudo IPnetwork are channeled back to or received from a program running in userspace, such as.BR slip .Standard input and output are used by.B slipto exchange packets with another SLIP implementation. This is normallythrough an RS-232 serial line like the second serial line.B /dev/tty01as used in the example above..PPIf we look at the flow of data over normal ethernet then this is what a TCPconnection between two MINIX 3 machines,.B telnetfor instance, looks like:.PP.in 0.ce 13[telnet]|/dev/tcp0|inet|[ethernet]|inet|/dev/tcp0|[in.telnetd].PPOne-half (!) of a SLIP connection would look like this:.PP.in 0.ce 12[telnet]|/dev/tcp2|inet|/dev/psip2|slip|[serial line]\&....SS "Configuration for a SLIP network only"It is important to know that as far as.B inetis concerned the pseudo IP network is just another network, nothing special.So you have to convince.B inetthat it has to send packets out over that network. One does this bysetting a default route that makes.B inetbelieve that there is a router somewhere on the pseudo-IP network..PPAssume your machine has been given the IP address.B 192.168.0.13by your service provider. Let's choose another address on that network,.B 192.168.0.1for instance. (You can use the address of the SLIP gateway if you wantto make it look pretty, but it doesn't really matter, anything "out there"is ok.)To make MINIX 3 aware of the situation you have to configure the pseudo IPnetwork. For Minix-vmd you need to look for the.B if-then-else-ficode in.B /usr/etc/rcthat tests if.B /etc/rc.netshould be run. Copy the lines in the.B elseclause that starts network daemons to.B /etc/rc.netand add the following lines to make it look like this:.PP.RS.nf# My SLIP interface address.ifconfig -h 192.168.0.13 -n 255.255.255.0.SP# Standard network daemons.daemonize rarpd $named irdpd rip inetd.SP# Default route to the outside world.add_route -g 192.168.0.1.fi.RE.PPFor standard MINIX 3 one has to edit.B /etc/rcinstead at the point of the XXX comments. The.B ifconfiggoes at the first XXX, the.B add_routeat the second XXX. The result is conceptually the same as the exampleabove. The important thing is the order: Configuration, Daemons, Routes.(First give addresses to the networks, let the daemons meditate over theresults and possibly configure more networks (rarpd), then add routes tothe configured networks.).PPJust one thing left to do. The system uses the first ethernet network.RB ( eth0 ,.BR ip0 ,.BR tcp0 ,and.BR udp0 )as the default network. With the program.BR netdefault (8)you have to change the links to the default devices.RB ( eth / psip ,.BR ip ,.BR tcp ,and.BR udp )to point to the first pseudo IP network.RB ( psip2 ,.BR ip2 ,.BR tcp2 ,and.BR udp2 ):.PP.RS.B "netdefault psip2".RE.PPIn.B /etc/hostslist at least.B localhostand the name of your machine with its SLIP address. This way your machinewill boot and know its own name. Now you need to find a way to let yoursystem know the addresses of other machines. There are three ways:.PP.RSList the names and addresses of any other machine you wish to talkto in.BR /etc/hosts .Drawback: This will quickly become a pretty long list..SPCreate an.B /etc/resolv.confthat lists a nameserver at your ISP and.B 127.0.0.1(localhost). Drawback: With the SLIP link down it takes 5 to 10 seconds fora name lookup to time out on the remote name server before the local nameserver is tried..SPInstall the above.B /etc/resolv.confwhen.B slipis started, and remove it when.B slipexits. Drawback: Long running programs only read.B /etc/resolv.confat startup, so they don't notice it changing..SPRun a real Internet name daemon from the.B namedpackage. Drawback: Nontrivial to set up..SS "Configuration for a SLIP - Ethernet router (simple case)"XXX.SS "Configuration for a SLIP - Ethernet router (complex case)"XXX.SH FILES.TP \w'/dev/psip*'u+5n.B /dev/psip*Pseudo-IP devices for use by.BR slipand.BR ppp ..SH "SEE ALSO".BR boot (8),.BR inet (8),.BR netdefault (8),.BR term (1),.BR chat (1)..SH BUGS.SH AUTHORKees J. Bot (kjb@cs.vu.nl)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -