The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
script to change passwords for the same user on multiple servers stolz Shell Programming and Scripting 6 12-18-2007 09:08 AM
User add on multiple servers sandeep_pan Shell Programming and Scripting 6 06-10-2005 02:04 PM
Apache Config> One IP, Multiple Servers l008com UNIX for Advanced & Expert Users 7 09-15-2003 06:54 AM
moving files across multiple servers kymberm UNIX for Advanced & Expert Users 2 10-23-2002 09:04 AM
ftp to multiple servers kristy Shell Programming and Scripting 2 12-03-2001 11:49 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-17-2008
Registered User
 

Join Date: Feb 2008
Posts: 40
rsh to change multiple ip in multiple servers?

good day. i jsut wanted to know what is the best script or the best way changing a lot of Ip's in all servers. Do you have any idea? im using awk to change IP,what if, you have lots of servers. You need to change it one by one? It will take time to change it manually.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 02-17-2008
Smiling Dragon's Avatar
Disorganised User
 
Join Date: Nov 2007
Location: New Zealand
Posts: 637
Depends on the OS of the servers to be changed but generally speaking, you can write a script to log onto each server and update the files (have a big table mapping each IP to the new one and just do a search and replace of all of them on each server), then restart the network stack (if required).

Unless you are using DHCP, in which case it would be pretty easy, just do a big search and replace on your dhcptab file and refresh each server.
Reply With Quote
  #3 (permalink)  
Old 02-17-2008
Registered User
 

Join Date: Dec 2007
Location: Philippines, Cebu City
Posts: 67
in linux,try to edit ifcfg-eth0 for linux servers, and /etc/rc.config.d/netconf in HP-UX, well i dont know in AIX. Maybe someone had an idea.

For automation, you can use awk and sed, that will change your IP or your subnet etc.. I have some machines too, that i made script to changed the IP.

all servers 10.131.3.xx i changed it to 10.121.3.xx but that servers were linux and hpux. i do manually running the scripts, but havent tried ssh
maybe someone knows how to change ip not using smitty
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 04:14 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0