Solved

Chanage IP address of a server

Posted on 2004-09-02
11
1,902 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

830 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