1827880 Members
1582 Online
109969 Solutions
New Discussion

host file and alias

 
SOLVED
Go to solution
Neale Machin
Advisor

host file and alias

I have a 10.20 system and needed to add a host entry for an ip-address and 2 alias's.
I can ping the ip address but am unable to ping either of the aliases. The machine doesnt use NIS and teh changes made to the hosts file look ok. Any thoughts from anyone would be gratefully received
Just cos I look after Unix Boxes doesnt mean I wear sandals
5 REPLIES 5
Dave Kelly_1
Respected Contributor
Solution

Re: host file and alias

What settings do you have for the hosts entry in /etc/nsswitch.conf ?

If you nslookup the alias, what does it return ?
Tony Constantine_1
Regular Advisor

Re: host file and alias

on your local host add an entry to the /etc/hosts


10.40.2.4 hosta hostb

try

man hosts
John Palmer
Honored Contributor

Re: host file and alias

Hi Mark,

Are you using DNS? Do you have a file '/etc/nsswitch.conf'? If so what is in it?

You could try running nslookup...

# nslookup
Using ????? on ????

>

nslookup will display details.

> exit

Regards,
John
Dan Hetzel
Honored Contributor

Re: host file and alias

Hi Mark,

If you have the file /etc/nsswitch.conf, it should show a line like the following (providing you are using DNS):

hosts: dns[NOTFOUND=continue UNAVAIL=continue]files

This makes sure that if the host name isn't found using the DNS or if the DNS server is anavailable, the local file will be searched.

Best regards,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Neale Machin
Advisor

Re: host file and alias

Thanks.. I'm thick . Theres a proxy on the network which didnt recognise the alias
Just cos I look after Unix Boxes doesnt mean I wear sandals