Solved

Naming service configuration in Solaris 2.5

Posted on 1997-10-14
12
439 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 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

839 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