Click to See Complete Forum and Search --> : Boot IP Address on Solaris (SPARC)
Stuka
11-28-2001, 02:47 PM
How do I go about changing the bootup IP address on a Sparc box? I've hunted through the rc scripts, and it looks like it's using RARP to assign the IP addy - how can I get RARP to tell it what I want? Or do I need to hack that script (I'm not really sure I want to do that, though).
epseps
11-29-2001, 05:59 PM
Originally posted by Stuka:
<STRONG>How do I go about changing the bootup IP address on a Sparc box? I've hunted through the rc scripts, and it looks like it's using RARP to assign the IP addy - how can I get RARP to tell it what I want? Or do I need to hack that script (I'm not really sure I want to do that, though).</STRONG>
People more knowlegable than myself don't seem to be jumping at this one, so here it goes...
First make a backup of your /etc/hosts file and then edit the loghost to be the new ip that you want.
Next type in ifconfig hme0 and it will tell you what your ip adress of your network card is.
Now don't take my word completely at this, cuz I don't know what your setup is or what you want to do or if you are on a network, so you should first read the man pages on ifconfig...read them twice cuz they are hard to keep in order sometimes.
try typing ifconfig hme0 down
then (read the man pages for arp first!) type arp -a. This will give your hostname and the hexidecimal ethernet adress. As superuser type arp -s (hostname) (ethernet adress)
Then type ifconfig hme0 up
Maybe this will change your ethernet adress on bootup, but like I said, read the man pages because I am not modifying anything at work to see if the advice I gave you works or not.
Stuka
11-29-2001, 06:26 PM
ok...I know how to use ifconfig - what is the loghost entry?
<edit>
I think I got that part - now where do startup route commands go?
And thanks!
</edit>
[ 29 November 2001: Message edited by: Stuka ]
epseps
11-29-2001, 09:22 PM
[QUOTE]Originally posted by Stuka:
[QB]ok...I know how to use ifconfig - what is the loghost entry?
Hmmm maybe I entered the name loghost in /etc/hosts myself to keep track of it but loghost might look something like this:
127.0.0.1 loopback
192.168.1.1 computername loghost
So when you edit /etc/hosts and comment out the old IP of the machine you enter the new IP next to the name you wanna give it.
Oh yeah, I think you may want to do a route add command somewhere too.
I think I got that part - now where do startup route commands go?
And thanks!
I haven't a clue. Maybe route add (address)? Like I said, I can't screw around with any of my machines at work in case I screw them up, so I am hoping to stimulate experimentation or get someone to correct me.
Tell me how it goes.
Stuka
11-30-2001, 01:43 PM
Well, the loghost bit didn't work. When I changed that entry and rebooted, I got NO IP info. As for the route, I know I need to add it, but I'm not sure where that would go - guess I'll have to poke around a bit more in the startup scripts. This is a work machine, but it's for learning/experimentation, so its uptime isn't critical, I just can't frag it completely.
epseps
12-03-2001, 08:52 AM
OK, I'm curious about this myself. Lets start from the beginning....
What do you want set up? Will you be using dhcp? What kind of network is it? Connecting to the internet or not? Are you using one or two NICs?
Maybe a cut & paste of dmesg?..or a cut & paste of /var/adm/log/messages. If I have time this week I'll work on it if I don't have time this week I'll call Sun tech support to ask a question.
Next week, I'm going to Haiti so I might have a lot of work to do before my vacation.
arca1
12-04-2001, 01:48 AM
I just skimed what you wanted..., but I think this is what youw want...
there are 5 files that you need to put information in if you are going to get solaris to boot nicely with network support. /etc/hosts /etc/hostname.[device] (in this example I will use hme0) /etc/netmasks /etc/defaultrouter /etc/nodename.
This is how you do it, if you want the ip of the box to be 192.168.32.50, with the name of client1. In /etc/hosts you put the name client1 and the IP this is where the IP information is stored, you need the name in this file because it serves as a reference to /etc/hostsname.hme0 where in that file you will have the name client1 in it. In /etc/netmasks you just put the netmask information pertaining to your network like this, 192.168.32.0 255.255.255.0. Now the gateway, or the default route will be put in /etc/defaultrouter, file. This is the only file that you will not find in /etc/ because for whatever reason in Suns infinite wisdow they leave this for you to figure out. So create the file /etc/defaultrouter and in there you will put (in our case) 192.168.32.1, which is the gateway.
Nodename will hold the name of the machine itself. For instance, lets say you wanted to keep the name client1 then just put that in nodename and that will be fine. But you could put any name in there, and that will be the name of the system when it comes up. Keep in mind that this does not conflict with /etc/hosts and /etc/hostname.hme0. They are sepreate. I hope that helps you. Let me know if you have any further questions.
Arca++
Stuka
12-04-2001, 06:27 PM
Arca-
It worked beautifully! Thanks a ton. I do have other questions, but if you could point me in the direction of some good documentation regarding the boot process on Solaris (actually this one calls itself SunOS 5.7, which I'm guessing is just an earlier iteration), I'd be more than happy to read the manual!
Thanks again!!
xulfralos
12-05-2001, 01:53 AM
SunOS 5.7 == Solaris 7
SunOS 5.8 == Solaris 8
Openboot info:
http://sundocs.princeton.edu:8888/ab2/coll.216.1/@Ab2CollView
http://www.cis.ohio-state.edu/~ware/cis662/1999-04/openboot.pdf
Try these for general Solaris info:
http://solarisguide.com
http://sunhelp.org
http://searchsolaris.techtarget.com/
http://sunfreeware.com (http://www.sunfreeware.com)
[ 05 December 2001: Message edited by: xulfralos ]