From owner-freebsd-questions Wed Oct 18 0:20: 9 2000 Delivered-To: freebsd-questions@freebsd.org Received: from oahu.WURLDLINK.NET (oahu.WURLDLINK.NET [216.235.52.1]) by hub.freebsd.org (Postfix) with ESMTP id 6B6C837B4C5 for ; Wed, 18 Oct 2000 00:20:05 -0700 (PDT) Received: from localhost (vince@localhost) by oahu.WURLDLINK.NET (8.9.3/8.9.3) with ESMTP id VAA63227; Tue, 17 Oct 2000 21:19:41 -1000 (HST) (envelope-from vince@oahu.WURLDLINK.NET) Date: Tue, 17 Oct 2000 21:19:41 -1000 (HST) From: Vincent Poy To: Erin Cc: questions@FreeBSD.ORG Subject: Re: Adding an IP alias without a reboot. In-Reply-To: <004d01c03866$e3edb540$e815820a@sdccd.cc.ca.us> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 17 Oct 2000, Erin wrote: It's pretty easy, let's assume you have a primary ip of 123.123.123.2 and you wanted to add the alias 124.123.123.2, All you have to do is: ifconfig fxp0 inet 124.123.123.2 netmask 255.255.255.0 alias Replace the fxp0 with the ethernet card type you're using... For the DNS, all you have to do is change the /etc/resolv.conf file or basically edit it. As for the default router. Do this in one line. route delete default ; route add default newgatewayip And you can even either delete the primary IP or flip it around as follows later. Make sure everything is on one line separated by the ;'s: ifconfig fxp0 inet 123.123.123.2 delete ; ifconfig fxp0 inet 124.123.123.2 delete ; ifconfig fxp0 inet 124.123.123.2 netmask 255.255.255.0 The above will delete the original primary and replace it with the alias. Then there is the flipping around method as well. ifconfig fxp0 inet 123.123.123.2 delete ; ifconfig fxp0 inet 124.123.123.2 delete ; ifconfig fxp0 inet 124.123.123.2 netmask 255.255.255.0 ; ifconfig fxp0 inet 123.123.123.2 netmask 255.255.255.0 alias Cheers, Vince - vince@WURLDLINK.NET - Vice President ________ __ ____ Unix Networking Operations - FreeBSD-Real Unix for Free / / / / | / |[__ ] WurldLink Corporation / / / / | / | __] ] San Francisco - Honolulu - Hong Kong / / / / / |/ / | __] ] HongKong Stars/Gravis UltraSound Mailing Lists Admin /_/_/_/_/|___/|_|[____] Almighty1@IRC - oahu.DAL.NET Hawaii's DALnet IRC Network Server Admin > I have a production machine whos IP is going to change. I have to add an > aliased IP to it for a while from a completely different subnet then by the > middle of next month have everything changed over (i.e. defaultrouter, dns > servers, etc.). I'd like to do this with out rebooting the machine if > possable. > > The machine in question is a 3.3-RELEASE and is colocated with very limited > access. > > > Thanks, > > > Erin > > > mailto:kahn@deadbbs.com > http://www.deadbbs.com > http://www.fortenberry.net > > > "Can i dial 1-255-255-255255 and make every phone in the world ring?" > > -- Tanuki > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message