Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Naming service configuration in Solaris 2.5

Posted on 1997-10-14
12
Medium Priority
?
448 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
  • 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 360 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
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…
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…
Suggested Courses
Course of the Month7 days, 15 hours left to enroll

824 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