Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

URGENT: Change IP address on SunOS 5.6

759 views
Skip to first unread message

Bart Vels

unread,
Dec 19, 2002, 8:55:39 AM12/19/02
to
I want to change the IP address on my sparc20 machine with SunOS 5.6
on it (can't be upgraded because of installed software).
I read about doing this with sys-unconfig but this scares me a bit
because it seems that the system is completely reconfigured, I only
want to change the ip address.
Can someone help me by telling which files to edit to do this?

Regards,
Bart Vels

PS If possible also mail your answer to ict.b...@grafidata.nl

Anthony Mandic

unread,
Dec 19, 2002, 9:06:20 AM12/19/02
to
Bart Vels wrote:
>
> I want to change the IP address on my sparc20 machine with SunOS 5.6
> on it (can't be upgraded because of installed software).
> I read about doing this with sys-unconfig but this scares me a bit
> because it seems that the system is completely reconfigured, I only
> want to change the ip address.
> Can someone help me by telling which files to edit to do this?

Just edit the appropriate line in /etc/hosts.

-am © 2002

A. Nony, Mouse

unread,
Dec 29, 2002, 4:22:07 AM12/29/02
to
Anthony Mandic <am_i...@start.com.au> wrote in news:3E01D25C.CEA51962
@start.com.au:

Actually, hat is not quite correct.

/etc/hosts simply tells your computer what ip numbers match what
host/domain names (like telling your compputer to look at 64.124.140.181
to find www.sun.com).

To change the ip number of a machine (or, more exactly, an interface on a
machine), you have to remove the old interface-setup and put in a new
one. This will need to be done from the system administrator's account
(typically 'root')

First, clear out the old interface by issuing the command:

/sbin/ifconfig <interface> unplumb

Then get the interface back:

/sbin/ifconfig <interface> plumb

Then assign the new information:

/sbin/ifconfig <interface> <new address> netmask <subnetwork mask>
broadcast <broadcast address>
/sbin/ifconfig <interface> up

<interface> is the name of the network interface. In a SPARCStation, this
is typically le0 or hme0

<new address> is the new ip number which you have been asssigned.

<subnetwork mask> is a dotted-decimal value that tells your computer how
many other machines are in its network group. The most common subnetwork
mask is 255.255.255.0

<broadcast address> is the ip number that is designated as being for all
of the machines in the subnetwork (typically the last ip number in the
block)

for example, on my SPARCStation, the command was

su -c '/sbin/ifconfig le0 192.168.2.200 netmask 255.255.255.0 broadcast
192.168.2.255'
su -c '/sbin/ifconfig le0 up'


prefacing the commands with the su -c ' ' allows me to run the commands
as the superuser/sysadmin, and requires knowing hte sysadmin password. It
is better to do this than to log in as the sysadmin and do stuff that
way. It is easy to make mistakes with a full sysadmin shell.

Anyway, after doing that, you will need to add a default router

route flush
route add net 0.0.0.0 <default router>

then make it permanent by saying

printf "<default router>" > /etc/defaultrouter

which in my case is

su -c ' route flush'
su -c ' route add net 0.0.0.0 192.168.2.1'
su -c ' printf "192.168.2.1" > /etc/defaultrouter'

After that, try using the network and see if it works.

Best of luck

--
A. Nony, Mouse

Address purposely munged
to foil address-harvesting robots.

To contact me: maus <AT> cyberspace <DECIMAL> org

-- Life is short. Forgive quickly. Kiss slowly. ~ Robert Doisneau

Anthony Mandic

unread,
Dec 29, 2002, 5:58:11 AM12/29/02
to
"A. Nony, Mouse" wrote:

> Actually, hat is not quite correct.

Yes, I was expecting Tugger to come along after me and tell him to
reboot.

> It is easy to make mistakes with a full sysadmin shell.

It depends on how inept you are and whether you've changed the
root shell.

-am © 2002

A. Nony, Mouse

unread,
Dec 29, 2002, 2:17:03 PM12/29/02
to
Anthony Mandic <am_i...@start.com.au> wrote in
news:3E0ED543...@start.com.au:

Sometimes it is not ineptitude (though in my case, it could be). In an
environment where one is sysadmin for an important computer (such as a
server or bbs or other machine that multiple people/beings count on),
there is pressure to do things NOW, and the consequences can be ugly.
Plus there is distraction, read the wrong man page (or read the man page
wrong), bad luck, or simply a dangerous, harmful or trojanized (is that a
word?) executable or whatnot in a place where it can be hit while doing
things that should be done with non-sysadmin priveleges.

Lon Stowell

unread,
Dec 29, 2002, 3:09:07 PM12/29/02
to

SunOS 5.6 uses /etc/nodename as the hostname and there are a
few other trivia files that contain the hostname. Although
sys-unconfig may be overkill, RTFMP for the list of files that
should be changed is a good idea.


A. Nony, Mouse

unread,
Dec 29, 2002, 4:54:26 PM12/29/02
to
Lon Stowell <lon.s...@attbi.com> wrote in
news:3E0F565C...@attbi.com:


>
> SunOS 5.6 uses /etc/nodename as the hostname and there are a
> few other trivia files that contain the hostname. Although
> sys-unconfig may be overkill, RTFMP for the list of files that
> should be changed is a good idea.
>
>
>

Thank you for pointing this out. My home machine runs Solaris 2.7 (aka
SunOS 5.7) , and at school we used Solaris 8 (aka SunOS 2.8). As soon as
I get a machine with Solaris 2.6 on it, I will need to experiment and
learn this all.

I think all of what I gave was standard SysV implementation of the BSD
TCP-networking package. If I'm missing anything else or wrong anywhere,
please let me know.

Rich Teer

unread,
Dec 29, 2002, 5:10:38 PM12/29/02
to
On 29 Dec 2002, A. Nony, Mouse wrote:

> Thank you for pointing this out. My home machine runs Solaris 2.7 (aka
> SunOS 5.7) , and at school we used Solaris 8 (aka SunOS 2.8). As soon as

Actually, your home machine is running Solaris 7 (there is no
Solaris 2.7; Solaris 7 was the first to jump from 2.x to a whole
number).

--
Rich Teer . * * . * .* .
. * . .*
President, * . . /\ ( . . *
Rite Online Inc. . . / .\ . * .
.*. / * \ . .
. /* o \ .
Voice: +1 (250) 979-1638 * '''||''' .
URL: http://www.rite-online.net ******************

A. Nony, Mouse

unread,
Dec 29, 2002, 5:21:13 PM12/29/02
to
Rich Teer <rich...@rite-group.com> wrote in
news:Pine.GSO.4.44.02122...@grover.rite-group.com:


Their numbering system is, IMHO, somewhat screwey. Solaris 7 it is,
then.

Rich Teer

unread,
Dec 30, 2002, 1:16:28 AM12/30/02
to
On 29 Dec 2002, A. Nony, Mouse wrote:

> Their numbering system is, IMHO, somewhat screwey. Solaris 7 it is,
> then.

You're not wrong there! I think Sun's marketroids wanted to "catchup"
to WinNT 5, or something.

I guess it does kinda make sense: Solaris 2.15 could be confused
as being a release between 2.1 and 2.2.

A. Nony, Mouse

unread,
Dec 30, 2002, 2:58:42 AM12/30/02
to

> On 29 Dec 2002, A. Nony, Mouse wrote:


Regardless of what the marketoids want to call it, it seems to work
reasonably well, is decently intuitive and uses CDE. What more could I
ask? Well, I suppose I could ask for a newer, more powerful machine, or
maybe better marks in school, but that will happen with hard work and
dedication and stuff.

Anthony Mandic

unread,
Dec 30, 2002, 5:50:00 AM12/30/02
to
"A. Nony, Mouse" wrote:

> Sometimes it is not ineptitude (though in my case, it could be). In an
> environment where one is sysadmin for an important computer (such as a
> server or bbs or other machine that multiple people/beings count on),
> there is pressure to do things NOW, and the consequences can be ugly.

There's also pressure to do things after hours so as not to
disrupt regular business activity. It comes with the job.

> Plus there is distraction, read the wrong man page (or read the man page
> wrong), bad luck, or simply a dangerous, harmful or trojanized (is that a
> word?) executable or whatnot in a place where it can be hit while doing
> things that should be done with non-sysadmin priveleges.

Yes, all this is plausible. That's why firewalls, tripwires
and general Solaris security are important.

-am © 2002


Anthony Mandic

unread,
Dec 30, 2002, 5:50:30 AM12/30/02
to
Lon Stowell wrote:

> SunOS 5.6 uses /etc/nodename as the hostname and there are a
> few other trivia files that contain the hostname. Although
> sys-unconfig may be overkill, RTFMP for the list of files that
> should be changed is a good idea.

Whilst useful for change the hostname its not required for a
simple IP address change.

-am © 2002


Anthony Mandic

unread,
Dec 30, 2002, 5:54:00 AM12/30/02
to
Rich Teer wrote:

> You're not wrong there! I think Sun's marketroids wanted to "catchup"
> to WinNT 5, or something.

Except that there never was an NT5. MS, being cleverer than that,
jumped to 2000 (and instantly dated their OSes in the process.
Nowadays, who in their right mind would want to run something
from the 90's like Win95 or Win98?).

> I guess it does kinda make sense: Solaris 2.15 could be confused
> as being a release between 2.1 and 2.2.

Perhaps they could use a time format like 2:15 instead. But is
that AM or PM?

-am © 2002


0 new messages