sol9 gw setting

Hi!

I have Solaris9, using the Gnome2 and CDE interface. I dont know where to set the default gateway. I have a local subnet - 192.168.0/24 and want to connect to the internet. Sol9 recognises the machines and the server (192.168.0.1) in the subnet but cant connect to the net. I have set everything except the gw, because I do not know how. Where can I access the network settings and how to configure them, for example add a different ip etc.

Thanks,

B.
MorganStanleyAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
karahalisConnect With a Mentor Commented:
You have probably already setup DNS but If not here is how you would. The /etc/nsswitch.conf file tells Solaris which naming services to use in which order. The /etc/resolv.conf file is the configuration file for the DNS client settings.

To setup the nsswitch.conf file for dns :

1. Make a backup of your old one
cp /etc/nsswitch.conf /etc/nswitch.old

2. Copy the nsswitch.dns file to nsswitch.conf to configure solaris to use DNS
cp /etc/nsswitch.dns /etc/nsswitch.conf

3. Set permissions
chown root:sys /etc/nsswitch.conf
chmod 664 /etc/nsswitch.conf

To setup the /etc/resolv.conf:

1. touch /etc/resolv.conf
2. Use a text editor to add the following lines to the /etc/resolv.conf file
domain yourcompany.com
nameserver 10.10.10.2 #where 10.10.10.2 is your primary dns server
nameserver 10.10.10.3 #where 10.10.10.3 is your secondary dns server
3. Save the /etc/resolv.conf file
4.  Set permissions on the /etc/resolv.conf
chown root:sys /etc/resolv.conf
chmod 664 /etc/resolv.conf
0
 
PsiCopCommented:
Create /etc/defaultrouter, set the mode to 644 and change the ownership to root:sys

This is a simple text file and should contain the IP address of the router to the Internet. So let's that that router's IP was 10.1.1.1, you might enter the following commands to achieve this (NOTE: I would be logged in, as root, at the system console using the Command-Line interface - and the "<CONTROL-D>" below is a key-sequence, don't actually type all those characters, just hold down the CONTROL key and press the D key and then release both):

# cd /etc
# cat > defaultrouter
10.1.1.1
<CONTROL-D>
# chown root:sys defaultrouter
# chmod 664 defaultrouter

You can then reboot the system:

# /usr/sbin/shutdown -i 6 -y -g 1

And when it comes back up it will know where the gateway router is.

A short-term fix for this is:

# route add default 10.1.1.1

Which will last until the next reboot. So you can do both ("route add" and create the "defaultrouter" file) and have it immediately effective without rebooting. I'm just old-fashioned and prefer to make sure everything that might need to know about that change is informed, and the easiest way to ensure that is a reboot. It probably unnecessary - like I said, I'm old-fashioned-cautious.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.