|
|
In order to run TCP/IP applications (including servers like MacHTTP) without being connected to a network, a Mac still needs to be setup as if it were part of a network. There are some special requirements in doing this for a standalone machine.
The following method has been tested on a number of systems and requires no extra software (beyond MacTCP or OpenTransport).
Ethernet cannot be used unless you are connected to a hub or another ethernet device (if you are, you don't need the following method). So, you will instead have to use AppleTalk over LocalTalk (whether or not you're actually connected to a LocalTalk network. This method uses MacIP which is a way of using TCP/IP within AppleTalk.
AppleTalk must be on. To turn it on, you can use the 'Chooser' (usually found under the Apple menu). Simply select the 'Active' radio button next to the word 'AppleTalk'.
Depending on which you're using, MacTCP or OpenTransport TCP/IP need to be configured to connect using AppleTalk/MacIP.
You need to pick an arbitrary IP Address. I recommend 192.0.1.2.
Set the Network control panel to LocalTalk.
Set your TCP connection to LocalTalk
(usually shown as an icon of a mac with network wires coming out the bottom).
Set your IP address to the arbitrary address you've chosen to use (192.0.1.2 is recommended).
Then click on the
button in the
MacTCP control panel to bring up an additional dialog box. The settings
in the "More" dialog need to be as follows:
![]()
Manually
0.0.0.0
C
To initiate the changes to the MacTCP configuration, restart your computer. You will then be able to launch your TCP/IP software, including servers, and access it using http client software on the same mac.
Configure the "TCP/IP" control panel as follows:
AppleTalk (MacIP)
Using MacIP Manually
192.0.1.2
Click the
button in the "TCP/IP" control panel to bring up the "Select MacIP Server Zone" dialog.
![]()
Select "Current AppleTalk zone" in the dialog.
You will have to address server software you run on your local machine by the
IP address you assigned in the TCP/IP configuration (192.0.1.2). For example,
a web server would be addressed using the url "http://192.0.1.2/"
from your client software.
If you are running server software (such as a web server) using this method, you should turn off DNS (domain name server) lookups in your server configuration.
If you want to use domain names instead of IP addresses, you will need to configure domain names in your TCP "hosts" file. This file is found in your "System Folder". Instructions for setting up the hosts file are contained in the default "hosts" file supplied with MacTCP or OpenTransport.
An alternative to the above is to use your SLIP or PPP setup (if you're using one) to provide a 'local only' connection.
You will need to set up a local setting with the SLIP/PPP application/control-panel.
This should be set to use TCP without dialing out.
You can use your usual SLIP/PPP IP address (or 192.0.1.2 if you
don't have one).
Use the "Configurations..." menu item in the "File" menu.
MacTCP Switcher or MacTCP NetSwitch may be useful to users who access their TCP Networks by modem (using protocols such as SLIP or PPP). It provides for relatively easy switching between MacTCP configurations. I use this to switch between my SLIP configuration for when I'm a client of other sites, and my Local, no-network, configuration (as described above).
You configure MacTCP the way you want, then run the tcp switcher to save the current configuration. Repeat the process for every different configuration you use. Then, when you want to reload a configuration, just open the MacTCP Switcher file you created for that configuration. You should restart your Mac after switching the tcp configuration in order for MacTCP to reset itself.
Generally, you should be using a hub or gateway that supports MacIP over LocalTalk. If all you want is to connect a couple Macs on a simple LAN, you can often (but don't consider this anything close to guaranteed) have two Macintosh computers perform TCP communication using MacTCP over LocalTalk without any special routing devices or software.
Make sure AppleTalk is on. You can do this using the Chooser (usually found in the Apple menu), or with OpenTransport's AppleTalk control panel. You may (but probably not) have to restart your computer for AppleTalk to come on. You will be informed by the Chooser if this is the case.
Configure MacTCP on both machines as described in the section on
using MacTCP without a network. However,
you should set one of them to have an IP address one more than the
other. IE. if one is set to 192.0.1.2 the other should be
192.0.1.3 or 192.0.1.1.
After restarting, (or possibly even without restarting) you should be
able to use a TCP client application on one mac to talk to a TCP server
application on the other. Be sure to use the address (IE.
http://192.0.1.2/) to reference the machines in this
configuration. Domain names (IE. http://my.mac.home/) will
not work unless you've configured your "Hosts" file with
names mapped to the IP addresses you are using.
Netscape may become 'confused' about the address it was accessing and
end up trying to access 255.255.255.255 instead of
192.0.1.2. You may want to switch your IP from 192.0.1.2
to 255.255.255.255 or 1.1.1.1.
You need to modify your "Hosts" file which is a plain text file that
should be in your "System Folder". If it isn't there, just create a new
one. You can make a domain name for your local IP by including a line like the
following:
www.mysite.home. A 192.0.1.2.
The first part is the domain name to use, the A indicates
that this is an address mapping, and the number is the IP address to map
the name to.
You can also make shortcuts for the names, so that you don't have to type in the whole name every time.
home. CNAME www.mysite.home.
The first part is the 'nickname', the CNAME indicates that
this is a nickname mapping, and the third part is the 'real' name to map
the nickname to.
Any number of domain names may be assigned to a particular
IP address, but they will all amount to the same thing. For example,
a machine with IP address 123.45.67.89 could have different
names such as (the fictional) one.two.three.com,
mac.serv.school.edu and house.here.net. Any
machine accessing one of those names will first resolve the name to the
IP address 123.45.67.89 before establishing a connection.
Client software never actually does TCP access using the domain name. Before connecting, the client software (IE. Netscape) does a domain name lookup to retrieve the actual IP address of the machine. The IP address is then used to locate and connect to the server. So, the server does not know what domain name the client accessed from, only the IP address used.
in-addr.arpa."?
In the MacHTTP log file, when an IP address cannot be mapped to a domain name, it
will be identified by the IP address string (reversed) followed by
".in-addr.arpa.". IE. if 192.0.1.2 does not have a domain
name, it will map to "2.1.0.192.in-addr.arpa."
This does not indicate any problems with the accessing site or with MacHTTP. It just means that the IP address hasn't been mapped (reverse DNS tables) to a domain name.
|
|
|
|
|