Search this book | Previous | Table of contents | Next

Appendix B: Running servers without the Internet


This text describes how to run your WWW server without a TCP (Internet) connection.

There are many times when you may want to run your WWW server even though you are not directly connected to the Internet. For example, you may be giving a presentation. You may be at home without a connection. Your Internet provider happens to be "down."

At first glance, since your WWW server depends on the Internet (more specifically the transmission control protocol or TCP) to communicate with client applications, you may think it is not possible to run your WWW server without an Internet connection. This is not true. While it is true that without an Internet connection you will not be able to communicate with others on the Internet, you will be able to run our WWW server locally.

The "trick" is in configuring your MacTCP control panel document in a special way. This technique was first illustrated by Grant Neufeld in his documents "Running MacHTTP Locally Without A Network" and "Using TCP on a LocalTalk Network." Full and complete credit is given to him for these ideas.

To run your WWW server on your local computer without an Internet connection, follow these steps:

1. Make sure AppleTalk is turned on.
AppleTalk is the Macintosh's native networking protocol. Make sure it is turned on by opening your Chooser and selecting the Active button. You may have to restart your computer to complete this part of the process.

2. Configure MacTCP for AppleTalk communications.
Open your MacTCP control panel document. One of the icons presented there will be LocalTalk. Select the LocalTalk icon. This tells MacTCP to get its Internet configuration via the AppleTalk protocol.

3. Give yourself a gateway, address class, and name server designation.
Click the More... button. From the resulting dialog box:

  1. Select Manual from the "Obtain Address" section
  2. Enter 0.0.0.0 for your gateway address
  3. Select C as the class
  4. Make sure the there is no information in the Name Server section

These settings tell our Macintosh that you have a static IP address (Manual), but you don't have a gateway. Your address class is C, and you don't use a name server (a database of Internet names).

4. Assign yourself an IP number.
Close the dialog box by clicking the OK button. Finally, give yourself an IP number. Specifically, give yourself an IP number that is a class C address. Grant suggests 192.0.1.2. Again, you may have to restart your computer in order for the changes to take effect.

When the configuration is complete, your MacTCP control panel should look very similar to the dialog boxes below.

After the changes have taken effect (this may be after you restart), you can launch your WWW server and it will think it is connected to the Internet. More importantly, you will now be able to access our WWW server normally except you will have to connect to it via it new IP number. Again, to use this new configuration, you will have to access your server through the proper IP number, namely 192.0.1.2 or what ever IP number you assigned yourself in Step #4 above.

There are at least two caveats with this procedure. First you must tell your WWW server not to do DNS (domain name server) look ups. By not doing so, your WWW server will try to resolve IP numbers can cause problems. Second, CGI scripts that return referer information will not work. This includes imagemapping programs like MapServe and Mac-Imagemap. This happens because the IP address passed by your client application to the server is not quite valid. This incorrect information is then passed on to the CGI script in turn being passed back to you. Its a vicious circle.

The process of moving back and forth between various MacTCP configurations can be tedious. Luckily there is a utility call MacTCP Switcher that can save MacTCP configurations and update them. You may find this utility indispensable if you tend to "trick" MacTCP often.


Running your server on a AppleTalk-only network

You can extend this technique to many Macintoshes on an AppleTalk-only network. By configuring every Macintosh on a AppleTalk-only network exactly as outlined above, except incrementing every Macintosh's IP number by 1 (192.0.1.3, 192.0.1.4, 192.0.1.5, etc.), then you can run a server on one of these Macintoshes and each of the computers on your network will be able to access the server. Just as above, the server will have to be access through it IP number, what ever that is. Consequently, you can use your WWW server to disseminate information within your local area network without going through the Internet.


See Also

  1. Grant Neufeld, "Running MacHTTP Locally Without A Network" - This text describes how to configure MacTCP so your WWW server will run even though you may not be physically connected to a network. <URL:http://arpp1.carleton.ca/machttp/doc/setup/nonetwork.html>

  2. Grant Neufeld, "Using TCP on a LocalTalk Network" - Grant describes how to run a WWW server on an AppleTalk-only network without the Internet. <URL:http://arpp1.carleton.ca/machttp/doc/setup/localtalk.html>

  3. John Norstad, "MacTCP Switcher" - This handy utility saves and restores MacTCP configurations. <URL:ftp://ftp.acns.nwu.edu/pub/jlnstuff/mactcp-switcher/mactcp-switcher-11.sea.hqx>


Search this book | Previous | Table of contents | Next

This page was first published on September 26, 1995. Feel free to send comments.