Unix Technical Forum

Solaris newbie: How to change IP address?

This is a discussion on Solaris newbie: How to change IP address? within the comp.unix.solaris forums, part of the Solaris Operating System category; --> I'm completely new to Solaris. I've inherited a Solaris 7 box, and need to change the static IP address. ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > comp.unix.solaris

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-09-2008, 06:58 AM
James Egan
 
Posts: n/a
Default Solaris newbie: How to change IP address?

I'm completely new to Solaris. I've inherited a Solaris 7
box, and need to change the static IP address. The only
reference I can find to the IP address is in the file
/etc/defaultrouter. Do I just change this? What If
I needed to change the submask as well?

-Thanks

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-09-2008, 06:58 AM
KJ
 
Posts: n/a
Default Re: Solaris newbie: How to change IP address?

James Egan wrote:
> I'm completely new to Solaris. I've inherited a Solaris 7
> box, and need to change the static IP address. The only
> reference I can find to the IP address is in the file
> /etc/defaultrouter. Do I just change this? What If
> I needed to change the submask as well?
>
> -Thanks
>

This will get you started:

# man ifconfig
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-09-2008, 06:58 AM
gefi
 
Posts: n/a
Default Re: Solaris newbie: How to change IP address?

Hi James...
don't take me wrong.... change Solaris 7. to the ver 10. ... or... go for
fishing...
George.


"James Egan" <jegan472@comcast.net> wrote in message
newsan.2005.11.23.03.25.16.534133@comcast.net...
> I'm completely new to Solaris. I've inherited a Solaris 7
> box, and need to change the static IP address. The only
> reference I can find to the IP address is in the file
> /etc/defaultrouter. Do I just change this? What If
> I needed to change the submask as well?
>
> -Thanks
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-09-2008, 06:58 AM
Dave
 
Posts: n/a
Default Re: Solaris newbie: How to change IP address?

James Egan wrote:
> I'm completely new to Solaris. I've inherited a Solaris 7
> box, and need to change the static IP address. The only
> reference I can find to the IP address is in the file
> /etc/defaultrouter. Do I just change this? What If
> I needed to change the submask as well?
>
> -Thanks
>


You might want to look at the program sys-unconfig - I've copied the man
page below. It changes quite a lot, but I find it quite quick to change
all the things. I suspect if you have inherrited a system in which you
want to change the IP and subnet, you might want to change some of the
others too.



sparrow /export/home/drkirkby % man sys-unconfig

System Administration Commands sys-unconfig(1M)

NAME
sys-unconfig - undo a system's configuration

SYNOPSIS
/usr/sbin/sys-unconfig

DESCRIPTION
The sys-unconfig command is used to restore a system's con-
figuration to an "as-manufactured" state, ready to be recon-
figured again. The system's configuration consists of host-
name, Network Information Service (NIS) domain name,
timezone, IP address, IP subnet mask, and root password.
This operation is the inverse of those performed by the
sysidnet(1M), sysidns(1M), and sysidsys(1M) programs run at
boot. See sysidtool(1M).

sys-unconfig does the following:

o Saves current /etc/inet/hosts file information in
/etc/inet/hosts.saved.

o If the current /etc/vfstab file contains NFS mount
entries, saves the /etc/vfstab file to
/etc/vfstab.orig.

o Restores the default /etc/inet/hosts file.

o Removes the default hostname in
/etc/hostname.interface files for all interfaces con-
figured when this command is run. To determine which
interfaces are configured, run the command 'ifconfig-
a'. The /etc/hostname.interface files corresponding
to all of the interfaces listed in the resulting out-
put, with the exception of the loopback interface
(lo0), will be removed.

o Removes the default domainname in /etc/defaultdomain.

o Restores the timezone to PST8PDT in /etc/TIMEZONE.

o Disables the Network Information Service (NIS) and
Network Information Service Plus (NIS+) if either NIS
or NIS+ was configured.

o Removes the entries for this host in /etc/net/*/hosts.

o Removes the file /etc/inet/netmasks.

o Removes the file /etc/defaultrouter.

o Removes the password set for root in /etc/shadow.

SunOS 5.9 Last change: 16 Jun 2000 1

System Administration Commands sys-unconfig(1M)

o Removes the file /etc/.rootkey.

o Executes all system configuration applications. These
applications are defined by prior executions of a
sysidconfig -a application. (See sysidconfig(1M)).
When sys-unconfig is run, all system configuration
applications are passed one argument, -u.

o Removes the file /etc/resolv.conf.

o Disables LDAP by removing
/var/ldap/ldap_client_cache,
/var/ldap/ldap_client_file,
/var/ldap/ldap_client_cred, and
/var/ldap/cachemgr.log.

When sys-unconfig is finished, it performs a system shut-
down. sys-unconfig is a potentially dangerous utility and
can only be run by the super user.

FILES
/etc/default/init
process control initialization

/etc/defaultdomain

/etc/defaultrouter

/etc/hostname.interface

/etc/inet/hosts
host name database

/etc/inet/netmasks
network mask database

/etc/net/*/hosts

/etc/nodename

/etc/.rootkey
super-user's secret key

/etc/shadow
shadow password file

/etc/vfstab
virtual file system table

/var/nis/NIS_COLD_START

/var/yp/binding/*/ypservers

SunOS 5.9 Last change: 16 Jun 2000 2

System Administration Commands sys-unconfig(1M)

ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:

__________________________________________________ __________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|___________________ __________|
| Availability | SUNWadmap |
|_____________________________|___________________ __________|

SEE ALSO
init(1M), kdmconfig(1M), sysidconfig(1M), sysidtool(1M),
hosts(4), netmasks(4), shadow(4), attributes(5)

NOTES
sys-unconfig is not available on diskless clients.

SunOS 5.9 Last change: 16 Jun 2000 3


--
Dave K

http://www.southminster-branch-line.org.uk/

Please note my email address changes periodically to avoid spam.
It is always of the form: month-year@domain. Hitting reply will work
for a couple of months only. Later set it manually. The month is
always written in 3 letters (e.g. Jan, not January etc)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-09-2008, 06:58 AM
Logan Shaw
 
Posts: n/a
Default Re: Solaris newbie: How to change IP address?

James Egan wrote:
> I'm completely new to Solaris. I've inherited a Solaris 7
> box, and need to change the static IP address. The only
> reference I can find to the IP address is in the file
> /etc/defaultrouter.


That's the address of the default router, which some people
like to call the "gateway address". You may or may not
need to change that.

The IP address assigned to your computer will be in a file
called /etc/hostname.xxxxn, where "xxxx" is the name of the
interface and "n" is the instance number. For example, if
you are using an "hme" interface and it's the first one,
then its IP address will be in /etc/hostname.hme0.

Actually, it's a little more complex than that: that
hostname.xxxxn file can have the hostname instead of the
IP address if you want to set it up that way. If it does,
then you'll need to change the hostname in /etc/inet/hosts.

Finally, to change the subnet mask, the usual way is to
change /etc/netmasks. That contains a table of netmasks
for subnets, then the system looks at the address you
assign an interface and matches it up with the appropriate
entry in that table to determine the netmask for a given
interface.

- Logan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-09-2008, 06:58 AM
KJ
 
Posts: n/a
Default Re: Solaris newbie: How to change IP address?

gefi wrote:
> Hi James...
> don't take me wrong.... change Solaris 7. to the ver 10. ... or... go for
> fishing...
> George.
>


I concur. If you can, upgrade to Solaris 10 (it's free!).
http://www.sun.com/software/solaris/get.jsp

You'll have an option to setup DHCP or a static IP of your choice during
installation. Though the current installer for the production release
of Solaris 10 is not the friendliest to new Solaris users, you might do
as and I had and run several dry runs to figure out what each option
does. If you burn a DVD version this is easier as you can let the
installer run overnight and awake to S10 - especially a good idea if you
have Solaris 7 era hardware.


>
> "James Egan" <jegan472@comcast.net> wrote in message
> newsan.2005.11.23.03.25.16.534133@comcast.net...
>> I'm completely new to Solaris. I've inherited a Solaris 7
>> box, and need to change the static IP address. The only
>> reference I can find to the IP address is in the file
>> /etc/defaultrouter. Do I just change this? What If
>> I needed to change the submask as well?
>>
>> -Thanks
>>

>
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:27 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com