All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linux Chips <linux.chips@gmail.com>
To: "Sage Weil" <sweil@redhat.com>, 蔡毅 <cymengxiang@126.com>
Cc: "ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>,
	ceph-cn@lists.ceph.com
Subject: Re: How to configure if there are tow network cards in Client
Date: Tue, 29 Dec 2015 13:21:21 +0300	[thread overview]
Message-ID: <56825EA1.1070803@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1512280846380.14656@cobra.newdream.net>

On 12/28/2015 07:47 PM, Sage Weil wrote:
> On Fri, 25 Dec 2015, ?? wrote:
>> Hi all,
>>      When we read the code, we haven?t find the function that the client can bind a specific IP. In Ceph?s configuration, we could only find the parameter ?public network?, but it seems acts on the OSD but not the client.
>>      There is a scenario that the client has two network cards named NIC1 and NIC2. The NIC1 is responsible for communicating with cluster (monitor and RADOS) and the NIC2 has other services except Ceph?s client. So   we need the client can bind specific IP in order to differentiate the IP communicating with cluster from another IP serving other applications. We want to know is there any configuration in Ceph to achieve this function? If there is, how could we configure the IP? if not, could we add this function in Ceph? Thank you so much.
you can use routing tables plus routing rules. otherwise linux will just 
use the default gateway.
or you can put the second interface on the same public net of ceph. 
though that would break if you have multiple external nets.
> Right.  There isn't a configurable to do this now--we've always just let
> the kernel network layer sort it out. Is this just a matter of calling
> bind on the socket before connecting? I've never done this before..
linux will send all packets to the default gateway event if an 
application binds to an ip on different interface, the packet will go 
out with the source address as the binded one but through your router. 
the only solution, even if the bind function exists is to use the 
routing tables and rules.
>
> sage
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



  reply	other threads:[~2015-12-29 10:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-25 14:04 How to configure if there are tow network cards in Client 蔡毅
2015-12-28 16:47 ` Sage Weil
2015-12-29 10:21   ` Linux Chips [this message]
2015-12-29 12:58     ` 蔡毅
2015-12-31  8:45       ` Linux Chips

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=56825EA1.1070803@gmail.com \
    --to=linux.chips@gmail.com \
    --cc=ceph-cn@lists.ceph.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=cymengxiang@126.com \
    --cc=sweil@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.