This is a discussion on routing/gateway/dns settings within the HP-UX Operating System forums, part of the Unix Operating Systems category; --> Hi Ok, I'm still setting up my HP. My /etc/resolv.conf looks like domain <my subdomain> nameserver <dns-server-1> nameserver <dns-server-2> ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi Ok, I'm still setting up my HP. My /etc/resolv.conf looks like domain <my subdomain> nameserver <dns-server-1> nameserver <dns-server-2> When I go to http://66.94.230.33, I get a nice Yahoo Page (minus graphics) However, when I go to http://www.yahoo.com, the domain name cannot be resolved. The DNS servers are correct; I use them on other machines. I tried putting my router ip in /etc/defaultrouter, which fixes this problem in Solaris, but apparently HP does not use the same convention. My host search order is /etc/hosts, nis, dns. What do I have to do to get my computer to be able to surf the net? Thank you, Tony G. |
| |||
| hp-ux is no solaris /etc/defaultrouter has no meaning in this case. Can you ping the dns servers? If not set the route correctly. Easiest done with sam. go to network settings and find something like default gateway. Check your netmask also. If you don't use nis remove the nis entry in the /etc/nsswitch.conf name lookup list. Paul |
| |||
| If you're able to reach the web site via IP address, the problem isn't routing. However, HP-UX configures this through /etc/rc.config.d/netconf (along with IP addresses for the interfaces). The form of the resolv.conf looks good and if you use the same nameservers on other systems with no problems, things should work for you. And you say you have nsswitch.conf configured to use files, nis, then dns so that should be good too. The one thing that comes to mind is to check the permissions on nsswitch.conf and resolv.conf. I vaguely recall having some difficulties at my previous job while trying to lock some file permissions down and discovered that if resolv.conf wasn't world readable, things didn't work. On 4/24/04 3:03 PM, in article 2Kzic.242936$2oI1.148065@twister01.bloor.is.net.ca ble.rogers.com, "Antony Gaitatzis" <tonyg@rollanet.org> wrote: > Hi > > Ok, I'm still setting up my HP. > > My /etc/resolv.conf looks like > > domain <my subdomain> > nameserver <dns-server-1> > nameserver <dns-server-2> > > When I go to http://66.94.230.33, I get a nice Yahoo Page (minus graphics) > > However, when I go to http://www.yahoo.com, the domain name cannot be > resolved. The DNS servers are correct; I use them on other machines. > > I tried putting my router ip in /etc/defaultrouter, which fixes this > problem in Solaris, but apparently HP does not use the same convention. > > My host search order is /etc/hosts, nis, dns. > > What do I have to do to get my computer to be able to surf the net? > > Thank you, > Tony G. -- Jeff Traigle traigle@si.umich.edu http://www-personal.si.umich.edu/~traigle/ |
| |||
| First of all, thank you for the suggestions so far... I have removed the nis entry from nsswitch.conf, but with no luck. I'm quite frustrated by this. I have tried to provide all the information anyone might need to diagnose this problem... I'm sure the solution is very simple, but I just don't know hpux well enough. And I have not been able to find any good answers in the admin manuals I have downloaded; perhapse I am looking in the wrong place. Will this help anyone? CONFIGURATION AND SETTINGS: Permissions: ======================================= # ls -l /etc/{resolv.conf,nsswitch.conf} -r--r--r-- 1 root sys 160 Apr 22 23:33 /etc/nsswitch.conf -r--r--r-- 1 root root 86 Apr 25 13:31 /etc/resolv.conf ======================================= Net Config: ======================================= # tail /etc/rc.config.d/netconf # # RARP: Set to 1 to start rarpd daemon # RARP=0 LANCONFIG_ARGS[0]=ether ROUTE_DESTINATION[0]=default ROUTE_GATEWAY[0]=<router-ip-address> ROUTE_COUNT[0]=1 ======================================= Domain Resolution: ======================================= # cat /etc/resolv.conf domain <my-search-domain> nameserver <dns-server-ip-1> nameserver <dns-server-ip-2> ======================================= Search Order: ======================================= # cat /etc/nsswitch.conf hosts: files [NOTFOUND=return UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return] ======================================= Hosts: ======================================= # tail -n 3 /etc/hosts <my-ip-addr> <my-hostname> 127.0.0.1 localhost loopback ======================================= Routing Table: ======================================= # netstat -r Routing tables Destination Gateway Flags Refs Interface Pmtu localhost localhost UH 0 lo0 4136 <my-host-name> <my-host-name> UH 0 lan0 4136 <my-network-addr> <my-host-name> U 2 lan0 1500 127.0.0.0 localhost U 0 lo0 0 default <router-ip> UG 0 lan0 0 ======================================= COMMUNICATIONS Domain Server: ======================================= # ping <domain-server-ip> 64 4 PING <domain-server-ip>: 64 byte packets 64 bytes from <domain-server-ip>: icmp_seq=0. time=36. ms 64 bytes from <domain-server-ip>: icmp_seq=1. time=31. ms 64 bytes from <domain-server-ip>: icmp_seq=2. time=30. ms 64 bytes from <domain-server-ip>: icmp_seq=3. time=33. ms ----<domain-server-ip> PING Statistics---- 4 packets transmitted, 4 packets received, 0% packet loss round-trip (ms) min/avg/max = 30/32/36 ======================================= Ping Yahoo! IP: ======================================= # ping 66.94.230.33 64 4 PING 66.94.230.33: 64 byte packets 64 bytes from 66.94.230.33: icmp_seq=0. time=124. ms 64 bytes from 66.94.230.33: icmp_seq=1. time=119. ms 64 bytes from 66.94.230.33: icmp_seq=2. time=122. ms 64 bytes from 66.94.230.33: icmp_seq=3. time=121. ms ----66.94.230.33 PING Statistics---- 4 packets transmitted, 4 packets received, 0% packet loss round-trip (ms) min/avg/max = 119/121/124 ======================================= Ping Yahoo! Domain Name: ======================================= # ping www.yahoo.com ping: unknown host www.yahoo.com ======================================= ATTEMPTS AT MODIFICATION Attempt to add new Route: ======================================= # route add default <my-router-ip> add net default: gateway <my-router-ip>: Network is unreachable ======================================= Ping Gateway: ======================================= # ping <my-router-ip> 64 4 PING <my-router-ip>: 64 byte packets 64 bytes from <my-router-ip>: icmp_seq=0. time=0. ms 64 bytes from <my-router-ip>: icmp_seq=1. time=0. ms 64 bytes from <my-router-ip>: icmp_seq=2. time=0. ms 64 bytes from <my-router-ip>: icmp_seq=3. time=0. ms ----<my-router-ip> PING Statistics---- 4 packets transmitted, 4 packets received, 0% packet loss round-trip (ms) min/avg/max = 0/0/0 ======================================= SUMMARY My computer has access to the local LAN. It has access to the internet, and can see my Domain Name Servers and even Yahoo.com when asked via IP. I have a sane routing table (afaik), but cannot add a new route. It seems as though hpux simply does not know to use the DNS servers to resolve domain names. Thank you again for any help you might provide, Tony G. |
| |||
| Oh, one more thing that might help: Lan config: =============================== # ifconfig lan0 lan0: flags=843<UP,BROADCAST,RUNNING,MULTICAST> inet <my-ip-address> netmask ffffff00 broadcast 192.168.0.255 =============================== |
| |||
| On Sun, 25 Apr 2004 18:26:09 GMT, Antony Gaitatzis <tonyg@rollanet.org> wrote: >Search Order: >======================================= ># cat /etc/nsswitch.conf >hosts: files [NOTFOUND=return UNAVAIL=continue] dns [NOTFOUND=return >UNAVAIL=continue TRYAGAIN=return] >======================================= The NOTFOUND=return after files prevent the use of the dns if the host is not found in the /etc/hosts. Check the man page or the examples files. -- echo papxc.sthrwpbeh@ugtt.ug | tr "p-za-o" "a-z" |
| |||
| Excellent, thank you I changed my nsswitch.conf so that it was: hosts: files [NOTFOUND=continue...dns... Now internet works. Thank you so much. In Linux, it just assumes that if you have more than one entry, you want to move from one to the next. It doesn't distinguish between unavailable and not found. Neat. Perhaps this is the default behavior in hpux too (if one were to exclude the [NOTFOUND...]. Anyway, thanks again. Tony G. P.S. I love your email signature... will have to use that sometime. Alain Deschamps wrote: > On Sun, 25 Apr 2004 18:26:09 GMT, Antony Gaitatzis > <tonyg@rollanet.org> wrote: > > >>Search Order: >>======================================= >># cat /etc/nsswitch.conf >>hosts: files [NOTFOUND=return UNAVAIL=continue] dns [NOTFOUND=return >>UNAVAIL=continue TRYAGAIN=return] >>======================================= > > > The NOTFOUND=return after files prevent the use of the dns if the host > is not found in the /etc/hosts. Check the man page or the examples > files. |
| ||||
| In article <spUic.6537$swh.2669@news04.bloor.is.net.cable.rog ers.com>, Antony Gaitatzis wrote: > Excellent, thank you > > I changed my nsswitch.conf so that it was: hosts: files > [NOTFOUND=continue...dns... > > Now internet works. Thank you so much. > > In Linux, it just assumes that if you have more than one entry, you want to > move from one to the next. It doesn't distinguish between unavailable and > not found. Neat. Perhaps this is the default behavior in hpux too (if one > were to exclude the [NOTFOUND...]. > > Anyway, thanks again. Tony G. > -snip- The behavior is the same on HP-UX as on Linux. The "[... ]" is not required and there is an implied behaviour of "[SUCCESS=return NOTFOUND=continue UNAVAIL=continue TRYAGAIN=continue]". Kevin |