How to flush DNS cache in TCPIP (956 Views)
Reply
Advisor
Bruno Seghers
Posts: 22
Registered: ‎03-27-2006
Message 1 of 7 (956 Views)
Accepted Solution

How to flush DNS cache in TCPIP

Hi,

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
Please use plain text.
Honored Contributor
Steven Schweda
Posts: 9,084
Registered: ‎02-23-2005
Message 2 of 7 (956 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_
cache.)

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

Log in how?

Around here, with Telnet and rsh, my
SYS$REM_NODE and SYS$REM_NODE_FULLNAME both
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?)
Please use plain text.
Honored Contributor
Wim Van den Wyngaert
Posts: 4,561
Registered: ‎12-10-2003
Message 3 of 7 (956 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.

Fwiw

Wim
Wim
Please use plain text.
Advisor
Bruno Seghers
Posts: 22
Registered: ‎03-27-2006
Message 4 of 7 (956 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


THX

SEGHERS Bruno
Please use plain text.
Honored Contributor
Volker Halle
Posts: 5,203
Registered: ‎04-26-2004
Message 5 of 7 (956 Views)

Re: How to flush DNS cache in TCPIP

Bruno,

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 ?

$ TCPIP SET NAME/DISABLE/SYSTEM
$ TCPIP SET NAME/ENABLE/SYSTEM

Volker.
Please use plain text.
Trusted Contributor
Peter Zeiszler
Posts: 354
Registered: ‎12-23-2003
Message 6 of 7 (956 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
Please use plain text.
Honored Contributor
Hoff
Posts: 4,932
Registered: ‎01-29-2006
Message 7 of 7 (956 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




Please use plain text.
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