From: "xixi lii" <xixi.limeng@gmail.com>
To: davids@webmaster.com
Cc: "Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>
Subject: Re: UDP question.
Date: Sat, 16 Sep 2006 08:02:04 +0800 [thread overview]
Message-ID: <a885b78b0609151702r3b4086c4l3bb79c2e5c9ddf4a@mail.gmail.com> (raw)
In-Reply-To: <MDEHLPKNGKAHNMBLJOLKGECFOHAB.davids@webmaster.com>
2006/9/16, David Schwartz <davids@webmaster.com>:
>
> > My two adapters has two different IP address, and I bind one IP
> > on one socket,
> > do you mean that I alloc two socket and bind different IP is not
> > helpful?
>
> Correct. You are still sending all the packets *to* the same place.
>
> > In fact, all the packet sent from two socket is go out by one
> > network adapter?
>
> Yes, of course. Why would the kernel send traffic to a destination out an
> interface that doesn't go to that destination?
>
> Suppose you have two interfaces, 1.2.3.4/8 and 10.2.3.4/8, if you are
> sending a packet *to* 1.2.4.5, it will go out the first interface. This
> applies whether the source address is 1.2.3.4 or 10.2.3.4.
>
> By default, the kernel routes traffic based on where it is going, not which
> interface address it came from.
>
> DS
>
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.
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.
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?
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?
Thx all.
Best Regard.
xixi
next prev parent reply other threads:[~2006-09-16 0:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-14 16:00 xixi lii
2006-09-14 23:32 ` Sven-Haegar Koch
2006-09-15 6:36 ` Jan Engelhardt
2006-09-15 7:07 ` xixi lii
2006-09-15 19:14 ` Phillip Susi
2006-09-15 22:23 ` David Schwartz
2006-09-16 0:02 ` xixi lii [this message]
2006-09-16 0:33 ` David Schwartz
2006-09-16 12:13 ` xixi lii
2006-09-16 7:59 ` Holy Aavu
2006-09-16 12:19 ` xixi lii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a885b78b0609151702r3b4086c4l3bb79c2e5c9ddf4a@mail.gmail.com \
--to=xixi.limeng@gmail.com \
--cc=davids@webmaster.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®