Convert Host/Domain Name to IP Address and vice versa

Discussion in 'The Lounge' started by bigbazza, Apr 29, 2007.

Thread Status:
Not open for further replies.
  1. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

     
    Last edited: Apr 29, 2007
  2. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Bump. Anyone?:wave
    I know this is not the usual run-of-the-mill query, but I'd like to give the HOSTS file a serious try. :) Bazza
     
  3. Calltaker

    Calltaker MajorGeek

    heheheh... I tracked down the IP for my work's server :)

    THis could be a really fun toy :)

    ~C
     
  4. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Not what I was trying to achieve. :D :D Bazza

    ===

     
  5. DavidGP

    DavidGP MajorGeeks Forum Administrator - Grand Pooh-Bah Staff Member

    Neat it's 95% accuracy on country of origin has me in

    Location : South Africa (95% accuracy)


    may wish to read this http://www.mvps.org/winhelp2002/hosts.htm Hosts while ok to block pests can be a pest itself if too large a file as it can slowdown the likes of XP/W2k ( you can workaround it in services.msc > dns client > set to manual )
     
  6. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Thanks Halo, I was hoping that you, or Adrynalyne, or other learned folk, would point out ideas and difficulties.
    I was thinking of putting my most visited sites like MG at the very start of the HOSTS file.
    Would this slow down (or speed up) access via HOSTS?
    It's only a slowly developing idea of mine at this time, an experiment perhaps. Bazza

    PS: Am I reading the use of HOSTS the wrong way around. Does it also increase the speed of access to nomimated sites like MG, as well as stopping access to sites coded as 127.nnn etc. confused Baz

    ===

     
    Last edited: May 2, 2007
  7. DavidGP

    DavidGP MajorGeeks Forum Administrator - Grand Pooh-Bah Staff Member

    Yes you can use it for both access or blocking of sites, the blocking side the IP is replaed by the Localhost Address of the PC ( aka Loopback Addess ) 127.0.0.1 *theirs no place like home*

    With DNS more commonly used I've never noticed a speedup in hosts, but you can actually have issues with sites not loading if they change servers and IP, then you'll have the wrong hosts file.

    They tend to now be used in the preventative.



    I would advise trying it and seeing if it speeds things up for you.




    A note on DNS and more so the DNS Resolver Cache, this can also be a cause of non-loading pages if you end up with a negative corrupt entry in your DNScache, resulting in some pages or one particular page error 404ing which is why some folk periodically flush the DNS cache on their PC.

    Start > Run > CMD [enter] type ipconfig /flushdns [enter]

    you can adjust the registry to also not cache negative entries if you so wish, but never turn off DNS caching fully as it will hurt performance due to un-necessary lookups by adding these ( note 2000/XP/2003 and already included in Vista as default and well as these are registry changes then normal care in backing up registry or Key folder location is required before using as your on your own if you mess something up )

    Navigate to here and add these DWORDs if not present

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters]
    "NegativeCacheTime"=dword:00000000
    "NetFailureCacheTime"=dword:00000000
    "NegativeSOACacheTime"=dword:00000000
     
  8. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Thanks Halo, as usual your advice is really appreciated.:major

    As I read it (in my XP Bible), the DNS cache is cleared / emptied every time you shut down Windows. I'd really like to see, daily, what info is stored in that days cache, so I can consider entering the URL into my HOSTS file.

    How can I access the DNS cache entries, each day?
    The ipconfig command doesn't seem to help me.confused

    I take your points that addresses may change and that the HOSTS file, nowadays, is mainly used to stop access to various URL's.;)

    Bazza
     
  9. DavidGP

    DavidGP MajorGeeks Forum Administrator - Grand Pooh-Bah Staff Member

    Yes, some folk though dont shut their PCs down, some do, iirr the DNScache also lasts for 24hrs and is then renewed, but as I mention some folk sometimes get 404 page not loading errors on certain pages, its a possible step to take in clearing the local DNScache of its entries ( or shutdown > restart )


    To view the DNScache at the CMD prompt type or paste this ipconfig /displaydns
     
  10. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Gako, thanks for your reply.:)

     
Thread Status:
Not open for further replies.

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds