Re: How to clean up routing cache?

From: Lon Stowell (LonDot.Stowell_at_ComcastPeriod.Net)
Date: 10/07/03


Date: Tue, 07 Oct 2003 17:54:24 GMT

Approximately 10/6/03 23:11, Alexandre Patchine uttered for posterity:

> Ok, I have not explained good enough...

  This is not a routing issue, it is a name caching issue.
>
> when I ping some host that does not exist (I know it):
> bash2#ping blade_110.xxx.ericsson.se
> ping: unknown host blade_110.ericsson.se
>
> I get the error message above after 15..20 sec because ping tries to
> reach the host blade_110.xxx.ericsson.se...

  No, actually what happens is that your machine tries to
  reach a nameserver to find the IP address for that hostname.
  And this takes a while on a negative answer.

> When I run the same command second time (after one minute):
>
> bash2#ping blade_110.xxx.ericsson.se
>
> I get error response immediately:
> ping: unknown host blade_110.ericsson.se

  Your host has cached the negative answer and therefore
  doesn't waste time trying to find the IP address for
  that hostname.

  And even if your host did not cache the negative answer,
  the dns server at ericsson.se [or your isp, etc. etc.]
  will have cached the negative answer and will return that
  immediately.

  You can see this behavior with the nslookup command
  run interactively with debug set.

  # nslookup [do not enter the hostname here, just the command]

  blah blah blah blah, you get a nameserver...

> set d2 [note that you now have a nslookup prompt]
              set debug level 2.

> bogus.ip.hostname.co.se enter bad name.

>
> But if I wait one hour (did not measure shortest time) then happens
> like I run it first time, ping command does not return immediately...
>
> My question was that I think the error message stored in some kind of
> cache on OS (looks like error response cached for second time).
> How I clean that cache and where is setting for the timeout of cache?

  Why would you want to?

  On your host, if solaris, the caching is done by the naming
  services caching demon, aka nscd. Man pages on timeouts.
  However, your host isn't the only name server timeout involved.

  And negative answers in DNS are required to timeout...otherwise
  you'd never be able to access newly added hosts.
>
> I need to know the behavior exactly because I am going to use it for
> supervising of some nodes...

  What you are really doing is managing the name servers, not those
  nodes.

  If you really want to know whether they exist, try their IP
  address rather than hostname....unless you are really trying
  to manage the naming services.
>
> thanks,
> alexandre
>
> patshin@hotmail.com (Alexandre Patchine) wrote in message news:<7c3669b4.0310060600.447a769d@posting.google.com>...
>> Hello!
>>
>> My OS is the Solaris 8
>>
>> When I ping some host that is not alive, first time I get error
>> message after quite long timeout ~15...20 sec...
>>
>> Second time I do it I get error message almost immediately that means
>> the error response is stored somewhere on my computer...
>>
>> If I wait quite long period of time I see that error message again
>> appears after long timeout, that indicates that cache was cleand up...
>>
>> Question: how do I change cache time and where? How can I clean up
>> cache myself?
>>
>> I looked in zillion places and commands and could not find the option
>> to do that...
>>
>> Thanks,
>> Alexandre



Relevant Pages

  • Re: How to clean up routing cache?
    ... when I ping some host that does not exist: ... I get the error message above after 15..20 sec because ping tries to ... How I clean that cache and where is setting for the timeout of cache? ...
    (comp.unix.solaris)
  • Re: New problem with Front Page
    ... Has your host run a check on the extensions for your account and/or checked the permissions? ... FrontPage Resources, WebCircle, MS KB Quick Links, etc. ... > emptied front page temp folder. ... > I am still getting the same error message. ...
    (microsoft.public.frontpage.client)
  • netra 440 - Time of Date battery dead?
    ... I decided to reboot the host because it seemed confused ... clean), looking at dmesg, I saw the following error message: ... cache_cleanup thread unexpected error 22" was being written to the ... then restarted xntpd, at which time the time synced up and everything ...
    (SunManagers)
  • Continued publishing problem
    ... I signed up with another host. ... the same problem -- FP seems to start publishing, then, one of the ... -- Listing files in c://mydomain.org; listing files in http://mydomain.org; ... then I get the error message -- see below. ...
    (microsoft.public.frontpage.programming)
  • Re: network
    ... I can ping and ftp to this box, but can't access it through telnet or ... The error message is "could not open connection to the host ...
    (Fedora)