How to flush DNS cache in TCPIP (1362 Views)
Posts: 22
Registered: ‎03-27-2006
Message 1 of 7 (1,362 Views)
Accepted Solution

How to flush DNS cache in TCPIP


I have a server who is accessed by lots of PC's.
Each PC is a DHCP client (lease time 21 days), thus, in most of time, pc's keep their address.
A dns name was attributed to each possible address.

Thus, a pc connects to the server, OpenVMS TCPIP makes a reverse request and obtains the dns name of the pc. Then logicalname "SYS$REM_NODE" and "SYS$REM_NODE_FULLNAME" are defined to dns node name.

Now, network team decides to suppress PC's from the dns and from the reserve table.

Thus a reverse request on a ip address of a pc give an empty respond.

My problem is that the reverse definitions seems to be conserved somewhere in cache on my server because after a new login, logical names are still pointing to old dns name.

Is there a way to flush this cache or must I wait the TTL (I don't know how long it is).

Thanks for your help

Seghers Bruno
Banksys - Belgium
Honored Contributor
Posts: 9,173
Registered: ‎02-23-2005
Message 2 of 7 (1,362 Views)

Re: How to flush DNS cache in TCPIP

I don't know of a way to flush the DNS
resolver's cache, if there is one. (There is
a SYS$SYSTEM:TCPIP$RNDC.EXE, which might be
able to do something with a BIND _server's_

> [...] after a new login [...]

Log in how?

Around here, with Telnet and rsh, my
show an IP address, not a name. With _ssh_,
I see the name for both.

alp $ tcpip show version

HP TCP/IP Services for OpenVMS Alpha Version V5.4 - ECO 6
on a COMPAQ Professional Workstation XP1000 running OpenVMS V7.3-2

(That was all very helpful, right?)
Honored Contributor
Posts: 4,562
Registered: ‎12-10-2003
Message 3 of 7 (1,362 Views)

Re: How to flush DNS cache in TCPIP

UCX 5.3 eco 2

I defined my pc address and the name is shown in sys$rem_node. Even 45 min after I deleted the name it is still shown in the logical.

Even re-enabling telnet doesn't clear it.


Posts: 22
Registered: ‎03-27-2006
Message 4 of 7 (1,362 Views)

Re: How to flush DNS cache in TCPIP

More info :

The login is made via terminal emulation reflexion (telnet).

HP TCP/IP Services for OpenVMS Alpha Version V5.4 - ECO 5
on a AlphaServer GS160 6/731 running OpenVMS V7.3-2


Honored Contributor
Posts: 5,247
Registered: ‎04-26-2004
Message 5 of 7 (1,362 Views)

Re: How to flush DNS cache in TCPIP


I think I've read somewhere, that there are no commands in HP OpenVMS TCPIP to flush the DNS name resolver cache.

Did you try disabling and re-enabled the TCPIP BIND resolver ?


Trusted Contributor
Posts: 365
Registered: ‎12-23-2003
Message 6 of 7 (1,362 Views)

Re: How to flush DNS cache in TCPIP

We have had similiar things where not all PCs end up in the DNS because of DHCP handling (don't forget WINS in there somewhere). I worked around that by just trying to find the specific remote node directly and translating the IP.

I use this whenever people want to rshell, telnet, etc to the machine. It sets up the symbol "remote_node". Thats then used for displaying X or finding the remote machines IP.

(except from one of my command files)

$ remote_node = "''f$trnlnm("sys$rem_node")'"
$ remote_node = f$extract(0,f$locate("::","''remote_node'"),remote_node)
$ if remote_node .eqs. "TELNET" .or. remote_node .eqs. "RSHELL" -
.or. remote_node .eqs. "RLOGIN" .or. remote_node .eqs. "REXEC"
$ then
$ remote_node = "''f$trnlnm("sys$rem_id")'"
$ ad1 = %x'f$extract(0,2,remote_node)
$ ad2 = %x'f$extract(2,2,remote_node)
$ ad3 = %x'f$extract(4,2,remote_node)
$ ad4 = %x'f$extract(6,2,remote_node)
$ remote_node = "''ad1'.''ad2'.''ad3'.''ad4'"
$ endif
Honored Contributor
Posts: 5,049
Registered: ‎01-29-2006
Message 7 of 7 (1,362 Views)

Re: How to flush DNS cache in TCPIP

On TCP/IP Services V5.4 and later, I might consider the rndc flush-updates command. The rndc command is in the existing management manual, though the flush-updates keyword is new in V5.4 and apparently only listed in the release notes.

Existing sessions displayed via logical names will not be updated to reflect changes in rdns.

Being paranoid, I'd probably only try this on a test system first, and not on a production server.

Stephen Hoffman
HoffmanLabs LLC

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.