Solved

Naming service configuration in Solaris 2.5

Posted on 1997-10-14
12
436 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
Comment Utility
My machine is SUN ultra1, Solaris 2.5.1 OS.

0
 
LVL 5

Accepted Solution

by:
n0thing earned 90 total points
Comment Utility
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
Comment Utility
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
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
> 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
Comment Utility
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
Comment Utility
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Author Comment

by:magdy
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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 …
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 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 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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now