From owner-freebsd-doc@FreeBSD.ORG Thu Jan 21 00:40:02 2010 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0158110656A6 for ; Thu, 21 Jan 2010 00:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B4E388FC12 for ; Thu, 21 Jan 2010 00:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o0L0e1SL013158 for ; Thu, 21 Jan 2010 00:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o0L0e18e013157; Thu, 21 Jan 2010 00:40:01 GMT (envelope-from gnats) Resent-Date: Thu, 21 Jan 2010 00:40:01 GMT Resent-Message-Id: <201001210040.o0L0e18e013157@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Robert Jenssen Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76AE8106566C for ; Thu, 21 Jan 2010 00:36:47 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 64E668FC17 for ; Thu, 21 Jan 2010 00:36:47 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o0L0akKP036661 for ; Thu, 21 Jan 2010 00:36:46 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o0L0ak43036660; Thu, 21 Jan 2010 00:36:46 GMT (envelope-from nobody) Message-Id: <201001210036.o0L0ak43036660@www.freebsd.org> Date: Thu, 21 Jan 2010 00:36:46 GMT From: Robert Jenssen To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: docs/143041: doc/en__US.ISO8859-1 refers to slip, slirp, slattach and pppd X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2010 00:40:02 -0000 >Number: 143041 >Category: docs >Synopsis: doc/en__US.ISO8859-1 refers to slip, slirp, slattach and pppd >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Thu Jan 21 00:40:01 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Robert Jenssen >Release: 8-STABLE >Organization: >Environment: FreeBSD kraken 8.0-STABLE FreeBSD 8.0-STABLE #0: Wed Jan 20 07:40:20 EST 2010 root@kraken:/usr/obj/usr/src/sys/KRAKEN i386 >Description: slip, slirp, slattach and pppd have been removed from FreeBSD but they are still referred to in the documentation. (There are still references to slip, slirp, slattach and pppd under /usr/src.) >How-To-Repeat: >Fix: I have attached patches for en_US.ISO8859-1/articles/dialup-firewall/article.sgml en_US.ISO8859-1/books/faq/book.sgml en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.sgml en_US.ISO8859-1/books/handbook/preface/preface.sgml Patch attached with submission follows: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # article.sgml.diff # book.sgml.diff # chapter.sgml.diff # preface.sgml.diff # echo x - article.sgml.diff sed 's/^X//' >article.sgml.diff << '2523653e9c26f6a06853ddd875789c39' X*** orig/en_US.ISO8859-1/articles/dialup-firewall/article.sgml 2010-01-21 10:25:12.000000000 +1100 X--- new/en_US.ISO8859-1/articles/dialup-firewall/article.sgml 2010-01-21 10:37:14.000000000 +1100 X*************** X*** 269,304 **** X tun1, tun2 and so X on. X X! You should also note that &man.pppd.8; uses the X! ppp0 interface instead, so if you X! start the connection with &man.pppd.8; you must substitute X! tun0 for X! ppp0. A quick way to edit the X! firewall rules to reflect this change is shown below. The X! original rule set is backed up as X! fwrules_tun0. X! X! &prompt.user; cd /etc/firewall X! /etc/firewall&prompt.user; su X! Password: X! /etc/firewall&prompt.root; mv fwrules fwrules_tun0 X! /etc/firewall&prompt.root; cat fwrules_tun0 | sed s/tun0/ppp0/g > fwrules X! X! X! To know whether you are currently using &man.ppp.8; or X! &man.pppd.8; you can examine the output of X! &man.ifconfig.8; once the connection is up. E.g., for a X! connection made with &man.pppd.8; you would see something X! like this (showing only the relevant lines): X! X! &prompt.user; ifconfig X! (skipped...) X! ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1524 X! inet xxx.xxx.xxx.xxx --> xxx.xxx.xxx.xxx netmask 0xff000000 X! (skipped...) X! X! X! On the other hand, for a connection made with X &man.ppp.8; (user-ppp) you should see X something similar to this: X X--- 269,275 ---- X tun1, tun2 and so X on. X X! For a connection made with X &man.ppp.8; (user-ppp) you should see X something similar to this: X 2523653e9c26f6a06853ddd875789c39 echo x - book.sgml.diff sed 's/^X//' >book.sgml.diff << 'c0b1393dc42e3eff0b4aab955f5d387c' X*** orig/en_US.ISO8859-1/books/faq/book.sgml 2010-01-21 10:25:12.000000000 +1100 X--- new/en_US.ISO8859-1/books/faq/book.sgml 2010-01-21 10:48:32.000000000 +1100 X*************** X*** 7687,7715 **** X X X X! X! Does &os; support SLIP and PPP? X X X X! Yes. See the manual pages for &man.slattach.8;, X! &man.sliplogin.8;, &man.ppp.8;, and &man.pppd.8;. X! &man.ppp.8; and &man.pppd.8; provide support for both X! incoming and outgoing connections, while &man.sliplogin.8; X! deals exclusively with incoming connections, and X! &man.slattach.8; deals exclusively with outgoing X! connections. X X For more information on how to use these, please see the X Handbook chapter on PPP and SLIP. X X- X- If you only have access to the Internet through a X- shell account, you may want to have a look at X- the net/slirp package. X- It can provide you with (limited) access to services such as X- ftp and http direct from your local machine. X X X X--- 7687,7705 ---- X X X X! X! Does &os; support PPP? X X X X! Yes. See the manual pages for &man.ppp.8;. X! &man.ppp.8; provides support for both X! incoming and outgoing connections. X X For more information on how to use these, please see the X Handbook chapter on PPP. X X X X X*************** X*** 8956,8963 **** X This normally happens on server machines with slow disks X that are spawning a &man.getty.8; on the port, and executing X &man.ppp.8; from a login script or program after login. X! There were reports of it happening consistently when using X! slirp. The reason is that in the time taken between X &man.getty.8; exiting and &man.ppp.8; starting, the X client-side &man.ppp.8; starts sending Line Control Protocol X (LCP) packets. Because ECHO is still switched on for the X--- 8946,8952 ---- X This normally happens on server machines with slow disks X that are spawning a &man.getty.8; on the port, and executing X &man.ppp.8; from a login script or program after login. X! The reason is that in the time taken between X &man.getty.8; exiting and &man.ppp.8; starting, the X client-side &man.ppp.8; starts sending Line Control Protocol X (LCP) packets. Because ECHO is still switched on for the X*************** X*** 9719,9725 **** X Serial Communications X X This section answers common questions about serial X! communications with &os;. PPP and SLIP are covered in the Networking section. X X X--- 9708,9714 ---- X Serial Communications X X This section answers common questions about serial X! communications with &os;. PPP is covered in the Networking section. X X c0b1393dc42e3eff0b4aab955f5d387c echo x - chapter.sgml.diff sed 's/^X//' >chapter.sgml.diff << 'caa8c35a33a0bbab5ed23ad5917fd940' X*** orig/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.sgml 2010-01-21 10:25:12.000000000 +1100 X--- new/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.sgml 2010-01-21 10:35:57.000000000 +1100 X*************** X*** 4,10 **** X $FreeBSD: doc/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.sgml,v 1.192 2009/02/01 09:38:25 manolis Exp $ X --> X X! X X X X--- 4,10 ---- X $FreeBSD: doc/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.sgml,v 1.192 2009/02/01 09:38:25 manolis Exp $ X --> X X! X X X X*************** X*** 16,36 **** X X X X! PPP and SLIP X X! X Synopsis X X PPP X X- X- SLIP X- X X FreeBSD has a number of ways to link one computer to X another. To establish a network or Internet connection through a X dial-up modem, or to allow others to do so through you, requires X! the use of PPP or SLIP. This chapter describes setting up X these modem-based communication services in detail. X X After reading this chapter, you will know: X--- 16,33 ---- X X X X! PPP X X! X Synopsis X X PPP X X X FreeBSD has a number of ways to link one computer to X another. To establish a network or Internet connection through a X dial-up modem, or to allow others to do so through you, requires X! the use of PPP. This chapter describes setting up X these modem-based communication services in detail. X X After reading this chapter, you will know: X*************** X*** 40,48 **** X How to set up user PPP. X X X- How to set up kernel PPP. X- X- X How to set up PPPoE (PPP over X Ethernet). X X--- 37,42 ---- X*************** X*** 50,69 **** X How to set up PPPoA (PPP over X ATM). X X- X- How to configure and set up a SLIP client and X- server. X- X X X X PPP X user PPP X X- X- PPP X- kernel PPP X- X X PPP X over Ethernet X--- 44,55 ---- X*************** X*** 77,83 **** X X X Understand the basics and purpose of a dialup connection X! and PPP and/or SLIP. X X X X--- 63,69 ---- X X X Understand the basics and purpose of a dialup connection X! and PPP. X X X X*************** X*** 87,100 **** X This is expensive in terms of copying the data between the kernel X and userland, but allows a far more feature-rich PPP implementation. X User PPP uses the tun device to communicate X! with the outside world whereas kernel PPP uses the X! ppp device. X X X Throughout in this chapter, user PPP will simply be X referred to as ppp unless a distinction X! needs to be made between it and any other PPP software such as X! pppd. Unless otherwise stated, all of X the commands explained in this chapter should be executed as X root. X X--- 73,85 ---- X This is expensive in terms of copying the data between the kernel X and userland, but allows a far more feature-rich PPP implementation. X User PPP uses the tun device to communicate X! with the outside world. X X X Throughout in this chapter, user PPP will simply be X referred to as ppp unless a distinction X! needs to be made between it and any other PPP software. X! Unless otherwise stated, all of X the commands explained in this chapter should be executed as X root. X X*************** X*** 255,262 **** X configuration X X X! Both ppp and pppd X! (the kernel level implementation of PPP) use the configuration X files located in the /etc/ppp directory. X Examples for user ppp can be found in X /usr/share/examples/ppp/. X--- 240,246 ---- X configuration X X X! ppp uses the configuration X files located in the /etc/ppp directory. X Examples for user ppp can be found in X /usr/share/examples/ppp/. X*************** X*** 1305,1797 **** X X X X- X- X- X- X- Gennady B. X- Sorokopud X- Parts originally contributed by X- X- X- Robert X- Huff X- X- X- X- X- Using Kernel PPP X- X- X- Setting Up Kernel PPP X- X- X- PPP X- kernel PPP X- X- X- Before you start setting up PPP on your machine, make sure X- that pppd is located in X- /usr/sbin and the directory X- /etc/ppp exists. X- X- pppd can work in two modes: X- X- X- X- As a client — you want to connect your X- machine to the outside world via a PPP serial connection or X- modem line. X- X- X- X- PPP X- server X- X- X- X- As a server — your machine is located on X- the network, and is used to connect other computers using X- PPP. X- X- X- X- In both cases you will need to set up an options file X- (/etc/ppp/options or X- ~/.ppprc if you have more than one user on X- your machine that uses PPP). X- X- You will also need some modem/serial software (preferably X- comms/kermit), so you can dial and X- establish a connection with the remote host. X- X- X- X- X- X- X- Trev X- Roydhouse X- Based on information provided by X- X- X- X- X- X- Using <command>pppd</command> as a Client X- X- X- PPP X- client X- X- X- X- Cisco X- X- X- The following /etc/ppp/options might be X- used to connect to a Cisco terminal server PPP line. X- X- crtscts # enable hardware flow control X- modem # modem control line X- noipdefault # remote PPP server must supply your IP address X- # if the remote host does not send your IP during IPCP X- # negotiation, remove this option X- passive # wait for LCP packets X- domain ppp.foo.com # put your domain name here X- X- :remote_ip # put the IP of remote PPP host here X- # it will be used to route packets via PPP link X- # if you didn't specified the noipdefault option X- # change this line to local_ip:remote_ip X- X- defaultroute # put this if you want that PPP server will be your X- # default router X- X- To connect: X- X- Kermit X- modem X- X- X- Dial to the remote host using X- Kermit (or some other modem X- program), and enter your user name and password (or whatever X- is needed to enable PPP on the remote host). X- X- X- X- Exit Kermit (without X- hanging up the line). X- X- X- X- Enter the following: X- X- &prompt.root; /usr/sbin/pppd /dev/tty01 19200 X- X- Be sure to use the appropriate speed and device name. X- X- X- X- Now your computer is connected with PPP. If the connection X- fails, you can add the option to the X- /etc/ppp/options file, and check console messages X- to track the problem. X- X- Following /etc/ppp/pppup script will make X- all 3 stages automatic: X- X- #!/bin/sh X- pgrep -l pppd X- pid=`pgrep pppd` X- if [ "X${pid}" != "X" ] ; then X- echo 'killing pppd, PID=' ${pid} X- kill ${pid} X- fi X- pgrep -l kermit X- pid=`pgrep kermit` X- if [ "X${pid}" != "X" ] ; then X- echo 'killing kermit, PID=' ${pid} X- kill -9 ${pid} X- fi X- X- ifconfig ppp0 down X- ifconfig ppp0 delete X- X- kermit -y /etc/ppp/kermit.dial X- pppd /dev/tty01 19200 X- X- X- Kermit X- X- X- /etc/ppp/kermit.dial is a X- Kermit script that dials and makes all X- necessary authorization on the remote host (an example of such a X- script is attached to the end of this document). X- X- Use the following /etc/ppp/pppdown script X- to disconnect the PPP line: X- X- #!/bin/sh X- pid=`pgrep pppd` X- if [ X${pid} != "X" ] ; then X- echo 'killing pppd, PID=' ${pid} X- kill -TERM ${pid} X- fi X- X- pgrep -l kermit X- pid=`pgrep kermit` X- if [ "X${pid}" != "X" ] ; then X- echo 'killing kermit, PID=' ${pid} X- kill -9 ${pid} X- fi X- X- /sbin/ifconfig ppp0 down X- /sbin/ifconfig ppp0 delete X- kermit -y /etc/ppp/kermit.hup X- /etc/ppp/ppptest X- X- Check to see if pppd is still running by X- executing /usr/etc/ppp/ppptest, which should look X- like this: X- X- #!/bin/sh X- pid=`pgrep pppd` X- if [ X${pid} != "X" ] ; then X- echo 'pppd running: PID=' ${pid-NONE} X- else X- echo 'No pppd running.' X- fi X- set -x X- netstat -n -I ppp0 X- ifconfig ppp0 X- X- To hang up the modem, execute X- /etc/ppp/kermit.hup, which should X- contain: X- X- set line /dev/tty01 ; put your modem device here X- set speed 19200 X- set file type binary X- set file names literal X- set win 8 X- set rec pack 1024 X- set send pack 1024 X- set block 3 X- set term bytesize 8 X- set command bytesize 8 X- set flow none X- X- pau 1 X- out +++ X- inp 5 OK X- out ATH0\13 X- echo \13 X- exit X- X- Here is an alternate method using chat X- instead of kermit: X- X- The following two files are sufficient to accomplish a X- pppd connection. X- X- /etc/ppp/options: X- X- /dev/cuad1 115200 X- X- crtscts # enable hardware flow control X- modem # modem control line X- connect "/usr/bin/chat -f /etc/ppp/login.chat.script" X- noipdefault # remote PPP serve must supply your IP address X- # if the remote host doesn't send your IP during X- # IPCP negotiation, remove this option X- passive # wait for LCP packets X- domain your.domain # put your domain name here X- X- : # put the IP of remote PPP host here X- # it will be used to route packets via PPP link X- # if you didn't specified the noipdefault option X- # change this line to local_ip:remote_ip X- X- defaultroute # put this if you want that PPP server will be X- # your default router X- X- /etc/ppp/login.chat.script: X- X- X- The following should go on a single line. X- X- X- ABORT BUSY ABORT 'NO CARRIER' "" AT OK ATDTphone.number X- CONNECT "" TIMEOUT 10 ogin:-\\r-ogin: login-id X- TIMEOUT 5 sword: password X- X- Once these are installed and modified correctly, all you need X- to do is run pppd, like so: X- X- &prompt.root; pppd X- X- X- X- Using <command>pppd</command> as a Server X- X- /etc/ppp/options should contain something X- similar to the following: X- X- crtscts # Hardware flow control X- netmask 255.255.255.0 # netmask (not required) X- 192.114.208.20:192.114.208.165 # IP's of local and remote hosts X- # local ip must be different from one X- # you assigned to the Ethernet (or other) X- # interface on your machine. X- # remote IP is IP address that will be X- # assigned to the remote machine X- domain ppp.foo.com # your domain X- passive # wait for LCP X- modem # modem line X- X- The following /etc/ppp/pppserv script X- will tell pppd to behave as a X- server: X- X- #!/bin/sh X- pgrep -l pppd X- pid=`pgrep pppd` X- if [ "X${pid}" != "X" ] ; then X- echo 'killing pppd, PID=' ${pid} X- kill ${pid} X- fi X- pgrep -l kermit X- pid=`pgrep kermit` X- if [ "X${pid}" != "X" ] ; then X- echo 'killing kermit, PID=' ${pid} X- kill -9 ${pid} X- fi X- X- # reset ppp interface X- ifconfig ppp0 down X- ifconfig ppp0 delete X- X- # enable autoanswer mode X- kermit -y /etc/ppp/kermit.ans X- X- # run ppp X- pppd /dev/tty01 19200 X- X- Use this /etc/ppp/pppservdown script to X- stop the server: X- X- #!/bin/sh X- pgrep -l pppd X- pid=`pgrep pppd` X- if [ "X${pid}" != "X" ] ; then X- echo 'killing pppd, PID=' ${pid} X- kill ${pid} X- fi X- pgrep -l kermit X- pid=`pgrep kermit` X- if [ "X${pid}" != "X" ] ; then X- echo 'killing kermit, PID=' ${pid} X- kill -9 ${pid} X- fi X- ifconfig ppp0 down X- ifconfig ppp0 delete X- X- kermit -y /etc/ppp/kermit.noans X- X- The following Kermit script X- (/etc/ppp/kermit.ans) will enable/disable X- autoanswer mode on your modem. It should look like this: X- X- set line /dev/tty01 X- set speed 19200 X- set file type binary X- set file names literal X- set win 8 X- set rec pack 1024 X- set send pack 1024 X- set block 3 X- set term bytesize 8 X- set command bytesize 8 X- set flow none X- X- pau 1 X- out +++ X- inp 5 OK X- out ATH0\13 X- inp 5 OK X- echo \13 X- out ATS0=1\13 ; change this to out ATS0=0\13 if you want to disable X- ; autoanswer mode X- inp 5 OK X- echo \13 X- exit X- X- A script named /etc/ppp/kermit.dial is X- used for dialing and authenticating on the remote host. You will X- need to customize it for your needs. Put your login and password X- in this script; you will also need to change the input statement X- depending on responses from your modem and remote host. X- X- ; X- ; put the com line attached to the modem here: X- ; X- set line /dev/tty01 X- ; X- ; put the modem speed here: X- ; X- set speed 19200 X- set file type binary ; full 8 bit file xfer X- set file names literal X- set win 8 X- set rec pack 1024 X- set send pack 1024 X- set block 3 X- set term bytesize 8 X- set command bytesize 8 X- set flow none X- set modem hayes X- set dial hangup off X- set carrier auto ; Then SET CARRIER if necessary, X- set dial display on ; Then SET DIAL if necessary, X- set input echo on X- set input timeout proceed X- set input case ignore X- def \%x 0 ; login prompt counter X- goto slhup X- X- :slcmd ; put the modem in command mode X- echo Put the modem in command mode. X- clear ; Clear unread characters from input buffer X- pause 1 X- output +++ ; hayes escape sequence X- input 1 OK\13\10 ; wait for OK X- if success goto slhup X- output \13 X- pause 1 X- output at\13 X- input 1 OK\13\10 X- if fail goto slcmd ; if modem doesn't answer OK, try again X- X- :slhup ; hang up the phone X- clear ; Clear unread characters from input buffer X- pause 1 X- echo Hanging up the phone. X- output ath0\13 ; hayes command for on hook X- input 2 OK\13\10 X- if fail goto slcmd ; if no OK answer, put modem in command mode X- X- :sldial ; dial the number X- pause 1 X- echo Dialing. X- output atdt9,550311\13\10 ; put phone number here X- assign \%x 0 ; zero the time counter X- X- :look X- clear ; Clear unread characters from input buffer X- increment \%x ; Count the seconds X- input 1 {CONNECT } X- if success goto sllogin X- reinput 1 {NO CARRIER\13\10} X- if success goto sldial X- reinput 1 {NO DIALTONE\13\10} X- if success goto slnodial X- reinput 1 {\255} X- if success goto slhup X- reinput 1 {\127} X- if success goto slhup X- if < \%x 60 goto look X- else goto slhup X- X- :sllogin ; login X- assign \%x 0 ; zero the time counter X- pause 1 X- echo Looking for login prompt. X- X- :slloop X- increment \%x ; Count the seconds X- clear ; Clear unread characters from input buffer X- output \13 X- ; X- ; put your expected login prompt here: X- ; X- input 1 {Username: } X- if success goto sluid X- reinput 1 {\255} X- if success goto slhup X- reinput 1 {\127} X- if success goto slhup X- if < \%x 10 goto slloop ; try 10 times to get a login prompt X- else goto slhup ; hang up and start again if 10 failures X- X- :sluid X- ; X- ; put your userid here: X- ; X- output ppp-login\13 X- input 1 {Password: } X- ; X- ; put your password here: X- ; X- output ppp-password\13 X- input 1 {Entering SLIP mode.} X- echo X- quit X- X- :slnodial X- echo \7No dialtone. Check the telephone line!\7 X- exit 1 X- X- ; local variables: X- ; mode: csh X- ; comment-start: "; " X- ; comment-start-skip: "; " X- ; end: X- X- X- X X X X--- 1289,1294 ---- X*************** X*** 2480,3202 **** X X X X- X- X- X- X- Satoshi X- Asami X- Originally contributed by X- X- X- X- X- Guy X- Helmer X- With input from X- X- X- Piero X- Serini X- X- X- X- X- Using SLIP X- SLIP X- X- X- Setting Up a SLIP Client X- X- X- SLIP X- client X- X- X- The following is one way to set up a FreeBSD machine for SLIP X- on a static host network. For dynamic hostname assignments (your X- address changes each time you dial up), you probably need to X- have a more complex setup. X- X- First, determine which serial port your modem is connected to. X- Many people set up a symbolic link, such as X- /dev/modem, to point to the real device name, X- /dev/cuadN. X- This allows you to abstract the actual device X- name should you ever need to move the modem to a different port. It X- can become quite cumbersome when you need to fix a bunch of files in X- /etc and .kermrc files all X- over the system! X- X- X- /dev/cuad0 X- is X- COM1, /dev/cuad1 X- is X- COM2, etc. X- X- X- Make sure you have the following in your kernel configuration X- file: X- X- device sl X- X- It is included in the GENERIC kernel, so X- this should not be a problem unless you have deleted it. X- X- X- Things You Have to Do Only Once X- X- X- X- Add your home machine, the gateway and nameservers to X- your /etc/hosts file. Ours looks like X- this: X- X- 127.0.0.1 localhost loghost X- 136.152.64.181 water.CS.Example.EDU water.CS water X- 136.152.64.1 inr-3.CS.Example.EDU inr-3 slip-gateway X- 128.32.136.9 ns1.Example.EDU ns1 X- 128.32.136.12 ns2.Example.EDU ns2 X- X- X- X- Make sure you have files before X- dns in the hosts: X- section of your /etc/nsswitch.conf X- file. Without these parameters funny things may X- happen. X- X- X- X- Edit the /etc/rc.conf file. X- X- X- X- Set your hostname by editing the line that X- says: X- X- hostname="myname.my.domain" X- X- Your machine's full Internet hostname should be X- placed here. X- X- X- default route X- X- Designate the default router by changing the X- line: X- X- defaultrouter="NO" X- X- to: X- X- defaultrouter="slip-gateway" X- X- X- X- X- X- Make a file /etc/resolv.conf which X- contains: X- X- domain CS.Example.EDU X- nameserver 128.32.136.9 X- nameserver 128.32.136.12 X- X- nameserver X- domain name X- As you can see, these set up the nameserver hosts. Of X- course, the actual domain names and addresses depend on your X- environment. X- X- X- X- Set the password for root and X- toor (and any other X- accounts that do not have a password). X- X- X- X- Reboot your machine and make sure it comes up with the X- correct hostname. X- X- X- X- X- X- Making a SLIP Connection X- X- X- SLIP X- connecting with X- X- X- X- X- Dial up, type slip at the prompt, X- enter your machine name and password. What is required to X- be entered depends on your environment. If you use X- Kermit, you can try a script like X- this: X- X- # kermit setup X- set modem hayes X- set line /dev/modem X- set speed 115200 X- set parity none X- set flow rts/cts X- set terminal bytesize 8 X- set file type binary X- # The next macro will dial up and login X- define slip dial 643-9600, input 10 =>, if failure stop, - X- output slip\x0d, input 10 Username:, if failure stop, - X- output silvia\x0d, input 10 Password:, if failure stop, - X- output ***\x0d, echo \x0aCONNECTED\x0a X- X- Of course, you have to change the username and password X- to fit yours. After doing so, you can just type X- slip from the X- Kermit prompt to connect. X- X- X- Leaving your password in plain text anywhere in the X- filesystem is generally a bad idea. X- Do it at your own risk. X- X- X- X- X- Leave the Kermit there (you can X- suspend it by X- X- Ctrl X- z X- ) and as root, type: X- X- &prompt.root; slattach -h -c -s 115200 /dev/modem X- X- If you are able to ping hosts on the X- other side of the router, you are connected! If it does not X- work, you might want to try instead of X- as an argument to X- slattach. X- X- X- X- X- X- How to Shutdown the Connection X- X- Do the following: X- X- &prompt.root; kill -INT `cat /var/run/slattach.modem.pid` X- X- to kill slattach. Keep in mind you must be X- root to do the above. Then go back to X- kermit (by running fg if you X- suspended it) and exit from it (q). X- X- The &man.slattach.8; manual page says you have X- to use ifconfig sl0 down X- to mark the interface down, but this does not X- seem to make any difference. X- (ifconfig sl0 reports the same thing.) X- X- Some times, your modem might refuse to drop the carrier. X- In that case, simply start kermit and quit X- it again. It usually goes out on the second try. X- X- X- X- Troubleshooting X- X- If it does not work, feel free to ask on &a.net.name; mailing X- list. The things that people tripped over so far: X- X- X- X- Not using or in X- slattach (This should not be fatal, X- but some users have reported that this solves their X- problems.) X- X- X- X- Using instead of X- (might be hard to see the difference on X- some fonts). X- X- X- X- Try ifconfig sl0 to see your X- interface status. For example, you might get: X- X- &prompt.root; ifconfig sl0 X- sl0: flags=10<POINTOPOINT> X- inet 136.152.64.181 --> 136.152.64.1 netmask ffffff00 X- X- X- X- If you get no route to host X- messages from &man.ping.8;, there may be a problem with your X- routing table. You can use the netstat -r X- command to display the current routes : X- X- &prompt.root; netstat -r X- Routing tables X- Destination Gateway Flags Refs Use IfaceMTU Rtt Netmasks: X- X- (root node) X- (root node) X- X- Route Tree for Protocol Family inet: X- (root node) => X- default inr-3.Example.EDU UG 8 224515 sl0 - - X- localhost.Exampl localhost.Example. UH 5 42127 lo0 - 0.438 X- inr-3.Example.ED water.CS.Example.E UH 1 0 sl0 - - X- water.CS.Example localhost.Example. UGH 34 47641234 lo0 - 0.438 X- (root node) X- X- The preceding examples are from a relatively busy system. X- The numbers on your system will vary depending on X- network activity. X- X- X- X- X- X- X- X- Setting Up a SLIP Server X- X- X- SLIP X- server X- X- X- This document provides suggestions for setting up SLIP Server X- services on a FreeBSD system, which typically means configuring X- your system to automatically start up connections upon login for X- remote SLIP clients. X- X- X- X- X- Prerequisites X- TCP/IP networking X- This section is very technical in nature, so background X- knowledge is required. It is assumed that you are familiar with X- the TCP/IP network protocol, and in particular, network and node X- addressing, network address masks, subnetting, routing, and X- routing protocols, such as RIP. Configuring SLIP services on a X- dial-up server requires a knowledge of these concepts, and if X- you are not familiar with them, please read a copy of either X- Craig Hunt's TCP/IP Network Administration X- published by O'Reilly & Associates, Inc. (ISBN Number X- 0-937175-82-X), or Douglas Comer's books on the TCP/IP X- protocol. X- X- modem X- It is further assumed that you have already set up your X- modem(s) and configured the appropriate system files to allow X- logins through your modems. If you have not prepared your X- system for this yet, please see for details on dialup services X- configuration. X- You may also want to check the manual pages for &man.sio.4; for X- information on the serial port device driver and &man.ttys.5;, X- &man.gettytab.5;, &man.getty.8;, & &man.init.8; for X- information relevant to configuring the system to accept logins X- on modems, and perhaps &man.stty.1; for information on setting X- serial port parameters (such as clocal for X- directly-connected serial interfaces). X- X- X- X- Quick Overview X- X- In its typical configuration, using FreeBSD as a SLIP server X- works as follows: a SLIP user dials up your FreeBSD SLIP Server X- system and logs in with a special SLIP login ID that uses X- /usr/sbin/sliplogin as the special user's X- shell. The sliplogin program browses the X- file /etc/sliphome/slip.hosts to find a X- matching line for the special user, and if it finds a match, X- connects the serial line to an available SLIP interface and then X- runs the shell script X- /etc/sliphome/slip.login to configure the X- SLIP interface. X- X- X- An Example of a SLIP Server Login X- X- For example, if a SLIP user ID were X- Shelmerg, Shelmerg's X- entry in /etc/master.passwd would look X- something like this: X- X- Shelmerg:password:1964:89::0:0:Guy Helmer - SLIP:/usr/users/Shelmerg:/usr/sbin/sliplogin X- X- When Shelmerg logs in, X- sliplogin will search X- /etc/sliphome/slip.hosts for a line that X- had a matching user ID; for example, there may be a line in X- /etc/sliphome/slip.hosts that X- reads: X- X- Shelmerg dc-slip sl-helmer 0xfffffc00 autocomp X- X- sliplogin will find that matching line, X- hook the serial line into the next available SLIP interface, X- and then execute /etc/sliphome/slip.login X- like this: X- X- /etc/sliphome/slip.login 0 19200 Shelmerg dc-slip sl-helmer 0xfffffc00 autocomp X- X- If all goes well, X- /etc/sliphome/slip.login will issue an X- ifconfig for the SLIP interface to which X- sliplogin attached itself (SLIP interface X- 0, in the above example, which was the first parameter in the X- list given to slip.login) to set the X- local IP address (dc-slip), remote IP address X- (sl-helmer), network mask for the SLIP X- interface (0xfffffc00), and X- any additional flags (autocomp). If X- something goes wrong, sliplogin usually X- logs good informational messages via the X- syslogd daemon facility, which usually X- logs to /var/log/messages (see the manual X- pages for &man.syslogd.8; and &man.syslog.conf.5; and perhaps X- check /etc/syslog.conf to see to what X- syslogd is logging and where it is X- logging to). X- X- X- X- X- Kernel Configuration X- X- X- kernel X- configuration X- X- X- X- SLIP X- X- X- &os;'s default kernel (GENERIC) X- comes with SLIP (&man.sl.4;) support; in case of a custom X- kernel, you have to add the following line to your kernel X- configuration file: X- X- device sl X- X- By default, your &os; machine will not forward packets. X- If you want your FreeBSD SLIP Server to act as a router, you X- will have to edit the /etc/rc.conf file and X- change the setting of the gateway_enable variable X- to . This will make sure that setting the X- routing option will be persistent after a reboot. X- X- To apply the settings immediately you can execute the X- following command as root: X- X- &prompt.root; /etc/rc.d/routing start X- X- Please refer to on X- Configuring the FreeBSD Kernel for help in X- reconfiguring your kernel. X- X- X- X- Sliplogin Configuration X- X- As mentioned earlier, there are three files in the X- /etc/sliphome directory that are part of X- the configuration for /usr/sbin/sliplogin X- (see &man.sliplogin.8; for the actual manual page for X- sliplogin): slip.hosts, X- which defines the SLIP users and their associated IP X- addresses; slip.login, which usually just X- configures the SLIP interface; and (optionally) X- slip.logout, which undoes X- slip.login's effects when the serial X- connection is terminated. X- X- X- <filename>slip.hosts</filename> Configuration X- X- /etc/sliphome/slip.hosts contains X- lines which have at least four items separated by X- whitespace: X- X- X- X- SLIP user's login ID X- X- X- X- Local address (local to the SLIP server) of the SLIP X- link X- X- X- X- Remote address of the SLIP link X- X- X- X- Network mask X- X- X- X- The local and remote addresses may be host names X- (resolved to IP addresses by X- /etc/hosts or by the domain name X- service, depending on your specifications in the file X- /etc/nsswitch.conf), and the network mask X- may be a name that can be resolved by a lookup into X- /etc/networks. On a sample system, X- /etc/sliphome/slip.hosts looks like X- this: X- X- # X- # login local-addr remote-addr mask opt1 opt2 X- # (normal,compress,noicmp) X- # X- Shelmerg dc-slip sl-helmerg 0xfffffc00 autocomp X- X- At the end of the line is one or more of the X- options: X- X- X- X- — no header X- compression X- X- X- X- — compress X- headers X- X- X- X- — compress headers if X- the remote end allows it X- X- X- X- — disable ICMP packets X- (so any ping packets will be dropped instead X- of using up your bandwidth) X- X- X- X- SLIP X- TCP/IP networking X- Your choice of local and remote addresses for your SLIP X- links depends on whether you are going to dedicate a TCP/IP X- subnet or if you are going to use proxy ARP on X- your SLIP server (it is not true proxy ARP, but X- that is the terminology used in this section to describe it). X- If you are not sure which method to select or how to assign IP X- addresses, please refer to the TCP/IP books referenced in X- the SLIP Prerequisites () X- and/or consult your IP network manager. X- X- If you are going to use a separate subnet for your SLIP X- clients, you will need to allocate the subnet number out of X- your assigned IP network number and assign each of your SLIP X- client's IP numbers out of that subnet. Then, you will X- probably need to configure a static route to the SLIP X- subnet via your SLIP server on your nearest IP router. X- X- Ethernet X- Otherwise, if you will use the proxy ARP X- method, you will need to assign your SLIP client's IP X- addresses out of your SLIP server's Ethernet subnet, and you X- will also need to adjust your X- /etc/sliphome/slip.login and X- /etc/sliphome/slip.logout scripts to use X- &man.arp.8; to manage the proxy ARP entries in the SLIP X- server's ARP table. X- X- X- X- <filename>slip.login</filename> Configuration X- X- The typical /etc/sliphome/slip.login X- file looks like this: X- X- #!/bin/sh - X- # X- # @(#)slip.login 5.1 (Berkeley) 7/1/90 X- X- # X- # generic login file for a slip line. sliplogin invokes this with X- # the parameters: X- # 1 2 3 4 5 6 7-n X- # slipunit ttyspeed loginname local-addr remote-addr mask opt-args X- # X- /sbin/ifconfig sl$1 inet $4 $5 netmask $6 X- X- This slip.login file merely runs X- ifconfig for the appropriate SLIP interface X- with the local and remote addresses and network mask of the X- SLIP interface. X- X- If you have decided to use the proxy ARP X- method (instead of using a separate subnet for your SLIP X- clients), your /etc/sliphome/slip.login X- file will need to look something like this: X- X- #!/bin/sh - X- # X- # @(#)slip.login 5.1 (Berkeley) 7/1/90 X- X- # X- # generic login file for a slip line. sliplogin invokes this with X- # the parameters: X- # 1 2 3 4 5 6 7-n X- # slipunit ttyspeed loginname local-addr remote-addr mask opt-args X- # X- /sbin/ifconfig sl$1 inet $4 $5 netmask $6 X- # Answer ARP requests for the SLIP client with our Ethernet addr X- /usr/sbin/arp -s $5 00:11:22:33:44:55 pub X- X- The additional line in this X- slip.login, arp -s X- $5 00:11:22:33:44:55 pub, creates an ARP entry X- in the SLIP server's ARP table. This ARP entry causes the X- SLIP server to respond with the SLIP server's Ethernet MAC X- address whenever another IP node on the Ethernet asks to X- speak to the SLIP client's IP address. X- X- X- Ethernet X- MAC address X- X- X- When using the example above, be sure to replace the X- Ethernet MAC address (00:11:22:33:44:55) with the MAC address of X- your system's Ethernet card, or your proxy ARP X- will definitely not work! You can discover your SLIP server's X- Ethernet MAC address by looking at the results of running X- netstat -i; the second line of the output X- should look something like: X- X- ed0 1500 <Link>0.2.c1.28.5f.4a 191923 0 129457 0 116 X- X- This indicates that this particular system's Ethernet MAC X- address is 00:02:c1:28:5f:4a X- — the periods in the Ethernet MAC address given by X- netstat -i must be changed to colons and X- leading zeros should be added to each single-digit hexadecimal X- number to convert the address into the form that &man.arp.8; X- desires; see the manual page on &man.arp.8; for complete X- information on usage. X- X- X- When you create X- /etc/sliphome/slip.login and X- /etc/sliphome/slip.logout, the X- execute bit (i.e., chmod 755 X- /etc/sliphome/slip.login /etc/sliphome/slip.logout) X- must be set, or sliplogin will be unable X- to execute it. X- X- X- X- X- <filename>slip.logout</filename> Configuration X- X- /etc/sliphome/slip.logout is not X- strictly needed (unless you are implementing proxy X- ARP), but if you decide to create it, this is an X- example of a basic X- slip.logout script: X- X- #!/bin/sh - X- # X- # slip.logout X- X- # X- # logout file for a slip line. sliplogin invokes this with X- # the parameters: X- # 1 2 3 4 5 6 7-n X- # slipunit ttyspeed loginname local-addr remote-addr mask opt-args X- # X- /sbin/ifconfig sl$1 down X- X- If you are using proxy ARP, you will want to X- have /etc/sliphome/slip.logout remove the X- ARP entry for the SLIP client: X- X- #!/bin/sh - X- # X- # @(#)slip.logout X- X- # X- # logout file for a slip line. sliplogin invokes this with X- # the parameters: X- # 1 2 3 4 5 6 7-n X- # slipunit ttyspeed loginname local-addr remote-addr mask opt-args X- # X- /sbin/ifconfig sl$1 down X- # Quit answering ARP requests for the SLIP client X- /usr/sbin/arp -d $5 X- X- The arp -d $5 removes the ARP entry X- that the proxy ARP X- slip.login added when the SLIP client X- logged in. X- X- It bears repeating: make sure X- /etc/sliphome/slip.logout has the execute X- bit set after you create it (i.e., chmod 755 X- /etc/sliphome/slip.logout). X- X- X- X- X- Routing Considerations X- X- SLIP X- routing X- X- If you are not using the proxy ARP method for X- routing packets between your SLIP clients and the rest of your X- network (and perhaps the Internet), you will probably X- have to add static routes to your closest default router(s) to X- route your SLIP clients subnet via your SLIP server. X- X- X- Static Routes X- static routes X- X- Adding static routes to your nearest default routers X- can be troublesome (or impossible if you do not have X- authority to do so...). If you have a multiple-router X- network in your organization, some routers, such as those X- made by Cisco and Proteon, may not only need to be X- configured with the static route to the SLIP subnet, but X- also need to be told which static routes to tell other X- routers about, so some expertise and X- troubleshooting/tweaking may be necessary to get X- static-route-based routing to work. X- X- X- X- X X X