RE: UDP question.




Let me explain my network environment, My program is running on a two
adapters machine, whose IP is 192.168.0.1/8 and 192.168.0.2/8, then,
my destination is two machine, whose IP is 192.168.0.3/8 and
192.168.0.4/8. I use four 100M exchange and a 1000M exchange cennected
them to ensure the choke point is not at network equipment.

So both interfaces are part of the same network, and the machines are not
connected to the Internet? (The host ns4.bbn.com is 192.1.122.13, for
example.)

when I use two socket without bonding, one socket is bind
192.168.0.1/8 and sendto 192.168.0.3/8, the other is bind
192.168.0.2/8 and sendto 192.168.0.4/8, but, as you see, I get a
result that the speed of send by two adapters is equal to the only one
adapter's.

None of your code gives the kernel any reason to prefer one interface over
the other. Why would an interface bound to 192.168.0.1 be better than one
for 192.168.0.2 if you're sending to 192.168.0.3?

yesterday. I got an uncertain idea, is the problem that IP layer is
separate with Eth layer ? when I bind src IP, it just do helpful to IP
layer, not real bind the adapter? when I send, the real ethreal
adapter is select by IP route? If the two interface can go
destinnation both, IP layer will choose the frist, not use both? Am I
right?

Correct, you are binding to the adapter's address, not to the adapter. The
IP routing layer still determines which interface a packet is transmitted
on.

If so, when I use bonding, the adapter's physical address is the frist
one, Do this means that all of the packet come to my machine will go
through in the frist one adapter?

It depends how you have the IP routing layer configured. You can configure
it to select the adapter based on the source address if you want to.

DS


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: IS:: VOS Loopback interfaces
    ... >> I'd like to configure a loopback interface, additionaly to 127.0.0.1, ... > the IP layer (Can't remember when the primary fails if the secondary ... failover if the active adapter loses link or fails outright. ...
    (comp.sys.stratus)
  • Re: UDP question.
    ... > when I use two socket without bonding, one socket is bind ... None of your code gives the kernel any reason to prefer one interface over ... is the problem that IP layer is ... > adapter is select by IP route? ...
    (Linux-Kernel)
  • Re: Difference between?
    ... loopback interface (second one in the case when even loopback adapter not ... installed but network adapter do installed). ... > passes the remaining data to the next layer up - the IP layer, ...
    (microsoft.public.win32.programmer.networks)
  • Re: A proposal - binary
    ... VMI into the paravirt_ops interface. ... it is important for me to educate everyone on that layer and find out the opinions people have on what an acceptable license / source policy is for that layer. ... We use it to indirect hypervisor calls so that they can be future compatible, instead of forcing a particular hypervisor interface. ... This layer is very much like a PAL code layer that allows system level instructions to have alternative implementations, and also, most importantly, means we are free to change the structural layout of information which is shared between the hypervisor and the kernel. ...
    (Linux-Kernel)
  • Re: Question re Migration of VB6 App to .NET
    ... I've had the opportunity to advise folks on how to move VB6 to .Net in the ... Create an ENTIRELY NEW USER INTERFACE. ... business object layer was actually designed to be independent of the U/I ... Pick a relatively self-contained set of business objects. ...
    (microsoft.public.dotnet.general)