Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

how to "clear" the dns entries and everything that maight be cached in a linux box (using ifconfig?)

Posted on 2006-03-28
13
Medium Priority
?
9,181 Views
Last Modified: 2012-06-27
I have suse 10.

I have some probs with a website from the localnetwork which i cannot open it with any browser, not even with lynx.

in windows boxes i used ipconfig /release  or ipconfig /flushdns to clean everything that might have been cached.
In linux i dont know how to do that with ifcongif or any other command.

Can any one help ?
0
Comment
Question by:MaRiOsGR
  • 4
  • 4
  • 2
  • +2
13 Comments
 
LVL 7

Expert Comment

by:sunilcomputer
ID: 16309047
Use Below Command

rnds flush

Then Restart the Service

/etc/rc.d/named restart
0
 
LVL 2

Author Comment

by:MaRiOsGR
ID: 16309222
hell:/ # rnds flush
bash: rnds: command not found

and about named, i dont run any dns server like bind etc.
0
 
LVL 6

Assisted Solution

by:mightyone
mightyone earned 760 total points
ID: 16309630
then do rcnetwork restart
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Accepted Solution

by:
levine_the_machine earned 760 total points
ID: 16314037
The Suse Linux equivalent of the Windows command ipconfig is:

"rcnscd restart"

Look at /etc/nscd.conf for more information.
0
 
LVL 6

Expert Comment

by:mightyone
ID: 16315760
>>The Suse Linux equivalent of the Windows command ipconfig is:
>>
>>"rcnscd restart"

i would say no it is /sbin/ifconfig
0
 
LVL 2

Expert Comment

by:levine_the_machine
ID: 16315911
To mimic the functionality of the ipconfig /flushdns (To flush the DNS cache on a SUSE 10 system) use the command "rcnscd restart" from the shell of your choice.

If you want to configure a network interface use "ifconfig" configure a network interface.

In Microsoft Windows, you can use the command ipconfig /flushdns to flush the DNS resolver cache. You can also use the command ipconfig /displaydns to view the DNS resolver cache.

C:\>ipconfig /flushdns

Windows IP Configuration

Successfully flushed the DNS Resolver Cache.

How to Flush DNS in Mac OSX
In Mac OSX, you can use the command lookupd -flushcache to flush the DNS resolver cache.

bash-2.05a$ lookupd -flushcache

How to Flush DNS in Linux:

In Linux, the nscd daemon manages the DNS cache.

To flush the DNS cache, restart the nscd daemon.

There is functionality built into ipconfig on Windows that does not translate one-for-one to ifconfig in Unix/Linux.

At the end of the day: "nscd restart" is the correct answer to the question.

0
 
LVL 27

Assisted Solution

by:Nopius
Nopius earned 480 total points
ID: 16317801
Usually Linux doesn't cache DNS records if you dont' ask to do so with nscd daemon.
To release IPs (if you have DHCP enabled) run from root:
# dhclient -r
To get IP again:
# dhclient eth0

0
 
LVL 2

Author Comment

by:MaRiOsGR
ID: 16319824
Thank you all.

rcnscd restart works :
hell:/ # rcnscd restart
Shutting down Name Service Cache Daemon                               done
Starting Name Service Cache Daemon                                    done

but dhclient -r (which sounds very interesting) doesnt work. :(

hell:/ # dhclient -r
bash: dhclient: command not found



0
 
LVL 6

Expert Comment

by:mightyone
ID: 16320092
rcnetwork restart

is still my favorite. have you tried?
0
 
LVL 27

Expert Comment

by:Nopius
ID: 16327964
MaRiOsGR you are probably have static IPs, so forget about DHCP releases.
0
 
LVL 2

Author Comment

by:MaRiOsGR
ID: 16330359
you're right i had disabled the dhcp :D

thank you all guys ! i fixed my problem.
0
 
LVL 2

Author Comment

by:MaRiOsGR
ID: 16330366
rcnetwork restart also works ;)
0
 
LVL 6

Expert Comment

by:mightyone
ID: 16336490
listen to me .-)
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
#Citrix #POC #XenDesktop #vCenter #VMware #ESX
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question