2020ok  Directory of FREE Online Books and FREE eBooks

Free eBooks > Computers & Internet > Certification Central > Subjects > Networking > The FreeBSD Corporate Networker's Guide

The FreeBSD Corporate Networker's Guide

by Ted Mittelstaedt


Download Book
(Respecting the intellectual property of others is utmost important to us, we make every effort to make sure we only link to legitimate sites, such as those sites owned by authors and publishers. If you have any questions about these links, please contact us.)


link 1



About Book

Book Description

FreeBSD runs many of the Web's most demanding applications. Yahoo! uses FreeBSD to deliver nearly 500 million page hits a day; even Microsoft's Hotmail has run for years on FreeBSD. Now, there's a single source of documentation for the thousands of technical professionals who've discovered FreeBSD and want to leverage its awesome power. The FreeBSD Corporate Networker's Guide covers everything IT professionals need to know to deploy and manage FreeBSD in applications from the desktop to high availability enterprise servers. Start with an overview of how FreeBSD compares with Windows NT, and the roles a FreeBSD server might play in an enterprise network. Next, review server planning, hardware selection, and infrastructure preparation; then walk through the steps involved in a successful FreeBSD installation. Master every aspect of FreeBSD Internet connectivity and services -- including TCP/IP, DNS, security, Apache, email, and more. Learn the fundamentals of FreeBSD system administration; use FreeBSD systems as firewalls and routers; configure Samba to support Windows workstations; deliver efficient print services, and more. The book concludes with a "manifesto" explaining why companies should consider migrating all their business-critical applications to FreeBSD, whatever they're using now. An accompanying CD-ROM contains FreeBSD 4.1, the latest version.



Book Info
(Pearson Education) A text providing practical instruction for using FreeBSD to search a corporate network. Contains an overview of FreeBSD serving a Windows network, an installation guide, and coverage of key topics. The CD-ROM contains a version of FreeBSD, with installer and bootable CD-ROM support. System requirements: Intel i386, CD-ROM drive. Softcover. DLC: FreeBSD.

From the Publisher
From the Back Cover "FreeBSD has been the secret weapon of serious network administrators for many years now and this book should provide a welcome introduction to those who have yet to discover it for themselves." --Jordan Hubbard, Co-founder, The FreeBSD Project

FreeBSD is the engine that runs on some of today's largest Internet servers, such as Yahoo!, Microsoft's Hotmail, and Walnut Creek. The power, flexibility, and cost effectiveness of FreeBSD make it the preferred server platform of many corporate networks, including networks in which the Windows OS predominates.

The FreeBSD Corporate Networker's Guide provides practical instructions for using FreeBSD to serve a largely Windows corporate network. Written for network managers and administrators, this book shows how FreeBSD and Windows can coexist and interoperate on the same network with few problems, and it reveals how to maximize FreeBSD's many advantages for optimal network performance.

The book contains an overview of FreeBSD serving a Windows network and a step-by-step FreeBSD installation guide. Key network server topics--system administration, Internet connectivity, Web servers, fileserving, printserving, and e-mail--are addressed in depth. You will read about specific topics, such as:

The FreeBSD user interface versus the Windows user interface Dual booting of Windows NT and FreeBSD DNS, DHCP, and TCP/IP on the corporate LAN FreeBSD installation phases, X installation, PPP installation, and disk configuration FreeBSD environment setup, backups, logs, and other system administrative tasks Migrating password files, UNIX equivalents of DOS commands, and some Windows-to-UNIX issues Internet security, proxy serving, and FreeBSD routers The Apache Web server, Windows Web publishing tools, and the vi HTML tool

Fileserving with Samba-SMB and NetBIOS protocols, browsing, and passwords Setting up LPR on Windows clients and FreeBSD Managing the UNIX printserver queue Installing Sendmail on FreeBSD Connecting a mailserver to the Internet

In addition, The FreeBSD Corporate Networker's Guide highlights FreeBSD's many technical advantages, the history and rationale behind its development, and its relationship to Linux.The CD that comes with this book contains the base FreeBSD 4.2 operating system for the Intel i386 platform, including installer and bootable CD-ROM support. The disk also contains XFree86 3.3.6 for FreeBSD, and several hundred of the most popular third-party packages for FreeBSD.

From the Author
I have used FreeBSD as a server software platform, right alongside Windows NT servers, in all of the corporate networks that I managed at the companies that I have worked at. FreeBSD has performed extremely well for routing, mail, webserving, fileserving, and other general-purpose corporate serving tasks. I have been very impressed by FreeBSD's efficiency on server hardware that is now considered too old and slow for Windows 2000, such as Pentium 200Mhz, 64MB ram systems. Today as I replace Windows NT 4 servers with new hardware running Windows 2K, I regularly cycle the obsolete NT4 hardware into FreeBSD servers that frequently outperform their Windows 2000 sisters in speed and reliability.

I wrote "The FreeBSD Corporate Networker's Guide" with the goal of helping the organizational network admin quickly come up to speed with FreeBSD. The book bridges the gap between introductory UNIX texts, such as those frequently found in Intro to UNIX classes at the local college, and the extremely advanced texts such as "The Design and Implementation of the 4.4BSD Operating System" by Marshall Kirk McKusick (also available from Amazon) that are intended for programmers. Rather than approaching the subject from a general UNIX or Linux viewpoint, I focused on FreeBSD to permit specific examples and instruction.

I hope that the book becomes your most-used reference text in your FreeBSD library, and I look forward to your comments and feedback which can be mailed to book@freebsd-corp-net-guide.com

From the Inside Flap
The FreeBSD Corporate Networker's Guide is written for beginning FreeBSD administrators who want to take advantage of the power and cost savings afforded by use of this operating system on their organizations' production network. FreeBSD takes its name from the Berkeley Software Distribution group, where the software originated. As with all network operating systems (NOSs), there is a "learning hump" that the administrator just beginning to work with the NOS must climb. In keeping with the spirit of freely available Open Source software, this book has operating with the Microsoft (MS) operating system and networking as a primary goal. FreeBSD and Windows can peaceably coexist on the same network without problems. As an administrator you can mix and match FreeBSD and Windows servers and clients as you see fit, as long as you follow good networking practices of using standards-based methods and protocols. It is important that a production network be based on standards as much as possible. Mixing FreeBSD and Windows on the same network is an excellent way to do this. Newcomers to the UNIX computing paradigm will find it somewhat different than the Windows paradigm. Sometimes it is even more difficult for the administrator experienced in other operating systems (OSs) to pick up UNIX than it is for the raw newcomer. Preconceptions of how an OS works and how best to do things need to be shed. This mind expanding is a very good thing for the information system (IS) professional, even if he or she has no intention of using the material professionally. Some people are so bigoted that they carry on a crusade against the Macintosh and/or OS/2. This trap, more than anything else, blocks progress in the quickly shifting computer industry. Even Microsoft, once the standards' bearer of proprietary computing, has come to realize this. The Web front-end of MS's Hotmail service, for example, runs entirely on FreeBSD (look at the MS Help Wanted postings that require FreeBSD experience for Hotmail administrators). Organization of This Book The first section of this book, Chapters 1 through 3, covers preinstallation and installation of FreeBSD. As with any other NOS, several questions must be answered before the installation CD even boots up in the server hardware. (This is one reason the DNS chapter is before the installation chapter.) I strongly recommend installing a FreeBSD system before tackling the rest of the book, even if all you do is install according to the directions without understanding them. In some ways, learning about FreeBSD is a catch-22 proposition. You need to know how FreeBSD works before you can install it properly, but you need an installed FreeBSD system before you can learn how it works! To solve this problem, just go ahead and install a system, even if it's the ugliest and worst option selection possible. All you need is something running on something, which will help you understand the rest of this book. You will want to go back later and reinstall FreeBSD anyway. Chapters 4 through 9 are intended to be taken piecemeal. Do you need a FreeBSD router to connect to the Internet? If so, skip to Chapter 5. Do you need a FreeBSD mailserver? If so, skip to Chapter 9. Although there is some order, in that later topics do build on some material introduced in earlier chapters, the main idea is to concentrate first on the sections for which you have an immediate need. In addition, the information in the chapters is not intended to be swallowed in one gulp but to be used more as a reference. Ignore the bits that are completely inapplicable to your situation. For example, most people will never need to connect a DOS-bootable disk to a FreeBSD network, but the information is there for the few who do need it. Chapter 10, Advocacy, contains material that polarized the reviewers. Some loved it, some hated it; nobody lacked an opinion about it. This chapter presents all the reasons to use FreeBSD instead of Windows, and it includes some background information about FreeBSD. If you are an administrator who thinks that both Windows and FreeBSD have their strong points and you want to "marry" the two, you won't find agreement here. My goal is to see FreeBSD replace Windows, not to coexist with it forever. Although advocacy may seem out of place in a technically oriented publication, the truth is that this chapter is the real key to the essence of FreeBSD. FreeBSD, and other Open Source software products, were not written by people who wanted to make a lot of money, or even any money at all. They are not in any way commercial products, yet they are being used as pillars for commercial enterprises! Without understanding Open Source software, why FreeBSD exists, or what drives it, any good administrator would be concerned about its longevity in the market; no administrator could persuade management to try FreeBSD or have any confidence in it. Thus, an understanding of advocacy is essential to the FreeBSD administrator. Open Source Software Open Source software, like FreeBSD, generally follows this definition. The software is free when obtained electronically and has only a nominal cost if supplied on media (usually less than $30). No support, warranty, or suitability of fitness for use is implied. There is no guarantee that it will function at all. The entire source code needed to compile the software is freely available. In some cases binary versions of the software may not be available; the end user must compile it. There are no restrictions on the end user's personal use of the software. In a corporate or governmental organization, personal use is defined as entirely within that organization and benefiting members of that organization. The software is not intended to be available only for a limited time, at the end of which it converts to a commercial model (e.g., beta code, eval code). In general, no commercial support is available, other than targeted consulting. This is changing with the largest packages--FreeBSD, Linux, and Sendmail--which do have commercial support available. Open Source software generally comes with a license applied by its copyright holder. The most important purpose of this license is to establish that the software is indeed Open Source and is not commercial, or pirated. Beyond this, Open Source licenses fall into one of two general categories. 1. Limited or restricted license. A good example is the GNU software license used on the GNU C Complier (GCC) in the FreeBSD operating system. This license permits GNU code to be included in commercial software, but any modifications to the GNU software must be placed under GNU also. Another example is the license used on the Sendmail version 8.9.X software package, which requires anyone using Sendmail in a commercial software project, such as a UNIX operating system, to obtain permission from Sendmail, with an exception for Open Source projects. These licenses also have language specifying source availability. There is no single standard for a limited or restricted Open Source license, despite what you may read about the GNU software license. Anybody can (and often does) sit down and write up a license document and apply it to his or her software; the existence of GNU does not prevent this.
2. Unlimited or unrestricted license. The classic example of this type of license is the Berkeley BSD license used on most of FreeBSD itself. It allows use of the source in other commercial projects without obtaining permission or opening the source of the commercial project. Another example of this kind of license is that of the Livingston Radius code; that license file can be found at ftp://ftp.livingston/pub/le/radius/radius21.tar.Z. Although the difference between limited or restricted and unlimited or unrestricted may seem trivial, in reality it is not. Unlimited licenses, such as that of BSD, exist because the developers want the code to be used commercially, even if the developer never sees a dime from revenue generated by sale of the software. The principal reason for this is the age-old human instinct for leaving a mark. If your goal is to write a piece of software that will become a standard for everyone, BSD is the best and quickest way to do it. In contrast, GNU and GNU public license (GPL) and those limited licenses force the software to stay alive and be improved or prevent people from profiting by reselling software under the limited license. Software that is shipped with the source code and contains a software license that disallows mere use of the software in a commercial environment is not Open Source software. The FreeBSD Project does not use such software in FreeBSD because this practice would place most FreeBSD end users in legal trouble. PC Server and PC Local Area Network In the old days of IBM XT-compatibles, building a fileserver on a PC was impractical as well as unbelievable. The 8088 hardware simply was not powerful enough, and the XT was extremely restricted in internal bandwidth and other resources. Back then, servers were big, powerful computers that sat in a glass house, if the organization had them at all. As PCs became more powerful and Ethernet networks extended to all desktops, the Intel 80286 chip began to be used in the AT computer. Because these PCs were constructed with 8MB and 16MB of RAM and 300MB ESDI disks, their use as network servers became possible. These early machines were still very weak compared to a real UNIX server of the time, but because they were much cheaper, network operating systems began appearing--for example, NetWare and LanManager based on OS/2. Companies built large networks based entirely around these NOSs; these networks came to be known as PC-LANs since clients and servers were both PC-compatible computers. The primary difference between a PC used as a server and a PC used as a client was that the server was more powerful, with larger disks, more RAM, and a faster central processing unit (CPU). In addition to this, while PCs were becoming powerful enough to be used as servers, the original proprietary server computers also continued to become more powerful. Today, vendors selling servers can be selling, in effect, souped-up PCs, or proprietary-hardware computers such as Sun Sparcs. In this book, the term PC server is used to designate a server built around a PC computer (e.g., Wintel) rather than a server computer built with proprietary hardware (e.g., Sparc). The Token Ring, Latticenet, and Arcnet network media types originally had some marketshare, but Ethernet rapidly became the dominant network media. FreeBSD does support fiber distributed data interface (FDDI) network cards, but the Ethernet network standard is assumed in this book because it is what most 10BaseT and 100BaseT networks are made up of. Conventions Used Over the years, the various Microsoft OSs have developed nicknames, although, according to Microsoft, the proper way to refer to them is to use their full names. This book is not an advertisement for MS products, therefore I do not use spelled-out product names for Windows, such as Windows NT Advanced Server, numerous times in a paragraph. Using full names would not only be very tiring for the reader, but it would also make the text read like Microsoft advertising copy. So, here are the shortened terms that are used: MS--Microsoft Corporation Win31--Microsoft Windows 3.0 and Microsoft Windows 3.1 WfW--Windows for Workgroups 3.1 and Windows for Workgroups 3.11 Win16--All Windows 3.0, 3.1, 3.11, Windows for Workgroups 3.1 and 3.11 Win95, Win98, or Win95/98/ME--Windows 95, Windows 98, Windows Millennium NTWKS 3.51, NTWKS 4.0--Windows NT Workstation 3.51, 4.0 NT Server 3.51, 4.0--Windows NT Server 3.51, 4.0 and Windows NT Advanced Server 3.51, 4.0 (This book doesn't differentiate Advanced from regular NT Server.) NT--used when there is no difference in the behavior of the NT Workstation and Server, as well as numeric versions Win2K--Windows 2000 Professional (successor to Windows NT Workstation) Win2K Server--Windows 2000 Server (successor to Windows NT 4.0 Server) Normal text in this book is in Times New Roman. Text that is typed into the computer, such as commands, is represented in Courier. Bold Courier indicates computer output. You need to understand that space characters are just as important in command strings as they are in text characters; when typing commands, include the spaces. Special emphasis and keywords are represented in italics. In UNIX, the command interpreter assigns special meanings to double and single quotes. Text that is to be typed into the computer is always exactly what is to be typed, including all forward slashes, backslashes, and/or quote marks. All URLs in this book are set using underlined Courier (e.g., freebsd). URLs either follow the convention of linking to the root index or linking to the base of the item in question. For example, a Web site may have a separate area for a particular program that is substantively different from the rest of the site, in which case it's apparent that the Webmaster regards the separate area as being apart from the main Web site. UNIX uses the forward slash (/) as the directory separator in the filesystem, not the backslash (\), as in DOS and Windows. In most cases, I use the fully qualified pathname so that "a file named /foobar is read as a file named "foobar" located in the root directory." One other formatting convention I use is quad-X. In a command string where input must be substituted, the XXXX mark will appear, as in the following.

passwd root
Changing local password for root.
New password: XXXX
Retype new password: XXXX
passwd: rebuilding the database...
passwd: done Obtaining RFC Documents TCP/IP is an open protocol originated by the Internet Engineering Task Force (IETF). This body creates standards through the Request for Comments (RFC) process. In addition to the TCP/IP protocol, RFCs exist for many programs found in UNIX, especially network programs. RFCs are identified by numbers, and this book contains references to specific RFCs. A copy of any RFC can be downloaded from the Internet. Years ago, the master location was ftp://ds.internic/rfc. So many books and other publications linked to this machine name, however, that it was shut down. In any case, the Internic is not the network citizen it once was. Today, the master RFC site is rfc-editor/. The most popular primary repository is located at ftp://ftp.isi/in-notes. There is a second repository at ietf/, but its RFC page lists the RFC editor's site as the primary one. It contains mainly text versions along with some PostScript versions. The PostScript versions of the RFCs are better than the text ones because some contain diagrams. Software and Hardware Mentioned in This Book In keeping with the spirit of the FreeBSD operating system, practically all software discussed in this book is free, except for the Windows and DOS operating systems. Where specific needs exist on Windows OSs for which no free software package is available, I have used shareware alternatives, always attempting to use the least expensive shareware possible. Many commercial software packages that manage UNIX-to-Windows interoperability would probably work just as well or better with FreeBSD and Windows desktops. For TCP/IP clients for Windows in particular, the market could use a $20-per-seat Network File System (NFS) client for Win95/98, although this is becoming a moot issue with the release of Win2K. In some cases, buying hardware devices may be far cheaper and make more sense for many applications than would running software packages on a PC. You owe it to yourself to investigate these as well. Nothing in this book should be construed as a licensing statement for any specific software package. In the case of shareware and freeware, the licenses in the packages take precedence over any statements in this book. It is the end user's responsibility to make sure that all licensing requirements are properly met. I mention various computer hardware devices that facilitate use of FreeBSD as a network server. Rest assured that I have not received any of these devices free as promotions from their manufacturers, which would influence my selection as to their suitability for use with the operating system. I have purchased all the hardware mentioned here, or used it at businesses that have employe me, where I used the FreeBSD operating system. Information Sources An administrator can use a number of significant recognized sources of information about FreeBSD, including the following. The manual. All UNIX systems have a system manual, accessed by the man command. Electronic documentation. Many document directories can be found in /usr/share, such as the FreeBSD Handbook. If full sources are installed, detailed documentation is often available in source directories, along with the source code. The FreeBSD Web site. freebsd Mailing lists. The FreeBSD group manages a number of mailing lists, subscription instructions, and a list of mailing lists on the FreeBSD Web site. Usenet news. Several Usenet news groups cover FreeBSD. Usenet is an excellent source of quick information on FreeBSD, but new users should be aware of certain aspects of Usenet and its mailing lists. All users should read the "Netiquette" document in the newsgroup news. newusers before posting. In addition, please keep the following in mind. Usenet is not a manufacturer's technical support forum. If you post a question, nobody has any responsibility to respond, or to respond with correct information. Usenet is not very fast. In general it may take more than a week before your question is answered by those in the reading group who want to answer it. Before posting a question on Usenet, make sure that it is not answered in documentation or on the FreeBSD Web site in the documentation archives. In addition, check past postings at dejanews or some other major Usenet news archive. Most readers of the Usenet site visit it irregularly. The one person who can answer your question may not happen to be reading on the few days that you post. Post a question again after a suitable interval, such as a week, if no answer is posted. Don't say "send responses by e-mail" in your posting message. Most readers who answer questions on Usenet get annoyed at this because it indicates someone who is too lazy or too busy to bother to follow up on a query. An unreliable news server is not an excuse because DejaNews can be checked for possible missing postings. Don't post general questions asking for help. Make your posting as specific as possible. List all relevant details, such as machine, brand, disk size, disk model, amount of memory, exactly what you are trying to do, and so on. Always remember that people answering questions on Usenet are doing it for their own enjoyment and advancement of the FreeBSD Project. Your education is of secondary importance. Megabytes and Megabits From almost the beginning of the computer industry, computer engineers have measured data by bits. A single bit in a computer can be either on or off, represented by decimal 0 or 1. Bits are grouped together into bytes, which are eight bits long. Bytes are grouped into words, then double words, and so on. All of these units are used with the octal (base 8) or the hexadecimal (base 16) numbering system. People don't think in hexadecimal, however; they think in the decimal system (base 10). So do most engineers in other disciplines. Only software engineers can think in hexadecimal. So, bits and bytes are often converted from their hexadecimal and octal measurements into decimal by adding the powers of two: two to the zeroeth, plus two to the first, plus two to the second, and so on. Two raised to the tenth is equal to 1,024. Very early on, software engineers decided to make things easier for themselves and began using the International System of Units (SI) designations--kilo, mega, giga, and so on. So, eight bits is a byte, 1,024 bytes is a kilobyte, 1,024 x 1,024 bits is a megabyte, and so on. Soon, the abbreviation KB came to be associated with kilobytes, MB with megabytes, GB with gigabytes, and so on. When networking became important to the industry, confusion arose, so people began writing Kbt, Mbt, Gbt--kilobits, megabits, and gigabits--to satisfy the networking and telecommunications people. These people use the decimal measurement, generally, and to them 1Mbt means 1,000,000 bits, not 1,048,576 bits (a megabyte). Everyone was pretty satisfied with the arrangement and things went along well enough until hard drive manufacturers came along. The problem was that generally the more bits a hard drive holds, the more expensive it is. So, to gain marketshare, hard drive manufacturers began to market their products based on the decimal measurement of bytes the drives could hold. Thus, instead of a 100MB hard drive holding 100 x 1,024 bytes, it actually held only 100 x 1,000 bytes. This allowed hard drive manufacturers to advertise a 10MB drive that didn't actually hold 10MB of data from the computer user's point of view. As long as hard drives were fairly small, every computer user pretty much accepted the fact that a hard drive's usable capacity was somewhat smaller than its advertised capacity. In the 1990s, however, as hard drives became larger and larger, the advertised capacity began to diverge tremendously from the real capacity. The drive manufacturers, being hardware people, began complaining to the umbrella standards organization--the Institute of Electrical and Electronics Engineers (IEEE)--to do something about it. Things came to a head, so in December of 1998, the IEEE (which the networking TCP/IP community had rejected in favor of IETF over the IP standards wars) decided to get involved. With a coalition of physicists and measurement purists, they persuaded the International Electrotechnical Commission (IEC) to issue a standard for data storage based on the decimal system. The new standard renamed all of the standard terminology used by the computer industry, with the exception of the hard drive manufacturers, into the base 10 terminology. In this book, I do not use the Revised Data Processing measurements promoted by the IEC. Because this book is about a computer operating system, the classic measurement system used by software engineers is used except when referring to data transmission--the telecommunications people have never used the computer measurement system. Sadly, the IEC justifies its standard by saying that more people don't know that 1K means 1,024 rather than 1,000. Therefore, the technical people should bow to the majority.Reaching the Author and Errata I am always interested in comments and questions from readers. I've set up an e-mail address for comments about the book, and I hope to incorporate readers' suggestions into a future edition. Please refrain from sending general FreeBSD questions until you have read the entire book, asked questions on one of the FreeBSD mailing lists, and searched the archives--freebsd. Unfortunately, I don't have the time (or money) to be a full-time, unpaid, technical support person for FreeBSD. Please send any book comments to book@freebsd-corp-net-guide. Naturally, the publisher and I have tried to eliminate all typos and errors from the text. However, a book this size undoubtedly contains at least one mistake. I'll post any necessary corrections you send me on a Web site for this book. Check the Addison-Wesley site and see freebsd-corp-net-guide for postproduction information. Web Site URLs No body of case law covers URL linking. I am aware that some people would like to make some sort of global, or at least federal, requirement that anyone linking to a URL first seeks permission from the Web site host. This idea may sound reasonable, but it is not. Because no right to control URL linking exists currently, seeking permission would merely confer a right that never existed to begin with. In all URLs listed in this book, I have followed any instructions that are posted on the Web site by the Webmaster. However, a Web site that is intentionally made accessible to the public is fundamentally a public venue. If you as a Webmaster do not want others to link to a site that is plainly intended to be public, I respectfully suggest that you examine the definition of public and install IP number block filtering to prevent the general public from viewing the site. I believe that if you place a Web site on the publicly accessible Internet, then people should have the right to link to it, which is exactly the same as their right to visit it. If the Webmaster has placed a directive on the Web site requesting that links to it be made to a particular location, I follow these directives for the URLs in this book. Because of the fluidity of the Internet, a book that names a significant number of URLs is likely to refer to some sites that have vanished or moved. I apologize for this and I'll try to keep a table of corrected URLs and links available at freebsd-corp-net-guide.

0201704811P04062001

From the Back Cover

"FreeBSD has been the secret weapon of serious network administrators for many years now and this book should provide a welcome introduction to those who have yet to discover it for themselves."
--Jordan Hubbard, Co-founder, The FreeBSD Project

FreeBSD is the engine that runs on some of today's largest Internet servers, such as Yahoo!, Microsoft's Hotmail, and Walnut Creek. The power, flexibility, and cost effectiveness of FreeBSD make it the preferred server platform of many corporate networks, including networks in which the Windows OS predominates.

The FreeBSD Corporate Networker's Guide provides practical instructions for using FreeBSD to serve a largely Windows corporate network. Written for network managers and administrators, this book shows how FreeBSD and Windows can coexist and interoperate on the same network with few problems, and it reveals how to maximize FreeBSD's many advantages for optimal network performance.

The book contains an overview of FreeBSD serving a Windows network and a step-by-step FreeBSD installation guide. Key network server topics--system administration, Internet connectivity, Web servers, fileserving, printserving, and e-mail--are addressed in depth. You will read about specific topics, such as:

  • The FreeBSD user interface versus the Windows user interface
  • Dual booting of Windows NT and FreeBSD
  • DNS, DHCP, and TCP/IP on the corporate LAN
  • FreeBSD installation phases, X installation, PPP installation, and disk configuration
  • FreeBSD environment setup, backups, logs, and other system administrative tasks
  • Migrating password files, UNIX equivalents of DOS commands, and some Windows-to-UNIX issues
  • Internet security, proxy serving, and FreeBSD routers
  • The Apache Web server, Windows Web publishing tools, and the vi HTML tool
  • Fileserving with Samba-SMB and NetBIOS protocols, browsing, and passwords
  • Setting up LPR on Windows clients and FreeBSD
  • Managing the UNIX printserver queue
  • Installing Sendmail on FreeBSD
  • Connecting a mailserver to the Internet

In addition, The FreeBSD Corporate Networker's Guide highlights FreeBSD's many technical advantages, the history and rationale behind its development, and its relationship to Linux. The author's Web site for this book, which includes sample code, working examples, and a Q&A forum, is located at www.freebsd-corp-net-guide.com. The CD that comes with this book contains the base FreeBSD 4.2 operating system for the Intel i386 platform, including installer and bootable CD-ROM support. The disk also contains XFree86 3.3.6 for FreeBSD, and several hundred of the most popular third-party packages for FreeBSD.



0201704811B04062001



About the Author

Ted Mittelstaedt is the Network Operations Center Director at Internet Partners, Inc., in Portland, Oregon. Previously, he was the IS Manager at Portland Software, Senior Developer at Computers Plus, and Senior Systems Administrator at Symantec. He has been using FreeBSD commercially since its initial release. A well-known expert, Mittelstaedt writes networking articles for Computer Bits magazine, wrote most of the FAQs for www.sendmail.net, and frequently contributes to the Usenet newsgroup--comp.unix.bsd.freebsd.misc.

0201704811AB04062001



Excerpt. © Reprinted by permission. All rights reserved.

The FreeBSD Corporate Networker's Guide is written for beginning FreeBSD administrators who want to take advantage of the power and cost savings afforded by use of this operating system on their organizations' production network. FreeBSD takes its name from the Berkeley Software Distribution group, where the software originated. As with all network operating systems (NOSs), there is a "learning hump" that the administrator just beginning to work with the NOS must climb.

In keeping with the spirit of freely available Open Source software, this book has operating with the Microsoft (MS) operating system and networking as a primary goal. FreeBSD and Windows can peaceably coexist on the same network without problems. As an administrator you can mix and match FreeBSD and Windows servers and clients as you see fit, as long as you follow good networking practices of using standards-based methods and protocols. It is important that a production network be based on standards as much as possible. Mixing FreeBSD and Windows on the same network is an excellent way to do this.

Newcomers to the UNIX computing paradigm will find it somewhat different than the Windows paradigm. Sometimes it is even more difficult for the administrator experienced in other operating systems (OSs) to pick up UNIX than it is for the raw newcomer. Preconceptions of how an OS works and how best to do things need to be shed. This mind expanding is a very good thing for the information system (IS) professional, even if he or she has no intention of using the material professionally. Some people are so bigoted that they carry on a crusade against the Macintosh and/or OS/2. This trap, more than anything else, blocks progress in the quickly shifting computer industry. Even Microsoft, once the standards' bearer of proprietary computing, has come to realize this. The Web front-end of MS's Hotmail service, for example, runs entirely on FreeBSD (look at the MS Help Wanted postings that require FreeBSD experience for Hotmail administrators).

Organization of This Book

The first section of this book, Chapters 1 through 3, covers preinstallation and installation of FreeBSD. As with any other NOS, several questions must be answered before the installation CD even boots up in the server hardware. (This is one reason the DNS chapter is before the installation chapter.) I strongly recommend installing a FreeBSD system before tackling the rest of the book, even if all you do is install according to the directions without understanding them. In some ways, learning about FreeBSD is a catch-22 proposition. You need to know how FreeBSD works before you can install it properly, but you need an installed FreeBSD system before you can learn how it works! To solve this problem, just go ahead and install a system, even if it's the ugliest and worst option selection possible. All you need is something running on something, which will help you understand the rest of this book. You will want to go back later and reinstall FreeBSD anyway.

Chapters 4 through 9 are intended to be taken piecemeal. Do you need a FreeBSD router to connect to the Internet? If so, skip to Chapter 5. Do you need a FreeBSD mailserver? If so, skip to Chapter 9. Although there is some order, in that later topics do build on some material introduced in earlier chapters, the main idea is to concentrate first on the sections for which you have an immediate need.

In addition, the information in the chapters is not intended to be swallowed in one gulp but to be used more as a reference. Ignore the bits that are completely inapplicable to your situation. For example, most people will never need to connect a DOS-bootable disk to a FreeBSD network, but the information is there for the few who do need it.

Chapter 10, Advocacy, contains material that polarized the reviewers. Some loved it, some hated it; nobody lacked an opinion about it. This chapter presents all the reasons to use FreeBSD instead of Windows, and it includes some background information about FreeBSD. If you are an administrator who thinks that both Windows and FreeBSD have their strong points and you want to "marry" the two, you won't find agreement here. My goal is to see FreeBSD replace Windows, not to coexist with it forever. Although advocacy may seem out of place in a technically oriented publication, the truth is that this chapter is the real key to the essence of FreeBSD.

FreeBSD, and other Open Source software products, were not written by people who wanted to make a lot of money, or even any money at all. They are not in any way commercial products, yet they are being used as pillars for commercial enterprises! Without understanding Open Source software, why FreeBSD exists, or what drives it, any good administrator would be concerned about its longevity in the market; no administrator could persuade management to try FreeBSD or have any confidence in it. Thus, an understanding of advocacy is essential to the FreeBSD administrator.

Open Source Software

Open Source software, like FreeBSD, generally follows this definition.

  • The software is free when obtained electronically and has only a nominal cost if supplied on media (usually less than $30).
  • No support, warranty, or suitability of fitness for use is implied. There is no guarantee that it will function at all.
  • The entire source code needed to compile the software is freely available. In some cases binary versions of the software may not be available; the end user must compile it.
  • There are no restrictions on the end user's personal use of the software. In a corporate or governmental organization, personal use is defined as entirely within that organization and benefiting members of that organization.
  • The software is not intended to be available only for a limited time, at the end of which it converts to a commercial model (e.g., beta code, eval code).
  • In general, no commercial support is available, other than targeted consulting. This is changing with the largest packages--FreeBSD, Linux, and Sendmail--which do have commercial support available.

Open Source software generally comes with a license applied by its copyright holder. The most important purpose of this license is to establish that the software is indeed Open Source and is not commercial, or pirated. Beyond this, Open Source licenses fall into one of two general categories.

1. Limited or restricted license. A good example is the GNU software license used on the GNU C Complier (GCC) in the FreeBSD operating system. This license permits GNU code to be included in commercial software, but any modifications to the GNU software must be placed under GNU also. Another example is the license used on the Sendmail version 8.9.X software package, which requires anyone using Sendmail in a commercial software project, such as a UNIX operating system, to obtain permission from Sendmail, with an exception for Open Source projects. These licenses also have language specifying source availability. There is no single standard for a limited or restricted Open Source license, despite what you may read about the GNU software license. Anybody can (and often does) sit down and write up a license document and apply it to his or her software; the existence of GNU does not prevent this.
2. Unlimited or unrestricted license. The classic example of this type of license is the Berkeley BSD license used on most of FreeBSD itself. It allows use of the source in other commercial projects without obtaining permission or opening the source of the commercial project. Another example of this kind of license is that of the Livingston Radius code; that license file can be found at ftp://ftp.livingston.com/pub/le/radius/radius21.tar.Z. Although the difference between limited or restricted and unlimited or unrestricted may seem trivial, in reality it is not. Unlimited licenses, such as that of BSD, exist because the developers want the code to be used commercially, even if the developer never sees a dime from revenue generated by sale of the software. The principal reason for this is the age-old human instinct for leaving a mark. If your goal is to write a piece of software that will become a standard for everyone, BSD is the best and quickest way to do it. In contrast, GNU and GNU public license (GPL) and those limited licenses force the software to stay alive and be improved or prevent people from profiting by reselling software under the limited license.

Software that is shipped with the source code and contains a software license that disallows mere use of the software in a commercial environment is not Open Source software. The FreeBSD Project does not use such software in FreeBSD because this practice would place most FreeBSD end users in legal trouble.

PC Server and PC Local Area Network

In the old days of IBM XT-compatibles, building a fileserver on a PC was impractical as well as unbelievable. The 8088 hardware simply was not powerful enough, and the XT was extremely restricted in internal bandwidth and other resources. Back then, servers were big, powerful computers that sat in a glass house, if the organization had them at all.

As PCs became more powerful and Ethernet networks extended to all desktops, the Intel 80286 chip began to be used in the AT computer. Because these PCs were constructed with 8MB and 16MB of RAM and 300MB ESDI disks, their use as network servers became possible. These early machines were still very weak compared to a real UNIX server of the time, but because they were much cheaper, network operating systems began appearing--for example, NetWare and LanManager based on OS/2. Companies built large networks based entirely around these NOSs; these networks came to be known as PC-LANs since clients and servers were both PC-compatible computers. The primary difference between a PC used as a server and a PC used as a client was that the server was more powerful, with larger disks, more RAM, and a faster central processing unit (CPU). In addition to this, while PCs were becoming powerful enough to be used as servers, the original proprietary server computers also continued to become more powerful.

Today, vendors selling servers can be selling, in effect, souped-up PCs, or proprietary-hardware computers such as Sun Sparcs. In this book, the term PC server is used to designate a server built around a PC computer (e.g., Wintel) rather than a server computer built with proprietary hardware (e.g., Sparc).

The Token Ring, Latticenet, and Arcnet network media types originally had some marketshare, but Ethernet rapidly became the dominant network media. FreeBSD does support fiber distributed data interface (FDDI) network cards, but the Ethernet network standard is assumed in this book because it is what most 10BaseT and 100BaseT networks are made up of.

Conventions Used

Over the years, the various Microsoft OSs have developed nicknames, although, according to Microsoft, the proper way to refer to them is to use their full names. This book is not an advertisement for MS products, therefore I do not use spelled-out product names for Windows, such as Windows NT Advanced Server, numerous times in a paragraph. Using full names would not only be very tiring for the reader, but it would also make the text read like Microsoft advertising copy. So, here are the shortened terms that are used:

  • MS--Microsoft Corporation
  • Win31--Microsoft Windows 3.0 and Microsoft Windows 3.1
  • WfW--Windows for Workgroups 3.1 and Windows for Workgroups 3.11
  • Win16--All Windows 3.0, 3.1, 3.11, Windows for Workgroups 3.1 and 3.11
  • Win95, Win98, or Win95/98/ME--Windows 95, Windows 98, Windows Millennium
  • NTWKS 3.51, NTWKS 4.0--Windows NT Workstation 3.51, 4.0
  • NT Server 3.51, 4.0--Windows NT Server 3.51, 4.0 and Windows NT Advanced Server 3.51, 4.0 (This book doesn't differentiate Advanced from regular NT Server.)
  • NT--used when there is no difference in the behavior of the NT Workstation and Server, as well as numeric versions
  • Win2K--Windows 2000 Professional (successor to Windows NT Workstation)
  • Win2K Server--Windows 2000 Server (successor to Windows NT 4.0 Server)

Normal text in this book is in Times New Roman. Text that is typed into the computer, such as commands, is represented in Courier. Bold Courier indicates computer output. You need to understand that space characters are just as important in command strings as they are in text characters; when typing commands, include the spaces. Special emphasis and keywords are represented in italics. In UNIX, the command interpreter assigns special meanings to double and single quotes. Text that is to be typed into the computer is always exactly what is to be typed, including all forward slashes, backslashes, and/or quote marks.

All URLs in this book are set using underlined Courier (e.g., http://www.freebsd.org). URLs either follow the convention of linking to the root index or linking to the base of the item in question. For example, a Web site may have a separate area for a particular program that is substantively different from the rest of the site, in which case it's apparent that the Webmaster regards the separate area as being apart from the main Web site.

UNIX uses the forward slash (/) as the directory separator in the filesystem, not the backslash (\), as in DOS and Windows. In most cases, I use the fully qualified pathname so that "a file named /foobar is read as a file named "foobar" located in the root directory."

One other formatting convention I use is quad-X. In a command string where input must be substituted, the XXXX mark will appear, as in the following.

passwd root
Changing local password for root.
New password:
XXXX
Retype new password: XXXX
passwd: rebuilding the database...
passwd: done

Obtaining RFC Documents

TCP/IP is an open protocol originated by the Internet Engineering Task Force (IETF). This body creates standards through the Request for Comments (RFC) process. In addition to the TCP/IP protocol, RFCs exist for many programs found in UNIX, especially network programs. RFCs are identified by numbers, and this book contains references to specific RFCs. A copy of any RFC can be downloaded from the Internet. Years ago, the master location was ftp://ds.internic.net/rfc. So many books and other publications linked to this machine name, however, that it was shut down. In any case, the Internic is not the network citizen it once was. Today, the master RFC site is http://www.rfc-editor.org/. The most popular primary repository is located at ftp://ftp.isi.edu/in-notes. There is a second repository at http://www.ietf.org/, but its RFC page lists the RFC editor's site as the primary one. It contains mainly text versions along with some PostScript versions. The PostScript versions of the RFCs are better than the text ones because some contain diagrams.

Software and Hardware Mentioned in This Book

In keeping with the spirit of the FreeBSD operating system, practically all software discussed in this book is free, except for the Windows and DOS operating systems. Where specific needs exist on Windows OSs for which no free software package is available, I have used shareware alternatives, always attempting to use the least expensive shareware possible.

Many commercial software packages that manage UNIX-to-Windows interoperability would probably work just as well or better with FreeBSD and Windows desktops. For TCP/IP clients for Windows in particular, the market could use a $20-per-seat Network File System (NFS) client for Win95/98, although this is becoming a moot issue with the release of Win2K.

In some cases, buying hardware devices may be far cheaper and make more sense for many applications than would running software packages on a PC. You owe it to yourself to investigate these as well. Nothing in this book should be construed as a licensing statement for any specific software package. In the case of shareware and freeware, the licenses in the packages take precedence over any statements in this book. It is the end user's responsibility to make sure that all licensing requirements are properly met.

I mention various computer hardware devices that facilitate use of FreeBSD as a network server. Rest assured that I have not received any of these devices free as promotions from their manufacturers, which would influence my selection as to their suitability for use with the operating system. I have purchased all the hardware mentioned here, or used it at businesses that have employe me, where I used the FreeBSD operating system.

Information Sources

An administrator can use a number of significant recognized sources of information about FreeBSD, including the following.

  • The manual. All UNIX systems have a system manual, accessed by the man command.
  • Electronic documentation. Many document directories can be found in /usr/share, such as the FreeBSD Handbook. If full sources are installed, detailed documentation is often available in source directories, along with the source code.
  • The FreeBSD Web site. http://www.freebsd.org
  • Mailing lists. The FreeBSD group manages a number of mailing lists, subscription instructions, and a list of mailing lists on the FreeBSD Web site.
  • Usenet news. Several Usenet news groups cover FreeBSD.

Usenet is an excellent source of quick information on FreeBSD, but new users should be aware of certain aspects of Usenet and its mailing lists. All users should read the "Netiquette" document in the newsgroup news. newusers before posting. In addition, please keep the following in mind.

  • Usenet is not a manufacturer's technical support forum. If you post a question, nobody has any responsibility to respond, or to respond with correct information.
  • Usenet is not very fast. In general it may take more than a week before your question is answered by those in the reading group who want to answer it.
  • Before posting a question on Usenet, make sure that it is not answered in documentation or on the FreeBSD Web site in the documentation archives. In addition, check past postings at http://www.dejanews.com or some other major Usenet news archive.
  • Most readers of the Usenet site visit it irregularly. The one person who can answer your question may not happen to be reading on the few days that you post. Post a question again after a suitable interval, such as a week, if no answer is posted.
  • Don't say "send responses by e-mail" in your posting message. Most readers who answer questions on Usenet get annoyed at this because it indicates someone who is too lazy or too busy to bother to follow up on a query. An unreliable news server is not an excuse because DejaNews can be checked for possible missing postings.
  • Don't post general questions asking for help. Make your posting as specific as possible. List all relevant details, such as machine, brand, disk size, disk model, amount of memory, exactly what you are trying to do, and so on.
  • Always remember that people answering questions on Usenet are doing it for their own enjoyment and advancement of the FreeBSD Project. Your education is of secondary importance.

Megabytes and Megabits

From almost the beginning of the computer industry, computer engineers have measured data by bits. A single bit in a computer can be either on or off, represented by decimal 0 or 1. Bits are grouped together into bytes, which are eight bits long. Bytes are grouped into words, then double words, and so on. All of these units are used with the octal (base 8) or the hexadecimal (base 16) numbering system.

People don't think in hexadecimal, however; they think in the decimal system (base 10). So do most engineers in other disciplines. Only software engineers can think in hexadecimal. So, bits and bytes are often converted from their hexadecimal and octal measurements into decimal by adding the powers of two: two to the zeroeth, plus two to the first, plus two to the second, and so on.

Two raised to the tenth is equal to 1,024. Very early on, software engineers decided to make things easier for themselves and began using the International System of Units (SI) designations--kilo, mega, giga, and so on. So, eight bits is a byte, 1,024 bytes is a kilobyte, 1,024 x 1,024 bits is a megabyte, and so on. Soon, the abbreviation KB came to be associated with kilobytes, MB with megabytes, GB with gigabytes, and so on.

When networking became important to the industry, confusion arose, so people began writing Kbt, Mbt, Gbt--kilobits, megabits, and gigabits--to satisfy the networking and telecommunications people. These people use the decimal measurement, generally, and to them 1Mbt means 1,000,000 bits, not 1,048,576 bits (a megabyte).

Everyone was pretty satisfied with the arrangement and things went along well enough until hard drive manufacturers came along. The problem was that generally the more bits a hard drive holds, the more expensive it is. So, to gain marketshare, hard drive manufacturers began to market their products based on the decimal measurement of bytes the drives could hold. Thus, instead of a 100MB hard drive holding 100 x 1,024 bytes, it actually held only 100 x 1,000 bytes. This allowed hard drive manufacturers to advertise a 10MB drive that didn't actually hold 10MB of data from the computer user's point of view.

As long as hard drives were fairly small, every computer user pretty much accepted the fact that a hard drive's usable capacity was somewhat smaller than its advertised capacity. In the 1990s, however, as hard drives became larger and larger, the advertised capacity began to diverge tremendously from the real capacity. The drive manufacturers, being hardware people, began complaining to the umbrella standards organization--the Institute of Electrical and Electronics Engineers (IEEE)--to do something about it.

Things came to a head, so in December of 1998, the IEEE (which the networking TCP/IP community had rejected in favor of IETF over the IP standards wars) decided to get involved. With a coalition of physicists and measurement purists, they persuaded the International Electrotechnical Commission (IEC) to issue a standard for data storage based on the decimal system. The new standard renamed all of the standard terminology used by the computer industry, with the exception of the hard drive manufacturers, into the base 10 terminology.

In this book, I do not use the Revised Data Processing measurements promoted by the IEC. Because this book is about a computer operating system, the classic measurement system used by software engineers is used except when referring to data transmission--the telecommunications people have never used the computer measurement system. Sadly, the IEC justifies its standard by saying that more people don't know that 1K means 1,024 rather than 1,000. Therefore, the technical people should bow to the majority. An explanation of the IEC's views on this is located at http://physics.nist.gov/cuu/Units/binary.html.

Reaching the Author and Errata

I am always interested in comments and questions from readers. I've set up an e-mail address for comments about the book, and I hope to incorporate readers' suggestions into a future edition. Please refrain from sending general FreeBSD questions until you have read the entire book, asked questions on one of the FreeBSD mailing lists, and searched the archives--http://www.freebsd.org. Unfortunately, I don't have the time (or money) to be a full-time, unpaid, technical support person for FreeBSD. Please send any book comments to book@freebsd-corp-net-guide.com. Naturally, the publisher and I have tried to eliminate all typos and errors from the text. However, a book this size undoubtedly contains at least one mistake. I'll post any necessary corrections you send me on a Web site for this book. Check the Addison-Wesley site and see http://www.freebsd-corp-net-guide.com for postproduction information.

Web Site URLs

No body of case law covers URL linking. I am aware that some people would like to make some sort of global, or at least federal, requirement that anyone linking to a URL first seeks permission from the Web site host. This idea may sound reasonable, but it is not. Because no right to control URL linking exists currently, seeking permission would merely confer a right that never existed to begin with.

In all URLs listed in this book, I have followed any instructions that are posted on the Web site by the Webmaster. However, a Web site that is intentionally made accessible to the public is fundamentally a public venue. If you as a Webmaster do not want others to link to a site that is plainly intended to be public, I respectfully suggest that you examine the definition of public and install IP number block filtering to prevent the general public from viewing the site. I believe that if you place a Web site on the publicly accessible Internet, then people should have the right to link to it, which is exactly the same as their right to visit it. If the Webmaster has placed a directive on the Web site requesting that links to it be made to a particular location, I follow these directives for the URLs in this book.

Because of the fluidity of the Internet, a book that names a significant number of URLs is likely to refer to some sites that have vanished or moved. I apologize for this and I'll try to keep a table of corrected URLs and links available at http://www.freebsd-corp-net-guide.com.



0201704811P04062001

Comments

SEND A COMMENT

PLEASE READ: All comments must be approved before appearing in the thread; time and space constraints prevent all comments from appearing. We will only approve comments that are directly related to the article, use appropriate language and are not attacking the comments of others.

Message (please, no HTML tags. Web addresses will be hyperlinked):

Related Free eBooks

Related Tags

DIGG This story   Save To Google   Save To Windows Live   Save To Del.icio.us   diigo it   Save To blinklist
Save To Furl   Save To Yahoo! My Web 2.0   Save To Blogmarks   Save To Shadows   Save To stumbleupon   Save To Reddit