Network failure: Gateway is first entry in routing table.

Hello,

I have QNX 6.2.1 (including CD update) installed on a Notebook with a 3COM PCMCIA card on a private network (192.168.100.X) and a gateway box (192.168.100.1). Everything on the (private) network works fine until I add the gateway:

route add default 192.168.100.1

After that, I cannot even ping myself. Using route show -n, the reason seems to be that the gateway is the first entry in my routing table:

Destination Gateway
default ________ 192.168.100.1
127.0.0.1 ______ 127.0.0.1
192.168.100.0 __ link#2

I searched around this forum and googled around, but no one seems to have my particular kind of problem. Why is it that the default route is added to the start, not the end, of the routing table? And how can I change that?

Even as I tried to init everything using my DHCP server, the same result happens – default route first. Would be happily appreciating any suggestions.

Best regards,

megid

I used to see this. Can you “ping -n 192.168.100.y” ?

It’s something to do with “ping” wants to resolve a name, and you have a DNS setting.
Without the default route, since it can’t reach your DNS server, the resolving faild very
quick. WIth a default route, the resolving goes to the “probably worng” nameserver…

Hi xtang,

Thanks for your swift reply. ping -n does the trick, even for IPs in the outer world (e.g. my nameserver can be pinged). Can you tell me the reason for ping asking DNS when I have given an IP address (sounds pretty unnecessary to me, at least)?

Next, the DNS server can be pinged, but is of no use (and yes, on the Linux machines they work). A e.g. ping -n www.heise.de fails.

Again, suggestions are very welcome. I’d be especially interested in which context you used to see this.

Best regards,

megid

ping is try to translate back the address into it’s name. See this:

$ ping 66.218.71.198
PING w1.rc.vip.scd.yahoo.com (66.218.71.198): 56 data bytes

ping is try to contact your DNS to get that “w1.rc.vip.scd.yahoo.com”.

As for DNS setting, could you do a “getconf CS_RESOLVE” (as root)
and post ?

getconf CS_RESOLVE
nameserver_217.5.115.7

As I would expect. I also tried editing /etc/resolv.conf manually, since the GUI network configurator saves everything in /etc/net.cfg, but to no avail (why is there a resolv.conf, btw?).

Another thought is that it could be my firewall; on the other hand, my windows and linux machines do quite well with it. I also checked ifconfig for TCP and UDP, but both are available.

So, “217.5.115.7” IS your name server, and you can ping to it? But you still can’t resolve ? hm…

Yes, I can ping it. It works on my other machines. I am pretty much awestruck.

Does “nslookup - 217.5.115.7” works ? Can this resolve any name ?

No, this does not work. I also tried this with my secondary nameserver (just to be sure) – this does not work either.

I have no idea. I would say the 217.5.115.7 have problem, but you said it is working
with other boxes. Any difference between the QNX machine and other linux machine?
(network wise, does the QNX machine behind a firewall? things like that).
or maybe you need to setup proper domain just as your Linux box.

Are you able to nslookup through some wellknown server? For example, on my
machine:

$ nslookup cn.yahoo.com 63.250.206.138
Server: ns4.yahoo.com
Address: 63.250.206.138

Name: cn.vip.cnb.yahoo.com
Address: 202.43.216.55
Aliases: cn.yahoo.com

does your firewall/router allow outbound connection to port 53 ? for both tcp and udp.