From owner-freebsd-questions@FreeBSD.ORG Sun Dec 4 22:55:46 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E52D106564A for ; Sun, 4 Dec 2011 22:55:46 +0000 (UTC) (envelope-from bonomi@mail.r-bonomi.com) Received: from mail.r-bonomi.com (mx-out.r-bonomi.com [204.87.227.120]) by mx1.freebsd.org (Postfix) with ESMTP id 6C9108FC08 for ; Sun, 4 Dec 2011 22:55:46 +0000 (UTC) Received: (from bonomi@localhost) by mail.r-bonomi.com (8.14.4/rdb1) id pB4MvU38032407; Sun, 4 Dec 2011 16:57:30 -0600 (CST) Date: Sun, 4 Dec 2011 16:57:30 -0600 (CST) From: Robert Bonomi Message-Id: <201112042257.pB4MvU38032407@mail.r-bonomi.com> To: apseudoutopia@gmail.com, freebsd-questions@freebsd.org In-Reply-To: Cc: Subject: Re: FreeBSD Gateway, Crossover X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Dec 2011 22:55:46 -0000 > From: APseudoUtopia > > Hello, > > I'm trying to setup a small home network, It consists of my FreeBSD > 9.0-RC2 box connected to my modem (just a modem, not modem/router) and > two other systems connected directly via ethernet to the freebsd box. > I'm able to connect to the internet with the FreeBSD box. I can get an > IP via DHCP from my ISP. However, I can't seem to figure out how to > setup the gateway routes and the IP addresses for the other system. > > I'd like to have the internal network be on 192.168.1.0/24. I have 2x > 2-port NICs in the freebsd box. > > em0 - Internet - 1.2.3.4 > em1 - System1 - 192.168.1.1 > em2 - System2 - 192.168.1.2 > > I'm kindof lost here. I've played with it a bit, trying to set > 192.168.1.0/24 on em1 and em2, then setting the specific IP address on > system1 and system2 respectively. I've also tried manually adding > routes from 192.168.1.0/24 to 1.2.3.4 (my external IP) to no avail. > The system1/2 boxes cannot ping the freebsd box, nor vise-versa. That > implies it's not a routing problem, but a problem with the systems > getting a proper IP address. > > Anyone have any tips? Other than "don't do it that way", you mean? Having two different interfaces with the same 'network' configuration, Where either address -cannot- reach *every* host on that 'network' Recommendation: IP addresses: Assign em1 192.168.1.1/24 Assign em2 129.168.2.1/24 Assign System1 192.168.1.2/24 Assign System2 192.168.2.2/24 Routing: System1; default route 192.168.1.1 System2; default route 192.168.2.1 Server: default route 1.2.3.4 (should have auto routes for 192.68.1.0/24 and 192.68.2.0/24) If you _really_ want everything on the same internal network, the easiest way is to put in an ethernet hub/switch, and connect everything to that hub/switch -- only 1 interface per device.