How to reload DNS and other WINSOCK settings without rebooting the server

  • 7001355
  • 15-Sep-2008
  • 27-Apr-2012

Environment

Novell NetWare 6.5
Novell NetWare 6.0
Novell NetWare 5.1

Situation

The server needs to reload winsock settings due to changes made to one of the following files:

SYS:ETC\HOSTS
SYS:ETC\NWSWITCH.CONF
SYS:ETC\PROTOCOL
SYS:ETC\RESOLV.CFG
SYS:ETC\SERVICES

In the past these changes required a server restart to take effect.


Resolution

The following is a list of new commands implemented in a newer version of Winsock. These commands will cause Winsock to reread and then cache the settings stored in the associated file.

Reload the SYS:\ETC\HOSTS file:
WS2_32 RELOAD HOSTS

Reload the SYS:\ETC\PROTOCOL file:
WS2_32 RELOAD PROTOCOL

Reload the SYS:\ETC\SERVICES file:
WS2_32 RELOAD SERVICES

Reload the SYS:\ETC\RESOLV.CFG (used to define "domain" and "nameserver" entries for DNS) file:
WS2_32 RELOAD RESOLVE

Reload the SYS:\ETC\NWSWITCH.CONF file:
WS2_32 RELOAD NWSWITCH

Additional Information

After processing the command successfully, it will echo the following back to the server console:

SYS:\ETC\RESOLV.CFG file successfully reloaded

So if you do not see the message (or a similar one for other Winsock components), then the command was not successful. One cause for it failing to work is not having a new enough version of WS2_32.NLM to support it. Another cause is that the configuration file for the Winsock component did not exist.
The following versions of WS2_32.NLM have been verified to support the new RELOAD commands:
6.21.06 dated June 16, 2004 (comes with NW 6.0 SP5 and NW 6.5 SP2)
6.21j dated February 26, 2005 (comes with NW 5.1 SP8)


Formerly known as TID# 10098279