⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 faq

📁 经典的ppp程序
💻
📖 第 1 页 / 共 2 页
字号:
	  that the client may use.- The file may contain comments, which begin with a `#' and continueto the end of the line.- Double quotes `"' should be used around a field if it containscharacters with special significance, such as space, tab, `#', etc.- The backslash `\' may be used before characters with specialsignificance (space, tab, `#', `\', etc.) to remove that significance.Some important points to note:* A machine can be *both* a "client" and a "server" for the purposesof authentication - this happens when both peers require the other toauthenticate itself.  So A would authenticate itself to B, and B wouldalso authenticate itself to A (possibly using a differentauthentication protocol).* If both the "client" and the "server" are running ppp-2.x, they needto have a similar entry in the appropriate secrets file; the first twofields are *not* swapped on the client, compared to the server.  Sothe client might have an entry like this:	ay	bee	"our little secret"	-and the corresponding entry on the server could look like this:	ay	bee	"our little secret"	123.45.67.89------------------------------------------------------------------------Q: Explain about PAP and CHAP?PAP stands for the Password Authentication Protocol.  With thisprotocol, the "client" (the machine that needs to authenticate itself)sends its name and a password, in clear text, to the "server".  Theserver returns a message indicating whether the name and password arevalid.CHAP stands for the Challenge Handshake Authentication Protocol.  Itis designed to address some of the deficiencies and vulnerabilities ofPAP.  Like PAP, it is based on the client and server having a sharedsecret, but the secret is never passed in clear text over the link.Instead, the server sends a "challenge" - an arbitrary string ofbytes, and the client must prove it knows the shared secret bygenerating a hash value from the challenge combined with the sharedsecret, and sending the hash value back to the server.  The serveralso generates the hash value and compares it with the value receivedfrom the client.At a practical level, CHAP can be slightly easier to configure thanPAP because the server sends its name with the challenge.  Thus, whenfinding the appropriate secret in the secrets file, the client knowsthe server's name.  In contrast, with PAP, the client has to find itspassword (i.e. the shared secret) before it has received anything fromthe server.  Thus, it may be necessary to use the `remotename' optionto pppd when using PAP authentication so that it can select theappropriate secret from /etc/ppp/pap-secrets.Microsoft also has a variant of CHAP which uses a different hashingarrangement from normal CHAP.  There is a client-side implementationof Microsoft's CHAP in ppp-2.3; see README.MSCHAP80.------------------------------------------------------------------------Q: When the modem hangs up, without the remote system havingterminated the connection properly, pppd does not notice the hangup,but just keeps running.  How do I get pppd to notice the hangup andexit?A: Pppd detects modem hangup by looking for an end-of-file indicationfrom the serial driver, which should be generated when the CD (carrierdetect) signal on the serial port is deasserted.  For this to work:- The modem has to be set to assert CD when the connection is made anddeassert it when the phone line hangs up.  Usually the AT&C1 modemcommand sets this mode.- The cable from the modem to the serial port must connect the CDsignal (on pin 8).- Some serial drivers have a "software carrier detect" mode, whichmust be *disabled*.  The method of doing this varies between systems.Under SunOS, use the ttysoftcar command.  Under NetBSD, edit /etc/ttysto remove the "softcar" flag from the line for the serial port, andrun ttyflags.------------------------------------------------------------------------Q: Why should I use PPP compression (BSD-Compress or Deflate) when mymodem already does V.42 compression?  Won't it slow the CPU down alot?A: Using PPP compression is preferable, especially when using modemsover phone lines, for the following reasons:- The V.42 compression in the modem isn't very strong - it's an LZWtechnique (same as BSD-Compress) with a 10, 11 or 12 bit code size.With BSD-Compress you can use a code size of up to 15 bits and getmuch better compression, or you can use Deflate and get even bettercompression ratios.- I have found that enabling V.42 compression in my 14.4k modemincreases the round-trip time for a character to be sent, echoed andreturned by around 40ms, from 160ms to 200ms (with error correctionenabled).  This is enough to make it feel less responsive on rlogin ortelnet sessions.  Using PPP compression adds less than 5ms (smallenough that I couldn't measure it reliably).  I admit my modem is acheapie and other modems may well perform better.- While compression and decompression do require some CPU time, theyreduce the amount of time spent in the serial driver to transmit agiven amount of data.  Many machines require an interrupt for eachcharacter sent or received, and the interrupt handler can take asignificant amount of CPU time.  So the increase in CPU load isn't asgreat as you might think.  My measurements indicate that a system witha 33MHz 486 CPU should be able to do Deflate compression for seriallink speeds of up to 100kb/s or more.  It depends somewhat on the typeof data, of course; for example, when compressing a string of nullswith Deflate, it's hard to get a high output data rate from thecompressor, simply because it compresses strings of nulls so well thatit has to eat a very large amount of input data to get each byte ofoutput.------------------------------------------------------------------------Q: I get messages saying "Unsupported protocol (...) received".  What dothese mean?A: If you only get one or two when pppd starts negotiating with thepeer, they mean that the peer wanted to negotiate some PPP protocolthat pppd doesn't understand.  This doesn't represent a problem, itsimply means that there is some functionality that the peer supportsthat pppd doesn't, so that functionality can't be used.If you get them sporadically while the link is operating, or if theprotocol numbers (in parentheses) don't correspond to any valid PPPprotocol that the peer might be using, then the problem is probablythat characters are getting corrupted on the receive side, or thatextra characters are being inserted into the receive stream somehow.If this is happening, most packets that get corrupted should getdiscarded by the FCS (Frame Check Sequence, a 16-bit CRC) check, but asmall number may get through.One possibility may be that you are receiving broadcast messages onthe remote system which are being sent over your serial link.  Anotherpossibility is that your modem is set for XON/XOFF (software) flowcontrol and is inserting ^Q and ^S characters into the receive datastream.------------------------------------------------------------------------Q: I get messages saying "Protocol-Reject for unsupported protocol ...".What do these mean?A: This is the other side of the previous question.  If characters aregetting corrupted on the way to the peer, or if your system isinserting extra bogus characters into the transmit data stream, thepeer may send protocol-reject messages to you, resulting in the abovemessage (since your pppd doesn't recognize the protocol numbereither.)------------------------------------------------------------------------Q: I get a message saying something like "ioctl(TIOCSETD): Operationnot permitted".  How do I fix this?A: This is because pppd is not running as root.  If you have notinstalled pppd setuid-root, you will have to be root to run it.  Ifyou have installed pppd setuid-root and you still get this message, itis probably because your shell is using some other copy of pppd thanthe installed one - for example, if you are in the pppd directorywhere you've just built pppd and your $PATH has . before /usr/sbin (orwherever pppd gets installed).------------------------------------------------------------------------Q: Has your package been ported to HP/UX or IRIX or AIX?A: No.  I don't have access to systems running HP/UX or AIX.  No-onehas volunteered to port it to HP/UX.  I had someone who did a port forAIX 4.x, but who is no longer able to maintain it.  And apparently AIX3.x is quite different, so it would need a separate port.IRIX includes a good PPP implementation in the standard distribution,as far as I know.------------------------------------------------------------------------Q: Under SunOS 4, when I try to modload the ppp modules, I get themessage "can't open /dev/vd: No such device".A: First check in /dev that there is an entry like this:crw-r--r--  1  root         57,   0 Oct 2  1991 vdIf not, make one (mknod /dev/vd c 57 0).  If the problem still exists,probably your kernel has been configured without the vd driverincluded.  The vd driver is needed for loadable module support.First, identify the config file that was used.  When you boot yourmachine, or if you run /etc/dmesg, you'll see a line that lookssomething like this:SunOS Release 4.1.3_U1 (CAP_XBOX) #7: Thu Mar 21 15:31:56 EST 1996			^^^^^^^^			this is the config file nameThe config file will be in the /sys/`arch -k`/conf directory (arch -kshould return sun4m for a SparcStation 10, sun3x for a Sun 3/80,etc.).  Look in there for a line saying "options VDDRV".  If that lineisn't present (or is commented out), add it (or uncomment it).You then need to rebuild the kernel as described in the SunOSmanuals.  Basically you need to run config and make like this:	/usr/etc/config CAP_XBOX	cd ../CAP_XBOX	make(replacing the string CAP_XBOX by the name of the config file for yourkernel, of course).Then copy the new kernel to /:	mv /vmunix /vmunix.working	cp vmunix /and reboot.  Modload should then work.------------------------------------------------------------------------Q: I'm running Linux (or NetBSD or FreeBSD), and my system comes withPPP already.  Should I consider installing this package?  Why?A: The PPP that is already installed in your system is (or is derivedfrom) some version of this PPP package.  You can find out what versionof this package is already installed with the command "pppd --help".If this is older than the latest version, you may wish to install thelatest version so that you can take advantage of the new features orbug fixes.------------------------------------------------------------------------Q: I'm running pppd in demand mode, and I find that pppd often dialsout unnecessarily when I try to make a connection within my localmachine or with a machine on my local LAN.  What can I do about this?A: Very often the cause of this is that a program is trying to contacta nameserver to resolve a hostname, and the nameserver (specified in/etc/resolv.conf, usually) is on the far side of the ppp link.  Youcan try executing a command such as `ping myhost' (where myhost is thename of the local machine, or some other machine on a local LAN), tosee whether that starts the ppp link.  If it does, check the setup ofyour /etc/hosts file to make sure you have the local machine and anyhosts on your local LAN listed, and /etc/resolv.conf and/or/etc/nsswitch.conf files to make sure you resolve hostnames from/etc/hosts if possible before trying to contact a nameserver.------------------------------------------------------------------------Q: Since I installed ppp-2.3.6, dialin users to my server have beengetting this message when they run pppd:peer authentication required but no suitable secret(s) found for authenticating any peer to us (ispserver)A: In 2.3.6, the default is to let an unauthenticated peer only use IPaddresses to which the machine doesn't already have a route.  So on amachine with a default route, everyone has to authenticate.  If youreally don't want that, you can put `noauth' in the /etc/ppp/optionsfile.  Note that there is then no check on who is using which IPaddress.  IMHO, this is undesirably insecure, but I guess it may betolerable as long as you don't use any .rhosts files or anything likethat.  I recommend that you require dialin users to authenticate, evenif just with PAP using their login password (using the `login' optionto pppd).  If you do use `noauth', you should at least have a pppusersgroup and set the permissions on pppd to allow only user and group toexecute it.------------------------------------------------------------------------Q: When running pppd as a dial-in server, I often get the message"LCP: timeout sending Config-Requests" from pppd.  It seems to berandom, but dial-out always works fine.  What is wrong?A: Most modern modems auto-detects the speed of the serial linebetween the modem and the computer.  This auto-detection occurs whenthe computer sends characters to the modem, when the modem is incommand mode.  It does not occur when the modem is in data mode.Thus, if you send commands to the modem at 2400 bps, and then changethe serial port speed to 115200 bps, the modem will not detect thischange until something is transmitted from the computer to the modem.When running pppd in dial-in mode (i.e. without a connect script),pppd sets the speed of the serial port, but does not transmitanything.  If the modem was already running at the specified speed,everything is fine, but if not, you will just receive garbage from themodem.  To cure this, use an init script such as the following:	pppd ttyS0 115200 modem crtscts init "chat '' AT OK"To reset the modem and enable auto-answer, use:	pppd ttyS0 115200 modem crtscts init "chat '' ATZ OK ATS0=1 OK"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -