Question about TCP/IP

November 05th, 2009 - 05:26 am ET by Anonym | Report spam
Hello,

On a computer (called C1) I have two network cards.
The first network card has IP 192.168.0.10 and the subnet mask is
255.255.255.0.
The second network card has IP 192.168.1.10 and the subnet mask is
255.255.255.0.

On this computer, I have made a program witch connect with two computers
(called C2 and C3) using Socket in MS VB .Net 2008 Express.
C2 has IP 192.168.0.11 and the subnet mask is 255.255.255.0.
C3 has IP 192.168.1.11 and the subnet mask is 255.255.255.0.

My question is :
When I send datas using the socket connexion with C2, does the operating
system send those datas only on the good network card ? or it send on both
network cards (in this case, the frame will reach the destination witch the
network card for C2, and never reach the destination for C3 but this network
is polluted with datas witch does not belong to it) ?

Regards,
Stéphane

PS :
I'm french, so excuse me for my english
PPS :
If the word "witch" is not the good word, you can try with the word "that"
email Follow the discussionReplies 7 repliesReplies Make a reply

Replies

#1 Anonym
November 05th, 2009 - 04:05 pm ET | Report spam
Thanks a lot Geoff !

Like I said to Noah, all is OK !!!

I knew something was wrong with that witch ! Let's burn it !!! :) (and I
just saw Eastwick !)

Stéphane


"Geoff" a écrit dans le message de news:

On Thu, 05 Nov 2009 10:13:13 -0800, Geoff
wrote:

On Thu, 5 Nov 2009 11:26:22 +0100, <Stéphane> wrote:

Hello,

On a computer (called C1) I have two network cards.
The first network card has IP 192.168.0.10 and the subnet mask is
255.255.255.0.
The second network card has IP 192.168.1.10 and the subnet mask is
255.255.255.0.

On this computer, I have made a program witch connect with two computers
(called C2 and C3) using Socket in MS VB .Net 2008 Express.
C2 has IP 192.168.0.11 and the subnet mask is 255.255.255.0.
C3 has IP 192.168.1.11 and the subnet mask is 255.255.255.0.

My question is :
When I send datas using the socket connexion with C2, does the operating
system send those datas only on the good network card ? or it send on
both
network cards (in this case, the frame will reach the destination witch
the
network card for C2, and never reach the destination for C3 but this
network
is polluted with datas witch does not belong to it) ?

Regards,
Stéphane

PS :
I'm french, so excuse me for my english
PPS :
If the word "witch" is not the good word, you can try with the word
"that"




Bon jour.

The correct spelling is "which", not witch. Witches are hags that
haunt us on Halloween. Which witch is the good witch? I don't know
that. :)

The TCP/IP stack will examine the address of the destination host and
use the netmask to determine which network card to use for that
destination.

Traffic destined for 192.168.1.x will go out on C3.
Traffic destined for 192.168.0.x will go out on C2.

However, traffic destined for any other hosts, such as 74.125.67.100
(google.com) will go out on C2 or C3 depending on which of them has
the lowest metric. The metric is the measure of the cost of the route
on that hop, the lower the metric the lower the cost. You can display
the metrics for each network interface by typing "route print" in the
cmd console.

The card with the lowest metric is the preferred route for traffic
that is not destined for addresses on the particular LAN subnets for
all the cards in the system.



Amendment:
Traffic destined for 192.168.1.x will go out on the NIC on that net.
Traffic destined for 192.168.0.x will go out on the NIC on that net.


Similar topics