Setting IP on Solaris 10 help

Hi all,

So, I need to change the IP/netmask on 2 sun v240's running solaris 10. I seem to have done it correctly on one, it's holding the ip after a init 6 reboot. The other does not want to keep ip using same commands. I'm guessing I have to change some files I haven't yet, but have no idea how to enter info correctly into the files.

Commands I used were

#ifconfig bge0 plumb
#ifconfig bge0 <ip address> netmask 255.255.255.0 broadcast + up
#ifconfig -a (just to check it went in)
#init 6
#ifconfig -a (verified it stayed) <--stayed on one, not on the other
#netstat -rn

So, with running these, do I need to update /etc/hostname.bge0 and etc/hosts ? If so, what is the format to input?

Thanks much!

~K:wall:

post a output of your /etc/netmasks file, there must be a entry like:

192.168.1.0 255.255.255.0

changing the ip configuration with the ifconfig command is not permanent!

"netmasks" [Read only] 15 lines, 382 characters
#
# The netmasks file associates Internet Protocol (IP) address
# masks with IP network numbers.
#
# network-number netmask
#
# The term network-number refers to a number obtained from the Internet Network
# Information Center.
#
# Both the network-number and the netmasks are specified in
# "decimal dot" notation, e.g:
#
# 128.32.0.0 255.255.255.0
#
10.10.173.0 255.255.255.0

---------- Post updated at 11:42 AM ---------- Previous update was at 11:31 AM ----------

How does one make the changes stay?

and? is the ip and netmask in this file correct?
you need to edit this file if you need to make some changes permantent.

do I need to make any changes to the hostname.bge0 or hosts files?

And no, they aren't.

depends on what is in the hostname.X file... usually you'll find a "hostname" and this "hostname" should be in the /etc/hosts file where he goes and read the ip...

here a example:

[root@unix] /etc/inet => more /etc/hosts
#
# Internet host table
#
::1     localhost
127.0.0.1       localhost
192.168.1.100      test123      test123.unix.com        loghost
[root@unix] /etc/inet => more /etc/hostname.e1000g0
test123
[root@unix] /etc/inet => more /etc/netmasks
#
# The netmasks file associates Internet Protocol (IP) address
# masks with IP network numbers.
#
#       network-number  netmask
#
# The term network-number refers to a number obtained from the Internet Network
# Information Center.
#
# Both the network-number and the netmasks are specified in
# "decimal dot" notation, e.g:
#
#               128.32.0.0 255.255.255.0
#
192.168.1.0       255.255.255.0
1 Like

Excellent. It works now. Thank you!

~K

Nice! :wink: you are welcome!