Solved

Chanage IP address of a server

Posted on 2004-09-02
11
1,888 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
 

Author Comment

by:cplau
ID: 11961793
Hi All,

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

0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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 61

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
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…

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now