Digging to the final IP

Josh Kuo josh.kuo at gmail.com
Mon Oct 20 07:11:00 UTC 2014


If all you are after is one of the final IP addresses (not the entire 
set), then using a "dumb" client might be easier. For instance, 'ping'.

$ ping -q -c1 www.google.com
PING www.google.com (203.66.155.113): 56 data bytes


If you want to get more than one IP address, then you'll need an 
intelligent client such as 'host' or 'dig:

$ host www.google.com
www.google.com has address 203.66.155.49
www.google.com has address 203.66.155.50
www.google.com has address 203.66.155.44
...
www.google.com has address 203.66.155.45
www.google.com has IPv6 address 2404:6800:4008:c03::67



On 10/20/14, 12:03 PM, Fajar A. Nugraha wrote:
> What are you using this for?
>
> If it's part of a script, it might be easier to just use gethostbyname. For
> example, in php: http://php.net/manual/en/function.gethostbyname.php ,
> Returns the IPv4 address or a string containing the unmodified hostname on
> failure.
>
>
>
> _______________________________________________
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list
>
> bind-users mailing list
> bind-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/bind-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/bind-users/attachments/20141020/7c76fcad/attachment.html>


More information about the bind-users mailing list