From owner-freebsd-questions Thu Mar 25 7:25:17 1999 Delivered-To: freebsd-questions@freebsd.org Received: from plains.NoDak.edu (plains.NoDak.edu [134.129.111.64]) by hub.freebsd.org (Postfix) with ESMTP id E9C5614D4E for ; Thu, 25 Mar 1999 07:25:15 -0800 (PST) (envelope-from tinguely@plains.NoDak.edu) Received: (from tinguely@localhost) by plains.NoDak.edu (8.8.8/8.8.8) id JAA10186; Thu, 25 Mar 1999 09:24:56 -0600 (CST) Date: Thu, 25 Mar 1999 09:24:56 -0600 (CST) From: Mark Tinguely Message-Id: <199903251524.JAA10186@plains.NoDak.edu> To: questions@FreeBSD.ORG, thefett@negativemass.com Subject: Re: Changing the IP address on a FreeBSD machine? Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG if you are running a desktop machine, it is easier to change the address in the ifconfig_XX# line of the file /etc/rc.conf (2.2.X) or /etc/defaults/rc.conf (3.X) and reboot, but that may not be an option for those running servers. so, if you are changing the IP address of a RUNNING machine, use: # ifconfig XX# down delete # where XX# is the interface name IMPORTANT: be sure to remove ALL routes including dynamically learned routes, because if you try to contact these machines while the old routes still exist, the transmission will use the OLD IP address. IMHO, this is a bug. route flush does not always remove these routes, so: # route delete default # netstat -rn | grep '^###' | awk '{print "route delete " $1}' | /bin/sh where ### are your IP network numbers how you are ready to add the new IP address: # ifconfig XX# inet ###.###.###.### netmask 255.NNN.NNN.NNN # route add default ###.###.###.### --mark. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message