change my current IP address

Dear All ,

I have Sun Solaris 8 machine . during installation i gave the machine ip address 192.168.0.50 and gatway 192.168.0.1 .

now i hvae to change the IP address and the gateway ! how ??

i know i have to use ifconfig , but how can i change it and the gateway ???

also where from i can have a .zip or .tar.gz or any compressed full patches for sun solaris 8 ???

thanks alot

in SuSE linux you would set the default gatewat in the file /etc/sysconfig/network/routes

and in RedHat Linux you would set the defaul gateway in /etc/sysconfig/network-scripts/ifcfg-eth0 by adding the 'GATEWAY=' option

no idea about solaris though, sorry

You set your gateway in /etc/defaultrouter. Edit that file with the new IP you need.

To set the IP of the machine you change the entry in /etc/hosts for the hostname of the machine. Make sure /etc/hostname.hme0 (or whichever interface you are using) has the correct hostname in it.

Change both of those and reboot and you'll be all set. If you want to do it without rebooting, make those changes so it does come up correctly next time then do the following:

  1. Use the route command to set your default route on the fly. It should be

route add default IP_OF_GATEWAY

but check man route to be sure you get the syntax right for what you're needing to do.

  1. Use ifconfig to change the IP address of the interface on the fly. It should be

ifconfig hme0 down
ifconfig hme0 NEW_IP_ADDR
ifconfig hme0 up

Again, use the correct interface if you're not on hme0.

Good luck!

Ralph

Oh yeah, on the patches part you should download the "Recommended Solaris 8 Patch Set" from Sun's website. That contains the kernel jumbo patch and all other critical and security patches for Solaris. It is pretty easy to find, just go to www.sun.com, then click on support and there should be a "patchfinder" link or something named similar to that.

Hi rhfrommn ,

Thanks for your good information .
it worked with me .
and i found the set of patches .

Good Day