2 ips on one interface
I have windows server that on one interface I configured 2 ips.
let's say 10.170.50.4 and 10.170.50.8 same netmask 255.255.255.0 GW 10.170.50.1
I want to know if I have 2 ips and I try to refer one of them if i will have problems
example refer to 10.170.50.4 and get a response from 10.170.50.8
and socket will not open ... ?
If you make a connection to a specific IP address, the Windows server will respond back from that same IP address. But if the server initiates the connection, it will attempt to use an IP address in the same subnet as the destination. However, if one is not available, then it will use the FIRST IP address assigned to the NIC card to send the packet to the gateway.
So for example, if your Windows box is assigned 10.170.50.4 (first) and 10.170.50.8 (second). Then you make a connection to 10.170.50.8, it will reply back to you on 10.170.50.8. However, if your connection to 10.170.50.8 triggers, say.. an xml post to an address on the internet, the XML post will originate from 10.170.50.4. But remember that TCP conversation is completely independent of your TCP conversation.