vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I have HP UX box :HP-UX B.11.23 U ia64 0468963392 The /etc/hosts file has entry as below 16.81.21.52 box1.gb.tel.com box1 When I use the command below, $ping box1.gb.tel.com,the response is fine PING box1.gb.tel.com: 64 byte packets 64 bytes from 16.81.21.52: icmp_seq=0. time=0. ms 64 bytes from 16.81.21.52: icmp_seq=1. time=0. ms 64 bytes from 16.81.21.52: icmp_seq=2. time=0. ms But when I tried using the command below,there is no respone $ping box1 1)Seems like ping command is not looking into /etc/hosts file to get the ip address 2)Also tried telnet command...similar behaviour is seen. Tried googline but not of much use.Any idea what could be the reason. Regards, Mehaboob |
| |||
| mehaboob@gmail.com wrote: > Hi, > > I have HP UX box :HP-UX B.11.23 U ia64 0468963392 > > The /etc/hosts file has entry as below > 16.81.21.52 box1.gb.tel.com box1 > > When I use the command below, > > $ping box1.gb.tel.com,the response is fine > PING box1.gb.tel.com: 64 byte packets > 64 bytes from 16.81.21.52: icmp_seq=0. time=0. ms > 64 bytes from 16.81.21.52: icmp_seq=1. time=0. ms > 64 bytes from 16.81.21.52: icmp_seq=2. time=0. ms > > But when I tried using the command below,there is no respone > $ping box1 > > 1)Seems like ping command is not looking into /etc/hosts file to get > the ip address > 2)Also tried telnet command...similar behaviour is seen. > > Tried googline but not of much use.Any idea what could be the reason. you need to change your resolv.conf to lookup hosts in /etc/hosts. -- Markus |
| |||
| mehaboob@gmail.com wrote: > Hi, > < snip > > > But when I tried using the command below,there is no respone > $ping box1 > > 1)Seems like ping command is not looking into /etc/hosts file to get > the ip address > 2)Also tried telnet command...similar behaviour is seen. < end > Ok, check /etc/resolv.conf, it should contain domain name and nameserver info. then start sam -> networking & communications -> name service switch -> actions -> configure name service switch 1st should be /etc/hosts 2nd should be DNS all actions "try next source" that should make it try /etc/hosts then the nameservers |
| |||
| Markus D?hr <wantbottom@t-online.de> wrote: > you need to change your resolv.conf to lookup hosts in /etc/hosts. That would be /etc/nsswitch.conf rather than resolv.conf. rick jones -- portable adj, code that compiles under more than one compiler these opinions are mine, all mine; HP might not want them anyway... feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH... |
| ||||
| Rick Jones wrote: > Markus D?hr <wantbottom@t-online.de> wrote: > > you need to change your resolv.conf to lookup hosts in /etc/hosts. > > That would be /etc/nsswitch.conf rather than resolv.conf. > > rick jones > -- > portable adj, code that compiles under more than one compiler > these opinions are mine, all mine; HP might not want them anyway... > feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH... Hi, Thanks a lot for the reply. Updated the /etc/nsswitch.conf to look into the hosts files and DNS. Thanks, Mehaboob |