From owner-freebsd-questions@FreeBSD.ORG Sat Nov 11 04:23:27 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 6183816A403 for ; Sat, 11 Nov 2006 04:23:27 +0000 (UTC) (envelope-from lane@joeandlane.com) Received: from elasmtp-dupuy.atl.sa.earthlink.net (elasmtp-dupuy.atl.sa.earthlink.net [209.86.89.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id E16CF43D55 for ; Sat, 11 Nov 2006 04:23:26 +0000 (GMT) (envelope-from lane@joeandlane.com) Received: from [66.47.111.183] (helo=joeandlane.com) by elasmtp-dupuy.atl.sa.earthlink.net with asmtp (Exim 4.34) id 1GikOq-0004qR-5e for freebsd-questions@freebsd.org; Fri, 10 Nov 2006 23:23:24 -0500 Received: from joeandlane.com (localhost.localnet.local [127.0.0.1]) by joeandlane.com (8.13.8/8.13.1) with ESMTP id kAB4QFjf011521 for ; Fri, 10 Nov 2006 22:26:15 -0600 (CST) (envelope-from lane@joeandlane.com) Received: from localhost (localhost [[UNIX: localhost]]) by joeandlane.com (8.13.8/8.13.1/Submit) id kAB4QFZP011520 for freebsd-questions@freebsd.org; Fri, 10 Nov 2006 22:26:15 -0600 (CST) (envelope-from lane@joeandlane.com) From: Lane To: freebsd-questions@freebsd.org Date: Fri, 10 Nov 2006 22:26:15 -0600 User-Agent: KMail/1.9.3 References: <720B687A-66B6-497A-9F16-9D01B7B1441A@lafn.org> <200611102134.14061.freebsd@dfwlp.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611102226.15497.lane@joeandlane.com> X-CD-SOLUTIONS-MailScanner-Information: Please contact the ISP for more information X-CD-SOLUTIONS-MailScanner: Found to be clean X-CD-SOLUTIONS-MailScanner-From: lane@joeandlane.com X-ELNK-Trace: e56a4b6ca9bdfda11aa676d7e74259b7b3291a7d08dfec79497cda3f3928bb1a7545b182ef396214350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 66.47.111.183 Subject: Re: Network Setup Question 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: Sat, 11 Nov 2006 04:23:27 -0000 On Friday 10 November 2006 21:56, Doug Hardie wrote: > On Nov 10, 2006, at 19:34, Jonathan Horne wrote: > > On Friday 10 November 2006 19:17, Doug Hardie wrote: > >> I have a bit of an unusual network setup situation. I have a machine > >> that is only used to store backups. It gets moved around to > >> different locations occasionally so it has to be able to live on a > >> 192.168.1.x or a 10.0.1.x network without reconfiguration. I also > >> need a fixed last address byte so I can connect to it remotely. I > >> initially set it up with DHCP and then used an alias for the .250 > >> address on both networks. That worked, but caused problems for the > >> local network in one location. The particular user couldn't > >> understand why sometimes his computer got different IP addresses. So > >> I tried to establish the 192.168.1.250 as the primary address and > >> added an alias of 10.0.1.250. That works in both environments > >> except that there is no default route. Is there a way to negotiate > >> just a default route via DHCP and not an IP address? or is there a > >> way to set the default route based on which IP address is in use? > >> Thanks. > >> _______________________________________________ > > > > dhclient.conf can get pretty granular as to exactly what you want > > from your > > DHCP server. myself, i use it to get everything, but to ignore the > > domain > > search mine tries to provide. > > > > man dhclient.conf and you will see tons of options (and some really > > good > > examples too). > > There are lots of options all right, but I couldn't find anything > that would cause it not to negotiate the IP address. All of the > other options are configurable. > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" Doug, I'm no expert, but it seems to me that your requirements are a little too optimistic. If I understand correctly, you want this machine to be able to connect to multiple heterogenous networks, and always get the same last byte for its ip. The only way to do that reliably, in my mind, is to have each dhcp server on each network assign a static address based upon the MAC address of your computer. If you do not have access to the DHCP server configuration on a particular network then you must manually configure the nic. Assuming that you know the universe of networks that you will connect to ... say 3 or 300 possible networks ... then you could write a script in /usr/local/etc/rc.d to test various network configs ... but you might be better off just manually configuring the nic and moving on, as you cannot guarantee that the terminal byte of the ip will be available on any given network. IP just doesn't work that way. I'd be interested in any solution you may scare up, as I am faced with a similar situation. My solution is to just use static assignment, with an identifiable NETBIOS name in Samba. Good Luck lane