Re: How can I obtain multiple IP addresses from one hostname?

Giganews Newsgroups
Subject: Re: How can I obtain multiple IP addresses from one hostname?
Posted by:  Don (blacknapk…@twistandfruge.com)
Date: Sun, 30 Oct 2005

> I can obtain one IP address from one hostname as below.
>    IPAddress:=MyStack.ResolveHost(HostName, ID_DEFAULT_IP_VERSION);

> Some host returns multiple IP addresses as below.
>    C:\>nslookup nm01mta.dion.ne.jp
>    Server:  aterm-220389
>    Address:  192.168.0.1
>    Name:    nm01mta.dion.ne.jp
>    Addresses:  211.5.2.78, 211.5.2.79, 211.5.2.80, 211.5.2.81
>              211.5.2.82, 211.5.2.83, 211.5.2.84, 211.5.2.69, 211.5.2.70
>              211.5.2.71, 211.5.2.72, 211.5.2.73, 211.5.2.74, 211.5.2.75
>              211.5.2.76, 211.5.2.77

> How can I obtain multiple IP addresses from one hostname?

Use the TIdDNSResolver component to perform the lookup using the QueryType
qtA.  It will return multiple addresses if they are present in DNS.

hth...

Replies

None

In response to

How can I obtain multiple IP addresses from one hostname? posted by Fumio Kawamata on Sun, 30 Oct 2005