Notice: This material is excerpted from Running A Perfect Internet Site with Linux, ISBN: 0-7897-0514-1. The electronic version of this material has not been through the final proof reading stage that the book goes through before being published in printed form. Some errors may exist here that are corrected before the book is published. This material is provided "as is" without any warranty of any kind.

Copyright ©1996, Que Corporation. All rights reserved. No part of this book may be used or reproduced in any form or by any means, or stored in a database or retrieval system without prior written permission of the publisher except in the case of brief quotations embodied in critical articles and reviews. Making copies of any part of this book for any purpose other than your own personal use is a violation of United States copyright laws. For information, address Que Corporation, 201 West 103rd Street, Indianapolis, IN 46290 or at support@mcp .com.

Chapter 1 - Why Create Your Own Site with Linux?

Because you bought this book, I obviously don't need to sell you on the idea of having your own Internet site nor on the idea of using Linux. After all, Linux is a full-fledged version of UNIX. Servers and clients for all the major Internet services (electronic mail, the World Wide Web, and so on) are available for this operating system. This makes Linux an excellent choice for running an Internet server.

Linux makes an especially good Internet server because you don't have to get any programs to teach it how to speak TCP/IP (the protocol the computers on the Internet use to communicate with one another). Most operating systems require extra software to be able to handle it.

In this chapter, you learn the following about Linux:

What Is Linux?

Linux is a free clone of the UNIX operating system for machines with 386, 486, and 586 (Pentium) processors (see fig. 1.1). It's full-featured and flexible, and is constantly being updated and improved.

Fig. 1.1 The Linux shark is the unofficial Linux logo.

Who Wrote and Who Maintains Linux?

The Linux operating system began in 1991 in Finland when Linus Torvalds wrote Minix (mini-UNIX) for a school project. As he enhanced the system during that year on his own, it grew from the mini-UNIX "Minix" to "Linux."

Torvalds wrote the initial Linux (which was little more than a kernel way back then) and still oversees its progression. A team of people worldwide now contribute to its growth and maintenance.

Are you wondering exactly how Linux is pronounced? On the World Wide Web, you can actually find a sound file of Torvalds himself pronouncing it! Just go to sunsite and choose the link to Linus's pronunciation.

Linux Features

With Linux, you won't feel as though you're using a backwater version of UNIX because of a lack of key features. You get the same features you expect with any other version of UNIX, including the following:

Linux also aims for the UNIX POSIX (Portable Operating System Interface) Federal Information Processing Standard set forth by the National Institute of Standards and Technology. This fact means that applications for other flavors of UNIX port to Linux without too much difficulty.

Linux and Microsoft DOS and Windows Programs

Linux itself cannot run MS-DOS or Windows applications. However, a DOS emulator (dosemu) can run most DOS applications and is constantly improving. You can run Windows applications on top of the DOS emulator, but you can't run Windows in enhanced 386 mode. So, while it will soon be possible to run Windows on Linux on top of the DOS emulator, the process will be slower than you may prefer. To run Windows for serious use with multiple applications on top of Linux will require the Windows emulator that is still under development.

Copyright Status

The "ownership" of Linux can get a little complex. Linus Torvalds owns the copyright on the Linux kernel. However, Linux itself (including the kernel) is all under the GNU Public License (GPL), often referred to as the copyleft because of how different it is from most copyright agreements. The full GPL is in Appendix B, "The GNU Public License."

The GPL requires that those who use items that it covers to create programs make the source of those programs available to those who ask, and it insists that a copy of the GPL document be included with the product. This agreement allows the programmers to offer their software to the general public while retaining copyright over it so that it remains their work. It also ensures that code is available for others to enhance and modify (giving proper credit to the previous programmers, of course). The goal is to increase the total amount of free software available.

How To Follow Linux Version Numbers

Linux has two different sets of version numbers called version trees. It's important to understand the difference between the two trees so that when you see updates on the Internet, you know which patch files to get. One tree, the experimental tree, is a line of versions that is experimental; the code is still in the testing stages. The other tree, the production tree, has the code that is considered to be stable.

How To Tell the Difference Between Experimental and Stable

To determine the type of Linux version, look at the version numbers. Each number is made up of three digits, and it's the second that indicates the type. If the second digit is even, it's a production version. If it's odd, it's an experimental version. For example, version 1.2.0 is a production version and version 1.3.0 is an experimental version.

How Do the Two Trees Relate?

The two Linux version trees are related. They're done in tandem, with each tree starting at the same time. In fact, the appropriate x.y.0 versions are identical (e.g., 1.0.0 and 1.1.0 are the same, 1.2.0 and 1.3.0 are the same). From there, each tree grows individually with stable code added to the production version while the code still in the testing stages is added to the experimental version.

When Linus Torvalds determines that an experimental version has enough new features and is stable, he calls a code freeze. At that point, the stable experimental version becomes the new x.y.0 set, and development starts all over again in a new pair of trees.

History of the Version Trees

To get a feel for how Linux developed over time and how the version trees work, take a look at figure 1.2. The Linux version trees show the growth of the operating system.

How To Register Your Site

All system administrators on the Internet must register their sites with InterNIC or with the appropriate agency for their part of the world. Site registration is the only centralized requirement on the Internet; a site cannot exist without it.

What Is Site Registration?

Site registration is a two part process. In the first part, you apply for the number of IP addresses you think your site will need. These addresses are then permanently assigned to your site for you to assign to your own machines as need arises.

IP addresses are made up of 32 bits of information, divided between network and host. Network bits are those that tell the Internet the particular site to which the IP address belongs. Host bits are those that tell your own network the particular machine to which the address belongs.

IP addresses are written in four pieces, separated by periods, for example, www.xxx.yyy.zzz. Each of these pieces contains eight bits of information. The way these bits are used depends on the class of the address involved.

Class A addresses are for large sites such as universities and huge corporations; a single class A address can be used to define millions of hosts. The chance of getting a class A address today is slim because of the shortage of address space. A class A address has 8 network bits and 24 host bits. For the address www.xxx.yyy.zzz, www contains the network information, and xxx.yyy.zzz defines the machine. The 8 network bits making up www is any number between 1 and 126. The host bits for xxx, yyy, and zzz are numbers from 0 to 255. An example class A address is 34.152.25.4, where 34 represents the site itself, and 152.25.4 represents a particular machine. In a class A address, this machine is one of many on a network within the site.

Class B addresses are for mid-size schools and companies. Each class B address can define thousands of hosts. These addresses are also difficult to get in today's address shortage. A class B address has 16 network bits and 16 host bits. For the address www.xxx.yyy.zzz, www.xxx contains the network information, and yyy.zzz defines the machine. The 16 network bits that make up www.xxx is any number between 128 and 191. The host bits for the yyy and zzz aspects are numbers from 0 to 255. An example class B address is 142.96.133.6, where 142.96 represents the site itself, and 133.6 represents a particular machine. This machine, just as with a class A address, is likely to be on one network among many within that same site.

Class C addresses are the largest address most sites are likely to get today unless they can prove sufficient need for an A or B. Each class C address has 254 or fewer hosts, but there are millions of possible class C network addresses. Some sites may find they can get multiple class C addresses instead of a single B or A address. A class C address has 24 network bits and 8 host bits. For the address www.xxx.yyy.zzz, www.xxx.yyy contains the network information, and zzz defines the machine. The 24 network bits that make up www.xxx.yyy are numbers between 192 and 223. The host bits that make up zzz is any number from 0 to 255. An example class C address is 214.130.78.10, where 214.130.78 represents the site itself, and 10 represents a particular machine. This machine may be on one network among many within that same site, or may simply be a machine on one large network.

Once your IP addresses are assigned, the second step of the registration process involves registering your site's domain name. The domain name is the part of a site's address that is the same for all machines. Once registered, it is linked to your IP addresses throughout the Internet's nameservers. You can assign machine and subnetwork names later (see chapter 5, "Setting Your Site up for General Use").

Because the registration process takes over six weeks, it's important to get things started. This registration process takes longer and longer because of the number of site registrations being submitted. Although your site does not have to be up when you submit the forms, it does have to be up when they are processed. Be sure that your site is up within six weeks from the time you submit the forms; otherwise, you will find yourself waiting another six weeks.

Some service providers do site registration; check into it because you may save yourself some work.

What Is the Process for Site Registration?

This section details the two step site registration process: applying for your IP address(es) and then your domain name.

It's important that you submit the forms for domain name registration after your IP address registration has been processed. Sending in the domain forms too early means you'll have to wait a lot longer for your registration to be complete because the IP information is needed to assign to the domain.

Getting Your IP Address

Before you get the appropriate IP address(es) assigned to your site, you need to decide how many of them you need. Let's take a look at how to determine the number of hosts you may eventually have and then see how to apply for the addresses.

How Large Might Your Site Get?

The following are some questions to consider when deciding how many IP addresses you will need:

If you have to use a subnet, you lose the use of a number of possible IP addresses. For example, if you want a network with 2 subnets and you have a class C address, you would have two networks (subnets) each with 126 possible hosts. If you have 4 subnets, each could have at most 62 hosts. Setting up subnets is discussed in more detail in chapter 5, "Setting Up Your Site for General Use."

Address space is scarce on the Internet. If InterNIC feels that you're being overzealous during registration time, it will try to talk you down to lower numbers. If you need more IP addresses later, you can get them; they just won't be in sequence with the ones you already have.

Getting Your IP Addresses Assigned

To get IP addresses assigned to your site, you need to either write to InterNIC or to the appropriate agency for your country (see table 1.1). If you're unsure of where your country is covered, write to the service that looks likely for clarification. Any region not covered below is probably covered by InterNIC.Table 1.1 IP Registration Services for Sites Outside the United States

Country             Service
Asia-Pacific Region AP-NIC
        E-mail: hostmaster@apnic.net
        Fax: +81-3-5276-6239
Canada              CA*Net IP Registry
        E-mail: hostmaster@ripe.net
        Fax: +31 20 592 5090
US and remaining    InterNIC
        E-mail: hostmaster@internic.net
        Phone Number: 1-703-742-4777

* Europe refers to requests from within the traditional European borders, as well as the former Soviet Union, Eastern Europe, Mediterranean countries, and parts of the Middle East. If you are unsure, contact RIPE NCC for clarification.

If you want a block of addresses smaller than a class C, ask your provider if they will sign over some of their own reserved addresses. That can save you some hassle.

Now, the form you use to apply for your IP address(es) is determined by your location and your needs. These forms change on a regular basis. See the following minitable to find out the document you need to consult for the correct form information.

Covered by         Form Location

AP-NIC             ftp.apnic.net/apnic/docs/Contents
CA*Net IP Registry rs.internic.net/templates/canadian-ip-template.txt
RIPE NCC           ftp.ripe.net/ripe/forms/netnum-appl.txt
InterNIC           rs.internic.net/templates/index

To register, just fill out the appropriate form and send it to the appropriate place. This chapter covers the InterNIC file for nonservice providers. If you're going to be a service provider, you need to fill out another form. At this time, the service provider form is isp-ip-template.txt.

The following are a number of the less self-explanatory exerpts from the general InterNIC IP registration form template (version 2.0 of internet-number-template.txt was the most current version at the time this book was written):

  1. 2a. NIC handle (if known)..........:
  2. If you have an NIC handle, include it here. If you have ever applied to InterNIC for something before, you were assigned a handle. If you have a handle and have forgotten about it, not including it is not a critical problem.
  3. 3. Network name...................:
  4. You need to make up a name for your network. It should end in "net," and be original. To get some ideas, think of what your network will be used for. Examples might be GAMENET, PROVIDENET, HELPNET, or COMPANYNET.

When you come up with something, do a whois search on the network name (see the next section for more information on whois). If nothing for your network name comes up, that means no one's registered it yet.

  1. 3. Justification
  2. Host Information
  3. 6a. Initially.......................:
  4. 6b. Within 1 year...................:
  5. You need to justify to InterNIC why you need the address space you've applied for. InterNIC wants to know how many hosts you intend to use when your site first starts up. In 6b, you need to predict the number of hosts you'll have in a year. If InterNIC doesn't feel you have sufficient reason to need a large block of addresses, it may offer you a smaller portion more in tune with your one-year projection. However, don't grossly overestimate what you think you need. Address space is scarce, but you can get more later if you need it.
  6. Keep in mind that even devices such as printers can be hosts on some networks.
  7. 4. Subnet Information
  8. 6c. Initially.......................:
  9. 6d. Within one year.................:
  10. Here, you need to tell InterNIC how many subnets you plan to have initially, and after one year.
  11. 5. 7a. Number of addresses requested...:
  12. 7b. Additional supporting
  13. justification...................:
  14. Here is where you actually request your IP addresses. In 7a, you tell InterNIC how many addresses you want. This can be a number of addresses, or a class, or multiple classes. For example, if you think you won't need more than 50 for quite a while, you can enter 50. If you think you'll need 4 class C's, you can enter that.
  15. In 7b, if you're requesting a large number of addresses, you'll want to include more justification as to why you need all of them. If you're requesting more than 16 class C's, be sure to note the additional instructions in the template.
  16. 6. 8. Type of network..................:
  17. Here, you need to tell InterNIC the type of network yours is, from the following choices: Research, Educational, Government-Non Defense or Commercial.

Notice that InterNIC has included instructions at the bottom of the template.

Getting Your Domain Name

Once you have your IP addresses, you can apply for your site's domain name. Because of how long this takes, be sure you're not choosing a name that is already taken. You can use the InterNIC Whois service to look up the name you want to use. If you're not able to use whois from your own prompt, you can locate a list of registered whois servers via FTP at rtfm.mit.edu and get the file /pub/whois/whois-servers.list.

If you were looking for renaissoft, for example, type whois \!renaissoft

If you get something back, that domain name is taken. However, keep in mind that if its top level domain (e.g., com, net) is different from what you want to use, that may be okay. Be careful to avoid copyright terms because your domain name may be disallowed or could be taken away later by the owner of the copyright.

When you have chosen your domain name, go back to the location where you found your IP address forms. In the InterNIC case that I am using in my example, you are a non-service provider. If you want to have .us at the end of your domain name, use the form us-domain-template.txt. However, you're not trying for a .us top-level domain, so use the form domain-template.txt. When you've completed the form, send it to the appropriate organization.

The .us domain is fairly new in the Internet's naming scheme. Sites outside the US are mostly used to having country extensions on their domain names, but sites in the US are still (as of when this book was written) traditionally without a country extension. However, as new sites continue to appear, use of the .us country extension shows up more often.

Registration for the .us domain isn't handled through InterNIC. Therefore, this registration may go a bit faster. It also isn't subject to InterNIC's fees, although .us registration may eventually have fees associated with it. Another reason to register as a .us site may simply be to represent the United States on the Internet, as a US site.

If you're interested in registering for a local .us domain, ask your service provider who to contact.

Portions of this sample document (domain-template.txt version 2.0) follow:

  1. 1. Technical Contact
  2. 5a. NIC Handle (if known)......:
  3. You'll likely want to be the technical contact. InterNIC assigned you an NIC handle during the IP application process. Include that here.
  4. 2. Billing Contact
  5. 6a. NIC Handle (if known)......:
  6. If the person handling the billing for your site is you, fill in the same handle you included in 5a. If you're not the billing contact, fill in the billing person's NIC handle.
  7. 3. Primary Name Server
  8. 7a. Primary Server Hostname....:
  9. 7b. Primary Server Netaddress..:
  10. Your site will have two nameservers. Generally, the primary nameserver is your own site's server. Include the hostname in 7a (more on choosing hostnames in chapter 5, "Setting Up Your Site for General Use"). In 7b, include the server's IP address.
  11. 4. Secondary Name Server(s)
  12. 8a. Secondary Server Hostname..:
  13. 8b. Secondary Server Netaddress:
  14. The secondary nameserver will likely be your provider's nameserver. If your own nameserver goes down for some reason, you still have access to your provider's. Fill the hostname of your provider's nameserver in 8a, and its IP address in 8b.
  15. 5. Stop where it says cut here. There are helpful instructions after this point, but the rest of it is for either changing already registered domain information, or for deleting a domain.

InterNIC Billing

InterNIC charges $100 for initial domain name registration. This fee covers the first two years your site exists. After that time, you have to pay $50 per year for domain name maintenance. You'll get an invoice to remind you, which will come through e-mail or postal mail, depending on what you selected in your domain name registration form.

It's important that you read the instructions involving where and when to send your payments, and that you meet these deadlines. If you're late, InterNIC will shut down your domain name. If you're seriously late, it will place your domain name back into the pool of names new sites are allowed to use.

A breakdown of current billing procedures can be found by FTP at rs.internic.net, in /billing/billing-procedures.txt.

If you intend to be a service provider that offers permanent connections, you may wish to apply for an account with InterNIC. Having an account would allow you to easily offer your users the extra service of registering IP's and domains, and make it simple for you to deal with user registration fees. The account application can be found by FTP at rs.internic.net, in /templates/account-template.txt.

Having an InterNIC account would enable you to get monthly statements from InterNIC to cover all your clients. You can then pay by credit card or check once a month rather than having to deal with a scattered payment schedule, which would occur as each site's anniversary came along every year. At the time this book was written, an initial deposit of $1,000 was required to open an InterNIC account.

QUE Home Page

For technical support for our books and software contact support@mcp.com

Copyright ©1996, Que Corporation