Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Networking With Open Transport / Part 1 - Open Transport Essentials
Chapter 11 - TCP/IP Services


About Single Link Multi-Homing

Open Transport version 1.3 introduces single link multi-homing, a mechanism by which Open Transport can support multiple IP addresses on the same hardware interface. This is useful for users that want to give each of their clients a distinct IP address without requiring separate computers for each address.

In order to use this feature, you must check to see that you are using version 1.3 or later. See "Checking for Availability".

Configuring Your System to Use Multiple IP Addresses

To configure your system, you must do the following:

  1. Configure the TCP/IP control panel for manual addressing.

  2. Create a text file with the name "IP Secondary Addresses".

  3. Place the file in the Preferences folder.

Each line of the file contains a secondary IP address to be used by the system, and an optional subnet mask and router address for the secondary IP address. If there is not subnet mask entry, then Open Transport will use a default subnet mask for the IP address class. If there is not router entry, the default router associated with the primary address will be used.

Listing 11-1 shows a sample IP Secondary Addresses file. Each secondary address listed in the file must be prefixed by ip=. Each subnet mask entry must be prefixed by sm=. Each router address entry must be prefixed by rt. Note that the order of the entries is important. The router entry must follow the secondary name entry.

Listing 11-1 Sample IP Secondary Addresses file


ip=17.201.22.200       sm=255.255.255.0      rt=17.201.20.1
ip=17.201.22.201                             rt=17.201.20.1
ip=17.201.22.202
When Open Transport activates TCP/IP, it obtains the primary address from the TCP/IP Control Panel setting. Open Transport then looks for the IP Secondary Addresses file in the Preferences folder, to determine what other IP addresses the system must support. If it finds duplicate IP address entries in the IP Secondary Addresses file, it ignores them. When Open Transport binds a TCP/IP connection, if there is an address conflict of the primary or any secondary addresses with another host system, Open Transport will raise an Alert with an error message to this problem.

Checking for Availability

To check whether Open Transport version 1.3 is present, use the Gestalt function with the gestaltOpenTptVersions 'otvr' selector. If the result is greater than or equal to kOTIPSingleLinkMultihomingVersion, you can use this feature.

Getting Information About Secondary Addresses

You can use the function OTGetInterfaceInfo to return information about the number of secondary addresses that are supported. The fIPSecondaryCount field of the structure returned by this function specifies that number. Then, you can call the function OTInetGetSecondaryAddresses, passing this number for the count parameter, to obtain all the addresses. For more information, see "Single Link Multi-Homing".


Subtopics
Configuring Your System to Use Multiple IP Addresses
Checking for Availability
Getting Information About Secondary Addresses

Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998