Defining hostname and DNS server on a Solaris Box

Defining hostname and DNS server on a Solaris Box

Post by Stephen M » Fri, 21 Sep 2001 20:21:07



I'm still finding my way around how Unix operates, so if someone could
help out a newbie, it'd be greatly appreciated.  I've just
re-installed Solaris onto one of our machines, and for some reason it
didn't accept the hostname and DNS server I gave it during the
install.  How do I set the machine up so that the hostname is set
during boot?  I've had a look at the startup scripts, but I can't make
head nor tail of them!  Also, where do specify the DNS server that the
machine should use?  I'm soryr if these questionsseem really stupid,
but I'm only just beginning to find my way around Solaris!

Cheers,

Steve

 
 
 

Defining hostname and DNS server on a Solaris Box

Post by eric » Fri, 21 Sep 2001 22:06:43



> I'm still finding my way around how Unix operates, so if someone could
> help out a newbie, it'd be greatly appreciated.  I've just
> re-installed Solaris onto one of our machines, and for some reason it
> didn't accept the hostname and DNS server I gave it during the
> install.  How do I set the machine up so that the hostname is set
> during boot?  I've had a look at the startup scripts, but I can't make
> head nor tail of them!  Also, where do specify the DNS server that the
> machine should use?  I'm soryr if these questionsseem really stupid,
> but I'm only just beginning to find my way around Solaris!

> Cheers,

> Steve

5 files you need to look at

/etc/nodename <- what the box wants to call itself (does not have to be
fully qualified)
/etc/hostname.[le0|hme0] <- name or ip assigned to interface
/etc/hosts  <- ip name translation for /etc/hostname.[le0|hme0] (not
always used)
/etc/resolv.conf <- has the name/ip of the dns server (look for a line
like nameserver 192.168.1.2)
/etc/nsswitch.conf <- this describes how services are implemented

in the nsswitch.conf file look for the hosts: line  it should probably
read
hosts: files dns

unless you are using NIS or some other method for your dns

Hope this helps,

Eric

 
 
 

Defining hostname and DNS server on a Solaris Box

Post by Stephen M » Fri, 21 Sep 2001 23:27:07




>> I'm still finding my way around how Unix operates, so if someone could
>> help out a newbie, it'd be greatly appreciated.  I've just
>> re-installed Solaris onto one of our machines, and for some reason it
>> didn't accept the hostname and DNS server I gave it during the
>> install.  How do I set the machine up so that the hostname is set
>> during boot?  I've had a look at the startup scripts, but I can't make
>> head nor tail of them!  Also, where do specify the DNS server that the
>> machine should use?  I'm soryr if these questionsseem really stupid,
>> but I'm only just beginning to find my way around Solaris!

>> Cheers,

>> Steve

>5 files you need to look at

>/etc/nodename <- what the box wants to call itself (does not have to be
>fully qualified)
>/etc/hostname.[le0|hme0] <- name or ip assigned to interface
>/etc/hosts  <- ip name translation for /etc/hostname.[le0|hme0] (not
>always used)
>/etc/resolv.conf <- has the name/ip of the dns server (look for a line
>like nameserver 192.168.1.2)
>/etc/nsswitch.conf <- this describes how services are implemented

>in the nsswitch.conf file look for the hosts: line  it should probably
>read
>hosts: files dns

>unless you are using NIS or some other method for your dns

>Hope this helps,

>Eric

I've just managed to figure out the DNS setup, but thanks anyway!  I'd
found hostname.hme0, and put the machine's hostname in there, but it
came up with an error message at boot.  Does the hostname have to be
in both of the files, or just one?  Also, is it just the hostname in
the file, or do you have to include any extra commands?

Cheers,

Steve

 
 
 

1. DNS problem: hostnames don't get resolved on DNS server itself

Hi all,

I have a DNS server, it works perfectly for all our hosts, servers our
own domain and forwards/caches all other requests.

But name resolution doesn't work on the host itself.

For example:

bessel:/ # ping spock.dmz
ping: unknown host: spock.dmz
bessel:/ # nslookup
Default Server:  localhost
Address:  127.0.0.1

Server:  localhost
Address:  127.0.0.1

Name:    spock.dmz.XXXXXXX.com
Address:  10.0.2.104

So nslookup does a correct lookup of the name, but any utility (telnet,
ping etc.) that requires a name->IP resolution fails.

My etc/resolv.conf looks like this:

search XXXXXXX.com
nameserver 127.0.0.1  

What am I doing wrong?

Krist

2. Gcc installation problem

3. Set up DNS to resolve hostname to hostname:port?

4. prob: NFS: /etc/exports

5. Dynamic DNS not working with Solaris DHCP/DNS server and win clients

6. W95 sees all 96MB, Linux only sees 64MB?!

7. IBM Micro Channel Port MCA PS/2

8. gcc #define #define #define

9. Windows box not resolving Linux box hostname

10. Fritz DSL, DHCP/DNS problem, DNS does not show the hostname

11. Server hostname being used when DNS fails

12. DNS-Error:Server can't resolve clients hostnames