[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: .htaccess



On Wed Oct 30 2002 at 09:47, Vicki Edwards wrote:

> can you change the ip address of a box without having to reboot?

Yes, trivial.  Hey, this isn't microslop land :-)

Make your changes to /etc/sysconfig/networks-scripts/ifcfg-* and
then do "ifdown ethX ; ifup ethX" or "service network restart" (or
similar).

(BTW, it is a good idea to "ifdown ethX" before changing
ifcfg-ethX).

Of course, you can do it manually (command-line) too, eg:

	/sbin/ip address add 192.168.22.11/24 dev eth0
	/sbin/ip address add 192.168.0.1/24 dev eth0
	/sbin/ip address del 192.168.18.1/24 dev eth0

(or whatever).

  It is usually best to add the new address before removing the old
  one.  (Unlike "/sbin/ip route replace ...", their is not "replace"
  option for "/sbin/ip address").

You _might_ need to restart some of your daemon processes... if they
have bound to the old IP address, they might hiccup with the change
(although this is rare - sendmail might be an example if it is
configured to bind to specific IP addresses).

To see the start of your local processes listening to network
sockets:

	netstat -plut	(or -plutn)

To see the current state of your IP addresses:

	/sbin/ip a
or (nicer):
	/sbin/ip -o a | grep inet

To see the current state of your routing table:

	/sbin/ip r
or:
	/sbin/ip -o r
or:
	/sbin/ip route show table all

Cheers
Tony





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]