Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Naming service configuration in Solaris 2.5

Posted on 1997-10-14
12
Medium Priority
?
446 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 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
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 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.:
Suggested Courses

718 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