LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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-19-2005, 01:19 AM   #1
boyish
LQ Newbie
 
Registered: Apr 2005
Location: India
Distribution: Madrake Linux 9.2
Posts: 3

Rep: Reputation: 0
Can ping the gateway but not the DNS or the Internet.


Hi,
I recently installed Madrake 9.2(Mdk 9.2).
I have a cable connection , as in i have a NIC(I have a D-Link but linux detects it as a Relatek fast ethernet..something like 8139too) which connects to a router/NAT etc; without any proxy.

I have a static IP 10.71.1.149
Default Gateway address :10.71.0.1
Subnet Mask: 255.255.255.0 OR 255.255.0.0 (both work)
Server Address: 10.71.0.1
DNS: 202.134.160.7 /202.134.160.8

I configured the LAN from MCC but it din work.So later i manually configured the files as follows:
***************************************************************
/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=10.71.1.149
NETWORK=10.71.1.0 #this should be the server address right?/

When i change this NETWORK parameter to point to 10.71.0.1 (which is my actual server/gateway address...)
ifup eth0 give me a REALNETLINK answers: Invalid Arguments ERROR.
Otherwise ifup works fine.
*************************************************************
/etc/resolv.conf

nameserver 202.134.160.7
nameserver 202.134.160.8
*************************************************************

ifconfig -a works fine. As in it shows me that the subnet mask and the IP is bound to my NIC.
So no problems there.
*************************************************************
Results of route

Destination Gateway GenMask Flags Metric Ref Use IFace

10.71.1.0 * 255.255.255.0 U 0 0 0 eth0

there's one more entry here for localhost...i thinkit doesnt matter in this context.
*************************************************************
Now given the scenario i am able to ping the gateway/server (10.71.0.1).
I am also able to ping my own IP (which should be obvious).

However whenever i try to ping an external IP (Google for instance) or any IP not on my network..i get a "Destination Host Unreachable" error.

I'm presuming its a route problem but am not able to figure out what to do to resolve this.

Could some one help me asap.

Thanks in advance.



P.S : Its a dual boot with WinXP and Win98. The Internet works fine on both.perfect.

Last edited by boyish; 04-19-2005 at 01:22 AM.
 
Old 04-19-2005, 02:46 AM   #2
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
I am not clear on the actual setup but I am assuming you have cable feed ->router->pc? . If this is the case and the router is using the address 10.71.0.1 then the problem you have is that you are using a different subnet for your network. You need to connect on the same subnet i.e set the address of eth0 to 10.71.0.2 with same netmask as the router and then use the 10.71.0.1 as the gateway.
 
Old 04-19-2005, 04:39 AM   #3
boyish
LQ Newbie
 
Registered: Apr 2005
Location: India
Distribution: Madrake Linux 9.2
Posts: 3

Original Poster
Rep: Reputation: 0
the setup is as follows:
My NIC--->Router--->Internet. (i think this is similar to wot u were talking about tiger!)

also, on winXP box i use the settings as follows::

IP: 10.71.1.149
subnet mask :255.255.255.0 /255.255.0.0 (it wrks on either)
dns :202.134.160.7 and 202.134.160.8
Gateway: 10.71.0.1
Server address: 10.71.0.1

since i could ping my gateway i was presuming tht there was some issue with the route.

Is there some setting that i could make or something i could try to resolve this thing?
Please let me know.

Thank you very much.

I have 10.71.1.149 as a static IP assigned to me by the provider.

Last edited by boyish; 04-19-2005 at 04:42 AM.
 
Old 04-20-2005, 04:20 AM   #4
boyish
LQ Newbie
 
Registered: Apr 2005
Location: India
Distribution: Madrake Linux 9.2
Posts: 3

Original Poster
Rep: Reputation: 0
Thumbs up

Its been solved. I changed the subnet mask.
Also, in /etc/sysconfig/network-scripts/ifcfg-eth0...........the network was somehow set to 10.71.0.1. After configuring the MCC again......the settings changed to 10.71.0.0 and the whole thing just started functioning properly.

Thanks a lot for ur help guys.
 
  


Reply



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
default gateway not set by PPPoE, can't ping internet rproffit Linux - Networking 3 12-17-2007 05:29 AM
Suse 9.3 - No internet, can't ping my gateway bacan Linux - Networking 5 05-26-2005 10:08 AM
How to ping gateway and dns server banner Linux - Newbie 3 05-08-2005 05:49 AM
PPP establish can ping the gateway router but unable to ping the host deepalalla Linux - Networking 0 11-18-2004 09:10 AM
dhcp client can't ping gateway but can ping other local hosts dirty_forks Linux - Networking 7 10-08-2004 10:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration