Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: A little network question

by hdp (Beadle)
on Apr 25, 2001 at 18:52 UTC ( [id://75475] : note . print w/replies, xml ) Need Help??


in reply to A little network question

Your question makes me wonder if I'm missing something. Specifying a nameserver instead of using things like gethostbyname and letting the OS do the lookups for you on whatever servers it's configured to use can lead to problems. For example, if your nameservers change, you now have one additional place you need to remember to change that information, and if you move this script to a different machine, you'll likely need to update it again.

This is not to say there are no valid reasons for doing so, but none are coming readily to my mind.

hdp.

Replies are listed 'Best First'.
Re: Re: A little network question
by derek3000 (Beadle) on Apr 25, 2001 at 21:22 UTC
    Maybe this will answer that last one: I came up with this idea yesterday because the name server here went down, as it does many times. It was frustrating to me because I knew that if I had the IPs of the sites, I would at least be able to do some surfing (work is boring, and also a bitch because our air conditioning wasn't ready yet--yesterday was 80 something here). So I thought that a great way to apply what I've learned so far would be to write a little script to fetch the IPs from an alternate nameserver. Is this kind of a weird reason? Probably. But this was more of an excercise than anything.