i am learning the basics.......!

Showing posts with label TCP/IP. Show all posts
Showing posts with label TCP/IP. Show all posts

Sunday, August 13, 2006

TCP/IP socket - in a multi-homed host

In a multi-homed host ( host having two more network addresses), how does a TCP/IP socket connection behave ?

How does it find the interface through which packet has to be forwarded ? It depends on the entries in the forward information table.. ( or route table - ).. if there are more than one interface to the same destination it looks for the lowest Metric value.. or if it does not find an entry it forwards through the default route gateway interface..

Then how does it determines through which interface it should listen for the reply ? If "bind" is not explicitly called, the TCP/IP socket will listen on the interface through which the packet was forwarded..!

Using "bind" before "connect", we can explicitly bind a interface, if needed..

About Me

My photo
Predictably Unpredicatble, lazy, careless, sincere, honest, caring, Trouble maker, emotional, likeable