From owner-freebsd-questions@freebsd.org Wed Sep 30 20:59:08 2015 Return-Path: Delivered-To: freebsd-questions@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 7FA1EA0B0E3 for ; Wed, 30 Sep 2015 20:59:08 +0000 (UTC) (envelope-from che@bein.link) Received: from mail.bein.link (bein.link [37.252.124.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 497791187 for ; Wed, 30 Sep 2015 20:59:07 +0000 (UTC) (envelope-from che@bein.link) Received: from thinkpad.localnet (home.bein.link [172.16.32.6]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bein.link (Postfix) with ESMTPSA id 185331AF179 for ; Wed, 30 Sep 2015 20:58:58 +0000 (UTC) From: Maxim V Filimonov To: "'freebsd-questions@freebsd.org'" Reply-To: che@bein.link Subject: FreeBSD and two different networks Date: Wed, 30 Sep 2015 23:58:57 +0300 Message-ID: <6371943.nqOrXjNnlq@thinkpad> User-Agent: KMail/4.14.3 (FreeBSD/10.2-RELEASE; KDE/4.14.3; amd64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Sep 2015 20:59:08 -0000 Dear All, I have a FreeBSD machine at work. It's mostly connected to the so-called "internal" network that has a static ip: let it be 172.16.1.113/12. The default gateway for that network is 172.16.1.1. Sometimes, I need to connect this machine to another network that uses DHCP. Its network mask differs: it's 192.168.1.0/24. The second network uses DHCP. The question is: can I set both of the default gateways (skip DHCP: I can configure the interface for the "external" network manually) in some way? Can I set up some kind of a daemon that checks whether one of my gateways is accessible and forwards all of the traffic through that gateway? Thank you very much in advance. -- wbr, Maxim Filimonov