Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Mar 1999 09:24:56 -0600 (CST)
From:      Mark Tinguely <tinguely@plains.NoDak.edu>
To:        questions@FreeBSD.ORG, thefett@negativemass.com
Subject:   Re: Changing the IP address on a FreeBSD machine?
Message-ID:  <199903251524.JAA10186@plains.NoDak.edu>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903251524.JAA10186>