Google Answers Logo
View Question
 
Q: How to config Sun Solaris with using Linksys DSL Router? ( Answered,   0 Comments )
Question  
Subject: How to config Sun Solaris with using Linksys DSL Router?
Category: Computers > Operating Systems
Asked by: dingding-ga
List Price: $5.00
Posted: 25 Sep 2002 12:44 PDT
Expires: 25 Oct 2002 12:44 PDT
Question ID: 69004
How to set up Sun Solaris with using Linksys DSL Router?
I have two PCs(win 2000) and one SunBlade 100 (Solaris)connected to
Swbll DSL using a LinkSys router (and DSL modem), how to config in
solaris8 or edit the
appropriate files so that connect to internet.Thanks

Request for Question Clarification by twitch-ga on 26 Sep 2002 14:30 PDT
dingding-

Is the SunBlade currently on the network? Is the DSL doing Network
Address Translation, or just acting as a normal router? Thanks.

Clarification of Question by dingding-ga on 26 Sep 2002 15:49 PDT
twitch-ga 

The SubBalde is on the network, all PCs and SunBlade connected to
router(DHCP).  My PCs has no problem to connect to the internet, and I
can also ping the SunBlade from my PCs. The problem is my SunBlade can
not connect to the internet.

I want to use my Linksys router as a host server, so all machines can
connect to the internet through this router.

Did I answer your questions? Please let me know if you need anything
more. Thanks
Answer  
Subject: Re: How to config Sun Solaris with using Linksys DSL Router?
Answered By: twitch-ga on 27 Sep 2002 09:17 PDT
 
dingding-

Thank you for the clarification. From what you say it sounds as if the
SunBlade is already speaking DHCP and getting an address from the
router (I'm assuming this based on the fact that you can ping it from
the PCs that have obtained IP addresses via DHCP). Can you ping the
router from the Sun and vice/versa? If so, it sounds like there are
only a couple more steps that you need to take:

Setting the routing table
-------------------------

Log into the Sun as root and issue the following command:

# netstat -rn

You will get the system's routing table, something like the following:

Routing Table:
  Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------
192.186.1.0          192.168.1.6           U        3   6711  hme0
default              192.168.1.1           UG       0  38296
127.0.0.1            127.0.0.1             UH       0    962  lo0

There are two entries in the above table that concern you: the local
network route and the default route.

The local network route in the above example is the first entry. In
your table it will be the entry that has the IP address of the Sun in
the 'Gateway' field and the DHCP-provided network in the 'Destination'
field. You can double-check the correctness of the 'Gateway' entry by
issuing an 'ifconfig -a' command, which will list the IP address of
your ethernet interface. Judging from the fact that you are able to
ping the Sun from the PCs it sounds as if this entry is correct.

The default route is what lets your Sun know how to reach the
Internet. In the above example the entry with a Destination of
'default' and Gateway of '192.168.1.1' specifies the default route. If
you do _not_ see this entry in your routing table, execute the
following command:

   # route add -net 0 [ip_address_of_router]

Substitute [ip_address_of_router] above with the IP address of the
internal interface on the Linksys router. So if the Linksys has an
internal interface with an address of 192.168.1.1 the command should
be:

   # route add -net 0 192.168.1.1

If, perhaps, your routing table already contains a default route
entry, but Gateway is incorrect (i.e. not the address of the internal
interface of the router) you should remove the incorrect entry:

   # route delete -net 0 [ip_of_gateway_from_routing_table>]

Again, you are replacing [ip_of_gateway_from_route_table] above with
the Gateway field of the default route entry in the routing table. (If
you want to get cute, the following command will pull the Gateway
field from the routing table automatically and delete it:

   # route delete -net 0 `netstat -rn |grep "^default"|awk '{print
$2}'`

This is exactly equivalent to you manually supplying the Gateway
field, it's just provided as an example).

Once the bad default route has been removed, add the correct route
with the 'route add -net 0' command we talked about earlier.


You should now test that you are able to reach the Internet. Try
pinging the IP address of answers.google.com:

   # ping 216.239.35.88
   216.239.35.88 is alive

You want to ping the IP address and not the name because we haven't
guaranteed that DNS is working yet.

Entries in the routing table won't persist through reboot, so we need
to create a file to tell Solaris about its default route. The file
/etc/defaultroute is used for this. To set this up, simply execute the
following command:

   # cat [ip_address_of_router] > /etc/defaultroute

Again, you are replacing [ip_of_router] with the address of the
internal interface of the router.


Once you get the default route working correctly, it's time to make
certain that DNS is properly configured. If the default route isn't
working, post to this thread again and we'll work from there.


Setting Up DNS
--------------
Solaris uses two main files for resolving hosts: /etc/resolv.conf and
/etc/nsswitch.conf. First, let's tell your system about your primary
DNS server- we do this in /etc/resolv.conf. The following is an
example of what this file contains:

<++begin output of /etc/resolv.conf++>
nameserver  192.168.1.9
nameserver  192.168.1.10
domain      mydomain.com
search      mydomain.com
<--end output of /etc/resolv.conf-->

This file simply contains lines of keyword/parameter entries where the
keyword and the parameter are separated by whitespace (an arbitrary
number of spaces or tabs). It is important to remember that these
entires must be supplied _one_ per line and the keyword/parameter pair
for each entry must be on the same line. Additionally, any line
beginning with a pound sign (#) is ignored.

To setup your DNS, edit this file with the following format:

nameserver   [ip_address_of_primary_name_server]
nameserver   [ip_address_of_secondary_name_server]
domain       [your_default_domain_if_any]
search       [list_of_domains_to_automatically_search]


The nameserver entries are just the IP address of your primary and
secondary DNS servers (most likely these were supplied by your ISP).
The order here is important- the entry appearing first will be used as
your primary DNS server, with subsequent entries used only when the
primary server is unable to answer a request. The 'domain' and
'search' entries are optional and allow you to specify your local
domain and any domains that should be automatically appended to host
lookups (e.g. when you say 'ping pc1' the domain suffixes supplied in
the 'search' entry will automatically be appended to the hostname
'pc1').

Once your resolv.conf file is setup we need to tell your system to use
DNS when looking up hosts. For some reason, many default Solaris
installations won't use the DNS by default. This is controlled in
/etc/nsswitch.conf, an example of which follows:

<++begin /etc/nsswitch.conf++>
# does not use any naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet"
transports.

passwd:     files
group:      files
hosts:      files
networks:   files
protocols:  files
rpc:        files
ethers:     files
netmasks:   files
bootparams: files
publickey:  files
# At present there isn't a 'files' backend for netgroup;  the system
will
#   figure it out pretty quickly, and won't use netgroups at all.
netgroup:   files
automount:  files
aliases:    files
services:   files
sendmailvars:   files
<--end /etc/nsswitch.conf-->

There is a lot in this file with which you need not be concered. To
setup DNS you really only care about the 'hosts:' entry.

All you need to do is add 'dns' to the end of the host entry,
separating it from the 'files' parmater with whitespace. Edit
/etc/nsswitch.conf to resemble the following (NOTE: the end of the
file is truncated here in the name of saving space. DO NO delete any
entries from the file)

<++begin TRUCATED /etc/nsswitch.conf++>
# does not use any naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet"
transports.

passwd:     files
group:      files
hosts:      files dns
<--end TRUNCATED of /etc/nsswitch.conf-->

The addition of 'dns' to the 'hosts:' line tells Solaris to use the
DNS servers you specified in /etc/resolv.conf whenever it needs to
find a host's IP address. You can can test everything by pinging
answers.google.com by name:

# ping answers.google.com
answers.google.com is alive



Hopefully this has solved your problem. There are a few other things
that could be awry, so if this did not help you, just post a followup
and we can go through some other steps. One of the hinderences of this
type of help is that what takes a few minutes to test won't be known
for a few hours. So give the above a try, let me know what happens.
I'll check this thread every few minutes to see what else we may need
to do. Good luck, and thanks for the question.
Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy