Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the '10.4: A shell script to do DNS lookups in the Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: A shell script to do DNS lookups in the Terminal
Authored by: TigerKR on Sep 22, '05 01:31:58AM

>I'm afraid you've lost me on this. If one is using DHCP and uses no on-site
>router and instead gets his IP address from his ISP, then it is very unlikely to
>be of the 10-dot addressing format. Also, this IP address will most certainly
>NOT survive a restart of the computer except under very specific
>circumstances. Many users, depending on their connection type with their ISP,
>will not be assigned the same IP address.

You are correct, the 10.x.x.x range is for internal networks, however, I was using that as an example because I don't have the patience to type out every possible IP address combination. ; - )

Technically, you are also correct that most DHCP IP addresses are not guaranteed, however, many large broadband ISPs match IP addresses to MAC addresses, so your IP could change, but in reality, it never changes. For instance, my IP address on Comcast Broadband never changes, unless I use a different computer or a different network interface (ie: a second ethernet card).

In any event, my hint will not damage your computer or network connection in any way, because dns lookups start with the domain/host name first, not the IP address first. In the event that you were assigned a different IP address, my hint would simply not work, and your terminal host-name would revert to its ISP assigned host-name.

If someone else on your sub-net (another client of your ISP) got your old IP address, the worst case scenario would be that if you tried to use your /etc/hosts host-name to connect to yourself (it would never work outside of your computer because your /etc/hosts file does not exist on any other computer, nor is it published to any other computers), then you might be connected to that other computer on your sub-net, but its unlikely that anything would happen, unless your neighbor used the same software, services, usernames, and passwords a you use on your computer. ; - )

Thank you for posting your comments though, because I really should have been clearer and more explicit.


[ Reply to This | # ]