Solved

sol9 gw setting

Posted on 2004-10-02
2
287 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
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
auto mounter on solaris 1 68
UNIX SCP 5 83
How to Insert a File Using Text Editor 9 92
ipconfig not working on windows 10 bash shell; what other commands are missing. 17 391
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
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…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

831 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