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 03-31-2006, 01:33 PM   #1
yednotek
LQ Newbie
 
Registered: Mar 2006
Distribution: Slackware 10.2
Posts: 10

Rep: Reputation: 0
Question eth0 is up but can't connect to network


Hi, I already posted this message in the newbie forum, but I think this is a better place to post this question.

I just installed Slackware 10.2 and have trouble connecting to the local network / the internet. A little information:

Using netconfig I configured my host as followed:

ip: 192.168.1.100
gateway: 192.168.1.1 (router, set to static local IP addresses)
netmask: 255.255.255.0
dns: my dns ip address

In ifconfig I can see that eth0 is up and running with the specified ip adres.

I'm on an 'old' lap-top (compaq presario 1700) with a Conexant LANfinity ethernet card which is detected automatically at startup.

Even though everything looks fine, I don't seem to have a connection to the (local) network. I can't ping the router even though it's in the proper range. I've tested the network cable and it's fine.

Any advice on how to fix this would be appreciated!
 
Old 03-31-2006, 01:48 PM   #2
Absolute_P
LQ Newbie
 
Registered: Nov 2004
Location: Land of the penguine's or maybe south london
Distribution: Gentoo 2008.0 (2.6.24)on Laptop Gentoo 2008.0 (2.6.25)
Posts: 16

Rep: Reputation: 0
have you tried "dhcpcd" in the terminal as root
 
Old 03-31-2006, 02:07 PM   #3
yednotek
LQ Newbie
 
Registered: Mar 2006
Distribution: Slackware 10.2
Posts: 10

Original Poster
Rep: Reputation: 0
I just tried it but it doesn't do anything. The router is also not configured for DHCP.

Perhaps my NIC's physical port is broken.. I will check with a cross-cable..
edit: the physical connection is working fine

Last edited by yednotek; 03-31-2006 at 02:09 PM.
 
Old 03-31-2006, 02:50 PM   #4
ralvez
Member
 
Registered: Oct 2003
Location: Canada
Distribution: ArchLinux && Slackware 10.1
Posts: 298

Rep: Reputation: 30
Well, the first thing in this case is to know what your computer "believes" the eth0 configuration is. For that use:
"/sbin/ifconfig" and post the results, so we can make sure your settings did take.
 
Old 03-31-2006, 04:28 PM   #5
yednotek
LQ Newbie
 
Registered: Mar 2006
Distribution: Slackware 10.2
Posts: 10

Original Poster
Rep: Reputation: 0
the result from ifconfig for eth0:

Code:
eth0     Link encap:Ethernet  HWaddr 00:4C:69:6E:75:79
         inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
         UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
         RX packets:2 errors:0 dropped:0 overruns:0 frame:0
         TX packets:0 errors:49 dropped:0 overruns:0 carrier:111
         collisions:0 txqueuelen:1000
         RX bytes:120 (120.0 b) TX bytes:0 (0.0 b)
         Interrupt:9 Base address:0x1400


I typed this over so mind a capital letter or a missing space here and there..
 
Old 03-31-2006, 09:00 PM   #6
LuggerHouse
Member
 
Registered: May 2004
Location: Montreal,QC,Canada
Distribution: Fedora Core 7
Posts: 210

Rep: Reputation: 30
you might have a firewall?? Try /sbin/iptables -L
 
Old 04-01-2006, 12:16 AM   #7
ralvez
Member
 
Registered: Oct 2003
Location: Canada
Distribution: ArchLinux && Slackware 10.1
Posts: 298

Rep: Reputation: 30
OK, so we can conclude that your machine does find and allocate an IP address for your card.
Now, lets find if the card finds a way out to the "outside" world. For that we use the command:
/sbin/route.
You should get something like this:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.148.0 * 255.255.255.0 U 0 0 0 vmnet8
172.16.188.0 * 255.255.255.0 U 0 0 0 vmnet1
default it2web 0.0.0.0 UG 0 0 0 eth0 <-- That is the important line.
In your case you may have an IP address instead of a name (it2web), but that is OK.
If unsure post the result and we will keep going from there.

Rick
 
Old 04-01-2006, 03:12 AM   #8
yednotek
LQ Newbie
 
Registered: Mar 2006
Distribution: Slackware 10.2
Posts: 10

Original Poster
Rep: Reputation: 0
LuggerHouse: I don't have a firewall running, ip-tables -L doesn't give me any rules.

ralvez: This is the result of /sbin/route:
Code:
Kernel IP routing table
Destination Gateway      Genmask        Flags Metric Ref Use Iface
localnet    *            255.255.255.0  U     0      0   0   eth0
loopback    *            255.0.0.0      U     0      0   0   lo
default     192.168.1.1  0.0.0.0        UG    1      0   0   eth0
ps. Remember that I am unable to ping 192.168.1.1!
ps2. I use the [code] tags to keep the layout readable, hope that that's ok.

Last edited by yednotek; 04-01-2006 at 03:13 AM.
 
Old 04-01-2006, 10:24 AM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
So the cable is good. Are the link lights illuminated on the router as well as the PC?
What is the output of the command mii-tool (may not work with this adapter)? Does it show the link good? What is the mode(full duplex) and speed (100mbs)?

Try disabling Plug and Play in the computers BIOS.
 
Old 04-01-2006, 11:40 AM   #10
ralvez
Member
 
Registered: Oct 2003
Location: Canada
Distribution: ArchLinux && Slackware 10.1
Posts: 298

Rep: Reputation: 30
So far so good. Like michaelk says issue the command "mii-tool" (you must be root for this test to work) this will test the connection of eth0 (actually any number of cards connected to the system under test).
You should get something like this for response:
eth0: negotiated 100baseTx-FD flow-control, link ok
If there is a problem between the card and the switch, be it the cable, the card itself or the switch box ( I'm guessing you use a switch box to connect the two machines) you would get something like this: eth0: no link
Now, if you confirm your card and cables, switch box are OK, then use the command "ping 192.168.1.1" and take a look at the connection lights on the NIC card, the switch box and the NIC card in the router. Do the lights blink?
If they all do, then your router is ignoring the queries. It is possible that your hosts.allow, hosts.deny in the router are blocking your machine.
So, lets do those tests and then we will continue troubleshooting based on what you find.

Rick
 
Old 04-02-2006, 06:40 AM   #11
abhi.b
LQ Newbie
 
Registered: Apr 2006
Posts: 12

Rep: Reputation: 0
Hi,
Ping is working at network layer of OSI model, so let first try to check if the physical layer is responding or not by checking the reply for arping.
I m not much sure about arping command in Slackware ;in redhat you can do it something like this : arping -I eth0 192.168.1.1
Just check if that works or not. Then we can further think whether any firewall may be blocking or some other prb may be there.
 
Old 04-03-2006, 02:28 AM   #12
yednotek
LQ Newbie
 
Registered: Mar 2006
Distribution: Slackware 10.2
Posts: 10

Original Poster
Rep: Reputation: 0
mii-tool:
eth0: negotiated 100baseTx-FD, link ok

arping:
ARPING 192.168.1.1 from 192.168.1.100 eth0
Unicast reply from 192.168.1.1 [00:A0:C5:78:B4:EA] 4.102ms
Unicast reply from 192.168.1.1 [00:A0:C5:78:B4:EA] 1.064ms
Unicast reply from 192.168.1.1 [00:A0:C5:78:B4:EA] 1.073ms
......

so.. what to do next?

Last edited by yednotek; 04-06-2006 at 06:36 PM.
 
Old 04-06-2006, 06:36 PM   #13
yednotek
LQ Newbie
 
Registered: Mar 2006
Distribution: Slackware 10.2
Posts: 10

Original Poster
Rep: Reputation: 0
ps. normal ping to 192.168.1.1 does not work!
 
Old 04-06-2006, 07:19 PM   #14
ralvez
Member
 
Registered: Oct 2003
Location: Canada
Distribution: ArchLinux && Slackware 10.1
Posts: 298

Rep: Reputation: 30
OK. It seems to me that there is a firewall in your router that does not allow your machine to communicate with it.
Remember what LuggerHouse suggested? His idea was to log in into your router as root and issue the command : "iptalbles -L "
If there is a firewall setup it will display the rules ... that is likely your problem.
Try that.

R
 
Old 04-07-2006, 04:55 AM   #15
yednotek
LQ Newbie
 
Registered: Mar 2006
Distribution: Slackware 10.2
Posts: 10

Original Poster
Rep: Reputation: 0
The router is a hardware router without firewall rules and I am sure it allows me to connect to it. If I put the cable into my windows xp pc (with the same ip 192.168.1.100 as the linux box) it works perfectly.
 
  


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
3c905C network card in docking station. Cannot activate network device eth0. pathelms Linux - Networking 4 04-12-2006 02:55 PM
eth0 up but can't connect bengele Linux - Networking 5 02-27-2005 12:12 PM
Wireless network on eth1 diabled Ethernet eth0 and eth0 never comes back tadatoshi Linux - Wireless Networking 4 09-23-2004 05:57 PM
How can i choose network card (eth0 or wlan0) to connect to internet? Klas Linux - Networking 4 05-07-2004 04:36 PM
Problem withInternet, DHCP, connect with eth0 down work, connect with eth0 up not zowey Linux - Networking 1 03-12-2004 10:05 AM

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

All times are GMT -5. The time now is 09:13 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