Socket and interface (eth0, eth 1)relationship

hi,

Could some one answer this please

we have a program with client socket declared which connect to a server

for the above program description we wont send an interface information ... let us suppose, I have two interfaces (eth0 , eth1) which are assigned some ip, which interface the above socket send data to ???????

please clarify

Each packet has a life of its own, but each other sending host will send to the MAC in its ARP cache or first ARP response. Now, if the two cards with one IP are on different collision domains, only one should be ARPing in each collision domain, but if there is a bridge between the two, it might proxy ARP for the other collision domain.

If the IPs are different, then routing tables and software decide which to send a packet out on. If the interfaces are not full duplex, sometimes the net is set up to flow packets out one and back on the other (asymetric routing), which messes up with NAT if it comes to a dfferent firewall.

For high performance and reliability, sometimes the basics are complicated by special software to load balance and expedite avoiding breakdowns.

1 Like