Discussion Locked

Change of IP address in SUN machine

0 helpful
12 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I want to change IP address in my SUN machine. I know about ifconfig, but I want to change the IP permanently. Pls give me the syntax.

12 replies

by cavedweller

Your ip address is set at boot time in the following way: The hostname comes from /etc/hostname.{interface}. If you have the standard 100M utp port the file is /etc/hostname.hme0. The address is set by looking up the hostname in /etc/hosts. Evenif you use a naming service it must be set there (can't query the naming service until the network is up!) The file /etc/defaultdomain sets the domain name. Non-standard netmasks are specified in /etc/netmasks (if you subnet you must set the netmask here).

There are more network-related configuration files but these will get your address changed.

Be sure to use "ifconfig hme0" to check your settings after the system boots.

by ghislain.levesque

modify /etc/hosts, and then you have the choice to reboot or use the ifconfig command to put down your lan and put it up again

by dattatray_b

Dear Friend,

Follow the following step :-

1) Step 1 : login as root

2) Step 2 :

# ifconfig cardtype down
(Cardtype : le0 or lme0 etc.)

3) Step 3:

# ifconfig le0 newipaddress netmask newnetmask up

4) Step 4: After this change the /etc/hosts from all UNIX Servers and Workstations with new Server name and IP address

Pl. try out

Regards

D.V.Bhagwat

by west.daniel

Check out the sys-unconfig command. This
may do a little more than you need but it
is a very clean way to change the network
configuration. Basically, it resets the
hostname, NIS, timezone, IP address, subnet
mask, and root password. You then reboot
and go through a subset of the initial
installation screens prompting you to
re-enter this information. Make sure to
check out the man page on sys-unconfig to
be sure you have all of the information it
is going to reset.

This discussion is closed to new replies.