2 IPs, i need resolve localy name to only one IP.

Hello,

We have a server 2012 (Server1) with two network cards, each with an IP. For example:

IP1 - 10.1.1.50

IP2 - 192.168.10.50

I need this server it resolves itself localy with only an IP. I config the host file with only the IP i need.

192.168.10.50       Server1

But when launch ping to server1 resolve 10.1.1.50. Only when disable the NIC appears the IP that i need 192.168.10.50.

I flush cache.

https://support.microsoft.com/en-us/kb/172218

Says that the host file is the first option. If this is not working, where is looking for to resolve ?

Thanks


  • Edited by P_Agudo 20 hours 23 minutes ago
August 21st, 2015 12:51pm

Your questions it not very clear?

You have a server with 2 NIC. Each NIC has an IP address as described. Therefore, you have 2 different subnets.

You have a print server. What is the IP address of the print server?

The print server cannot connect to the server using IP 192.168.10.50. It can only connect using IP 10.1.1.50.

How is the print server physically connected to the server? On which NIC?

You should provide some more information.

Free Windows Admin Tool Kit Click here and download it now
August 24th, 2015 6:04am

Sorry, i mean PING. I correct

I need that when i launch ping to server1 (from itself) resolve the IP that i want. I need to prioritize one of the NIC:

IP1 - 10.1.1.50

IP2 - 192.168.10.50

When i launch ping to server1 always resolve the 192.168.10.50 IP. Only when disable the NIC 2 i receive the IP that i want, 10.1.1.50

My question is why the entries of HOSTS file doesnt work ?

I guess that resolve the IP looking for in other place, registry key maybe ?

August 24th, 2015 6:46am

The HOSTS file is read completely, all at once.

When your system determines the current IP and matches it against the HOSTS entries, it works out the shortest route, which is generally based on the subnet mask.

So, in this case, I would assume that the main NIC on the print server has an IP in the same subnet as IP2.

This is a very unusual set up, to have both IPs on the same physical network.

Free Windows Admin Tool Kit Click here and download it now
August 24th, 2015 7:02am

Hi P_Agudo,

>>I need this server it resolves itself localy with only an IP. I config the host file with only the IP i need.

192.168.10.50       Server1

But when launch ping to server1 resolve 10.1.1.50. Only when disable the NIC appears the IP that i need 192.168.10.50.

What do you mean by resolves itself?

If you are pinging from other client, we need to modify the hosts file on the client.

Best Regards,

Leo

August 24th, 2015 10:36pm

This server host an aplication. The app needs locate the server by hostname, and this hostname must match with one of the two IP.

I'vesolved it configuring the metric in the tcp/ip options, lowest value have priority.

Thanks and regards

Free Windows Admin Tool Kit Click here and download it now
August 25th, 2015 2:34am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics