Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jun 2016 15:53:57 +0200 (CEST)
From:      =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no>
To:        Niklaas Baudet von Gersdorff <stdin@niklaas.eu>
Cc:        freebsd-questions@freebsd.org, freebsd-net@freebsd.org
Subject:   Re: Getting CARP to broadcast on a different interface
Message-ID:  <alpine.BSF.2.20.1606081547300.1240@mail.fig.ol.no>
In-Reply-To: <20160608124310.GG2050@box-hlm-03.niklaas.eu>
References:  <20160608124310.GG2050@box-hlm-03.niklaas.eu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 8 Jun 2016 14:43+0200, Niklaas Baudet von Gersdorff wrote:

> Hello,
> 
> is it possible to configure CARP in such a way that it sends its
> broadcasts on an interface different from the one that gets the shared
> IP address assigned? Unfortunately, my provider blocks broadcast and
> multicast on public interfaces of virtual machines.
> 
> However, they offer to set up an additional virtual NIC that directly
> connects multiple virtual machines on which broadcast and multicast are
> not blocked. So, while I assign a shared IP to the public interface
> vtnet0, I would like to configure CARP to broadcast on the private
> interface vtnet1.
> 
> Is that possible? Or are there alternatives for CARP that support this
> function?

Although it sounds pretty bad, you could set up CARP on the internal 
network and use those CARP events to control the main interfaces, e.g. 
re-adjust their annoncement intervals, or something equally awful.

You might end up locked out of your systems unless you can control 
them remotely using a third set of means, e.g. RDP.

Just a quick thought that popped up in my head.

-- 
+-------------------------------+------------------------------------+
| Vennlig hilsen,               | Best regards,                      |
| Trond Endrestøl,              | Trond Endrestøl,                   |
| IT-ansvarlig,                 | System administrator,              |
| Fagskolen Innlandet,          | Gjøvik Technical College, Norway,  |
| tlf. mob.   952 62 567,       | Cellular...: +47 952 62 567,       |
| sentralbord 61 14 54 00.      | Switchboard: +47 61 14 54 00.      |
+-------------------------------+------------------------------------+
From owner-freebsd-net@freebsd.org  Wed Jun  8 14:37:46 2016
Return-Path: <owner-freebsd-net@freebsd.org>
Delivered-To: freebsd-net@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8518DB6F85D;
 Wed,  8 Jun 2016 14:37:46 +0000 (UTC)
 (envelope-from asomers@gmail.com)
Received: from mail-oi0-x22b.google.com (mail-oi0-x22b.google.com
 [IPv6:2607:f8b0:4003:c06::22b])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "smtp.gmail.com",
 Issuer "Google Internet Authority G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 51D121D49;
 Wed,  8 Jun 2016 14:37:46 +0000 (UTC)
 (envelope-from asomers@gmail.com)
Received: by mail-oi0-x22b.google.com with SMTP id s139so15670434oie.2;
 Wed, 08 Jun 2016 07:37:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:in-reply-to:references:from:date:message-id
 :subject:to:cc;
 bh=kx8024szjNrS7tCJ4/F+vrEEUPc/ClJvq2uXaP8PDZI=;
 b=XQGO3rCoupJdh2O5Ebc4/xQQvFG4SjaTwrSzGA8y57PQoFe8I2eeTMTSPJgxzQEp5i
 FauNKw8ThgzvQnkuBIvUxA7aRbJ3irKmJoBdx/uPDFB8KlhQexNMDgmXX0eBXC1sZxA5
 rvKVge7tnK8ZfWDkGyd3IhPKAMOIGcoJFbszDMiNMYQzvkDFuvVWjn3COEa0nO3np5Kc
 jvSe+eqoiMewRaNDBagt1IGD9Xz7ECsU3hlqPDOiXCN4XeMJN61P0n5SAvaRxWvIG0cH
 6N2hyRa0T36eNuxYK2dYXDFd9tMQRg0Qd/zt66h09PNQJcbyaw9tTSnWgXfh78yHmU5y
 OhQQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:sender:in-reply-to:references:from
 :date:message-id:subject:to:cc;
 bh=kx8024szjNrS7tCJ4/F+vrEEUPc/ClJvq2uXaP8PDZI=;
 b=a8G5oA2CatO4ijk6/BGhQUha2V3WWhR1WZICi0t+Ju73/2hvyvliXkXy/i9qWAXvg/
 jDo/kRk/zmJGJmzvnJtfTWBtgC16cEd5FMlCQ1ZFXGG/Lf1vqI2weporncl5EJynTtvp
 foB/CBeV/7nnRSKOQKab1Ch0RfMHOkkIEk3nrs8Z+QpG9KJgRdafTAtbN6LWmNEkpRz4
 GZPC8CdqhNqHsLWBWLQ9VFTC5aIXi60AM7zlGIMFJkmFEne5fNxcjgeFwZNnlskVdc28
 H62cQQzg10oCGUJ4OXydJS+DE1OvwLUHLPYjaWM1qaBfRBbUtcxny8FlvuUVd4NSBsXa
 cC9Q==
X-Gm-Message-State: ALyK8tLIRPAgt/GCcCYqOkqriCAINwhJCekiuB0EohRKMnPafAdXVY3bO6eeZJZJKUsGk9kCaOK+d+gg21BmCg==
X-Received: by 10.202.86.82 with SMTP id k79mr3192755oib.105.1465396665299;
 Wed, 08 Jun 2016 07:37:45 -0700 (PDT)
MIME-Version: 1.0
Sender: asomers@gmail.com
Received: by 10.202.4.200 with HTTP; Wed, 8 Jun 2016 07:37:44 -0700 (PDT)
In-Reply-To: <5757F6CF.7070807@norma.perm.ru>
References: <5757F6CF.7070807@norma.perm.ru>
From: Alan Somers <asomers@freebsd.org>
Date: Wed, 8 Jun 2016 08:37:44 -0600
X-Google-Sender-Auth: g00HKOfA7lKA_G3yfG2GSuLrJbQ
Message-ID: <CAOtMX2gLJBk3jdTqMOuhpi9Aw8GyJbHxi=uZ=DGKiOpmi4e0qQ@mail.gmail.com>
Subject: Re: cannot delete on-interface route in FIB
To: "Eugene M. Zheganin" <emz@norma.perm.ru>
Cc: FreeBSD Stable ML <stable@freebsd.org>,
 FreeBSD Net <freebsd-net@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-BeenThere: freebsd-net@freebsd.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Networking and TCP/IP with FreeBSD <freebsd-net.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-net>,
 <mailto:freebsd-net-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-net/>;
List-Post: <mailto:freebsd-net@freebsd.org>
List-Help: <mailto:freebsd-net-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-net>,
 <mailto:freebsd-net-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 08 Jun 2016 14:37:46 -0000

On Wed, Jun 8, 2016 at 4:43 AM, Eugene M. Zheganin <emz@norma.perm.ru> wrote:
> Hi.
>
> (first part of the message is describing why I need this, so impatient
> people can proceed to th 'setfib 2 route delete' part directly).
>
> I have a FreeBSD router connected to the ISP network, which is organized
> according to the rfc3069 (you know, when all of the clients think they
> have /24. but in reality they have /32 and a central router is
> proxy-arping requests). This router is handling two organizations LANs,
> and it has two Internet links connected, I'm using FIB 0 for the first
> organization, and FIB 2 for second. To be specific:
>
> 46.146.220.88/24 - main router IP, gateway is 46.146.220.254, interface
> vlan2
> 46.146.206.94/24 - second router IP, gateway is 46.146.206.254,
> interface vlan4
>
> Both 46.146.220.24 and .206.254 are the same ISP router.
>
> I also have the application server on IP 46.146.220.92, which FIB 0
> thinks is on-interface. Now the tricky part:
>
> When FIB 0 need to communicate with 46.146.220.92, it does so from it's
> address 46.146.220.88, since it thinks it's directly reachable. But when
> requesting MAC from 46.146.220.88 it receives the ISP router MAC, so it
> does so via ISP router. This part is fine.
>
> Now the troubled part:
>
> When FIB 2 needs to communicate with 46.146.220.92, it thinks.... yeah,
> that it's directly reachable from vlan2. When it initiates the session,
> it takes 46.146.220.88 as source interface and everything is fine
> (again). But when the client in the LAN initiates the exchange, the
> packet IP src is translated to the 46.146.206.94 address, and the route
> still points to the vlan2 interface. So, network stack sends the packet
> with IP src of 46.146.206.94 via vlan2, and the ISP router seems to
> dislike such packets. Two workarounds come to mind:
>
> - translating the packets from internal LAN destined to specific address
> of 46.146.220.92 to appropriate address of vlan2
> - deleting the on-interface route from FIB 2.
>
> I have chosen the second (more obvious to me) but then I discovered that
> I cannot do this:
>
>  # setfib 2 route delete 46.146.220.0/24
> route: writing to routing socket: Address already in use
> delete net 46.146.220.0 fib 2: gateway uses the same route
>
> why ?
>
> Finally I added the host route to 46.146.220.92 in FIB 2 pointing to the
> appropriate (46.146.206.254) gateway and got my connectivity, but I
> still don't understand why the deletion of on-interface route is
> impossible. After all, it's the second FIB, and I don;t understand whet
> gateway the error is talking about. I tried this without having the
> default gateway in FIB 2, same result.
>
> Thanks.
> Eugene.

What is the value of "sysctl net.add_addr_allfibs"?  In your case, it
sounds like you want to set it to 0.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.1606081547300.1240>