413
LINUX РЪКОВОДСТВО НА МРЕЖОВИЯ АДМИНИСТРАТОР ОЛАФ КИРХ, ТЕРИ ДОУСЪН Linux Network Administrator’s Guide, Second Edition by Olaf Kirch and Terry Dawson © SoftPress Ltd. 2001. Authorized translation of the English edition © 2000 O'Reilly & Associates, Inc. This translation is published and sold by the permission of O'Reilly & Associates, Inc., the owner of all rights to publish and sell the same. Copyright 1993 Olaf Kirch. Copyright © 2000 Terry Dawson. Copyright on O'Reilly printed version © 2000 O'Reilly & Associates, Inc. Rights to copy the SoftPress printed version are reserved. The online version of this book, which at time of printing contains exactly the same text as the SoftPress printed version, is available under the GNU FDL. Rights to reprint the document under the FDL include the right to print and distribute printed copies of the online version. Appendix C contains a copy of the license. You can find the online copy of the license at http://www.soft-press.com/linux/index.html. The book is available online at http://www.soft-press.com/linux/index.html and may be reposted by others at other locations. Linux – ръководство на мрежовия администратор от Олаф Кирх и Тери Доусън За авторите Олаф Кирх има научна степен по математика, но обърна гръб на теорията на категориите и компактно свързаните мрежи след като зареди своето първо ядро на Linux някъде през 1992 г. Той с удоволствие си припомни радостта от изучаването на Unix чрез четене на кода на ядрото на Linux. От тогава до днес, той е участвал в различни проекти за Linux, включително с писане на големи части от неговата реализация на NFS и стартиране на първия пощенски списък за сигурност в Linux с Джеф Апхоф през 1995 г. В момента Олаф работи за Caldera Systems и отговаря за голяма част от мрежовите технологии, както и за въпросите, свързани със сигурността, като понякога се чуди дали мечтае или всичко това е реалност. В свободното си време се радва на присъствието на Мейрън и тяхната дъщеря Джул. А ако сте прочели биографията в първото издание на Ръководството на мрежовия администратор Олаф вече има шофьорска книжка. Тери Доусън е радио оператор - любител и от дълго време е Linux ентусиаст. Той е автора на голяма част от свързаните с работата в мрежа HOWTO документи на Проекта за документиране на Linux и участва активно в много други Linux проекти. Тери има 15 годишен професионален опит в областта на телекомуникациите и в момента се занимава с изследване на управлението на мрежи в Telstra Research Laboratories. Тери живее в Сидни със съпругата си Маги и сина им Джак. Изданието на български език е публикувано от издателство СофтПрес ООД, 2001-2007 ISBN 954-685-146-9 Издателски колектив: Редактори: Стефан Христов, Зоя Драговчева Предпечатна подготовка: Светослава Анева -Веселинова Художествен редактор: Владимир Владимиров © Вълко Йотов, Христо Йонков, Ивайло Иванов, превод, 2001 Всички права върху печатното издание запазени. За контакти: Адрес: София 1407, П.К. 114 тел.: (02) 958 25 80, 958 25 67; факс: ( 02) 58 62 04 e-mail: [email protected]; Web site: www.soft-press.com За дистрибуция: СофтПрес София ул. “Искърско шосе” 19; тел.: 02/ 973 15 06; e-mail: iliev@soft- press.com СофтПрес Пловдив бул. “Руски” 139, стая 104; тел.: 032/ 62 75 62; тел./факс: 032/ 62 27 47; e-mail: [email protected] СофтПрес Бургас пл. “Тройката” 4; тел.: 056/ 80 02 31; факс: 056/ 80 31 39; e-mail: [email protected] СофтПрес Стара Загора ул. “Цар Симеон Велики” 117; тел.: 042/ 60 27 75; e-mail: [email protected] СофтПрес Варна бул. “Васил Левскибл. 9, вх. А, ет. 2, ап. 11; тел.: 052/ 30 42 69; e-mail: [email protected] Съдържание 3

Linux Net Admin Guide

  • Upload
    -

  • View
    1.276

  • Download
    22

Embed Size (px)

DESCRIPTION

LINUX РЪКОВОДСТВО НА МРЕЖОВИЯ АДМИНИСТРАТОР

Citation preview

  • 1. LINUX , Linux Network Administrators Guide, Second Editionby Olaf Kirch and Terry Dawson SoftPress Ltd. 2001. Authorized translation of the English edition 2000 OReilly &Associates, Inc. This translation is published and sold by the permission of OReilly &Associates, Inc., the owner of all rights to publish and sell the same.Copyright 1993 Olaf Kirch. Copyright 2000 Terry Dawson. Copyright on OReilly printedversion 2000 OReilly & Associates, Inc. Rights to copy the SoftPress printed version arereserved. The online version of this book, which at time of printing contains exactly the sametext as the SoftPress printed version, is available under the GNU FDL. Rights to reprint thedocument under the FDL include the right to print and distribute printed copies of the onlineversion. Appendix C contains a copy of the license. You can find the online copy of thelicense at http://www.soft-press.com/linux/index.html. The book is available online athttp://www.soft-press.com/linux/index.html and may be reposted by others at other locations.Linux , Linux 1992 . Unix Linux. , Linux, NFS Linux 1995 . Caldera Systems , , , . . . - Linux . HOWTO Linux Linux . 15 Telstra ResearchLaboratories. . , 2001-2007ISBN 954-685-146-9 :: , : - : , , , , 2001 . :: 1407, .. 114.: (02) 958 25 80, 958 25 67; : ( 02) 58 62 04e-mail: [email protected]; Web site: www.soft-press.com : . 19;.: 02/ 973 15 06; e-mail: iliev@soft- press.com . 139, 104;.: 032/ 62 75 62; ./: 032/ 62 27 47; e-mail: [email protected] . 4;.: 056/ 80 02 31; : 056/ 80 31 39; e-mail: [email protected] . 117;.: 042/ 60 27 75; e-mail: [email protected] . . 9, . , . 2, . 11;.: 052/ 30 42 69; e-mail: [email protected]
  • 2. ............................................................ 116 mgetty ......................................117 __________________________________ 19 5 .......................... 21 TCP/IP _____________ 121 ....................................................... 21 /proc...............................122, FTP....................................... 23 ..................................... 123, WWW.................................. 23 ................................................. 24 6Linux Journal Linux Magazine ............................................ 25 ......................................................... 123Usenet Linux ........................................................... 25 IP ............................................................. 124 Linux ................................................. 26 .......................................................... 126 Linux ...................................... 27 hosts networks............................ 126 Linux............................................ 27 IP...................................... 128 Linux .................................................... 28 Loopback.......................................................129 ............................................ 29 Ethernet ............................................................ 131 Linux ......................................................... 30 .............................................. 134 .................................................................................... 31 .................................................... 135 .................................................. 33 PLIP .............................................................. 136 ....................................................... 34 SLIP PPP .................................................. 137, .......................................... 37 ....................................................... 138 ............................................................. 38 IP ..................................................................... 138............................................................................ 39 ifconfig.....................................................................139 ....................................................................... 40 netstat......................................................................143 1 .............................. 143 ________________ 41 ............................ 145 ....................................................................................... 41 ....................................................... 146TCP/IP ............................................................................. 42 ARP ............................................ 147 64 TCP/IP ............................................... 43 _________________________________ 149Ethernet ...................................................................... 45 ........................................................... 150 ........................................................... 47 host.conf .................................................................150 IP....................................................................... 50 nsswitch.conf ..........................................................153IP .......................................................... 52 resolv.conf TCP ................................................................... 52 .................................................................. 156 UDP................................................................... 54 .................................................. 158 .................................................................. 54 DNS....................................................................... 159 ............................................................ 55 DNS..................................................... 162UUCP .............................................................................. 56 .................................................... 163 Linux......................................................... 57 ................................................ 58 7 ......................................................... 59 DNS.......................................................... 164 ........................................................ 60 ................................................................. 166 ....................................................... 61 named ..............................................................168 2 named.boot..............................................................169 TCP/IP __________ 65 host.conf BIND 8 ............................................... 172 ................................................................ 65 DNS......................................... 174IP .................................................................................... 66 named ....................... 179 ............................................................. 69 ............................................. 180IP ...................................................................... 70 ........... 183IP ................................................................................ 70 ............................................... 186............................................................................. 71 7 ............................................................................... 72 IP _______________________ 187 ................................................. 74 ..................................................................... 188 ............................................................ 76 SLIP ....................................................................... 188 ICMP ...................................................................... 77 IP ....................................................... 191 .......................................... 78 dip.....................................................................192 ................................................................ 1935 dip...............................................................195 ....................................................... 199 3 __________ 81 8 ........................................................ 85 PPP ___________________________ 203 Linux 2.0 - ........... 86 PPP Linux ........................................................................... 205 Linux pppd.................................................................. 206 2.0.0 - ................................................... 90 ............................................ 208 Linux ......................... 93 chat ...... 209 Ethernet............................................................ 95 IP.............................................. 212 Ethernet ..................... 96 IP ........................................................ 213PLIP .............................................................................. 99 PPP ..................................... 214PPP SLIP ............................................................... 102 ......................................... 217 ................................................................ 102 ..................................... 219 4 8 _________ 103 PPP............................ 221 ............... 104 PAP CHAP ............................................................... 221 ............................... 105 CHA ............................................................ 223 ......................................... 106 PAP ............................................................... 224 ................... 108 ...................................... 226 ........................................................................ 109 - .................................. 226 .............. 111 PPP .......................................................................... 226 setserial..............................................................111 ......................................................... 229 stty .....................................................................114 ........................................................... 231 9
  • 3. TCP/IP ______________________ 233 NIS ............ 359 ....................................................................... 234 14 ?................................. 236 __________________ 361 IP ?................................. 238 N FS.................................................................. 363 Linu x ..................... 240 NFS ........................................................... 364, IP ........................ 240 NFS ........................................................................... 367 ipfwadm....................................................... 241 ipchains........................................................ 242 11 iptables ........................................................ 242 exports.......................................................................... 368 , .................. 242 NFSv2 .............. 371 IP ( 2.0) ................. 244 NFSv3 .............. 372 ipfwadm....................................................... 244 15 - ..................................................... 248 IPX NCP _______________ 373 ipfwadm.................................. 250 Xerox, Novell .......................................................... 374 IP ( 2.2).............................. 254 IPX Linux................................................................................ 375 ipchains....................................................... 255 Caldera......................................................... 376 ipchains....................................... 256 NDS......................................... 376 ........................... 260 IPX NCPFS......................... 377 ipchains..................................... 261 IPX ...................................... 377 ................................. 262 , IPX............................ 378 IP ( 2.4) .......................... 269 IPX ........... 3789 ipx_configure..................................................... 378 ipfwadm ipchains..................... 272 ipx_interface...................................................... 380 iptables ........................................................ 273 IPX ............................... 381 ........... 279 IPX TOS................................................ 280 ipx_route ....................................................... 383 TOS ipfwadm ipchains............ 281 IPX .......................... 384 TOS iptables .................................. 282 NetWare ........................... 386 ............. 283 ncpmount................................. 387 ........................ 286 - ncpmount................................. 388 NetWare................. 390 10 - ncpmount........................................... 390IP ___________________________ 295 IPX ..... 391 IP .................... 296 .......................................................... 391 IP ..................................... 296 NetWare .......... 392 ....................................................... 297 bindary ......... 392 ........................................ 299 NetWare ......................................... 393 ICMP ..................................... 302 nprint lpd .......................... 394 ................................................. 304 ..................................... 396 IP .................. 304 NtWare ................................................ 397 ipfwadm....................... 305 ipchains........................ 305 12 iptables ........................ 306 16 ............................................................. 306 TAYLOR UUCP ________________ 399 ......................................... 307 UUCP .................... 401 .............................. 308 uucico................................. 403 11 uucico .................................... 404IP UUCP .................................. 405 ____________________________________ 309 Tay lor UUCP .............................. 406 ........................... 312 UUCP................................................ 409 IP ......................... 313 ........................................................ 410 IP ........................................... 314 Tay lor ................................ 411 IP ............... 317 , config.................................................... 41310 UUCP , ..................... 318 sys ......................................................... 413 .......................... 318 12 port .................................................................... 419 _______________ 321 dial.......... 421 inetd............................................................... 321 UUCP TCP .................................................................. 422 tcpd .................... 325 .......................................... 423 ..................................... 327 UUCP.... 424 ................................... 329 ..................................................... 424 .................................................... 425 ........................................................... 331 ........................................................................ 426 r- ............................................... 332 ...................... 427 ssh................................ 333 UUCP ........................................ 427 ....................................... 429 13 : ___________ 341 ........................................................................... 429 NIS.................................................................... 343 UUCP................................................................. 431NIS NIS+ ....................................................................... 347 UUCP ............................................ 431 NIS.................................................... 347 ..................................................... 432 NIS ...................................................... 348 ............................ 433 NI S ...................................................... 349 ................................. 434 NIS GNU libc ................................... 351 .................................................... 353 13 passwd group................................. 356 ......................................................... 435
  • 4. uucico Wrong Time to Call............. 435 Usenet ?........................................... 523uucico , .................... 436 21 , __________________________________ 527 chat- ....................................... 436 ............................................................... 528 ........................................................ 436 ............................................................................. 530 , ... 437 sys................................................................................. 533 , active ............................................................................ 537................................................................................ 437 ............................................................. 539 .................................... 437 ............................................. 542 17 .......................................................................... 546 __________________________ 441 ........................................................ 548 ?.............................................. 443 cancel............................................................ 548 ?.......................................................... 446 newgroup rmgroup ............................................................ 548E-mail ............................................................................ 447 checkgroups.................................................. 549RFC-822 ..................................................................................... 448 .................................................... 448 16 .............................. 449 sendsys, version senduuname............................................. 550 ?......................... 450 News NFS ................................................................. 551 ........................... 450 .................................... 552 UUCP ............................ 452 22 UUCP RFC-822............................................... 453 NNTP NNT PD_______________________ 555 elm............................................................ 458 NNTP ................................................................... 557 elm........................................................... 458 ...................................... 558 .................................................. 459 ............................ 559 18 NNRP ......................... 560SENDMAIL __________________________________ 461 ........................ 561 sen dmail.............................................................. 461 .......................... 561 sendmail........................................................ 462 ....................................................... 562 .............................. 56214 .............................................. 563 ............................ 463 ...................... 563 sendmail.cf sendmail.mc ................................... 463 ........................... 564 sendmail.mc ...................................... 464 .................................. 564 sendmail.mc .................. 465 ............................................ 565 sen dmail.cf .......................................... 470 NNTP ............................................. 566 NNTP ...................................... 566 ...................................................................... 471 NNTP .......................... 568R S sendmail.cf.............................................. 471 nntpd NEWS................................ 569 ...................................... 472 23 ...................................................................... 472 __________________________ 571 .................................................................... 473 INN.................................. 571 ................................ 474 INN.............................................................................. 575 .................................... 475 INN................................................................ 575 sendmail.............................. 478 INN: ...................... 576 sen dmail.......................... 480 INN...................................... 577 From:.... 480 ........................................................... 577 ............................... 481 ...................................... 482 17 ............................... 579 (SPAM) .................................................... 484 .......................... 582 e-mail .................... 488 ........................................ 587 ........................................ 491 ............................... 590 sendmail........................................................... 495 ................................. 592 ..................................................................... 496 INN.................................................................. 596 ....................................... 496 INN: ctlinnd................................. 597 ...................................................... 598 ................................................................ 497 ............................................................... 598 ............................ 498 .......................................................... 598 19 .............................................. 599 EXIM_____________ 501 / .................................... 599 Exim................................................................. 502 .................. 599 ................. 60015 ....................................... 600 ........................... 504 ..................................... 600 Exim............................................................. 505 ................... 601 ................................................ 506 .................................. 601 ............................................ 508 .................................................... 602 ...................... 508 ................................................................ 602 ......................................... 510 24 ..................... 510 __________ 603 ...................................................... 513 tin .............................................................. 604 ............................................................. 514 trn.............................................................. 605 .......................... 515 nn .............................................................. 606 UUCP ............................................................ 516 A 20 : _________________________ 519 _____________________ 609 Usenet.................................................................... 519 ................. 610 Usenet?................................ 521
  • 5. 2. Verbatim Copying................................................................ 61618 3. Copying in Quantity ............................................................ 616 4. Mod ifications........................................................................ 617 _____________ 611 5. Combining Documents ........................................................ 619 PLIP........................................................ 611 6. Collections of Documents ................................................... 619 null- ........................................................ 611 7. Aggregation with .................................................................................................... 620 9. Termination .......................................................................... 620LINUX 10. Future Revisions of this License ........................................ 621, . ____________ 613 0. Preamble .............................................................................. 614 1. Applicability and Definitions.............................................. 614 ___________________________ 623
  • 6. .,..Usenet,Web,"".,.,,..,,UsenetISDN,,DSL(DigitalSubscriberLine),. ,Unix.,Unix,,.,Unix,UnixPC,386BSD,FreeBSDLinux.LinuxUnix.,Intel,Motorola6800ComodoreAmigaAppleMacintosh;SunSPARCUltraSPARC;AlphaCompaq;MIPS;PowerPC,AppleMacintoshStrongArmNetwinderrebel.comPalm3Com.LinuxFujitsuAP100System390IBM.,Linux.Linux,.1990..LinuxUnix,,,,web,.LinuxTCP/IP,SLIP,PPP.,LinuxIPX,,.Linux,.LinuxGeneralPublicLicenseGNU;,,FreeSoftwareFoundation.(),.freesoftware,,. Linux.,,Linux
  • 7. .,,,..,Linux,,Unix,,Linux,.,,,(Linux,Linux,).,,. Linux,.,.LDPLinux(LDPLinuxDocumentationProject),,,HOWTO,Linux.LDP:LinuxInstallationandGettingStarted.,Linux.Unix,XWindow.LinuxSystemAdministratorsGuideLarsWirzeniusJoannaOja.Linux,,.LinuxSystemAdministrationMadeEasySteveFrampton.,Linux.LinuxProgrammersGuideB.ScottBurkett,SvenGoldt,JohnD.Harper,SvenvanderMeer.,,Linux.TheLinuxKernelDavidRusling.Linux..TheLinuxKernelModuleProgrammingGuideOriPomerantz.Linux..LDPWWWhttp://www.linuxdoc.org.HOWTO
  • 8. HOWTO(......)Linux,,XWindowLinux.HOWTOFTP,,WebLDP.HOWTOINDEXHOWTO.InstallationHOWTO,Linux;HardwareCompatibilityHOWTO,,,LinuxDistributionsHOWTO,,LinuxCDROM.HOTWO,Linux.LinuxFrequentlyAskedQuestionsFAQ(FrequentlyAskedQuestionswithAnswers).Linux., FTPFTP,Linux,metalab.unc.edu:/pub/Linux/docstsx11.mit.edu:/pub/linux/docs.., WWWWebLinux.LDPhttp://www.linuxdoc.org/.OSWG(OpenSourceWritesGuild),Linux.OSWG,,.OSWGhttp://www.oswg.org.8080/oswg.Linux. LDP.:SpecializedSystemsConsultants,Inc.(SSC)http://www.ssc.com/P.O.Box55549Seattle,WA9815505491206782773312067827191(FAX)[email protected] :LinuxSystemsLabshttp://www.lsl.com/18300TaraDriveClintonTownship,MI480361810987880718109873562(FAX)
  • 9. [email protected] HOWTO,Linux.OReilly&AssociatesLinux.LDP,.:RunningLinux1,Linux.LearningDebianGNU/LinuxLearningRedHatLinux RunningLinux,CDROM.LinuxinaNutshellinaNutshell().Linux.Linux Journal Linux MagazineLinuxJournalLinuxMagazineLinux,Linux.,.Usenet,Linux.LinuxJournalS.S.C.Incorporated,.Webhttp://www.linuxjournal.com/ LinuxMagazine,.Webhttp://www.linuxmagazine.com/Usenet LinuxUsenet,Linux:comp.os.linux.announce,,,Linux.Linux.linuxannounce@news.ornl.gov.comp.os.linux.helpLinux.comp.os.linux.admin ,Linux.comp.os.linux.networking,Linux.comp.os.linux.development 1 Linux..
  • 10. Linux.comp.os.linux.misc,.,Linux,,,fr.comp.os.linuxde.comp.os.linux. LinuxLinux,,.,RutgersUniversity.email,: To: [email protected]: anything at allBody:subscribe listname,Linux,:linuxnet,Linux.linuxppp,LinuxPPPlinuxkernel,Linux. Linux.,.OpenProjectsIRCNetworkIRC,.Linux.IRCInternetRelayChat(,),.IRC,.,,.IRCOpenProjects,247,Linux,,.IRC,ircII,irc.openprojects.org:6667#linpeople. LinuxLinux.,,.Linux
  • 11. Linux..:GroupsofLinuxUsersEverywherehttp://www.ssc.com/glue/groups/LUGlistprojecthttp://www.nllgg.nl/lugww/LUGregistryhttp://wwwlinux.org/users/ LinuxLinux;,Debian,RedHat,Caldera,Corel,SuSESlackware.,,Linux:,,,. Linux,.FTPweb.:Calderahttp://www.caldera.com/ftp://ftp.caldera.com/Corelhttp://www.corel.com/ftp://ftp.corel.com/Debianhttp://www.debian.org/ftp://ftp.debian.org/RedHathttp://www.redhat.com/ftp://ftp.redhat.com/Slackwarehttp://www.slackware.com/ftp://ftp.slackware.com/SuShttp://www.suse.com/ftp://ftp.suse.com/FTPLinux.:metalab.unc.edu:/pub/Linux/distributions/ftp.funet.fi:/pub/Linux/mirrors/tsx11.mit.edu:/pub/linux/distributions/mirror.aarnet.edu.au:/pub/linux/distributions/.,
  • 12. ,2.LinuxCDROM.,.CDROM.,CDROM,Linux.,. ,Linux,,Linux,..1993.Linux(FSSTNDFileSystemStandardGroup).,.Linux.,FSSTND,,.,,,.,,.FSSTNDLinux,1997.FHS(FileHierarchyStandard).FHS,,FSSTND.FHSFTPLinuxhttp://www.pathname.com/fhs/.DanielQuinlan,FHS,[email protected]. LinuxLinux,,.,,.,,,.(),Linux.,Linux(LSBLinuxStandardBase).,.,Linux. 2 ...,24,,72,!
  • 13. LSBwebhttp://www.linuxbase.org/. ,,,Linux. Linux(LDP)1992.,UUCPsmail,SystemAdministratorsGuide.TCP/IP"",.!!.,Linux,1993..sendmail,sendmail.,,eOReilly&Associates*.20,15.NETFAQ,HOWTO.,Linux,,.eximPhilipHasel,.,,.TCP/IP.TCP/IP,rlogin,(NFS)(NIS).,UUCP.,TCP/IPUUCP:.IPXNCP,,Linux.,.exim,,,UUCP,sendmail,,,UUCP.,Usenetnews.INNCNews, * [email protected]. [email protected].
  • 14. NNTP.Linux.,,.,,,.(,),.,.,,.,FTPLinuxBBS.,.,Linux. 1993.,LDP,OReilly&Associates.,,.OReilly,,.,:LDPOReilly.,?TimOReilly,,,??"",",""".OReilly&Associates,().,,,.,,OReillyLinux(,),Linux,:.,LinuxOReilly.OReilly?.,,,Linux.,OReilly.LDP,.,.OReilly,.,,,.,?,,.(,,LDP,Linux).
  • 15. ,.,.,.,,.,.,OReilly.,,.,OReilly.,,,.,. 1,,LinuxUUCP,TCP/IP,,.LinuxTCP/IP.IP2,TCP/IP,.IP,.3,,Ethernet.4,,TCP/IP,UUCP.5,TCP/IP,TCP/IP.,Ethernet,loopback.,,.6,,.7,IP,SLIPdip,,.8,PPP,PPPpppd.9,TCP/IP,TCP/IPLinux:ipfwadm,ipchainsiptables.,IP,.10,IP,IPLinux,,,.11.IP,Linux,IP,IP,.12,,rlogin,ssh.inetd
  • 16. ,.13,14,,NISNFS.NIS,().NFS.15,IPXNCP,IPXNCP.Linux,NovellNetWare,Linux.16,TaylorUUCPTaylorUUCP,UUCP.Usenet.17,,,,.18,Sendmail,19,eximsendmailexim,,Linux.,exim,sendmailUUCP.20,Netnews23,,,UsenetCNews,nntpdINNUsenet.20,21,CNews,CNews,UUCP.CNews,NNTP(NetworkNewsTransferProtocol).22,NNTPnntpdNNTPnntpd,.23INN(InterNetNews).24,,., ,,,sh(shell,,).bashshLinux.csh,.,:,,,,email,URLs.,,,,.
  • 17. ,,,. ,,. ,.__________________________________________________,,.,. ,,(,!).,,,:OReilly&Assosites,Inc.101MorrisStreetSebastopol,Ca9547218009989938(U.S.Canada)17078290515()17078290104(FAX).,email:[email protected],email:[email protected],,.:http://www.oreilly.com/catalog/linag2OReilly:http://www.oreilly.com.,,.,,.,,(,
  • 18. ).PhilHughes,JohnMacDonaldsEricRatcliffe(,).,OReilly,:SarahJaneShangrow,,;MaureenDempsey,;RobRomano,RhonPorterChrisRailly,;HanaDayer,;AlisaCech,DavidFutatoJenniferNiedherst;;JudyHoer;,TimOReilly.AndreSepulveda,WolfgangMichaelis,MichaelK.Johnson,,.PhilHughes,JohnMacDonaldsEricRatcliffe.,,.Thanks.,HolgerGrothe,,.,Linux:LinuxSupportTeam,Erlangen,;S.u.S.E.GmbH,Fuerth,LinuxSystemLabs,Inc.,ClintonTwp.,RedHatSoftware,,.,,,,.,Linux,,.",". ,,..,.AlLongyear,AlanCox,AndresSeplveda,BenCooper,CameronSpitzer,ColinMcCormack,D.J.Roberts,EmilioLopes,FredN.vanKempen,GertDoering,GregHankins,HeikoEissfeldt,J.P.Szikora,JohannesStille,KarlEichwalder,LesJohnson,LudgerKunz,MarcvanDiest,MichaelK.Johnson,MichaelNebel,MichaelWing,MitchDSouza,PaulGortmaker,PeterBrouwer,PeterEriksson,PhilHughes,RaulDeluthMiller,RichBraun,RickSladkey,RonaldAarts,SwenThemmler,TerryDawson,ThomasQuinotYuryShevchuk.
  • 19. ,.,,.,,,.,,,.?:1),2)3),AB..,.,,,,,,*.,,..TCP/IP,,,.UUCPIPX.UUCP.,.IPX,NovellNetWare,LinuxNetware..,.,.,.,;....,,,,.,,,.TCP/IP .Linux,,,,,.,,(packetswitching).,.,.,. * ().
  • 20. ,Unix,,TCP/IP.TCP/IP,,,.,TCP/IP. TCP/IP TCP/IP(DefenseAdvancedResearchProjectAgencyDARPA)1969.ARPANET,,,,1975..1983.TCP/IP.ARPANET(ARPANET1990.),TCP/IP.,TCP/IP,,..,TCP/IPGrouchoMarx(GMU),.,,..,LinuxUnixerdos.,quark,:$ rlogin quark.physicsWelcome to the Physics Department at GMU(ttyq2) login:,andres,.shell*quark,,.,.,TCP/IP:(remotelogin).quark,,,web.XWindow.,,DISPLAY:$DISPLAY=erdos.maths:0.0$exportDISPLAY,,quark,.,11erdos.,TCP/IPquarkerdos11,,.. * (shell) Unix. .. DOSprompt Microsoft Windows, -.
  • 21. TCP/IPNFS,NetworksFileSystem().,,.,,.,.(,),.NFS14,.,,TCP/IP..TCP/IP...Ethernet Ethernet.,(),.Ethernet,10,1001000/(Mbps).Ethernet:(thick),(thin)a(twistedpair).Ethernet,.Ethernet"BNC",.Ethernet..""..Ethernet20050010base210base5.base()basebandmodulation,.Mbps,.,().10baseT,""Twisted().,100Mbps,100baseT.Ethernet,.,Ethernet,..,"",.,.Ethernet,PC$30(),.,Ethernet.,GMUEthernet,,..,.
  • 22. ,,Ethernet.GMU,.Ethernet,,.,Ethernet,.,,Ethernet.,..,Ethernet.Ethernet,()1500.6,(NICNetworkInterfaceCard)Ethernet.e,,aa:bb:cc:dd:ee:ff.,,,.,.Ethernet,.,Ethernet30.Ethernet30.Ethernet60,.* ,GMU,Ethernet.,.Linux,.HOWTO,,,,.GMU,,FDDI(FiberDistributionDataInterface).FDDI,(tokens).,.,.,,100MbpsFDDI.FDDI,,,200, * EthernetFAQ(http://www.faqs.org/faqs/LANs/ethernetfaq/),webEthernetCharlesSpurgeonhttp://www.host.ots.utexas.edu/ethernet.
  • 23. GMU,.,IBM,TokenRingIBM.TokenRingEthernetFDDI,(4Mbs16Mbps),,.LinuxTokenRing,Ethernet,.,LANArcNetDECNet.Linux,..,.25.Tymnet,AustpacDatexP,..25,,,(.25)..25,..25,,PAD(PacketAssemblerDisassembler).PAD,..25,.25..25,TCP/IP.IP.25(),.25.Linux.25.,,FrameRelay(.).FrameRelay.25,IP..25,FrameRelay.,.,,,FRAD(FrameRelayAccessDeviceFrameRelay),EthernetFrameRelay.FrameRelayTCP/IP.Linux,FrameRelay.,,ATM(AsynchronousTransferMode).ATM,,,,(Q.S.QualityofService).ATM,,.ATMTCP/IP.NetworkingHOWTOLinux.,;(packetradio).,,.25().25..25,TCP/IP..25,.25,,TerminalNodeController(),,.
  • 24. ."Z8530SCC",.,.25,NetRomRose,..25,.Linux.25,NetRomRose.AX.25HOWTOLinux.,(,ISDN..).,SLIPPPP,. IP,Ethernet.,,.,GMU,,.GMUEthernet.FDDI.,(gateway),,EthernetFDDI.,Linuxquark,quark,.,.(sophus)niels,niels.erdosquark11. FDDICampus FDDIBackboneMathematicsEthernet PhysicsEthernet 11.erdosquark.,.,,:IP.2,TCP/IP,I.IP,.,""...,IP.32,IP.IP,,8.,quarkIP0953004,149.76.12.4.,.IPv4(,4),IPv6
  • 25. ,.IPv6.,:,quark,IP6Ethernet.,rloginquark,IPquark,IP,EthernetIP.2.,(hostnameresolution),IP(addressresolution)IP.IP SLIPSerialLineIP(IP).SLIP,CSLIPSLIP,IP,,.PPPPointtoPointProtocol().PPPSLIP,.SLIP,IP,,. TCP.quark,rloginerdosshellquark.,,.,.,IP,.,webNetscapeFTPGMU.,.quark,sophus.IP.,.,TCP(TransmissionControlProtocol),IP.TCP,IP,,.,TCP,..TCPIP..,,IP(),().,.
  • 26. rlogin,(rlogin)erdos513quark,,rlogind.TCP.,rlogind.TCP,,rlogin,TCP. UDP,TCPTCP/IP.rlogin,NFS,TCP,UDP(UserDatagramProtocol).TCP,UDP,.,UDP,.,.TCP,.UDP.UDP.;,,.,TCP,UDP.,,. .,().,,.,.,,.,,,513.TCP,.,quarkerdos,rlogin1023,1022.513quark.erdos.,,.,.rlogin.IETF(InternetEngineeringTaskForce),RFC,AssignedNumbers(RFC1700).,,.Linux/etc/services,.TCP,UDP,.,TCP513,,UDP513.,rlogin(TCP)rwho(UDP).
  • 27. Unix,,.Linux.UnixBerkeleySocketLibrary().,,.bind,,,(connect,listenaccept).,TCP/IP(AF_INET),,,(AF_UNIX).XNS(XeroxNetworkingSystem).25.Linux,Clibc.AF_INETAF_INET6TCP/IPAF_UNIXUnix.,AF_IPXNovell,AF_X.25.25,AF_ATMPVCAF_ATMSVCATMAF_X25,AF_NETROMAF_NTROSE().,,.UUCP UUCP(UnixtoUnixCopyUnixUnix),,.,,.,.UUCPBellLaboratories1977.Unix.1978.80.,.,.UUCPUnix.,AmigaOS,DOSTOSAtari.UUCP,.,.UUCPUUCP.,,.,UUCP.,.UUCP,UUCP,.,rlogin.,UUCP,,.UUCP,.UUCP,,,UUCPUUCP,.UUCP,.
  • 28. UUCP,,,,UUCPTCP/IP. Linux,Linux.,,.UUCPLinux,TCP/IP1992.,RossBiro,Net1.Ross1993.,FredvanKempen,.Net2.Net2d1993.(0.99.10),AlanCox*.AlanNet2Debugged.,Net3,Linux1.0.Net3Linux1.2Linux2.0.2.2Net4,,.Net4Linux.Net4SLIPPPP(),FLIP(),IPX(Novell,15,IPXNCP),Appletalk(Apple)AX.25,NetRomRose().Net4IP,IP(9,TCP/IP10,IP),IP(11,IP).IP.Ethernet,FDDI,TokenRing,FrameRelay,ISDNATM.,,Linux.SMB,Samba,lanmanagerMicrosoftWindows,AndrewTridgell,NovellNCP(NetWareCoreProtocol)*. Linux.Net2DebuggedLinux,Fred.Net2e,.Fred(DDIDeviceDriverInterface),Net2.TCP/IPMatthiasUrlichs,ISDNLinuxFreeBSD.BSDLinux..Linux,,., * [email protected] * NCP,Novell
  • 29. ,.,,,upgrade,.Linux,.Net4.Net4.Linuxweb,.Linux,Linux,IPIPv6. ,Linux,,.,Linux.Linuxftp.kernel.org/pub/linux/kernel/v2x/,.Linuxftp.kernel.org/pub/linux/kernel/v2y/,y.Linux.Linux. .,.,,..(log).shell,cron.innCNews..cronemail.,logroot.,root;root.,19,exim18,Sendmail.,,.,,.,emailroot,,,.,postmaster,newsmasterusenet.hostmaster,DNS,.
  • 30. ..,,.,,..,,.,.,,,,...COPS,,.,,.shadowpassword,.,.,.,root(setuidroot),.,,,.,,TFTP(TrivialFileTransferProtocol),/boot.,TFTP.,TFTP/boot.*,.12tcpd,.9..,,,,,,..,.+,,,, * 12,. + Unix(),setuidrootshell,root
  • 31. .#setuid,,.,,.rlogin,rshrexec,.,(),.rssh,.,.,,.,,,.,tripwireGeneKimGeneSpafford,.tripwire.,,. # 1988.,RTM,,sendmail..
  • 32. ,,comp.os.linux.*,SAGE,USENIX.SAGE.SAGE,,,.SAGE: USENIX (LISA). JobDescriptionsforSystemAdministratorsTinaDarmohray . ftp.sage.usenix.org, ,. , ,,,,, .USENIXSAGE,USENIX(510)[email protected].,[email protected]$25(USENIX).login:ComputingSystems,SAGE,. TCP/IP ,,LinuxTCP/IP,IP,.,,,,.TCP/IPInternetworkingwithTCP/IPDouglasR.Comer(PrenticeHall).TCP/IP,TCP/IPNetworkAdministrationCraigHunt(OReilly). ,,TCP/IP,.,..,EthernetLinuxeth0eth1;PPP(8,PPP)ppp0ppp1,FDDIfddi0fddi1.,
  • 33. ,.TCP/IP,IP,.,.,,.,,.MTU(MaximumTransferUnit)..,.IP 1,,IP32..*,TCP/IP,.IP,.21.,,,NIC(NetworkInformationCenter)+.IP,.,quark.phisycs.groucho.eduIP0954004,149.76.12.4.(dottedquadnotation).,IPe,,,.NICIP,,.,,IP.,,.,,IP.:1.0.0.0127.0.0.0..24,1,6.128.0.0.0191.255.0.0..16,32065,024. * IP4.,IP6.IPv6.IPv6Linux,,.IPv6Linux,. + IP,IP.,NIC,IP,[email protected]://www.internic.net/
  • 34. 192.0.0.0223.255.255.0,.2254.D,EF,224.0.0.0254.0.0.0,.IPMulticast,,.1,,149.76.12.4,quark,12.4149.76.0.0.,.,0255.,0,,,1,broadcast..,149.76.255.255,149.76.0.0..0.0.0.0127.0.0.0.,..loopback().,IP.127.0.0.0IP,.,127.0.0.1,(loopback),.IP,TCPUDP,,,.,.,.,;,UUCPIP,INN.Linux,INNloopback...,,.21.21.IP,. 10.0.0.010.255.255.255 172.16.0.0172.31.0.0 192.168.0.0192.168.255.0 IP,EthernetTokenRing.,,IP,?.
  • 35. IP.ARP(AddressResolutionProtocol).,ARPEthernetTokenRing,A.25.,ARP,,150:,,,X,.,.ARPEthernet,IP,Ethernet,broadcasting(),.Broadcast,ARP,IP.,,IP,ARP.,Ethernet.,,.,..ARP.Ethernet,ARP,,.,;EthernetARP.,ARP,IP.IP,Ethernet.,,.,,,Ethernet!,broadcast,IP.,RARP(ReverseAddressResolutionProtocol).BOOTP,.IP ,IP.;,.IP ,,,.,:,.:,,,,.IP.,.,.,.
  • 36. IP,.,IP.,IP.*,,Ethernet.IPIP.IP.,A,BC..,,(subnetmask)(netmask).32,IP.GMU.149.76.0.0,255.255.0.0.,GMU.,IP254149.76.1.0149.76.254.0.,149.76.12.0.149.76.1.0.IP,,.,255.255.255.0.21149.76.12.4,quark,,,.,.().,,(Ethernet),()(),..21.. ;.,Ethernet,:.,(gateway).,.22GMU.,,. * .IP.
  • 37. IP,IP.,149.76.4.0.quark,erdosIP149.76.12.4,(sophus).sophus:.eth0fddi0.,IP?149.76.1.0149.76.4.0?22.GMUMathematicsDepartment TheoreticalPhysicsDepartment FDDICampusBackbone FDDIGrouchoComputingCenter GMU.sophus149.76.1.1149.76.1.0149.76.4.1146.76.4.0.IP,.,.,sophus: eth0 149.76.4.1 255.255.255.0fddi0 149.76.1.1 255.255.255.0lo 127.0.0.1 255.0.0.0loopbacklo,..,(erdos),IP,,,Ethernet,IP.,. ,IP,.,erdosquark,,.erdossophus,.sophus,quark,,,.niels,.sophus,.
  • 38. IP,,.();,0.0.0.0.,32.,.sophus: 149.76.1.0 255.255.255.0 fddi0149.76.2.0 255.255.255.0 149.76.1.2 fddi0149.76.3.0 255.255.255.0 149.76.1.3 fddi0149.76.4.0 255.255.255.0 eth0149.76.5.0 255.255.255.0 149.76.1.5 fddi0... ... ... ...0.0.0.0 0.0.0.0 149.76.1.2 fddi0,sophus,;..,.,(AND),.:,,().IP,,.,,,,.IP?.,.,.,;,,.,,24.,,,.,,,..,IProute(5,TCP/IP).,;
  • 39. ,..(GMU).RIP(RoutingInformationProtocol),BSDrouted.EGP(ExternalGatewayProtocol)BGP(BorderGatewayProtocol).RIPgatedCornell. (hops).,,,.,RIP.16.RIP,gated.,gated.(loopback),,.,RIP.,gated,..*,,,,,.,RIPgated. ICMPIP,.ICMP(InternetControlMessageProtocol),,.,erdostelnet12345quark,.TCPquark,ICMPerdos,,.ICMP,.,(redirectmessage).,,,.,erdos,.,FDDI,GMU(gcc1).,quarkgcc1niels.,gcc1, * ,,..
  • 40. niels,ICMPsophus,.,.,,,RIPICMP,.ICMPRIP..,Linux.,,.,,ICMP.ICMP. ,TCP/IP,IPv4,32.,.,gaussstrange.IP,,.(hostnameresolution).IP,gethostname(3)gethostbyaddr(3).,,resolverlibrary;Linuxlibc.,(theresolver).6,.Ethernet,.,/etc/hosts.e/e,,,hosts.,,.(NIS),SunMicrosystems,YP.NIShosts(),.,,hosts.NIS13,.,HOSTS.TXT.NIC(NetworkInformationCenter).,.HOST.TXT,,,.NIC,,.
  • 41. ,1994.:DNS(DomainNameSystem).DNSPaulMockapetris.DNS6. TCP/IP,,.,.,,,Ethernet,FDDITokenRing,,PC.,.,Linux,.,,.Linux:ISA,PCI,MCA,EISA,,PCMCIA,,USB.,,?Ethernet.,:,.IBM,/,/.,,./.EthernetISA02800300.PCI/.,,.(autoprobing),,/,,.,,;,.,,.,.,,.,,.PCISA,15,0,1,3..15.,,IRQ(InterruptRequestNumber).*2,TCP/IP,,.,..Unix,/dev/. * 29,IBMPC,;IRQ2.
  • 42. ls - las /dev/,.,(permissions),,,..b,,/,c,,.ls,,,(major)(minor).,...,tty/dev/tty,,c4,/dev/tty11,/dev/tty22.,,,.Linux/dev.Linux.,.,Etherneteth0,eth1.SLIP,.SLIP,.31,.KernelNetworking CodeNetworkInterface Devicedriver Hardware SMC/3COMDriver SMC/3Com31.,,,,.:..This processor honors the WP bit even when in supervisor mode.Good.Swansea University Computer Society NET3.035 for Linux 2.0NET3: Unix domain sockets 0.13 for Linux NET3.035.Swansea University Computer Society TCP/IP for NET3.034IP Protocols: IGMP,ICMP, UDP, TCPSwansea University Computer Society IPX 0.34 for NET3.035IPX Portions Copyright (c) 1995 Caldera, Inc.Serial driver version 4.13 with no serial options enabledtty00 at 0x03f8 (irq = 4) is a 16550Atty01 at 0x02f8 (irq = 3) is a 16550ACSLIP: code copyright 1989 Regents of the University of CaliforniaPPP: Version 2.2.0 (dynamic channel allocation)PPP Dynamic channel allocation code copyright 1995 Caldera, Inc.PPP line discipline registered.eth0: 3c509 at 0x300 tag 1, 10baseT port, address 00 a0 24 0e e4 e0,/ IRQ 10.3c509.c:1.12 6/4/97 [email protected] Version 2.0.32 (root@perf) (gcc Version 2.7.2.1)#1 Tue Oct 21 15:30:44 EST 1997..,TCP/IPSLIP,CSLIPPPP.,Ethernet3C509eth0.DLink
  • 43. ,dl0DLink.,,.Ethernet. Linux,PC.,.,,.,.,,,;,.,Linux,.,,,.,,.LinuxRunningLinux(OReilly)*.,.,,,.Linux,:2.2.14..,.,12,,Intel...Linux,,.,,.Linux,,,..*makemenuconfig,,,.TCP/IP.,,y. Linux 2.0 -,SCSI..?,,.(y),aa,(n),.,,(m).,,..,.,2.02.1: * Linux.. * ,;,,.,,/usr/src/linux/REPORTINGBUGSLinux.
  • 44. ** Network device support ( )*Network device support (CONFIG_NETDEVICES) [Y/n/?],Ethernet,SLIP,PPP,(y).y,Ethernet.,:PLIP (parallel port) support (CONFIG_PLIP) [N/y/m/?] yPPP (point-to-point) support (CONFIG_PPP) [N/y/m/?] y** CCP compressors for PPP are only built as modules*SLIP (serial line) support (CONFIG_SLIP) [N/y/m/?] mCSLIP compressed headers (CONFIG_SLIP_COMPRESSED) [N/y/?] (NEW) yKeepalive and linefill (CONFIG_SLIP_SMART) [N/y/?] (NEW) ySix bit SLIP encapsulation (CONFIG_SLIP_MODE_SLIP6) [N/y/?] (NEW) y,Linux.PPPSLIPIP.PPP,.,PPP,,,,PPPTCP/IP;,IPX.ymSLIP(SLIPsupport),,.(compressedheaders)CSLIP,TCP/IP.,CSLIP;.Keepalive and linefill,SLIP,,.Six bit SLIP encapsulationSLIP,8.unencodingbinhex,.PLIPIP.PC,DOS.PC,PLIPPPPSLIP,,,..,,.,,,:..Ethernet (10 or 100Mbit) (CONFIG_NET_ETHERNET) [Y/n/?]3COM cards (CONFIG_NET_VENDOR_3COM) [Y/n/?]3c501 support (CONFIG_EL1) [N/y/m/?]3c503 support (CONFIG_EL2) [N/y/m/?]3c509/3c579 support (CONFIG_EL3) [Y/m/n/?]3c590/3c900 series (592/595/597/900/905) "Vortex/Boomerang" support/ (CONFIG_VORTEX) [N/y/m/?]AMD LANCE and PCnet (AT1500 and NE2100) support (CONFIG_LANCE) [N/y/?]AMD PCInet32 (VLB and PCI) support (CONFIG_LANCE32) [N/y/?] (NEW)Western Digital/SMC cards (CONFIG_NET_VENDOR_SMC) [N/y/?]WD80*3 support (CONFIG_WD80x3) [N/y/m/?] (NEW)SMC Ultra support (CONFIG_ULTRA) [N/y/m/?] (NEW)SMC Ultra32 support (CONFIG_ULTRA32) [N/y/m/?] (NEW)SMC 9194 support (CONFIG_SMC9194) [N/y/m/?] (NEW)Other ISA cards (CONFIG_NET_ISA) [N/y/?]Cabletron E21xx support (CONFIG_E2100) [N/y/m/?] (NEW)DEPCA, DE10x, DE200, DE201, DE202, DE422 support (CONFIG_DEPCA) [N/y/m/?]/ (NEW)EtherWORKS 3 (DE203, DE204, DE205) support (CONFIG_EWRK3) [N/y/m/?] (NEW)
  • 45. EtherExpress 16 support (CONFIG_EEXPRESS) [N/y/m/?] (NEW)HP PCLAN+ (27247B and 27252A) support (CONFIG_HPLAN_PLUS) [N/y/m/?] (NEW)HP PCLAN (27245 and other 27xxx series) support (CONFIG_HPLAN) [N/y/m/?]/ (NEW)HP 10/100VG PCLAN (ISA, EISA, PCI) support (CONFIG_HP100) [N/y/m/?] (NEW)NE2000/NE1000 support (CONFIG_NE2000) [N/y/m/?] (NEW)SK_G16 support (CONFIG_SK_G16) [N/y/?] (NEW)EISA, VLB, PCI and on card controllers (CONFIG_NET_EISA) [N/y/?]Apricot Xen-II on card ethernet (CONFIG_APRICOT) [N/y/m/?] (NEW)Intel EtherExpress/Pro 100B support (CONFIG_EEXPRESS_PRO100B) [N/y/m/?]/ (NEW)DE425, DE434, DE435, DE450, DE500 support (CONFIG_DE4X5) [N/y/m/?] (NEW)DECchip Tulip (dc21x4x) PCI support (CONFIG_DEC_ELCP) [N/y/m/?] (NEW)Digi Intl. RightSwitch SE-X support (CONFIG_DGRS) [N/y/m/?] (NEW)Pocket and portable adaptors (CONFIG_NET_POCKET) [N/y/?]AT-LAN-TEC/RealTek pocket adaptor support (CONFIG_ATP) [N/y/?] (NEW)D-Link DE600 pocket adaptor support (CONFIG_DE600) [N/y/m/?] (NEW)D-Link DE620 pocket adaptor support (CONFIG_DE620) [N/y/m/?] (NEW)Token Ring driver support (CONFIG_TR) [N/y/?]IBM Tropic chipset based adaptor support (CONFIG_IBMTR) [N/y/m/?] (NEW)FDDI driver support (CONFIG_FDDI) [N/y/?]Digital DEFEA and DEFPA adapter support (CONFIG_DEFXX) [N/y/?] (NEW)ARCnet support (CONFIG_ARCNET) [N/y/m/?] Enable arc0e (ARCnet "Ether-Encap" packet format) (CONFIG_ARCNET_ETH)/ [N/y/?] (NEW) Enable arc0s (ARCnet RFC1051 packet format) (CONFIG_ARCNET_1051)/ [N/y/?] (NEW)..,,(NFS).NFS,,,:NFS file system support (CONFIG_NFS_FS) [Y]NFS14,. Linux 2.0.0 -Linux2.0.0.(IPX)...,,NetworkingHOWTO..TCP/IP,y.n,,IPX:Networking options---->[*] TCP/IP networking(SLIP),.,,.,,.,.,,(9,TCP/IP):[*]IP:forwarding/gatewaying
  • 46. IP.,,,,.IP(IPaliases):[*] Network aliasing IP: aliasing supportIP(10,IP):[*] IP: accountingPChugPC/TCPTCP/IPDOSPC.,Unix,:--- (it is safe to leave these untouched)[*] IP: PC/TCP compatibility modeRARP(ReverseAddressResolutionProtocol).RARPIP.,RARP.RARP,rarp,: IP: Reverse ARPMTUTCP,,IP.MTU(MaximumTransferUnit).,Ethernet,MTU,Ethernet1500.IP,,,,IP.*MTUIPTCP..y,.,(,SLIP),mssroute,:[ ] IP: Disable Path MTU Discovery (normally enabled)IP,SourceRouting().,,.RIPOSPF,.,.,:[*]IP:DropsourceroutedframesNovell * ,IP,Ethernet
  • 47. IPX,Novell.LinuxIPX;,Novell.NCPIPXNovell,(IPXNCP15,IPXNCP): The IPX protocolLinux:AX.25,NetRomRose(,AX25HOWTO): Amateur Radio AX.25 Level 2 Amateur Radio NET/ROM Amateur Radio X.25 (Rose)Linux:dummy().: Dummy net driver support,PPP/SLIP.(loopback).,PPP/SLIP,,,IP.5,TCP/IP.IP,IP. LinuxLinux.,.Linux.,,eth0eth1:lo.,.,.loopback.eth0,eth1,...Ethernet.Ethernet,Ethernet.tr0,tr1,TokenRing.TokenRing,,IBM.sl0,sl1,SLIP.,SLIP.ppp0,ppp1,PPP.SLIP,PPP,PPP.plip0,plip1,PLIP.PLIPIP.PLIP.2.0./,,SLIPPPP.
  • 48. ax0,ax1,AX.25.AX.25,.AX.25SLIP....NetworkingHOWTO,,AX25HOWTO. EthernetLinuxEthernet.DonaldBecker,,8390NationalSemiconductors;Becker.Ethernet,Linux.Ethernet,,.LinuxEthernet,.,PaulGortmakerEthernetHOWTO,Linux.+comp.os.linux.answersLDP.,Ethernet,EthernetHOWTO,.,.,,DMAEthernet,DMA,SCSIAdaptec1542.DMA,Ethernet.EthernetLinux,Linux.,.,,,,;. Ethernet EthernetLinux,Ethernet..EthernetHOWTO/..,..,,.,,.,Ethernet.,,.,,,,,.PCI.,. + [email protected]
  • 49. ,.,Ethernet,Ethernet,.lilo,,,appendlilo.conf.Ethernet,:ether=irq,_,[1,][ 2,],.irq,_,.,,.IRQ,.IRQ.,3503IRQ5,9,3,4._/;,..WD80x3,.1debug.17,8;0.35032()(1).BNC,AUI.,..Ethernet,.Ethernet,Linuxlilo,.,,,.reservelilo,/,.,LinuxEthernet0300eth1,:reserve=0x300,32 ether=0,0x300,eth1reserve,/.,eth0:reserve=0x340,32 ether=0,0x340,eth0.,,Ethernet,.1_:ether=0,-1,eth0,"boot:"lilo.,Control,AltShiftlilo.Tab,,.,,,,.Enter,lilo,.,,/etc/lilo.confappend=.:boot=/dev/hdaroot=/dev/hda2install=/boot/boot.b
  • 50. map=/boot/mapvga=normaldelay=20append="ether=10,300,eth0"image=/boot/vmlinuz-2.2.14label=2.2.14read-onlylilo.conf,lilo,.PLIP PLIP(ParallelLineIPIP),.,1020.PLIPCrynwr,Inc.(,,),IBMPC;,.#PLIPCrynwr,,,.PLIP0.,,8PLIPPLIP1.Linux2.0PLIP0.1patch2.02.2.%PLIP,PLIPCrynwr,PLIPNCSAtelnet.!PLIP,,NullPrinterTurboLaplinkcable.;,.PLIPLinux.NiibeYutaka.*,plip0lp0,plip1lp1..2.02.2.2.0drivers/net/Spacd.c.: / IRQplip0 0x3BC 7plip1 0x378 7 # !,,,,,.,.(NewHackersDictionary). % Patch,2.0http://www.cyberelc.demon.co.uk/parport.html. ! NCSAtelnetDOS,TCP/IPEthernetPLIPtelnetFTP. * [email protected].
  • 51. plip2 0x278 5,drivers/net/Spacd.c.2.2,PLIP"parport",PhilipBlundell.*,EthernetPPP,PLIPplip0,plip1...,./.parport_pc.o,,,lilo.IRQIRQproc/parport/*/irq./2.2.,,(PC)/02780x378,IRQ57,:modprob parport_pc io=0x278,0x378 irq=5,7,:parport=0x278,5 parport=0x278,7,append.PLIP,,,plip.o,plip.plip0,plip1...,parport1plip0parport0plip1,:plip=parport1plip=parport0,.PLIP.PPP SLIP PPPSLIPIP.PPPSLIP,IP(,).PPPSLIP;.TCP/IP,.4,.PPP8,PPP,SLIP7,IP. Ethernet.,,,./usr/src/linux/Documentation/networkingLinux. * [email protected]
  • 52. 4 .,SLIP,PPPUUCP,.,,.(,,,),Linux,.,,setserialstty.,,SerialHOWTODavidLawyer.Linux.,,.Unixkermit.,,.,,,.minicom,DOS.X11.seyonX11...,,..,.,,,.UUCP.,..UUCPIanTaylor,Linux,16:TaylorUUCP.Fidonet.Fidonetifmail,,,,.PPPSLIP,.PPPSLIP,FTPweb
  • 53. .PPPSLIP,ISDN.Unix,tty.ttyTeletypedevice(Teletype),Unix..Linux,.Linuxtty:,(AltF1AltFnn)(,X11).tty,Unix.tty,.SLIPPPP.tty,Ethernet,ifconfig.,tty,.,tty.SLIP,PPP,tty.,,,.,.SLIPPPP,,,,.;SLIPPPP,.Unix,,/dev.,,.,.,,,,.,.4,ttyS0,ttyS1..5,;cua0,cua1..Unix,0,1.,COM1:/dev/ttyS0,COM2:
  • 54. /dev/ttyS1..,IBMPC,COM3:.cua(callout),,,.,..Linux,Unix,,,.,tty,.,tty,.(lockfiles).tty,,,.,tty.,,.,,,,;.,.,Linux.,LinuxFilesystemStandard,tty.,,,:/usr/spool/locks/,/var/spool/locks/,/var/lock//usr/lock/..,tty;.cua,.,,,,.ttyS,cua,,.cuattyS,,..,cua.,,.,,.!,.,LinuxFilesystemStandard,/var/lock/,ttyS1LCK.ttyS1.
  • 55. cua,.cua,,.,ttyS,LinuxFSSTND,,,,.,tty,.LOCKDIRMakefile.,,FSSTND.,,:stringsbinaryfile|greplock,,,/var/lock/.,. .COM1:COM4:,COM63.,;.SerialHOWTO,.,COM2:.65,4.,ttyS1,.tty/dev/.,:$ 1s -1 /dev/ttyS*0 crw-rw---- 1 uucp dialout 4, 64 Oct 13 1997 /dev/ttyS00 crw-rw---- 1 uucp dialout 4, 65 Jan 26 21:55 /dev/ttyS10 crw-rw---- 1 uucp dialout 4, 66 Oct 13 1997 /dev/ttyS20 crw-rw---- 1 uucp dialout 4, 67 Oct 13 1997 /dev/ttyS3465,.:# mknod -m 666 /dev/ttyS1 c 4 65# chown uucp.dialout /dev/ttyS1Linux,.root,;uucp.
  • 56. ,,,./dev/modem,ttyS1.,modem,..RS232..().Linux,RS232.,.,.,,CTS(CleartoSend)RTS(ReadytoSend),:RTS/CTS.,,XON/XOFF.XON/XOFF,CtrlSCtrlR,.,,,,,.,.,XON/XOFF,.IBMPC,RS232UART,8250.PC486UART,16450.8250.,Pentium,UART,16550.(,Rockwell),16550.Linux.16550825016450,16FIFO().16550UART,16550,1655016550AFN(16550DN).FIFO;16550AFN,.NS16550,FIFO.825016450UART1.,16450.164509,600bpsISA. ,
  • 57. COM1: COM4:. , UART FIFO 16550, .,:setserialstty.setserial,.,100%.,,,.UART,,16FIFO,16450UART:,16550,.4,IRQ.,IRQIRQ.setserial,.setserialOsetserialrc.serial.,.setserial:setserial[],ttyS0.setserial.41.,setserial.41.setserial port I/O. __ ,0x2f8. irq , . uartuart_type UART. 1645016550. none. fourport ,ASPFourport. spd_hi UART57.6kbps,
  • 58. 38.4kbps. spd_vhi UART115kbps, 38.4kbps. spd_normal UART 38.4kbps., spd_hispd_vhi . auto_irq IRQ. , IRQ.IRQ ,irq. autoconfig port.,setserial UART,. auto_irq, IRQ. skip_test UART ., UART.rc,,41.Linux.41:setserialrc.serial# /etc/rc.serial - .## /sbin/setserial /dev/ttyS0 auto_irq skip_test autoconfig/sbin/setserial /dev/ttyS1 auto_irq skip_test autoconfig/sbin/setserial /dev/ttyS2 auto_irq skip_test autoconfig/sbin/setserial /dev/ttyS3 auto_irq skip_test autoconfig## /sbin/setserial -bg /dev/ttyS*
  • 59. bg/dev/ttyS*.42.42:setserialbg/dev/ttyS/dev/ttyS0at0x03f8(irq=4)isa16550A/dev/ttyS1at0x02f8(irq=3)isa16550Asttysttysettty(tty),.setserial,stty..stty.stty,.,ttystty.stty...;,,.,(),.sttycrtscts,;.rc.serial(),43.43:sttyrc.serial#sttycrtsctsDNS,.,IP,DNS,nslookup.,NotypeArecordsfound().,,,settype.SOAunc.edu,: > unc.edu Server: tao.linux.org.au Address: 203.41.101.121 *** No address (A) records available for unc.edu > set type=SOA > unc.edu Server: tao.linux.org.au
  • 107. Address: 203.41.101.121 unc.edu origin = ns.unc.edu mail addr = host-reg.ns.unc.edu serial = 1998111011 refresh = 14400 (4H) retry = 3600 (1H) expire = 1209600 (2W) minimum ttl = 86400 (1D) unc.edu name server = ns2.unc.edu unc.edu name server = ncnoc.ncren.net unc.edu name server = ns.unc.edu ns2.unc.edu internet address = 152.2.253.100 ncnoc.ncren.net internet address = 192.101.21.1 ncnoc.ncren.net internet address = 128.109.193.1 ns.unc.edu internet address = 152.2.21.1MX: > set type=MX > unc.edu Server: tao.linux.org.au Address: 203.41.101.121 unc.edu preference = 0, mail exchanger = conga.oit.unc.edu unc.edu preference = 10, mail exchanger = imsety.oit.unc.edu unc.edu name server = ns.unc.edu unc.edu name server = ns2.unc.edu unc.edu name server = ncnoc.ncren.net conga.oit.unc.edu internet address = 152.2.22.21 imsety.oit.unc.edu internet address = 152.2.21.99 ns.unc.edu internet address = 152.2.21.1 ns2.unc.edu internet address = 152.2.253.100 ncnoc.ncren.net internet address = 192.101.21.1 ncnoc.ncren.net internet address = 128.109.193.1ANY,.nslookup,,.NS,: > set type=NS > . Server: tao.linux.org.au Address: 203.41.101.121 Non-authoritative answer: (root) name server = A.ROOT-SERVERS.NET (root) name server = H.ROOT-SERVERS.NET (root) name server = B.ROOT-SERVERS.NET (root) name server = C.ROOT-SERVERS.NET (root) name server = D.ROOT-SERVERS.NET (root) name server = E.ROOT-SERVERS.NET (root) name server = I.ROOT-SERVERS.NET (root) name server = F.ROOT-SERVERS.NET (root) name server = G.ROOT-SERVERS.NET (root) name server = J.ROOT-SERVERS.NET (root) name server = K.ROOT-SERVERS.NET (root) name server = L.ROOT-SERVERS.NET (root) name server = M.ROOT-SERVERS.NET Authoritative answers can be found from: A.ROOT-SERVERS.NET internet address = 198.41.0.4 H.ROOT-SERVERS.NET internet address = 128.63.2.53 B.ROOT-SERVERS.NET internet address = 128.9.0.107
  • 108. C.ROOT-SERVERS.NET internet address = 192.33.4.12 D.ROOT-SERVERS.NET internet address = 128.8.10.90 E.ROOT-SERVERS.NET internet address = 192.203.230.10 I.ROOT-SERVERS.NET internet address = 192.36.148.17 F.ROOT-SERVERS.NET internet address = 192.5.5.241 G.ROOT-SERVERS.NET internet address = 192.112.36.4 J.ROOT-SERVERS.NET internet address = 198.41.0.10 K.ROOT-SERVERS.NET internet address = 193.0.14.129 L.ROOT-SERVERS.NET internet address = 198.32.64.12 M.ROOT-SERVERS.NET internet address = 202.12.27.33helpnslookup. ,BIND..,,.hostcvtBIND/etc/hostsnamed.()(PTR),.,,SOAMX.,.hostcvtBIND,LinuxFTP.,.,:dnswalk,Perl.nslint.DNS,,,.hostdig,DNS.DNS..dnswalknslinthttp://www.visi.com/~barr/dnswalk/ftp://ftp.ee.lbl.gov/nslint.tar.Z.hostdigftp://ftp.nikhef.nl/pub/network/ftp://ftp.is.co.za/networking/ip/dns/dig/.IPIPIPX,.,,delimitation.EthernetLAN,SLIPPPP.IP,.,SLIPPPP,.,,,FIFO.SLIP.PPP.,;.
  • 109. LinuxSLIPPPP.,..SLIPPPP,,..,DNS.PPP:DNSIP/etc/resolv.confSLIPIPSLIP.,;shell,SLIP..,SLIP;Linux,.SLIP.tty,SLIPDISC.tty(DISC0),,read(2)write(2),SLIPtty.SLIPDISC:tty,,,SLIP.SLIPSLIP.SLIP,SLIP,VanJacobsen(RFC1144)IP..,.SLIPslattach.,/dev/ttyS3SLIP.:# slattach /dev/ttyS3 &ttyS3SLIPDISCSLIP.SLIP,sl0;sl1..,256SLIP.,slattach,SLIP.,p.SLIP(),:# slattach -p slip /dev/ttyS3 &71.,adaptive,SLIP.
  • 110. 7-1. Linux SLIP slip SLI.cslip SLIPVanJacobsen.slip6 SLIP. uuencode,SLIPASCII, ,,cslip6 SLIPVanJacobsenadaptive ; .,,.,cowslipSLIP,.SLIP,,,,,.,adaptiveslip..slattachSLIP,,,PPPKISS(,)..slattach(8).SLIP,.ifconfigroute.,cowslipvlager.vlager:# ifconfig sl0 vlager-slip pointopoint cowslip# route add cowslip# route add default gw cowslipcowslip,cowslip,cowslip.ifconfig:pointopoint,vlagerslipSLIP.,,EthernetvlagerSLIP.,vlagerslip172.16.1.1.,SLIP.IP,..vlagerslip,SLIP.SLIP,cowslip,routedel,hangup(
  • 111. )slattach.,:# route del default# route del cowslip# ifconfig sl0 down# kill -HUP 516:516(psax)slattach,slip,. IP 5,TCP/IP,EthernetIP,,.;vlagercowslip,,.,vlager.SLIPIP(,cowslip).,vlager,ftp,telnetlynx,.telnet,vlager,.,vlager.WWW,,proxyvlager,.,vlager,.()IP,(firewall).,.9,TCP/IP.11,IP,Linux,IP,proxy.,IP192.168.5.74SLIP.,,,,,/etc/hosts,vlagerslip.SLIP. dip,.,,.,,,,SLIP.dip.DipDialup IP. FredvanKempen.,:
  • 112. dip337puri,LinuxFTPmetalab.unc.edu.Dip,,SLIP.,.SLIP,diproot.dipsetuidroot,SLIProot.,dip.,SLIP.SLIP,SLIPdip,.setuidroot19.rootdip,sudo. ,,SLIPcowslip,dip,cowslip.dip,.dip:# dip cowslip.dipDIP: Dialup IP Protocol Driver version 3.3.7 (12/13/93)Written by Fred N. van Kempen, MicroWalt Corporation.connected to cowslip.moo.com with addr 192.168.5.74#71.71:dip# dip cowslip# get $local vlager-slip get $remote cowslip port ttyS3 # speed 38400 # modem HAYES # reset # tty flush # # . send ATQ0V1E1X1r wait OK 2 if $errlvl != 0 goto error dial 41988 if $errlvl != 0 goto error wait CONNECT 60 if $errlvl != 0 goto error# OK, 19 diploginsetuidroot..
  • 113. sleep 3 send rnrn wait ogin: 10 if $errlvl != 0 goto error send Svlagern wait ssword: 5 if $errlvl != 0 goto error send knockknockn wait running 30 if $errlvl != 0 goto error# SLIP print Connected to $remote with address $rmtip default # mode SLIP # SLIP # error: print SLIP to $remote failed.cowslipSLIP,dip.SLIP.,dipk.dip, dip,/etc/dip.pid:# dip kdip,($).dip,.,$remote$local,SLIP.get,dip.vlagercowslip..reset ,. ,.:41988,cowslipSvlager,knockknock.waitdip,;,,,,.,if.,,default,SLIP,mode,SLIP. dip dip. , , dip help. , . help:
  • 114. # dip -tDIP: Dialup IP Protocol Driver version 3.3.7p-uri (25 Dec 96)Written by Fred N. van Kempen, MicroWalt Corporation.Debian version 3.3.7p-2 (debian).DIP> helpDIP knows about the following commands:beep bootp break chatkey configdatabits dec default dial echoflush get goto help ifinc init mode modem netmaskonexit parity password proxyarp printpsend port quit reset securidfixedsecurid send shell skey sleepspeed stopbits term timeout waitDIP> echoUsage: echo on|offDIP>,,DIP>,,.,,. Dip,.,port,,speed,databits,stopbitsparity,.modem.,,HAYES().dip,dialreset.reset;.HayesATZ.flush,.,,reset,,OK.init,.,HayesATE0Q0V1X1,,().,,,.dial.,HaysATD.echoecho.echoon,dip,.echooff.
  • 115. ,dipa.dip,,,.,Ctrl]. getgetdip.,cowslip.dip.,,ask:DIP> get $local askEnter the value for $local: _.,.,SLIPIPSLIP,,,,,."Youraddress:192.168.5.74",dip:# wait address: 10get $locip remote print,,dip.dip.:DIP>printUsingport$portatspeed$speedUsingportttyS3atspeed38400 Dip..$local$locipIP.$local,dipIP$locip.,,IP$locip;dip,$local.$remote$rmtip,.$mtuMTU.,,get.,,print;$modem,$port$speed.$errlvl,.0,. if goto
  • 116. if,if.:if goto $errlvl,$locip$rmtip.;op==,!=,,=.goto,..send, wait sleepchatdip.send.,Cnbbackspace().(~)/.wait,,..wait;,1$errlvl..sleep,;,login.,.mode defaultSLIP.modedip,.,.mode.dipSLIP,CSLIP,SLIP6,CSLIP6,PPPTERM.dipadaptiveSLIP.SLIP,dipifconfig,route,.,,defaultmode,dip,SLIP. SLIP.SLIP.SLIP.SLIP.,SLIPArthurDentdent.beta.com.dent,passwd:dent:*:501:60:Arthur Dents SLIP account:/tmp:/usr/sbin/diplogin
  • 117. dent,passwd.dip,diplogin.,diplogindip./etc/diphosts,IPSLIP,/.,sliplogin,BSD,,shell,.SLIPdent,dip.SLIP,dip/etc/diphosts.SLIP./etc/diphosts:# /etc/diphostsuser:password:rem-addr:loc-addr:netmask:comments:protocol,MTU 7-2.72:/tc/diphosts user ,dip, .password /etc/diphosts .(/etc/passwd SLIP., login , rem-addr ,. ,IP.loc-addr IP,SLIP. ,.netmask ,. SLIP,remadd ., .comments ,/e .protocol , pslattach.MTU ,. ,., MTU,,.MTU .dent:dent::dent.beta.com:vbrew.com:255.255.255.0:Arthur Dent:CSLIP,296
  • 118. dentSLIP.IP,dent.beta.com255.255.255.0.IPvbrew.comCSLIPMTU296.dent,diplogindiphosts.,diplogin.,,diphosts.,.passwords/keydipS/Key,S/Key.,dip.,diploginCSLIPSLIP..diplogin.diplogin.dip,setuidroot,diplogindip.diploginsetuid,dip.PPPSLIP,PPP,;,SLIP.,PPPIP.,SLIP,.,,IP.,,SLIP.PPP.PPP.PPP;,RFC 20RFC .Using&ManagingPPP(OReilly)AndrewSun.PPPHDLC(HighLevelDataLinkControl),PPP16 21 .SLIP,PPP,IP,IPXNovellAppletalk.PPPHDLC,,.LCP(LinkControlProtocol)HDLC.,MRU(MaximumReceiveUnit),.20 RFC.21 ,HDLC,ISOX.25
  • 119. PPP.,.,(),.,.PPP;..,:PAP(PasswordAuthenticationProtocol)CHAP(ChallengeHandshakeAuthenticationProtocol).,(IPAppleTalk)NCP(NetworkControlProtocol).IP,,PPP,IP,.,IPCP(InternetProtocolControlProtocol).IP,PPPVanJacobsonIP.TCP.CSLIPVJ.IPCP.PPP LinuxLinux,PPP:,(HDLC,IPCP,IPXCP..)pppd,PAPCHAP.PPPLinuxPPPpppd,chat,.PPPMichaelCallahanPaulMackerras.pppd 22PPP Sun386BSD,DrewPerkins,PaulMackerras.LinuxAlLongyear.chat 23KarlFox .SLIP,PPP.PPP,,,PPP.PPP,HDLC(HDLC16),.PPPIP,VanJacobson,IPX.pppd,.pppd.PPP,.,pppd.Using&ManagingPPPpppdREADME22 PPP,Linuxnetvger.rutgers.edu.23 [email protected].
  • 120. pppd,,.PPPHOWTO.PPPLinux.,PPP,,IRCLinux.,comp.protocols.ppp.,,pppd. pppdPPP,loopback.5,TCP/IP,6,./etc/resolv.conf,,DNS.;(),..,,DNS,,.6,named.,PPPpppd,,vlager.,PPPc3poppp.c3poPPP.,,,,:# pppd /dev/ttyS3 38400 crtscts defaultroutettyS3PPPIPc3po.,,38400bps.crtscts,9600bps.,pppd,LCP.,,pppd,,.,IP.,c3po,.pppdIP,IPCP,IP.IPpppd,,...Ethernet,IPEthernetPPP.,pppd.IP.IPCP,pppdPPP.PPP
  • 121. ,ppp0PPP,ppp1..,.pppd,c3po,defaultroute24.IP,,c3po;,,.pppd,. pppd,.,.(#)./etc/ppp/options,,pppd.,,.,pppd(PAPCHAP),auth.,PPP,.,;connect.,/etc/ppp/options,.ppprc../etc/ppp/options:#pppd,vlager.vbrew.comlock #UUCPauth #usehostname #CHAPdomainvbrew.com #lockpppdUUCP.,,,/dev/ttyS3,LCK..ttyS3,,.,minicomuucico,,PPP..,~/.ppprc. chat ,,pppd.dip,pppd,shell.,, 24 .
  • 122. pppdconnect.pppd.pppd,chat,..,chat.,,expect,DonLibes.,Tcl,.,,,/,,,expect.,expect.,expect,connectpppd.,,,,pppd.,.chatchatUUCP.,chat,,..chat:ogin:b1ffssword:s3|
  • 123. chat,ps.,chatdialc3po.chat,f,.,chat.,dialc3po: ATZOK ATDT318714CONNECT ogin: pppword: GaGariNchat,,,,,,.,.pppd:#pppdconnect"chatfdialc3po"/dev/ttyS338400detach crtsctsmodemdefaultrouteconnect,,:detach,pppd,modem,.,pppdDCD,,.,;chat.,,.BUSYNOCARRIER,,.chat,,,ABORT:$chatvABORTBUSYABORTNOCARRIERATZOK...chat,TIMEOUT.,chat:,BREAK(Enter..)..,,.,,,.chat:ogin:BREAKogin:pppssword:GaGariN
  • 124. chat,BREAK,.,;,. IPIPIPCP.,IPCPConfigurationRequest(IPCP),,.,,.pppdIPCP,.,. IP IPIP;PPPIP.PPP,IPPPP.PPPIP,,.PPP,,;,.IP.PPP,,.6,IP.,IP.PPP,IP,,DNS,IP.,;,,IP,26.,pppdc3poIP.IP.,pppd.,vlager,IP,,,c3po,.PPP.,pppd:_:___27.pppd 26 http://www.dynip.com/http://www.justlinux.com/dynamic_dns.html 27 CHAP.PPP.
  • 125. IP,.IPCP,IP28.IP,,pppd.,noipdefaultlocal_addr.noipdefaultpppdIP,.,,remote_addr.,vlagerIP130.83.4.27,130.83.4.27:.,,local_addr.,pppd,. PPP ,pppd.,,;.,pppd,defaultroute.,PPP,,.,,.,,oneshot.,vlagerPPP.vlagerIP,,proxyarppppd,ARPoneshot.oneshot..,.,PPP,,,.,.Ethernet,IP172.16.3.0,3.PPP,.VlagerPPP;vbourbonIP172.16.3.1.2,:.vbourbonvlager,vlager.vlagervbourbon3,vbourbon.,route,PPP,., 28 ipcpacceptlocalipcpacceptremotepppdIP,PPP,.,pppdIP.
  • 126. pppd,ipup.shell,/etc/ppp,pppd,PPP.,:ipupifacedevicespeedlocal_addrremote_addr(,shell): $1 iface ,,ppp0.$2 device (/dev/tty,stdin/stdout).$3 speed .$4 local_addr IP,.$5 remote_addr IP,.,ipup:#!/bin/shcase$5in172.16.3.1) #thisisvbourbon routeaddnet 172.16.3.0gw172.16.3.1;;...esacexit0,/etc/ppp/ipdownipup,PPP.,/etc/ppp/ipdownroute,,/etc/ppp/ipup..PPP,PPP.,,vbourbon,vlager.,gated.vlager,.
  • 127. LCP(LinkControlProtocol),.,LCP,AsynchronousControlCharacterMapMaximumReceiveUnit.LCP,,.AsynchronousControlCharacterMap,asyncmap,,,,(),,.,escape()XONXOFF,,XOFF.Ctrll(escapetelnet).PPPescapeASCII031,asyncmap.asyncmap32,.ASCIINULL,ASCII31.32ASCII.,,escape.,escape,,asyncmappppd,asyncmap.,^S^Q(ASCII1719,XONXOFF)escape,:asyncmap0x000A0000,.32.ASCII00(NULL),ASCII32.,,escape,,.,pppd,.."0x",,.,asyncmap0xffffffff,,escape.,,.,asyncmap,.,asyncmap0x0,.escape.MRU(MaximumReceiveUnit),HDLC,.MTU(MaximumTransferUnit),.MTU,.MRU,MRU;1,500.
  • 128. ,MRU,,.,MRU296,(FTP).pppdMRU296,mru296.MRU,VJ(),,IP.,pppdLCP,,,,.,.,,LCPecho.PPP,EchoRequestEchoResponse.pppd.lcpechointerval.,pppdEchoRequestEchoResponse.,.lcpechofailure.,.PPP.,Ethernet().,PPP.root,.,pppdsetuidroot.,pppd,.,pppd,/etc/ppp/options,,,.,,.connect.rootpppd,,connectnoauth/etc/ppp/options.,rootconnectpppd.,pppd,/etc/group,PPP.pppd,.,dialout,,:#chownroot/usr/sbin/pppd#chgrpdialout/usr/sbin/pppd#chmod4750/usr/sbin/pppd
  • 129. ,,PPP.,,.,IP,,..PPPPPP,:PAP(PasswordAuthenticationPr