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@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

Reply via email to