Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Chanage IP address of a server

Posted on 2004-09-02
11
Medium Priority
?
1,926 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
9 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:cplau
ID: 11961793
Hi All,

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

0
 
LVL 21

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 500 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 21

Assisted Solution

by:tfewster
tfewster earned 500 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: 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.

Question has a verified solution.

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

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.
Suggested Courses
Course of the Month6 days, 22 hours left to enroll

783 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