Solved

Naming service configuration in Solaris 2.5

Posted on 1997-10-14
12
443 Views
Last Modified: 2013-12-21
Hi
      I'm trying to configure naming service using DNS.
I edited the file /etc/resolv.conf to contain
domain xxx.xxx.xxx            (my domain name)
nameserver 000.000.000.000      (Naming server IP address)
but it does not work.
Thanks.
0
Comment
Question by:magdy
[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
  • 5
  • 4
  • 3
12 Comments
 

Author Comment

by:magdy
ID: 2007442
My machine is SUN ultra1, Solaris 2.5.1 OS.

0
 
LVL 5

Accepted Solution

by:
n0thing earned 90 total points
ID: 2007443
Hi,

  You'll have to change the /etc/nsswitch.conf too. Find the line
with hosts: files change it to

   hosts: files dns

   So the next time it will search the local /etc/hosts table then DNS.

Regards,
Minh Lai
0
 

Author Comment

by:magdy
ID: 2007444
Hi
I did what you said. It appears to work, but my system can not connect to the name server and give me error
host name lookup failure

I tried telnet the name server and I got error message
no route to host.


0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
LVL 51

Expert Comment

by:ahoffmann
ID: 2007445
> no route to host

Check your routing table with

  netstat -rn

It must contain a route to the network where your hosts is, or a default route to a gateway.

0
 

Author Comment

by:magdy
ID: 2007446
This is the output of netstat -m
streams allocation:
                                         cumulative  allocation
                      current   maximum       total    failures
streams                   179       204         990           0
queues                    506       544        2201           0
msg                       341       780      699929           0
linkblk                     6       340           6           0
strevent                    6       340         629           0
syncq                      10       113          30           0
qband                       0         0           0           0

313 Kbytes allocated for streams data

How can I set a gateway?
0
 
LVL 5

Expert Comment

by:n0thing
ID: 2007447
Try "route add default gateway xx.xx.xx.xx 0" on command line
where xx.xx.xx.xx is your IP address.
If it works, put that line in /etc/rc2.d/S69inet as the last line.


0
 

Author Comment

by:magdy
ID: 2007448
I tried
route add default gateway xx.xx.xx.xx
I used the correct gateway IP address, I got it from our network administrator but it give me error
gateway: bad value
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 2007449
magdy, please type
  netstat -r -n
instead of  netstat -m  (may be a bigger font in your browser make it readable:)

On Solaris the route command should be:
   route add default xx.xx.xx.xx 1

I'm not shure if Solaris evaluates the metric parameter (1), please refer to the man page.
0
 
LVL 5

Expert Comment

by:n0thing
ID: 2007450
It's easier to use your IP address as a gateway with metric 0.
"route add default gateway xx.xx.xx.xx 0" where xx.xx.xx.xx is
your IP address. It will send a broacast on the subnet and the
router will answer to it. So the next time if the router address
changes you don't have to update your machine gateway's address.

PS: ahoffmann, the metric 1 is the number of hops to your nearest gateway. You'll have to use it in order to avoid routing loop.
So i use 0 when using my IP addr. as a gateway. It means 0 hop.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 2007451
nothing, I know the metric parameter. But on any flavior of UNIX
the man pages (or other docs) tell you that just 0 and 1 (local or gateway) is implemented as metric, and any other value is treated as 1. I don't know very much about the services and how they interpret the hop count.
Looking at your last comment: does this mean (broadcast etc.) that you use routed ?

nothing and magdy, I'm not at Solaris at the moment, but I thought that it wont understand the gateway keyword for the route command (please ignore this if I'm wrong:)
0
 
LVL 5

Expert Comment

by:n0thing
ID: 2007452
No, if you use your machine as a router you'll need to run routed. Metric 0 is the local interface, 1 is for a gateway. More than 1 is not possible nowadays. So by using your IP as default gateway, any packets not destined for your hosts will be directed to the local subnet, the router will pick the packet up and route it to the proper destination.
Yes, Solaris does take "gateway" as a pamameter, other OS might
just take 0 as the default gateway.
0
 

Author Comment

by:magdy
ID: 2007453
It works. I used
route add default xx.xx.xx.xx 1
I used the gateway of our network.
Ahoffmann, you are right, the system does not understand the gateway keyword for the route command.

Also I tried using my IP address as gateway
route add default yy.yy.yy.yy 0
and it also works.
n0thing: you were right to use  my IP address so if the gateway address is changed, I will not need to change it in my computer.

Thanks all for help. I was installing a workstation with PC experience, but I learned much.

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

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…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

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