Solved

sol9 gw setting

Posted on 2004-10-02
2
290 Views
Last Modified: 2013-12-27
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.
0
Comment
Question by:MorganStanley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 34

Expert Comment

by:PsiCop
ID: 12206962
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
 

Accepted Solution

by:
karahalis earned 50 total points
ID: 12228982
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

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question