From 1c4519ff04f55dd8c3adc09b5892028c9f1869ae Mon Sep 17 00:00:00 2001 From: Gabor Kovesdan Date: Wed, 7 May 2008 15:10:38 +0000 Subject: [PATCH] - Whitespace cleanup and indentaion changes. Translators can ignore this change. --- .../books/handbook/ppp-and-slip/chapter.sgml | 376 ++++++++++++------ 1 file changed, 252 insertions(+), 124 deletions(-) diff --git a/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.sgml b/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.sgml index 0098244c49..623549da73 100644 --- a/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/ppp-and-slip/chapter.sgml @@ -92,10 +92,11 @@ Throughout in this chapter, user PPP will simply be - referred to as ppp unless a distinction needs to be made between it - and any other PPP software such as pppd. - Unless otherwise stated, all of the commands explained in this - chapter should be executed as root. + referred to as ppp unless a distinction + needs to be made between it and any other PPP software such as + pppd. Unless otherwise stated, all of + the commands explained in this chapter should be executed as + root. @@ -249,7 +250,11 @@ Automatic <application>PPP</application> Configuration - PPPconfiguration + + PPP + configuration + + Both ppp and pppd (the kernel level implementation of PPP) use the configuration files located in the /etc/ppp directory. @@ -266,7 +271,11 @@ PPP and Static IP Addresses - PPPwith static IP addresses + + PPP + with static IP addresses + + You will need to edit the /etc/ppp/ppp.conf configuration file. It should look similar to the example below. @@ -339,9 +348,11 @@ Identifies the device to which the modem is connected. COM1 is - /dev/cuad0 (or /dev/cuaa0 under &os; 5.X) and + /dev/cuad0 (or + /dev/cuaa0 under &os; 5.X) and COM2 is - /dev/cuad1 (or /dev/cuaa1). + /dev/cuad1 (or + /dev/cuaa1). @@ -358,7 +369,11 @@ Line 6 & 7: - PPPuser PPP + + PPP + user PPP + + The dial string. User PPP uses an expect-send syntax similar to the &man.chat.8; program. Refer to @@ -545,8 +560,16 @@ protocol: ppp PPP and Dynamic IP Addresses - PPPwith dynamic IP addresses - IPCP + + + PPP + with dynamic IP addresses + + + + IPCP + + If your service provider does not assign static IP addresses, ppp can be configured to negotiate the local and remote addresses. This is done by @@ -637,8 +660,12 @@ protocol: ppp Receiving Incoming Calls - PPPreceiving - incoming calls + + + PPP + receiving incoming calls + + When you configure ppp to receive incoming calls on a machine connected to a LAN, you must decide if you wish to forward packets to the LAN. If you @@ -659,7 +686,7 @@ protocol: ppp dial-up services using &man.getty.8;. An alternative to getty is mgetty, + url="http://www.leo.org/~doering/mgetty/index.html">mgetty, a smarter version of getty designed with dial-up lines in mind. @@ -704,7 +731,10 @@ protocol: ppp PPP Shells for Dynamic-IP Users - PPP shells + + + PPP shells + Create a file called /etc/ppp/ppp-shell containing the @@ -752,7 +782,10 @@ exec /usr/sbin/ppp -direct $IDENT PPP Shells for Static-IP Users - PPP shells + + + PPP shells + Create the ppp-shell file as above, and for each account with statically assigned IPs create a @@ -774,7 +807,8 @@ exec /usr/sbin/ppp -direct $IDENT - Setting Up <filename>ppp.conf</filename> for Dynamic-IP Users + Setting Up <filename>ppp.conf</filename> for Dynamic-IP + Users The /etc/ppp/ppp.conf file should contain something along the lines of: @@ -841,11 +875,18 @@ mary: <command>mgetty</command> and AutoPPP + - mgetty - - AutoPPP - LCP + mgetty + + + + AutoPPP + + + + LCP + Configuring and compiling mgetty with the AUTO_PPP option enabled @@ -906,9 +947,20 @@ exec /usr/sbin/ppp -direct pap$IDENT MS Extensions - DNS - NetBIOS - PPPMicrosoft extensions + + + DNS + + + + NetBIOS + + + + PPP + Microsoft extensions + + It is possible to configure PPP to supply DNS and NetBIOS nameserver addresses on demand. @@ -1028,35 +1080,41 @@ set nbns 203.14.100.5 - Using PPP Network Address Translation Capability - PPPNAT + Using PPP Network Address Translation Capability - PPP has ability to use internal NAT without kernel diverting - capabilities. This functionality may be enabled by the following - line in /etc/ppp/ppp.conf: + + PPPNAT + - nat enable yes + PPP has ability to use internal NAT without kernel diverting + capabilities. This functionality may be enabled by the following + line in /etc/ppp/ppp.conf: - Alternatively, PPP NAT may be enabled by command-line - option -nat. There is also - /etc/rc.conf knob named - ppp_nat, which is enabled by default. + nat enable yes - If you use this feature, you may also find useful - the following /etc/ppp/ppp.conf options - to enable incoming connections forwarding: + Alternatively, PPP NAT may be enabled by command-line + option -nat. There is also + /etc/rc.conf knob named + ppp_nat, which is enabled by default. - nat port tcp 10.0.0.2:ftp ftp + If you use this feature, you may also find useful + the following /etc/ppp/ppp.conf options + to enable incoming connections forwarding: + + nat port tcp 10.0.0.2:ftp ftp nat port tcp 10.0.0.2:http http - or do not trust the outside at all + or do not trust the outside at all - nat deny_incoming yes + nat deny_incoming yes Final System Configuration - PPPconfiguration + + + PPPconfiguration + You now have ppp configured, but there are a few more things to do before it is ready to work. They @@ -1095,19 +1153,19 @@ ifconfig_tun0= for further details. - Make sure that the router program is set to NO with - the following line in your + Make sure that the router program is set to + NO with the following line in your /etc/rc.conf: router_enable="NO" - routed - + routed + + It is important that the routed daemon is - not started, as - routed tends to delete the default routing - table entries created by ppp. + not started, as routed tends to delete the default + routing table entries created by ppp. It is probably a good idea to ensure that the sendmail_flags line does not include the @@ -1135,7 +1193,10 @@ ifconfig_tun0= 3 add 0 0 HISADDR 4 !bg sendmail -bd -q30m - SMTP + + SMTP + + If you do not like this, it is possible to set up a dfilter to block SMTP traffic. Refer to the sample files for further details. @@ -1264,7 +1325,11 @@ ifconfig_tun0= Setting Up Kernel PPP - PPPkernel PPP + + + PPP + kernel PPP + Before you start setting up PPP on your machine, make sure that pppd is located in @@ -1280,7 +1345,11 @@ ifconfig_tun0= modem line. - PPPserver + + PPP + server + + As a server — your machine is located on the network, and is used to connect other computers using @@ -1311,8 +1380,16 @@ ifconfig_tun0= Using <command>pppd</command> as a Client - PPPclient - Cisco + + + PPP + client + + + + Cisco + + The following /etc/ppp/options might be used to connect to a Cisco terminal server PPP line. @@ -1338,7 +1415,8 @@ defaultroute # put this if you want that PPP server will be your modem - Dial to the remote host using Kermit (or some other modem + Dial to the remote host using + Kermit (or some other modem program), and enter your user name and password (or whatever is needed to enable PPP on the remote host). @@ -1385,11 +1463,14 @@ ifconfig ppp0 delete kermit -y /etc/ppp/kermit.dial pppd /dev/tty01 19200 - Kermit - /etc/ppp/kermit.dial is a Kermit - script that dials and makes all necessary authorization on the - remote host (an example of such a script is attached to the end - of this document). + + Kermit + + + /etc/ppp/kermit.dial is a + Kermit script that dials and makes all + necessary authorization on the remote host (an example of such a + script is attached to the end of this document). Use the following /etc/ppp/pppdown script to disconnect the PPP line: @@ -1413,9 +1494,9 @@ fi kermit -y /etc/ppp/kermit.hup /etc/ppp/ppptest - Check to see if pppd is still running by executing - /usr/etc/ppp/ppptest, which should look like - this: + Check to see if pppd is still running by + executing /usr/etc/ppp/ppptest, which should look + like this: #!/bin/sh pid=`pgrep pppd` @@ -1725,19 +1806,22 @@ exit 1 Troubleshooting <acronym>PPP</acronym> Connections - PPPtroubleshooting + + PPP + troubleshooting + - This section covers a few issues which may arise when - using PPP over a modem connection. For instance, perhaps you - need to know exactly what prompts the system you are dialing - into will present. Some ISPs present the - ssword prompt, and others will present - password; if the ppp - script is not written accordingly, the login attempt will - fail. The most common way to debug ppp - connections is by connecting manually. The following - information will walk you through a manual connection step by - step. + This section covers a few issues which may arise when + using PPP over a modem connection. For instance, perhaps you + need to know exactly what prompts the system you are dialing + into will present. Some ISPs present the + ssword prompt, and others will present + password; if the ppp + script is not written accordingly, the login attempt will + fail. The most common way to debug ppp + connections is by connecting manually. The following + information will walk you through a manual connection step by + step. Check the Device Nodes @@ -1754,11 +1838,12 @@ exit 1 sio devices. These are the COM ports we need. If your modem acts like a standard serial port then you should see it listed on - sio1, or COM2. If so, you are not - required to rebuild the kernel. + sio1, or COM2. If + so, you are not required to rebuild the kernel. When matching up sio modem is on sio1 or COM2 if you are in DOS, then your - modem device would be /dev/cuad1 (or /dev/cuaa1 under &os; 5.X). + modem device would be /dev/cuad1 (or + /dev/cuaa1 under &os; 5.X). @@ -1782,7 +1867,8 @@ exit 1 ppp ON example> set device /dev/cuad1 We set our modem device, in this case it is - cuad1 (or /dev/cuaa1 under &os; 5.X). + cuad1 (or + /dev/cuaa1 under &os; 5.X). ppp ON example> set speed 115200 @@ -1986,7 +2072,12 @@ nameserver y.y.y.y Using PPP over Ethernet (PPPoE) - PPPover Ethernet + + + PPP + over Ethernet + + PPPoE PPP, over Ethernet @@ -2099,10 +2190,12 @@ ppp_profile="name_of_service_provider" - PPPoE with a &tm.3com; <trademark class="registered">HomeConnect</trademark> ADSL Modem Dual Link + PPPoE with a &tm.3com; <trademark + class="registered">HomeConnect</trademark> ADSL Modem Dual + Link This modem does not follow RFC 2516 + url="http://www.faqs.org/rfcs/rfc2516.html">RFC 2516 (A Method for transmitting PPP over Ethernet (PPPoE), written by L. Mamakos, K. Lidl, J. Evarts, D. Carrel, D. Simone, and R. Wheeler). Instead, different packet @@ -2122,14 +2215,20 @@ ppp_profile="name_of_service_provider" Unfortunately, because this is a system-wide setting, it is not possible to talk to a normal PPPoE client or server and a - &tm.3com; HomeConnect ADSL Modem at the same time. + &tm.3com; HomeConnect + ADSL Modem at the same time. Using <application>PPP</application> over ATM (PPPoA) - PPPover ATM + + + PPP + over ATM + + PPPoA PPP, over ATM @@ -2343,8 +2442,8 @@ ng0: flags=88d1<UP,POINTOPOINT,RUNNING,NOARP,SIMPLEX,MULTICAST> mtu 1500 This will open a tunnel for a PPP session to your DSL router. Ethernet DSL modems have a preconfigured LAN IP address which you - connect to. In the case of the Alcatel &speedtouch; Home this address is - 10.0.0.138. Your router documentation + connect to. In the case of the Alcatel &speedtouch; Home this address + is 10.0.0.138. Your router documentation should tell you which address your device uses. To open the tunnel and start a PPP session execute the following command: @@ -2406,7 +2505,12 @@ tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500 Setting Up a SLIP Client - SLIPclient + + + SLIP + client + + The following is one way to set up a FreeBSD machine for SLIP on a static host network. For dynamic hostname assignments (your address changes each time you dial up), you probably need to @@ -2415,15 +2519,18 @@ tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500 First, determine which serial port your modem is connected to. Many people set up a symbolic link, such as /dev/modem, to point to the real device name, - /dev/cuadN (or /dev/cuaaN under &os; 5.X). This allows you to - abstract the actual device name should you ever need to move - the modem to a different port. It can become quite cumbersome when you - need to fix a bunch of files in /etc and - .kermrc files all over the system! + /dev/cuadN (or /dev/cuaaN + under &os; 5.X). This allows you to abstract the actual device + name should you ever need to move the modem to a different port. It + can become quite cumbersome when you need to fix a bunch of files in + /etc and .kermrc files all + over the system! - /dev/cuad0 (or /dev/cuaa0 under &os; 5.X) is - COM1, cuad1 (or /dev/cuaa1) is + /dev/cuad0 (or + /dev/cuaa0 under &os; 5.X) is + COM1, cuad1 (or + /dev/cuaa1) is COM2, etc. @@ -2521,13 +2628,19 @@ nameserver 128.32.136.12 Making a SLIP Connection - SLIPconnecting with + + + SLIP + connecting with + + Dial up, type slip at the prompt, enter your machine name and password. What is required to be entered depends on your environment. If you use - Kermit, you can try a script like this: + Kermit, you can try a script like + this: # kermit setup set modem hayes @@ -2545,8 +2658,8 @@ output ***\x0d, echo \x0aCONNECTED\x0a Of course, you have to change the username and password to fit yours. After doing so, you can just type - slip from the Kermit prompt to - connect. + slip from the + Kermit prompt to connect. Leaving your password in plain text anywhere in the @@ -2556,7 +2669,8 @@ output ***\x0d, echo \x0aCONNECTED\x0a - Leave the Kermit there (you can suspend it by + Leave the Kermit there (you can + suspend it by Ctrl z @@ -2582,9 +2696,8 @@ output ***\x0d, echo \x0aCONNECTED\x0a to kill slattach. Keep in mind you must be root to do the above. Then go back to - kermit (by running fg if you suspended it) and - exit from - it (q). + kermit (by running fg if you + suspended it) and exit from it (q). The &man.slattach.8; manual page says you have to use ifconfig sl0 down @@ -2600,8 +2713,8 @@ output ***\x0d, echo \x0aCONNECTED\x0a Troubleshooting - If it does not work, feel free to ask on &a.net.name; mailing list. The things that - people tripped over so far: + If it does not work, feel free to ask on &a.net.name; mailing + list. The things that people tripped over so far: @@ -2658,7 +2771,11 @@ water.CS.Example localhost.Example. UGH 34 47641234 lo0 - 0.438 Setting Up a SLIP Server - SLIPserver + + + SLIP + server + This document provides suggestions for setting up SLIP Server services on a FreeBSD system, which typically means configuring @@ -2757,8 +2874,8 @@ water.CS.Example localhost.Example. UGH 34 47641234 lo0 - 0.438 any additional flags (autocomp). If something goes wrong, sliplogin usually logs good informational messages via the - syslogd daemon facility, which usually logs - to /var/log/messages (see the manual + syslogd daemon facility, which usually + logs to /var/log/messages (see the manual pages for &man.syslogd.8; and &man.syslog.conf.5; and perhaps check /etc/syslog.conf to see to what syslogd is logging and where it is @@ -2768,8 +2885,15 @@ water.CS.Example localhost.Example. UGH 34 47641234 lo0 - 0.438 Kernel Configuration - kernelconfiguration - SLIP + + + kernel + configuration + + + + SLIP + &os;'s default kernel (GENERIC) comes with SLIP (&man.sl.4;) support; in case of a custom @@ -2781,8 +2905,8 @@ water.CS.Example localhost.Example. UGH 34 47641234 lo0 - 0.438 By default, your &os; machine will not forward packets. If you want your FreeBSD SLIP Server to act as a router, you will have to edit the /etc/rc.conf file and - change the setting of the gateway_enable variable to - . + change the setting of the gateway_enable variable + to . You will then need to reboot for the new settings to take effect. @@ -2837,8 +2961,8 @@ water.CS.Example localhost.Example. UGH 34 47641234 lo0 - 0.438 (resolved to IP addresses by /etc/hosts or by the domain name service, depending on your specifications in the file - /etc/nsswitch.conf), and the network mask may be - a name that can be resolved by a lookup into + /etc/nsswitch.conf), and the network mask + may be a name that can be resolved by a lookup into /etc/networks. On a sample system, /etc/sliphome/slip.hosts looks like this: @@ -2955,7 +3079,11 @@ Shelmerg dc-slip sl-helmerg 0xfffffc00 autocomp - EthernetMAC address + + Ethernet + MAC address + + When using the example above, be sure to replace the Ethernet MAC address (00:11:22:33:44:55) with the MAC address of @@ -3073,8 +3201,8 @@ Shelmerg dc-slip sl-helmerg 0xfffffc00 autocomp - &gated; is proprietary software now and - will not be available as source code to the public anymore + &gated; is proprietary software now + and will not be available as source code to the public anymore (more info on the &gated; website). This section only exists to ensure backwards compatibility for @@ -3082,12 +3210,12 @@ Shelmerg dc-slip sl-helmerg 0xfffffc00 autocomp An alternative to the headaches of static routes is to - install &gated; on your FreeBSD SLIP server - and configure it to use the appropriate routing protocols + install &gated; on your FreeBSD SLIP + server and configure it to use the appropriate routing protocols (RIP/OSPF/BGP/EGP) to tell other routers about your SLIP - subnet. - You will need to write a /etc/gated.conf - file to configure your &gated;; here is a sample, similar to + subnet. You will need to write a + /etc/gated.conf file to configure your + &gated;; here is a sample, similar to what the author used on a FreeBSD SLIP server: # @@ -3139,10 +3267,10 @@ import proto rip interface ed { tracing to /var/tmp/gated.output for debugging &gated;'s activity; you can certainly turn off the tracing options if - &gated; works correctly for you. You will need to - change the xxx.xxx.yy's into the - network address of your own SLIP subnet (be sure to change the - net mask in the proto direct clause as + &gated; works correctly for you. You + will need to change the xxx.xxx.yy's + into the network address of your own SLIP subnet (be sure to change + the net mask in the proto direct clause as well). Once you have installed and configured