LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-04-2005, 01:47 AM   #1
contiang
Member
 
Registered: Dec 2004
Location: malaysia
Distribution: Redhat-7.2, VectorLinux-5.0 Standard
Posts: 46

Rep: Reputation: 15
Angry eth0 and internet


hi guys,

I got an headache because of my linux machine. I don't know what is the exact problem with it. The problem is I can't get my internet. I am using redhat-7.2 on Pentium-II 366 Mhz, Memory 128 MB (SDRAM) and 4.2 GB Hard drive. I am connected via LAN (DHCP client).

I can get my IP via DHCP. All works well. My linux shows that my eth0, lo was successfully brought up.

# /sbin/service network restart

----shows---

Shutting down interface lo: [OK]
Setting network parameters: [OK]
Bringing up interface lo: [OK]
Bringing up interface eth0: [OK]

--------end----


any idea guys why i still can't connected to internet? Any files I must configure to reset all my network to basic again? any suggestion??

- contiang
 
Old 04-04-2005, 05:29 AM   #2
brundles
Member
 
Registered: Nov 2003
Location: UK
Distribution: SUSE 9.2
Posts: 77

Rep: Reputation: 15
What information has the interface come up with - can you post the result of /sbin/ifconfig ?
 
Old 04-04-2005, 11:38 PM   #3
contiang
Member
 
Registered: Dec 2004
Location: malaysia
Distribution: Redhat-7.2, VectorLinux-5.0 Standard
Posts: 46

Original Poster
Rep: Reputation: 15
hi guys, here is my /sbin/config output... im a DHCP client...

-----------
eth0 Link encap:Ethernet HWaddr 00:40:05:85:C2:B8
inet addr:172.16.1.73 Bcast:172.16.1.255 Mask:255.255.254.0
UP BROADCAST NOTRAILERS RUNNING MTU:1500 Metric:1
RX packets:161053 errors:0 dropped:0 overruns:0 frame:0
TX packets:141 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:17159048 (16.3 Mb) TX bytes:11045 (10.7 Kb)
Interrupt:10 Base address:0x5f00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:20 errors:0 dropped:0 overruns:0 frame:0
TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1240 (1.2 Kb) TX bytes:1240 (1.2 Kb)
---------------
 
Old 04-05-2005, 05:46 PM   #4
brundles
Member
 
Registered: Nov 2003
Location: UK
Distribution: SUSE 9.2
Posts: 77

Rep: Reputation: 15
Going back to basics, can you ping anything from the machine?

The router? ping -c 5 172.16.0.1 (could be 172.16.1.1 you'll need to check)
LQ by IP? ping -c 5 64.179.4.149
LQ by DNS? ping -c 5 www.linuxquestions.org

The first should succeed - it's in the same subnet.
If the second fails (LG by IP) then you're missing a default gateway and will need to tag that onto the interface (can't remember the command off the top of my head though ).
If the last one fails the you're missing DNS settings (and possibly a DNS client) and will need to add those on.
 
Old 04-06-2005, 01:08 AM   #5
pmgroen
LQ Newbie
 
Registered: May 2004
Posts: 3

Rep: Reputation: 0
eth0 and Internet

Check your default gateway. I bet it's not handed out during the DHCP request.....
 
Old 04-06-2005, 05:52 AM   #6
contiang
Member
 
Registered: Dec 2004
Location: malaysia
Distribution: Redhat-7.2, VectorLinux-5.0 Standard
Posts: 46

Original Poster
Rep: Reputation: 15
hi guys,

what command to use and what files i have to check? I mean how to check my default gateway?

I have tried what 'brundels' state is his reply... but it still didn't works...
 
Old 04-06-2005, 06:39 AM   #7
brundles
Member
 
Registered: Nov 2003
Location: UK
Distribution: SUSE 9.2
Posts: 77

Rep: Reputation: 15
netstat -r will dump out the routing table and tell us what we need to know.
 
Old 04-07-2005, 02:52 AM   #8
contiang
Member
 
Registered: Dec 2004
Location: malaysia
Distribution: Redhat-7.2, VectorLinux-5.0 Standard
Posts: 46

Original Poster
Rep: Reputation: 15
hi guys,

i got this one when i cat /etc/sysconfig/static-routes...

eth0 net netmask gw

is it normal or what since i am using DHCP?
 
Old 04-07-2005, 02:58 AM   #9
contiang
Member
 
Registered: Dec 2004
Location: malaysia
Distribution: Redhat-7.2, VectorLinux-5.0 Standard
Posts: 46

Original Poster
Rep: Reputation: 15
i got this when i used netstat -r

Kernel IP routing table

Destination Gateway Genmask Flags MSS Window irtt Iface
172.16.0.0 0.0.0.0 255.255.254.0 U 40 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo

Last edited by contiang; 04-07-2005 at 03:05 AM.
 
Old 04-07-2005, 04:21 AM   #10
brundles
Member
 
Registered: Nov 2003
Location: UK
Distribution: SUSE 9.2
Posts: 77

Rep: Reputation: 15
We have a winner - as pmgroen has said, your DHCP server isn't telling you the default gateway. Is the DHCP server a router that you control or is this box on a LAN managed by somebody else?

Ideally you should update the DHCP server to handout the default gateway.

Alternatively you'll need to add the default gateway yourself. Try using: route add default gw 172.16.0.1

Note that the IP address there is just a guess and may not be the right one (were you able to ping it before?) - if there is a Windows box nearby you can check it with IPCONFIG from a DOS prompt.

Once that's done, re-run the netstat -r - you should see a line with a destination of 0.0.0.0 or default.

You might also want to keep an eye on this thread - the OP is having similar problems and mentions a package that may be causing it.

Last edited by brundles; 04-07-2005 at 04:52 AM.
 
Old 04-08-2005, 08:52 PM   #11
contiang
Member
 
Registered: Dec 2004
Location: malaysia
Distribution: Redhat-7.2, VectorLinux-5.0 Standard
Posts: 46

Original Poster
Rep: Reputation: 15
hi guys,

Still can't connected to internet....

It seem like I am having the real problem here. This is my output when I used netstat -rn :

Destination Gateway Genmask Flags MSS Window irtt Iface
172.16.0.0 0.0.0.0 255.255.254.0 U 40 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo
0.0.0.0 172.16.1.250 0.0.0.0 UG 40 0 0 eth0

I have already checked our DHCP default gateway from one of my windows machine. It shows me Default Gateway : 172.16.1.250 while our subnet mask : 255.255.254.0.

My ping to 172.16.1.250 is successfull and i got replied from it. This is my output when I tried to use ftp. And it takes so long to produce this result.

# ftp ftp.redhat.com
ftp: ftp.redhat.com: Temporary failure in name resolution
ftp>

Any ideas guys?
 
Old 04-09-2005, 08:05 AM   #12
brundles
Member
 
Registered: Nov 2003
Location: UK
Distribution: SUSE 9.2
Posts: 77

Rep: Reputation: 15
If the DHCP server isn't handing data out properly, it probably hasn't told you about the DNS server either.

Try the tests I put in earlier into this thread - I suspect you'll find that the first two now pass but the third which needs a DNS service fails.
 
Old 04-12-2005, 12:44 AM   #13
contiang
Member
 
Registered: Dec 2004
Location: malaysia
Distribution: Redhat-7.2, VectorLinux-5.0 Standard
Posts: 46

Original Poster
Rep: Reputation: 15
hi guys,

its me again.. i still in my nightmare.. i am thinkin what's wrong with my linux machine. My another linux machine doesn't have any problem at all even we are in the same subnet mask and using the same gateway. My windows machine also have no problem at all.

My routing using route -n shows me no problem since it can route to the right place. I have tried what brundles asked me to test. The ping test. None of the test is working. When I ping to my router and another machine within the same subnet, my ping got replied.

I am thinkin also what is the cause to all of this problem? is it something missing.. files or something from my linux machine? or just only the configuration? is it about the DHCP server? But I have tried to connect my machine trough another connection port in my research lab, it still giving me the same headache.

i can't see the light at the end of the tunnel yet? my last alternatives is to reinstall my machine all over again. But before that I want to give myself another chance first...
 
Old 04-12-2005, 03:47 PM   #14
genderbender
Member
 
Registered: Jan 2005
Location: US
Distribution: Centos, Ubuntu, Solaris, Redhat
Posts: 396

Rep: Reputation: 31
Someone said DNS, give that a try... Ping a website like google from a machine with working internet and write down the IP address then ping the same address from your linux box and send your results in. If you get a response its a DNS problem if you dont its not
 
Old 04-12-2005, 03:51 PM   #15
genderbender
Member
 
Registered: Jan 2005
Location: US
Distribution: Centos, Ubuntu, Solaris, Redhat
Posts: 396

Rep: Reputation: 31
Hiya I just noticed something else thats wrong your IP! You cant have all 0's or all 1's in the host section so "172.16.0.0" is not a valid address.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet using Ethernet eth0 anjanesh Fedora 23 10-25-2005 02:44 AM
internet over eth0 is not workin thiqued Linux - Newbie 2 11-05-2004 09:42 AM
eth0 Activates but no internet! benrose111488 Linux - Networking 8 06-21-2004 04:42 PM
eth0/Internet Problem... SiCkNeZz Linux - Networking 3 07-01-2003 02:48 PM
Help With eth0 And Cable Internet..... wzt29 Linux - Networking 1 02-16-2001 01:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

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