1748144 Members
3511 Online
108758 Solutions
New Discussion юеВ

Re: hostname

 
SOLVED
Go to solution
Bill Hassell
Honored Contributor

Re: hostname

> i am pining from my pc to unix server

OK. All the information about nsswtch.conf and nslookup have nothing to do with your PC. These directions are only for pinging from your HP-UX server to another location. You need to contact your network or WINS/DNS administrator and ask that your HP-UX server's hostname be added. That way, your PC will then know the server's hostname. You can also edit the PC's hosts file but that may be bypassing a process in your company for maintaining all the host names.

I noticed in your HP-UX nsswitch.conf file that it is using NIS, a centralized server containing a lot of network information. Perhaps the administrator of the NIS server can help with WIND/DNS for your PC.


Bill Hassell, sysadmin
sachit patil
Regular Advisor
Solution

Re: hostname

Hi you have to add entry in hosts file of windows
ip address hostname


start -> search > hosts* > edit file and insert entry >save

After u can ping ur hostname.

Regards
sac
Sajjad Sahir
Honored Contributor

Re: hostname

through telnet from my system i can ping ip address but not hostname so I checked all these files why I can't ping the hostname
I am pinging from my windows o/s system


this is the output of resolv.conf file and the nsswitch.conf file

and nslooup ip output is also u can see below

# cat /etc/resolv.conf
nameserver 10.65.60.100

# nslookup 10.65.65.11
Using /etc/hosts on: society1

looking up FILES
Name: society1
Address: 10.65.65.11

# cat /etc/nsswitch.conf
#
# /etc/nsswitch.hp_defaults:
#
# @(#)B11.23_LR
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# uses NIS (YP) in conjunction with files.
#

passwd: compat
group: compat
hosts: files [NOTFOUND=return] nis [NOTFOUND=return]
ipnodes: dns [NOTFOUND=return] files
networks: nis [NOTFOUND=return] files
protocols: nis [NOTFOUND=return] files
rpc: nis [NOTFOUND=return] files
publickey: nis [NOTFOUND=return] files
netgroup: nis [NOTFOUND=return] files
automount: files nis
aliases: files nis
services: nis [NOTFOUND=return] files
#
Bill Hassell
Honored Contributor

Re: hostname

As mentioned before, there is no problem with your HP-UX server. All those HP-UX files do not have anything to do with your PC. Your PC knows nothing about this hostname. Therefore, only the IP address will work. You have to configure your PC to translate the hostname into an IP address. The exact location of the hosts file depends on your version of Windows but for XP, the file is:

C:\WINDOWS\system32\drivers\hosts

Just add your hostname to that file, like this:

12.34.56.78 myhostname

This is strictly your PCs configuration. Nothing needs changing in the HP-UX system.


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: hostname

>Bill: The exact location of the hosts file depends on your version of Windows but for XP, the file is:
C:\WINDOWS\system32\drivers\hosts

On my XP it is:
C:\WINDOWS\system32\drivers\etc\hosts
(There are a bunch of other UNIX style networking files there too.)
Sajjad Sahir
Honored Contributor

Re: hostname

thank u bill Hassel I edited and got it

thank u once again? one more clarification

suppose more peoples are using from their own pc then we have to manually edit in all pcs?

sajjad
Dennis Handly
Acclaimed Contributor

Re: hostname

>then we have to manually edit in all PCs?

It was mentioned several times that if you can set up a DNS server with those FQDN/IP mappings, then everyone can access those machines.
Sajjad Sahir
Honored Contributor

Re: hostname

Dear Dennis

I have four unix servers I ddin't edit /etc/hosts files in windows

but i can ping hostname in 2 servers they are hp_da1 and hp_da2

but my problem is i can' tping hostname
in the other two

without editing anything in windows i can ping hostname of two servers and i can't ping hostname of two servers how to manage it
if i am editing in windows /etc/hosts file
every system i can ping wiht hostname no problem but in unix platform how i can manage these issue in my two servers
Dennis Handly
Acclaimed Contributor

Re: hostname

>but i can ping hostname in 2 servers they are hp_da1 and hp_da2

Are they on the same subnet and the other two aren't?
Were only two added to the DNS before?
TTr
Honored Contributor

Re: hostname

You need to get a basic understanding about what name resolution is and where it occurs and how to set up every host (windows or unix) to use that name resolution. I think I gave you the answer in the 5th reply above and Dennis above is telling you the same thing
-oo-