Solved

Chanage IP address of a server

Posted on 2004-09-02
11
1,897 Views
Last Modified: 2013-12-06
Hi,

Please lists the necessary steps in order to change the IP address of a server. e.g. the files need to be edited, modify routing information?

Thanks!

0
Comment
Question by:cplau
11 Comments
 
LVL 45

Expert Comment

by:sunnycoder
ID: 11961500
Hi cplau,

which unix ?

Sunnycoder
0
 
LVL 38

Expert Comment

by:yuzh
ID: 11961526
For Solaris:

you can use  /usr/sbin/sys-unconfig , command to undo your systems configuration, and then reboot your system.

    When system boot up, just following the screen to fill in all the new information about you system configuration.

    or you manually edit the following files: (use text editor, eg vi)
     /etc/nodename    #if you need to change the name of the machine
    /etc/hostname.interface    (eg hostname.hme0 )
    /etc/hosts                        # Update to reflect new IP
    /etc/nsswitch.conf           # Update if your name resolution
    /etc/resolv.conf       #Update if your name servers/domain changed (DNS only)
    /etc/defaultdomain   # set you default domain
   /etc/defaultrouter      # Set the default router's IP

   /etc/inet/networks             # Set your network name
   /etc/inet/netmasks             # Set your network number
   /etc/net/ticots/hosts           # For the streams-level loopback
   /etc/net/ticlts/hosts            # For the streams-level loopback
   /etc/net/ticotsord/hosts      # For the streams-level loopback

   If you have no experience about theses files, please make a backup before making the change. after you edit all the file, reboot your system.

For HP-UX:
   /sbin/set_parms ip_address

0
 
LVL 38

Expert Comment

by:yuzh
ID: 11961555
For SCO:

use scoadmin

other Unix favour:

Assume that your current IP is 192.168.1.1
find /etc -type f -print |xargs grep -l "192\.168\.1\.1" > /tmp/list

edit the file in /tmp/list
eg
vi `cat /tmp/list`

save the change, and reboot.

0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

Author Comment

by:cplau
ID: 11961793
Hi All,

I am using Digital Unix V4.0. Thanks for your advise.

0
 
LVL 20

Expert Comment

by:tfewster
ID: 11962402
Run `/usr/sbin/sysman net_wizard` - It will walk you through all the steps to set IP address, routes, netmask etc.

For Tru64 V4.0, you may have to use `netsetup` instead - Check the man page


0
 
LVL 38

Accepted Solution

by:
yuzh earned 125 total points
ID: 11969723
The "find" + "vi" in comment (http:#11961555) still can do the job.

To make it simply, just edit the following files and reboot:

/etc/rc.config    # specifies the hostname, IP number, and netmask.
/etc/routes        #specifies the default route:
/etc/resolv.conf  #specifies the DNS servers.
0
 
LVL 20

Assisted Solution

by:tfewster
tfewster earned 125 total points
ID: 11971435
On a Tru64 system, you may find /etc/rc.config is a link to  ../cluster/members/{memb}/etc/rc.config , so the find command would need to be:

find /etc -follow -print |xargs grep -l "192\.168\.1\.1" > /tmp/list


However, yuzh has listed the important files anyway ;-)
0
 
LVL 62

Expert Comment

by:gheist
ID: 11975516
Do this at your hosts console, since changing IP address may leave running net servicesin inconsistent state.
DNS name chenges may be required in external nameservers too
0
 

Expert Comment

by:mehta_rohit
ID: 12441342
hi
Do following steps to chage ur server ip
type following and use ur ip and subnet mask

"ifconfig lan0 172.27.1.1 netmask 255.255.255.192"


0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question