MacTCP: Releasing IP Addresses


A Macintosh with MacTCP installed refuses to give up a dynamically
assigned IP number until the we restart the computer.

If a Macintosh uses an application that requires an IP number from the
network (in this case a GatorBox and no MacTCP installed) and the
application is no longer in use, the IP is released for use by someone
else. This is what it's supposed to do.

When we add the MacTCP drivers and run an application that requires
MacTCP and an IP number, the Macintosh doesn't release the IP number,
even after quitting this program. My explanation is the MacTCP drivers
are now loaded into the Macintosh and reside there, holding on to the IP
number. Hence, until the machine is shut off or restarted, it doesn't
release the number.

Is this normal, and should I look for a way to release the number
without shutting off the Macintosh? Or is this a bug that will
be fixed or maybe someone has come up with a fix?

I have been told that the node number and IP numbers are all reset at
startup time. Is this correct?


You are correct; MacTCP doesn't release an acquired IP address until you
restart the Macintosh.

In the first instance you mention, an application has its own TCP/IP
driver; NCSA Telnet 2.3 (non-MacTCP) is a good example. When Telnet tries
to open a session, the built-in TCP/IP driver is opened and an IP address
is obtained. When you quit the application, the driver is removed from
memory and the IP address is released.

With MacTCP, when an application or DA opens the driver, an IP address is
obtained. Since MacTCP is a system-wide resource not limited to a specific
application, the driver is not removed from memory when the application is
quit because other applications or DAs may be using the driver as well.
This causes the IP address to remain in use until you restart the computer.

This behavior is not a bug, and will not be changed in a future release of
MacTCP.


Published Date: Feb 18, 2012