H
HiChetu
I have a host which has two NIC cards; one configured for LAN
connections, and another for external connections.
Say the ip address are
1) x.x.x.x - for LAN
2) y.y.y.y - for external
hostname = 'hichetu'
With the following code snippet...
public void TestDNS(string hostname)
{
try
{
IPHostEntry hostInfo = Dns.Resolve(hostname);
IPAddress[] address = hostInfo.AddressList;
Console.WriteLine("Host name : " + hostInfo.HostName);
Console.WriteLine("\nIP Address list :");
for(int index=0; index < address.Length; index++)
{
Console.WriteLine(address[index]);
}
}
}
....I always get
Host name : hichetu.a.b
IP Address list
x.x.x.x
Now, How do i get the other ip address y.y.y.y ?
connections, and another for external connections.
Say the ip address are
1) x.x.x.x - for LAN
2) y.y.y.y - for external
hostname = 'hichetu'
With the following code snippet...
public void TestDNS(string hostname)
{
try
{
IPHostEntry hostInfo = Dns.Resolve(hostname);
IPAddress[] address = hostInfo.AddressList;
Console.WriteLine("Host name : " + hostInfo.HostName);
Console.WriteLine("\nIP Address list :");
for(int index=0; index < address.Length; index++)
{
Console.WriteLine(address[index]);
}
}
}
....I always get
Host name : hichetu.a.b
IP Address list
x.x.x.x
Now, How do i get the other ip address y.y.y.y ?