Wednesday, December 20, 2006

how to change IP address on a Linux server :: a project?

I was asked this question once, "how do you change IP address on a Linux server?"  At its face value, it's a simple technical question on systems administration or network administration using a Linux server. So, my instant response is
  • edit /etc/sysconfig/ifcfg-eth0 (or eth?).   or system-config-network TUI or GUI.
  • adjust routes and personal fw on the host as needed
  • ifconfig eth1 down && ifconfig eth1 up (or /etc/init.d/network restart)
  • verify: ifconfig eth1 (to see if the new IP has taken effect)
  • check & verify from remote host it is actually accessible (TCP/IP level, plus other services the server may provide)
  • update DNS if applicable
To dwell on the question a little more,  and depends on the context of the conversation, the lines of questions, and who asks, I would expand a bit from the perspective of process management, configuration management, and knowledge management. In other words, I'd prefer to drive such a "simple" change as a small project. Thus, here comes the addition to my initial answer:

So, the actual change is simple. Depends on the function of the server and its inter-relationship with other systems, you probably need to manage such a change as a project. As they say, a little bit more of thinking and planning goes a long way.
  • gather requirement from functional groups and management
  • set a date to cut-over and obtain sign-off from stake-holders
  • plan for it (procedures/fall-back plan/check-list/notification/etc.)
  • communicate the planned change and its potential impact to stake-holders and end users
  • dry run if necessary
  • prior to cut-over: for days leading up to the cut-over, shorten TTL for A record for that IP, if it has DNS record and is accessed by DNS name instead of IP alone.
  • prior to cut-over: check to be sure ACL or conduits or fw rules get updated on router/firewalls and systems the server gain access to or from
  • during cut-over: keep team and stake-holders abreast of up-to-date status
  • post cut-over: verify by going through your check-list to determine success
  • post cut-over: enter change log for this event & notify users the cut-over is done
  • post cut-over: alias or real NIC to keep servicing the IP for limited period. (could also just alias the new IP onto the NIC serving the current IP, the cut-over becomes switching who's alias and who's real)
  • post cut-over: added DNAT or reverse proxy rules to catch traffic to the old IP and redirect/log/alert as necessary
  • post cut-over: document this in the knowledge-management system: a scrapbook, a WIKI, a technical writer.

3 comments:

mwcotton said...

last step in project, get fired or receive a pittance of a raise for making a damn big deal about changing a ip address jeez!

mwcotton said...

last step in project, get fired or receive a pittance of a raise for making a damn big deal about changing a ip address jeez!

Girendra said...

To know how to change ip address in windows vista, windows xp, Internet explorer, safari and firefox visit changeipaddress.org