On Mon, Dec 13, 2010 at 9:54 PM, Leslie S Satenstein
<[email protected]> wrote:
>
> I have been told that in the MS (XP, W7, etc), when a system has more than 1 
> network card, then we have to specify the card number to which we want to 
> address a socket command, a connect, etc.  After all, each card could be on a 
> different system­.
> What about a linux system with multiple TCP/IP ports?  Do we have to do 
> likewise?
> Nowhere with the samples for server or client, have I seen that we specify 
> the card number (eth0, eth1, etc.)
> Did I miss something that is really different from the MS implementation and 
> the Linux implementaton?

I'm not familiar with the Microsoft way, but under GNU/Linux you'd
either leave it unspecified (and the routing tables will know which
network interface you're using, e.g., if eth0 is in 10.0.0.0/16
network and eth1 is in 192.168.0.0/16 network, then an IP of the form
192.168.0.5 will go through eth1) or you can specify which interface
to use specifically, although that's usually done only for server
sockets (e.g., you want to serve webpages, but only on the 10.0.0.0
network). That's called to explicitly specify the interface to bind
to.

So, the keywords you want for searching this up are 'interface' and 'bind'.

HTH,

P.
_______________________________________________
mlug mailing list
[email protected]
https://listes.koumbit.net/cgi-bin/mailman/listinfo/mlug-listserv.mlug.ca

Reply via email to