CONNECTING TO THE INTERNET


In order to provide services on the Internet via a computer, you've got to connect that computer to the Internet. The Internet is a decentralized global computer network - there's no real “center”. As a result, connecting to the Internet can be a good deal more confusing than connecting to commercial online services such as CompuServe or America Online.

People connect to the Internet via a service provider, a company that's a lot like your local phone or cable company. An Internet service provider can give you an Internet "dial tone," just as your phone company gives you a regular dial tone and the cable company gives you a selection of television channels. The difference is that there are usually several competing service providers in a given area, and their rates can often differ substantially. So there's a lot more choice involved in getting on the Internet than there is in hooking up cable TV.

Unfortunately, providing services via the Internet usually requires a level of connectivity that's beyond what normal online users have. With a few exceptions, if you want to become an Internet information provider, you'll need a 24-hours-a-day, 7-days-a-week connection to the Internet. That's a big jump, and it's a lot more expensive than just logging in once or twice a day to check your mail or surf the Web. Of course, if your company or school already has a full-time Internet connection, connectivity will probably be much less of a problem. But if you're planning on establishing service from scratch, you'll need to know a lot more about what's involved before taking the plunge.

Types of Internet Connections

The first complication in connecting to the Internet is choosing the method you'll use to connect. Sure, you can connect via a modem over a standard phone line, just as you probably connect to online services today. But those lines can be slow, especially if you're going to be serving large files to several people at the same time. For that reason, there are other options you should consider when you're planning to hook up to the Net: ISDN, a means of using the standard copper phone lines in your house or office to make high-speed digital connections; Frame Relay, a connection to a high-speed, public, digital network; and the stratosphere of Internet connectivity, high-speed digital phone lines with names like PRI and T1.

Modem Connections

The most common way to make a connection to the Internet is via a modem line. But modems can't go very fast - even the fastest modems on the market can send and receive only 28,800 characters per second. That's fast enough for most of the Web surfers of today, but imagine trying to load several graphically rich Web pages all at once over such a line. The pace would be glacial at best. And since servers tend to send files to multiple users at the same time, even a fast modem line (and we're rapidly approaching the limits of modem technology when it comes to using old-fashioned voice telephone lines) isn't going to work very well.

That said, a modem connection to the Internet (via your service provider) might still be the best option for you, depending on what services you want to provide. If you're not expecting your site to get a lot of use, and you're serving mostly text (whether it's via the Web or Gopher or some other protocol), a modem link may be enough to handle your traffic. But if you expect your site to be popular, or you're planning on making lots of big graphics available, or if you're going to be letting people upload or download large files to your server, you may find your modem line overtaxed quickly.

Not all Internet services require you to have a 24-hours-a-day connection to the Net. If you want to put up a Web, Gopher, or FTP site, you'll need to be online all the time, or people won't want to visit your server. But if all you want to do is run mailing lists or a mailbot, a program that automatically replies to incoming e-mail messages based on their content, you can probably survive with only a sporadic Net connection (see Chapter 5). Likewise, a protocol called UUCP also makes it feasible for you to provide Internet e-mail services to yourself and others without a continuous connection.

Most service providers tend to charge an hourly rate for connecting to their system via a modem, because this is the best way to charge regular users. Chances are, those same providers offer a special flat rate for 24-hours-a-day connections. It'll cost a lot more than being connected sporadically, but the upside is that you'll be paying only a basic telephone rate, and all you'll need in the way of hardware is a fast modem.

ISDN

ISDN stands for Integrated Services Digital Networks. It's a means of using the copper wires that connect most homes and businesses to the telephone network to achieve high-speed data transmissions far beyond those offered by modems.

Here's now ISDN works: Standard telephone lines are analog in nature. They were designed to transmit voices across distance, and they do a pretty good job of this - after all, this is the telephone system most of us use every day. Now, we also use this same phone system to transmit digital information via modem - but we're still using an analog system to transmit this information. That's what a modem does - it translates (or modulates, the first half of the word modem) digital information into a series of sounds, which it then sends across the analog phone line. At the other end, another modem translates (or demodulates) the signal back into digital form.

ISDN uses those same copper wires, but it's a digital system. Everything that goes across an ISDN line has to be in digital form - even if it's a voice call. As a result, standard telephones (and modems) don't work on an ISDN line without an adapter, because they're made to work with the common analog phone lines.

Though ISDN has gained quite a bit of popularity in Europe, it's not as prevalent in the United States yet. As a result, ISDN can be an option for you only if you're lucky enough to live in an area serviced by a telephone company that's ISDN-savvy. Both of us are lucky enough to live in the San Francisco Bay Area, and our phone company, Pacific Bell, is on top of things when it comes to ISDN. In fact, an ISDN connection from Pacific Bell curently doesn't cost much more per month than a regular analog phone line. Unfortunately, ISDN rates vary widely across the country. The world of ISDN is one filled with acronyms and other forms of jargon, so bear with us as we try to describe this. The most common form of ISDN is the BRI, the Basic Rate Interface. The BRI line has two B (or Bearer) channels; essentially, the B channel is akin to a digital version of a regular phone line. Since each BRI contains two of these, every ISDN line has the capacity to place two calls at once - or place one call with twice the bandwidth. You could, for example, be transferring a file over one B channel while chatting with a friend at the same time.

The 28.8 Kbps rate achieved by modern V.34 modems is nearing the upper limit of transmission speeds on analog lines. But each B channel on an ISDN can handle data rates up to 64 Kbps, and two B channels connected in a process called "bonding" can handle 128 Kbps of information - almost nine times the speed of that wicked fast 14.4 modem you bought a couple of years ago.

ISDN is a great way to get a high-speed line into a home office, small business, or school. The only real problems with ISDN are availability (as we discussed) and price. In addition to paying your ISDN set-up fee and your monthly fees to the phone company, you have to buy hardware that can handle ISDN. The most important piece of hardware is the NT1, or network terminator. The NT1 is a device that connects to the digital telephone network and serves as the gateway between the outside world and your equipment. You'll also need to get either an ISDN terminal adapter to connect one CPU to the ISDN line, or an ISDN router to connect your local network to the line. You may also need an adapter to enable you to use analog devices like voice telephones with your ISDN line.

The good news is that the cost of ISDN hardware is coming down. You can now get an ISDN router for under $1,000, to which you can hook up several machines via Ethernet.


Frame Relay

Frame relay is a form of networking gaining in popularity because it's reasonably inexpensive for the speed it offers. At the heart of frame relay is a digital network. Subscribers sign up for a fixed access speed, typically between 56 Kbps and 1.554 Mbps. The speed through the provider's network is much faster, but you pay for the speed at which your data enters the port to the network. In addition to a speed, you specify a destination, a port somewhere else on the network. When you establish service, a permanent virtual circuit is set up between your port and the destination port. It's much like a physical circuit from the subscriber's point of view - all your traffic goes between the two ports, though the details of how it actually traverses the network are left up to the provider.

What makes frame relay interesting to many customers is that you aren't always limited to the amount of bandwidth you buy. If you sign up for 56 Kbps and access a frame relay network at 128 Kbps over ISDN, you can get your data to the network faster than you paid to have it transmitted. This is because, most of the time, a network isn't filled with traffic. A typical FTP server, for instance, uses the network only when people are transferring files to and from the server. When nobody is connected, an FTP server needs little to no bandwidth. But when someone wants to pull down a large file, the server will want as much bandwidth as it can grab.

Frame relay takes advantage of this by guaranteeing a minimum bandwidth to each customer, but allowing all customers to make use of unused bandwidth in the network. If your network is lightly loaded and your server suddenly starts serving files, you can use the extra, unused bandwidth. If another subscriber then needs some of its guaranteed bandwidth, your connection is dropped back down to the speed you've been guaranteed - but not below it.

Beyond: PRI, T1, T3

Beyond these connection types are high-speed lines that won't be needed for the person or organization setting up a Net presence for the first time - though if your services become popular enough, you might end up needing them one day. There's a type of ISDN called PRI, or Primary Rate Interface. PRI is a high-speed connection made up of 23 B channels - that's well over a megabyte per second. It offers high speeds, but it also costs a fortune.

The PRI has roughly the same bandwidth as the T1, a high-speed digital line usually used to connect large businesses to service providers. T1s run at 1.544 Mbps, about one sixth the speed of Ethernet, but over a hundred times faster than your 14.4 Kbps modem. There's also another type of digital line, the T3, with a maximum transfer rate of 45 Mbps. If all the machines in your office already have Internet connectivity, there's a good chance that your office is connected to the Net via one of these high-speed lines.

If you're searching for Internet connectivity on your own, you probably won't need any of these at first. But it's always something to shoot for.

Selecting a Service Provider

In addition to figuring out how you're going to get that digital or analog dial tone, you'll also need to contact an Internet service provider to get you connected to the rest of the Internet.

Shop Around

The best advice we can give when it comes to finding a service provider can be boiled down to this: shop around. In most areas, there are multiple service providers fighting for customers. Usually, there will be one or two that can offer you the best deal, taking into account where you live, how much bandwidth you'll be using, and by what means you'll be connecting to them. Don't be afraid to shop around. Considering how much money you might be paying for these services, you'll want to find the best price. But at the same time, keep the stability of your potential service providers in mind. Choosing a fly-by-night provider that may not be in business long won't do any good, no matter how cheap their services are.

A Service Provider Checklist

There are several things you should keep in mind when you're shopping for an Internet service provider. First, know as much as you can about your needs. Be clear about what sort of services you're going to need - Web, Gopher, FTP, mailing lists, and so on. Have a good idea of how popular you expect your site to be, if at all possible. This will let you determine how much bandwidth you'll need.

Bandwidth

Determine how much bandwidth you're going to need, or at least how much to start, and make sure your provider can meet your needs. With the wide variety of connection speeds and media available, be sure that your provider can give you not only what you want today, but what you will probably need down the road when your services increase in popularity.

This doesn't just mean that if they can set you up with a large pipe to their office, they can meet your needs. Make sure that they aren't overselling the quality of their connection to the rest of the Internet. If your provider is connected to the Internet at a certain speed, they can't offer any more than that to their customers. If you pay them for a certain amount of bandwidth, be sure they can guarantee that amount, even when all their other customers need the bandwidth they've paid for at the same time.

Hardware

There is hardware involved in any connection to the Internet. Generally, this takes the form of a box at either end, be it a pair of modems, ISDN terminal adapters, or routers. Find out what brands your provider supports and what they recommend. Some providers have arrangements with hardware manufacturers such that if you buy through your provider you get special discounts. But if you already own network hardware, you may want to make sure you can interoperate with your provider. You also may want to ask how much technical support you might be able to expect per each variety of hardware solution.

In some cases, as part of the startup, you will need to purchase equipment at both ends of the connection. Be sure to find out where the hardware goes should you end service.

Whither the Server?

There are three different ways to provide services on the Internet, and you should keep all three methods in mind when talking to service providers. First, you can keep your connection up 24 hours a day and run a server on a machine in your home or office. This situation offers a number of advantages. There's a clear line between what is your responsibility and what is the provider's: you take care of everything from where the line into your office or home ends. The only time you should have to deal with your provider is when something is wrong, as opposed to every time you want to change something. On the other hand, if you'd rather leave the details to someone else, you might be better off with letting your provider do more of the work.

Second, you can run your services from one of your computers, but keep that machine connected at the offices of your service provider. This way, the machine is always connected to the Internet, but you don't have to deal with the hassles of keeping yourself connected to the Net 24 hours a day. The drawback? Your service provider will probably charge a pretty penny to store your machine, keep it cool, and make sure it's up and running. You'll also need to invest in some remote-maintenance software (see Chapter 11) to administer your server from a distance. But be sure to ask prospective service providers about this option; if you live where ISDN costs a bundle and you expect your server will need a high-speed connection to the Internet, setting up a machine at your service provider might be more economical than running it yourself.

Third, you can provide your services on your provider's hardware. This is an easy way of doing things, and it works for a lot of people. It's also usually pretty cheap. The big drawback is that service providers seldom provide those services via the Mac OS. Usually, their Web, Gopher, FTP, and mail servers are run on a workstation using UNIX. UNIX workstations are quite powerful, but they usually don't offer much in the way of an interface. They can be hard to use. And chances are good that if you're reading this book, you'd prefer to avoid this option. However, if all you really want to do is serve a few HTML pages, run a mailing list, or offer a few files for FTP transfer, you may want to ask a service provider how much it would cost to do it on their server.

Support and Trouble

Support is crucial when dealing with a provider, and a provider's support policy can give a great deal of insight into what you can expect in your relationship with them. Some providers offer start-to-finish "get you on the Net" service where they walk you through the entire process. Others will leave you with a line in your office and expect you to handle the rest. Be sure you understand what level of assistance you can expect. If you'll need a significant amount of support, be sure your provider has experience with Mac-based clients.

Even with support, though, things break, and you'll want to know how well your provider handles it when they do. Find out if they have a 24-hour service number, and if they do, check to see if it's just an answering machine, or if a live human being will be able to help you when your line goes down at 3 a.m. on a Sunday. Find out how they track trouble reports, so that you'll be able to easily find out the status of a report you've filed.

You'll also want to find their average trouble report turnaround time. If you are going to be running your services as part of a business, you can't afford to be kept waiting. If your provider can give a list of their current customers as references, that can help in determining how they handle problems. Providers who deal with commercial clients generally have a higher level of professionalism than those who deal primarily with end users, though they often charge more.

You might also want to visit your provider's office and ask to see their machine room. A well-kept, orderly, properly air-conditioned machine room is a good sign that you are dealing with a professional organization. A rat's nest of cables and machines is a sign that you are not. Remember, your connection to the Internet goes through their setup, and if they have a hard time pointing out what everything is and what it does, imagine having to deal with them when things aren't working.

Costs

Of course, in some cases, it all comes down to money. You'll want to know all of the start-up costs. It's likely you'll have to pay the phone company if they're involved in setting up the physical line to your provider, be it an additional phone line, ISDN service, or a T1. Your provider may have start-up costs for opening your account with them and for anything they need to purchase on their end. You may also have initial hardware costs in the form of a modem, an ISDN terminal adapter, or even a router.

That's only the beginning. Monthly costs are where you have to be especially careful. The various options you have in terms of bandwidth are not linearly related - if you double your bandwidth, you may not end up paying exactly twice as much. Also, there is a great deal of overlap in the various options; for example, you could get the same bandwidth from an ISDN line as from a fractional T1 line, but they won't cost the same. Be careful to watch for any charges per minute or per packet. For instance, in some locations, ISDN is tariffed at a certain rate per minute, which may make it more expensive than a leased line. On the other hand, certain areas allow 24-hours-a-day, 7-days-a-week connections for a flat monthly fee. Be sure to check a variety of pricing models before picking one. And expect to pay more than you expect to. There will always be costs that you've forgotten to take into account.

Also, plan ahead. Some bandwidth and pricing solutions do not scale well. A 28.8 modem is a good solution for some sites, but if you need to increase your bandwidth at some point, it's much less expensive to go with another type of network than to buy a roomful of modems. Modems are increasing in speed, but buying new modems every year isn't efficient. A T1 line can generally be provisioned, so that you could start with some fraction of the full capability of a T1 and then expand as you need without having to reinvest in additional hardware. In addition to clearing any expansion plans with your provider, be sure to consult your local phone company if it is involved in any way with the line.

Name Services

Chances are good that if you're providing Internet services, you'll want to have your own Internet domain name - for example, freedonia.com. Be sure to ask prospective service providers what they'll charge to register a domain for you and provide you with name services.

Mail Services

If you're not planning to provide Internet e-mail to more than a handful of people, it might be easier to use your service provider's e-mail server than to set up one of your own (see Chapter 4). Gauge just how many e-mail accounts you might need, and ask prospective service providers how much it would cost to set up addresses for all of those users. If you have special e-mail needs, such as mailing lists or addresses that change on a regular basis, you may be better off handling mail on your own.

The Internet Protocol

All communications on the Internet happen by using the Internet Protocol, also known as TCP/IP. It's not necessary to know how TCP/IP works in order to provide Internet services, but it's usually helpful to know something about what's happening behind the scenes when you're downloading a file from a distant Internet server.

TCP/IP

Every machine on the Internet has an IP address assigned to it. IP addresses are a lot like street addresses - they're a short way of letting people know where they can find you. IP addresses are made up of four numbers, or quads, each of which can run from 0 to 255, separated by decimal points. So a sample IP address might be 128.25.255.8.

Addresses are given out in blocks, and these blocks come in three sizes, Classes A, B, and C. Class A networks are defined by the first quad, and have the rest of the numbers for particular machines. For instance, any IP address that starts with 13 is in the class A network at Xerox Palo Alto Research Center. Class A networks encompass millions of unique addresses, but there are only a small number of these networks.

Class B networks are defined by the first two quads, with the last two for individual machines. The University of California, Berkeley, has all addresses that start with 128.32 in their class B. Class B networks can have over 65,000 addresses in them.

Class C networks have the first three quads defining the network, and the last quad for each host, so there are many more class C networks, but each can only have 256 addresses. Addison-Wesley Publishing Company holds the 192.88.129 class C network. If you are planning on having a network in your home or office, this is the type of network you may initially have.

Of course, we know most machines on the Internet by names, not numbers, but those names all correspond to IP addresses like 128.25.255.8. A naming system was created because it's easier to remember www.freedonia.com than it is to remember 128.25.255.8.

When two machines on the Internet "talk," they use this four-number IP address to find one another. They converse by sending little bundles of information called packets back and forth. A packet contains a chunk of information, an identifier that lets the receiving computer understand in what sequence it was sent from the sending computer, the IP address of its target, and the IP address from which it came.

A sending computer creates a packet and sends it out across the Internet, where it bounces from router to router until it finds its way to the IP address of its target. There, the target computer receives the packet, sees where it goes in the sequence of packets it's receiving from the sender, and opens it. The individual packets can take any number of routes from the sender to the recipient - one could be routed through Great Britain, the other through Germany - but once the receiver gets the packets, sees where they fit, and opens them, it's as if one computer has sent a continuous stream of information directly to another. This can sound like an unreliable system, but in practice it works extremely well. And the best part is, it's all invisible to the user. All you have to do is set up your TCP/IP software.

- from the book “Providing Internet Services via the Mac OS” at http://www.pism.com Providing Internet Services via the Mac OS

Carl Steadman and Jason Snell