Solved

Chanage IP address of a server

Posted on 2004-09-02
11
1,892 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
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…
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.

867 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

22 Experts available now in Live!

Get 1:1 Help Now