LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 04-15-2005, 05:58 PM   #1
coolnicklas
LQ Newbie
 
Registered: Apr 2005
Posts: 15

Rep: Reputation: 0
nslookup works, ping doesn't


Hi,

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
address 192.168.0.185
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-nameservers 192.168.0.1

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?

/Nicklas
 
Old 04-16-2005, 11:38 AM   #2
fr_laz
Member
 
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384

Rep: Reputation: 32
Hi

What's your router ?
Since you can connect to the router, do some query dns, it seems to me that you're 192.168.0.0/24 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 ?
 
Old 04-16-2005, 11:44 AM   #3
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
If its not a router firewall issue, does your router have the correct DNS entries in /etc/resolv.conf ?
 
Old 04-16-2005, 12:13 PM   #4
coolnicklas
LQ Newbie
 
Registered: Apr 2005
Posts: 15

Original Poster
Rep: Reputation: 0
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:

192.168.0.1

This should be fine, shouldn't it?

Thanks for helping me out

/Nicklas
 
Old 04-16-2005, 02:37 PM   #5
coolnicklas
LQ Newbie
 
Registered: Apr 2005
Posts: 15

Original Poster
Rep: Reputation: 0
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
192.168.0.0 0.0.0.0 255.255.255.0 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
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0 0 0
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0 0 0 0

I have figured out that IP 0.0.0.0 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 (192.168.0.0) 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
Nicklas
 
Old 04-16-2005, 08:23 PM   #6
fr_laz
Member
 
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384

Rep: Reputation: 32
Hi,

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

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ping does not resolve name while nslookup does jmonatsys0 Linux - Networking 6 09-07-2010 03:00 PM
ProxyServer: how to ping,nslookup,wget,curl etc from client PC ~=gr3p=~ Linux - Networking 2 06-10-2005 07:16 AM
Router works, but can't ping it! ar1 Linux - Networking 4 03-10-2005 03:42 PM
ping works but ssh not tushar123 Linux - Networking 1 09-29-2004 12:16 PM
ping works, host works, ping host does not dublin212 Linux - Networking 3 03-31-2003 11:38 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration