From owner-freebsd-net@freebsd.org Sat Oct 29 20:21:34 2016 Return-Path: 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 1E5B9C25872 for ; Sat, 29 Oct 2016 20:21:34 +0000 (UTC) (envelope-from mi+thun@aldan.algebra.com) Received: from vms173013pub.verizon.net (vms173013pub.verizon.net [206.46.173.13]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04A84D47 for ; Sat, 29 Oct 2016 20:21:33 +0000 (UTC) (envelope-from mi+thun@aldan.algebra.com) Received: from vz-proxy-m004.mx.aol.com ([64.236.83.8]) by vms173013.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014)) with ESMTPA id <0OFT00MDRSJMS9D0@vms173013.mailsrvcs.net> for FreeBSD-net@FreeBSD.org; Sat, 29 Oct 2016 15:21:27 -0500 (CDT) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.2 cv=e4J2ceh/ c=1 sm=1 tr=0 a=Bcm0RCOkHTZ4We9DUxtllQ==:117 a=CH0kA5CcgfcA:10 a=r77TgQKjGQsHNAKrUKIA:9 a=tXNp_sQbAAAA:8 a=1tJKHpuAfZOtZZjSFmIA:9 a=QEXdDO2ut3YA:10 a=M3HAx0D1WwAPgf-oe0cA:9 a=1QXfd-jvFRXT7unS:21 a=_W_S_7VecoQA:10 Received: by 108.5.58.106 with SMTP id 71236061; Sat, 29 Oct 2016 20:21:27 GMT Subject: How to forward traffic out via a non-default interface? To: FreeBSD-net@FreeBSD.org From: "Mikhail T." Message-id: <2685a303-1450-d060-0206-c84004f73e6d@aldan.algebra.com> Date: Sat, 29 Oct 2016 16:21:22 -0400 MIME-version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Oct 2016 20:21:34 -0000 Hello! I asked this question online already: http://superuser.com/q/1138996/247471?sem=2 if you have an answer, please, share it wherever you feel appropriate... have a fairly vanilla home LAN with an Internet provider-supplied router providing DHCP. The router uses many of its default settings unmodified. The home network is 192.168.1.0/24 and the router itself is known internally as 192.168.1.1. I need to configure several similar routers to change their default settings. One of my computers (running FreeBSD) has a spare Ethernet interface (|bce0|) and I connected one of these additional routers to it. As expected, this router /also/ uses 192.168.1.1. The machine now has two "configured" interfaces: * |bce1| -- 192.168.1.8, which is connected to the "real" router, connecting it to the Internet and the rest of the home LAN * |bce0| -- 192.168.1.5, which is connected to the second router, which I need to change to use different network settings How can I reach this second router without breaking the machine's connectivity with the LAN and the Internet? Simply trying to reach 192.168.1.1 goes through |bce1| and reaches my normal router... Can |ipfw(8)| somehow force certain packets to go out using |bce0| instead of |bce1|? Preferably, without the use of "fib", because adding one requires a reboot... Thanks! Yours, -mi