-   Linux - Networking (
-   -   nslookup works, ping doesn't (

coolnicklas 04-15-2005 05:58 PM

nslookup works, ping doesn't

I have som problems with my Wlan connection which is described in another thread in the wireless forum. But I suspect that a part of the problem is not wlan related, just network (TCP/IP) related. I have a IBM T42 Thinkpad running Debian Sarge with Kernel 2.6.10.

When i get my Wlan card to work. I can ping my local router, log on to it with a browser, use "nslookup" and the "host" command on WAN addresses. However i cannot ping URL's or WAN Ip-adresses. It says: "Network not availiable"

Part of the the /etc/network/interfaces looks like

#name WLAN card
auto eth1
iface eth1 inet static

wireless_essid SpeedStar
wireless_mode ad-hoc
wireless_key restricted xxxxxxxxxx
wireless_ap any
wireless_channel 11

Since I am connected to my router and can use nslookup and host there must be some other problem. If a use the wired connection (eth0) which have an identical configuration apart from the IP-address and the Wlan stuff it works fine.

Any ideas?


fr_laz 04-16-2005 11:38 AM


What's your router ?
Since you can connect to the router, do some query dns, it seems to me that you're LAN is well configured.
But you cannot access to any other network... so, to my mind, either there's a firewall in your router that forbids the WLAN to communicate with others network, or there's a problem in your router's routing table.

So, could you see/post your router's config ?

trickykid 04-16-2005 11:44 AM

If its not a router firewall issue, does your router have the correct DNS entries in /etc/resolv.conf ?

coolnicklas 04-16-2005 12:13 PM

My Router is a Netgear WTG624 version 2

My girlfriend has a laptop running WinXP and there is no problem accessing neither the router or the WAN with it's 802.11b Wlan-card.

So it shouldn't be a firewall or DNS issue in the WTG624...

/etc/resolv.conf has one entry:

This should be fine, shouldn't it?

Thanks for helping me out


coolnicklas 04-16-2005 02:37 PM

I am not very good at Linux networking yet, but since google is my friend I have made some discoveries which I believe points out the problem. I read about routing tables and did following.

I brought up eth1 (my Wlan interface), ran the command "route -n" and got this output:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface MSS Window irtt U 0 0 0 eth1 0 0 0

Then i brought eth1 down, brought eth0 (gigabit Ethernet card) up and ran the same command with this output:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface MSS Window irtt U 0 0 0 eth0 0 0 0 UG 0 0 0 eth0 0 0 0

I have figured out that IP means "the rest of the world" aka WAN. And that entry is not present in the eth1 table which means (correct me if I am wrong) Ip-packets with an address outside my LAN ( will not be routed...

Is this supposed to be some kind of common knowledge I have missed out? I thought it would be enough to just fill in the correct entrys (default GW) in the /etc/network/interfaces file.

I guess I can figure out the command for adding the correct entry, but if someone know it, please share that information.

Thanks in advance

fr_laz 04-16-2005 08:23 PM


yes that's it... the command is
route add default gw

you're right about what it means... but what's queer is that the gateway should be configured thanks to the "gateway" entry in your /etc/network/interfaces file...

All times are GMT -5. The time now is 03:52 PM.