From owner-freebsd-questions@FreeBSD.ORG Tue Nov 14 08:51:43 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 41C0716A416 for ; Tue, 14 Nov 2006 08:51:43 +0000 (UTC) (envelope-from nvass@teledomenet.gr) Received: from matrix.teledomenet.gr (dns1.teledomenet.gr [213.142.128.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B18B43D58 for ; Tue, 14 Nov 2006 08:51:41 +0000 (GMT) (envelope-from nvass@teledomenet.gr) Received: from iris ([192.168.1.71]) by matrix.teledomenet.gr (8.12.10/8.12.10) with ESMTP id kAE8peEY015357; Tue, 14 Nov 2006 10:51:40 +0200 From: Nikos Vassiliadis To: freebsd-questions@freebsd.org Date: Tue, 14 Nov 2006 10:50:48 +0200 User-Agent: KMail/1.9.1 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200611141050.48414.nvass@teledomenet.gr> Cc: jekillen Subject: Re: [OT]two networks, one nic 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: Tue, 14 Nov 2006 08:51:43 -0000 On Tuesday 14 November 2006 07:52, jekillen wrote: > Hello FreeBSD users, > I have been operating under the assumption that > the same network interface card cannot handle two > different networks. But then I seem to have seen > an example in one of the OReill„ books on networking > that had one interface with one assigned inet address > and also aliased with another address that could only > be on another network. If I understood that right, it > seems to imply that I can use one Network interface > card for at least two different networks, like so; > 192.168.1. and > alias 172.0.0. > or; > 192.168.1. > alias 192.168.2. or you can keep your secondary addresses to a loopback interface: ifconfig create lo1 ifconfig lo1 200.200.200.1/24 ifconfig lo1 alias 200.200.201.1/24 ifconfig lo1 alias 200.200.202.1/24 ifconfig lo1 alias 200.200.203.1/24 ifconfig lo1 alias 200.200.204.1/24 etc > If this is possible is it accomplished via a special routing? No, nothing special. Your box has: network1.address1 network2.address1 your upstream router has: network1.address2 network2.address2 If your router is willing to forward packets to/from your addresses, everything will be correct(read bellow though). > My concern is that I have a laptop with one network > interface, built in, but would like to access it both at > a public static address and a private network address. > Is this possible? > Your private network address will not be routed by your ISP. You have to use "real", routable addresses. These are routable across the internet, the private addresses aren't. They are for private use and should be filtered. Please give more information, if I didn't cover your questions. HTH, Nikos