Subject: Re: [vserver] VServer and Multicasting
From: Furgerot Julien <julien.furgerot@gmail.com>
Date: Fri, 14 Jan 2011 15:05:37 +0100
Fri, 14 Jan 2011 15:05:37 +0100
First of all, thank you for your helpful responses,

I have resolved the multicast problem by declaring all the multicast
addresses thanks to Eric's hint.

However, I still have problems related to sockets. Recall, that all my
guests are running the same software. This software contains some
components that uses socket bound to 0.0.0.0 (all interfaces). Thus, when
running the VMs, only the first turret uses this socket and the other guests
are not able to use the already used socket.

To overcome this problem, we have thought to two solutions :

- The first solution consists on to review the software so that to make it
sure to bind to the allocated IP address on a given physical interface. The
problem with this solution is that we will be obliged to modify the software
code.

- In the second solution, we are thinking if there is some solution that
allows us to virtualise the network so that to isolate the physical
interfaces between the guests, virtual interfaces, etc. in VServer.

What do you think ?

Thank you for your answers,

Regards,

-- Julien

On Tue, Jan 11, 2011 at 10:08 PM, Herbert Poetzl <herbert@13thfloor.at>wrote:

> On Tue, Jan 11, 2011 at 09:58:34AM +0100, Benedikt Böhm wrote:
> > On Mon, Jan 10, 2011 at 6:04 PM, Eric Schoeller
> > <eschoeller@users.sourceforge.net> wrote:
> > > Someone else will probably come up with a cleaner solution though :)
>
> > the following patch should make it work out-of-the-box:
>
> but it will also disable all checks for multicast addresses
> inside the guest ... JFYI
>
> best,
> Herbert
>
> > --- a/include/linux/vs inet.h    2010-09-02 14:29:18.000000000 +0200
> > +++ b/include/linux/vs inet.h    2010-10-14 10:03:54.879553071 +0200
> > @@ -244,7 +244,7 @@
> >                 } else if (saddr == IPI LOOPBACK) {
> >                         if (nx info flags(nxi, NXF LBACK REMAP, 0))
> >                                 baddr = nxi->v4 lback.s addr;
> > -               } else {        /* normal address bind */
> > +               } else if (!ipv4 is multicast(saddr)) { /* normal
> > address bind */
> >                         if (!v4 addr in nx info(nxi, saddr,
> NXA MASK BIND))
> >                                 return -EADDRNOTAVAIL;
> >                 }
>


First of all, thank you for your helpful responses,

I have resolved the multicast problem by declaring all the multicast addresses thanks to Eric's hint.

However, I still have problems related to sockets. Recall, that all my guests are running the same software. This software contains some
components that uses socket bound to 0.0.0.0 (all interfaces). Thus, when running the VMs, only the first turret uses this socket and the other guests are not able to use the already used socket. 

To overcome this problem, we have thought to two solutions :

- The first solution consists on to review the software so that to make it sure to bind to the allocated IP address on a given physical interface. The problem with this solution is that we will be obliged to modify the software code.

In the second solution, we are thinking if there is some solution that allows us to virtualise the network so that to isolate the physical interfaces between the guests, virtual interfaces, etc. in VServer.

What do you think ?

Thank you for your answers,

Regards,

-- Julien


On Tue, Jan 11, 2011 at 10:08 PM, Herbert Poetzl <herbert@13thfloor.at> wrote:
On Tue, Jan 11, 2011 at 09:58:34AM +0100, Benedikt Böhm wrote:
> On Mon, Jan 10, 2011 at 6:04 PM, Eric Schoeller
> <eschoeller@users.sourceforge.net> wrote:
> > Someone else will probably come up with a cleaner solution though :)

> the following patch should make it work out-of-the-box:

but it will also disable all checks for multicast addresses
inside the guest ... JFYI

best,
Herbert

> --- a/include/linux/vs inet.h    2010-09-02 14:29:18.000000000 +0200
> +++ b/include/linux/vs inet.h    2010-10-14 10:03:54.879553071 +0200
> @@ -244,7 +244,7 @@
>                 } else if (saddr == IPI LOOPBACK) {
>                         if (nx info flags(nxi, NXF LBACK REMAP, 0))
>                                 baddr = nxi->v4 lback.s addr;
> -               } else {        /* normal address bind */
> +               } else if (!ipv4 is multicast(saddr)) { /* normal
> address bind */
>                         if (!v4 addr in nx info(nxi, saddr, NXA MASK BIND))
>                                 return -EADDRNOTAVAIL;
>                 }