Questions related to UNIX (SUN Solaris)

paopao

Member
Jul 22, 2000
191
0
0
My friend just dumped me a SUN sparc20.
After I installed Solaris 5.6, then I got stuck for I could not figue out some basics.

1) How do I configue the networks setting in the command line?
The only thing I know is /etc/hosts to put in my IP and name for this box. where do I put gateway IP, and Pri./Sec DNS server IP?

2) I installed Netscape Communicator, but it seems can't start.
I got some error messages like "can't connect to display..."

3) could anyone explain to me how this .dtprofile work? Is it same to .profile and .login? I assume I can only use one at a time?

4) any good web sites has those "basic" Unix stuff? (I bought SUN Solaris admin books, but they are not helping with these basics)

THANKS!
 

Bilbo777

Member
Oct 25, 2000
64
0
0
I may be missing details so go to the web site and check for specifics.

netstat -a and netstat -i to see what you have in terms of routing. How are you sending data to where. If you see nothing except the loopback you don't have any NIC cards setup.

setup your machine: you did /etc/hosts

Configure card:
in /etc look for hostname.leo or hme0 You should see the ip address of your network card. You setup /etc/hostname.whatever.
Create this file as necessary.

/etc/defaultrouter - if you know what your default hop is on the network. Where you will send data by default on a network. Pick the first hop past your network card.

/etc/netmasks - see if you are limiting what range of IP traffic is going out card. Do you have muliple cards..

look in the manpages for the route command as you may need to add a route just in case. I work with multiple nics so I always had to do so..

snoop -v nameofdevice device could be hme0 or le0.. whatever you setup for the card. Have this screen open to siff if you are getting anything to the network card.


www.ugu.com - my fav.

luck to you. Fun stuff.
 

paopao

Member
Jul 22, 2000
191
0
0
OK, Ihave got everything else right, except, I don't where to put gateway info.

I have DSL, and NAT to share the connection, and it's IP is 192,168.0.1
 

Sunner

Elite Member
Oct 9, 1999
11,641
0
76
Create a file called "defaultrouter" in the /etc directory, and put the gateway in there, and it will be used as the default gateway.
 

nexus9

Senior member
Jan 8, 2000
535
0
0
1. hostname and IP address is controlled by several files:

/etc/hostname
/etc/nodename
/etc/hostname.le0 (for the main 10 meg network card, hostname.le1 for the second, etc. hostname.hme0 [Hundred Meg Ethernet] for a 10/100 card - the onboard network card on a sparc 20 is le0)
/etc/net/*/hosts (3 files)
/etc/netmasks (to set your netmask)

ifconfig -a will tell you your current network settings.

DNS servers are defined in /etc/resolv.conf
you might also have to edit your /etc/nsswitch.conf and put "hosts: files dns". This will tell the machine to look in /etc/hosts first, then use DNS.

2. If you're running C-shell and CDE as your window manage, open a command prompt and do an
"echo $DISPLAY". This will show where netscape (or any other GUI program) is set up to display.
The command "xhost+" allows all hosts to display to your machine.

3. It depends on what shell you're using (set in the /etc/passwd file usually) /bin/sh or /bin/csh. Usually things are run in this order (if I remember correctly):


.login
.profile (for /bin/sh) or .cshrc (for /bin/csh)
.dtprofile - when you run the GUI

You might try www.sunhelp.org for additional help, or just post more messages here.

-Nexus9