All of lore.kernel.org
 help / color / mirror / Atom feed
* How to configure if there are tow network cards in Client
@ 2015-12-25 14:04 蔡毅
  2015-12-28 16:47 ` Sage Weil
  0 siblings, 1 reply; 5+ messages in thread
From: 蔡毅 @ 2015-12-25 14:04 UTC (permalink / raw)
  To: ceph-devel, sweil; +Cc: ceph-cn

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.
Best regards,
Cai Yi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to configure if there are tow network cards in Client
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Sage Weil @ 2015-12-28 16:47 UTC (permalink / raw)
  To: 蔡毅; +Cc: ceph-devel, ceph-cn

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.

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..

sage

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 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
  2015-12-29 12:58     ` 蔡毅
  0 siblings, 1 reply; 5+ messages in thread
From: Linux Chips @ 2015-12-29 10:21 UTC (permalink / raw)
  To: Sage Weil, 蔡毅; +Cc: ceph-devel, ceph-cn

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re:Re: How to configure if there are tow network cards in Client
  2015-12-29 10:21   ` Linux Chips
@ 2015-12-29 12:58     ` 蔡毅
  2015-12-31  8:45       ` Linux Chips
  0 siblings, 1 reply; 5+ messages in thread
From: 蔡毅 @ 2015-12-29 12:58 UTC (permalink / raw)
  To: Sage Weil, Linux Chips; +Cc: ceph-devel


      Thank for your replies.  
      So is it reasonable that we could write a file such as shell script to bind one process with a specific IP and modify the routing tables and rules
as one of Ceph’s tools? So that the users is convenient when they want to change the NIC connecting with the OSD.



At 2015-12-29 18:21:21, "Linux Chips" <linux.chips@gmail.com> wrote:
>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
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to configure if there are tow network cards in Client
  2015-12-29 12:58     ` 蔡毅
@ 2015-12-31  8:45       ` Linux Chips
  0 siblings, 0 replies; 5+ messages in thread
From: Linux Chips @ 2015-12-31  8:45 UTC (permalink / raw)
  To: 蔡毅, Sage Weil; +Cc: ceph-devel

it would certainly help those with less knowledge about networking in 
linux, though i do not know how many people using ceph are in this 
category. Sage and the others here may have a better idea about its 
feasibility.
but i usually use rule-* and route-* (in CentOS) files, they work with 
networkmanager, and very easy to configure. in ubuntu you can put them 
in interfaces file, and they are as easy. if such a tool is made, i 
think it should understand the ceph.conf file, but i doubt it can figure 
out the routes correctly without you putting them in.

On 12/29/2015 03:58 PM, 蔡毅 wrote:
>        Thank for your replies.
>        So is it reasonable that we could write a file such as shell script to bind one process with a specific IP and modify the routing tables and rules
> as one of Ceph’s tools? So that the users is convenient when they want to change the NIC connecting with the OSD.
>
>
>
> At 2015-12-29 18:21:21, "Linux Chips"<linux.chips@gmail.com>  wrote:
>> 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 tomajordomo@vger.kernel.org
>>> More majordomo info athttp://vger.kernel.org/majordomo-info.html

--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-12-31  8:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2015-12-29 12:58     ` 蔡毅
2015-12-31  8:45       ` Linux Chips

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.