From owner-freebsd-net@freebsd.org Mon Jul 30 15:05:46 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57D6D105900C for ; Mon, 30 Jul 2018 15:05:46 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (unknown [IPv6:2a01:4f8:d12:604::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D6ACA75983 for ; Mon, 30 Jul 2018 15:05:45 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w6UF5c3W003726 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 Jul 2018 17:05:38 +0200 (CEST) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: tobias.urdin@binero.se Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w6UF5YXj081841 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 30 Jul 2018 22:05:34 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: ospf redistribute into openbgpd overwrites directly connected routes To: Tobias Urdin , freebsd-net@freebsd.org References: <9507d752-6815-92fe-924b-55459710bb9d@binero.se> From: Eugene Grosbein Message-ID: <5B5F2938.5090103@grosbein.net> Date: Mon, 30 Jul 2018 22:05:28 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <9507d752-6815-92fe-924b-55459710bb9d@binero.se> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -0.0 SPF_PASS SPF: sender matches SPF record * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2018 15:05:46 -0000 30.07.2018 21:06, Tobias Urdin wrote: > I have a setup where we connect a OSPF area with a edge router, this edge router then has a BGP peer to my router > where it redistributes all OSPF routes into the BGP feed to my router. > > My router is running FreeBSD 11.1 with openbgpd > > root@myrouter:~ # uname -a > FreeBSD dr20-1-sto1 11.1-RELEASE FreeBSD 11.1-RELEASE #0 r321309: Fri Jul 21 02:08:28 UTC 2017 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 > > root@myrouter:~ # pkg info openbgpd > openbgpd-5.2.20121209_2 > Name : openbgpd > Version : 5.2.20121209_2 > > The thing here is that my router has layer 2 access directly to one of the networks that the edge router BGP announces to my router (172.20.104.0/22). > When my FreeBSD machine boots it will install a directly connected route for 172.20.104.0/22 in my routing table but as soon as openbgpd starts it will > install a 172.20.104.0/22 route with the nexthop of the edge router instead. > > How can I prevent openbgpd from overwriting the directly connected route? > Directly connected networks should never be overwritten by a routing protocol but I suspect this is because of the redistribute. > > I've tried messing with metrics, but maybe I to create a rtable and mess around with that? This problem was fixed in 11.2-RELEASE, just upgrade and you will be fine.