From owner-freebsd-net@FreeBSD.ORG Thu Apr 8 06:03:01 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A890C16A4CE for ; Thu, 8 Apr 2004 06:03:01 -0700 (PDT) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id D00C643D1D for ; Thu, 8 Apr 2004 06:03:00 -0700 (PDT) (envelope-from glebius@cell.sick.ru) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.9/8.12.8) with ESMTP id i38D2vQE082132 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 8 Apr 2004 17:02:57 +0400 (MSD) (envelope-from glebius@cell.sick.ru) Received: (from glebius@localhost) by cell.sick.ru (8.12.9/8.12.6/Submit) id i38D2t4a082131 for freebsd-net@freebsd.org; Thu, 8 Apr 2004 17:02:55 +0400 (MSD) Date: Thu, 8 Apr 2004 17:02:55 +0400 From: Gleb Smirnoff To: freebsd-net@freebsd.org Message-ID: <20040408130255.GA81999@cell.sick.ru> Mail-Followup-To: Gleb Smirnoff , freebsd-net@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline User-Agent: Mutt/1.5.6i Subject: loosely routed tunnel X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 13:03:01 -0000 I need to set up a "loosely routed" tunnel between two boxes, one running STABLE, and other 5.2.1-RELEASE. Under "loosely routed" I mean that tunnel route won't be allocated once at tunnel creation, but looked up on every emitting packet. So, I have got a WAN link, and two routers standing on opposite sides of this link. Both routers are connected to internet. A tunnel is running on IP addresses provided by upstreams (say x.x.x.x and y.y.y.y). To make tunnel traffic run thru the WAN link these p2p nets x.x.x.x/30 and y.y.y.y/30 are announced inside using OSPF. When WAN link breaks tunnel runs thru internet, since OSPF neighbor disappears. The problem is that when WAN links comes up the tunnel keeps running thru internet. OSPF routes are successfully received and ping between x.x.x.x and y.y.y.y is running thru WAN link, but encapsulated packets keep running thru inet. The desired behavior is to switch back to WAN link, surely. I have tried gif tunnel, gre tunnel with the above results. Now I use a UDP tunnel built with ng_iface + ng_ksocket. On 5.2.1-RELEASE the routing switches back when WAN link is up. On STABLE it does not. I need to shutdown and restart ng_ksocket manually. Any ideas any other way I can obtain subj? -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE