LinuxQuestions.org
Help answer threads with 0 replies.
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 12-24-2006, 03:07 PM   #1
Furlinastis
Member
 
Registered: Dec 2004
Location: Ball of Confusion
Distribution: Artix,Arch,Slackware,Bluewhite64
Posts: 261

Rep: Reputation: 40
slackbox refuses to connect to the internet


I am trying to connect my slackware machine up to the internet but it doesn't even see my router. I have two network cards one with realtek 8139 chipset and the other with a realtek 8169 chipset. I've tried editing some files like resolv.conf but to no avail. I've tried using the route command as well as ifconfig.. but I'm no expert with these commands so maybe I did them wrong? I did route add -net 192.168.123.109 gw 192.168.123.254 netmask 255.255.255.0 eth0 or so... but it didn't seem to do anything. Sometimes it would give me a network not reachable or similar error. Also, have tried netconfig both as DHCP and static IP but neither were successful.

I'm not convinced that it's a hardware issue. And I know my connection is fine because I am typing this post on my windows box. My windows machine is manually setup and has a static IP. But I've never manually setup a network on linux before so I am unsure where to start. Though I have setup samba before but that's different then routing the signal to the internet.

I want my 100MB/s ethernet adapter (realtek 8139)to connect to my router and my gigabit ethernet adapter (realtek 8169)to connect to my switch which will serve my network(but I'll get to that later, first I have to be able to connect to the internet )

Here's some info, if it's helpful:

ifconfig -a

Code:
eth0      Link encap:Ethernet  HWaddr 00:0F:B5:F9:0E:14  
          inet addr:192.168.123.109  Bcast:192.168.123.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:7200  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:1800 (1.7 KiB)
          Interrupt:12 Base address:0x2000 

eth1      Link encap:Ethernet  HWaddr 00:30:BD:2C:D8:A8  
          inet addr:192.168.123.107  Bcast:192.168.123.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:76 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:10 Base address:0x2000 

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:34 errors:0 dropped:0 overruns:0 frame:0
          TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:3416 (3.3 KiB)  TX bytes:3416 (3.3 KiB)
route -n
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.123.0   0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.123.0   0.0.0.0         255.255.255.0   U     0      0        0 eth1
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         192.168.123.254 0.0.0.0         UG    1      0        0 eth0
ethtool eth1
Code:
Settings for eth1:
	Supported ports: [ TP MII ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	Supports auto-negotiation: Yes
	Advertised link modes:  10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	Advertised auto-negotiation: Yes
	Speed: 100Mb/s
	Duplex: Full
	Port: MII
	PHYAD: 32
	Transceiver: internal
	Auto-negotiation: on
	Supports Wake-on: pumbg
	Wake-on: d
	Current message level: 0x00000007 (7)
	Link detected: yes
ethtool eth0
Code:
Settings for eth0:
	Supported ports: [ TP ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Full 
	Supports auto-negotiation: Yes
	Advertised link modes:  10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Full 
	Advertised auto-negotiation: Yes
	Speed: 1000Mb/s
	Duplex: Full
	Port: Twisted Pair
	PHYAD: 0
	Transceiver: internal
	Auto-negotiation: on
	Supports Wake-on: pumbg
	Wake-on: g
	Current message level: 0x00000033 (51)
	Link detected: yes
Code:
PING 192.168.123.254 (192.168.123.254) 56(84) bytes of data.
From 192.168.123.109 icmp_seq=1 Destination Host Unreachable
From 192.168.123.109 icmp_seq=2 Destination Host Unreachable
From 192.168.123.109 icmp_seq=3 Destination Host Unreachable

--- 192.168.123.254 ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3004ms
, pipe 3
 
Old 12-24-2006, 03:46 PM   #2
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676
Blog Entries: 7

Rep: Reputation: 32
Try disabling one of the network cards (The one not connected to the router) and then ping the router, I have noticed that sometimes you can not ping a computer if you have two nics configured with IPs for the same network and one of them up but not connected.

To disable :
ifconfig ethn down

To enable
ifconfig ethn up
 
Old 12-24-2006, 04:25 PM   #3
Furlinastis
Member
 
Registered: Dec 2004
Location: Ball of Confusion
Distribution: Artix,Arch,Slackware,Bluewhite64
Posts: 261

Original Poster
Rep: Reputation: 40
Thanks but it didn't work I even removed one of the ethernet cards and it says network is unreachable.

I have no idea what I'm missing? I've tried to configure both manually and dynamically with netconfig .. but still nothing.
 
Old 12-24-2006, 04:56 PM   #4
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,136
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
What's the IP address of your router? Is it on the same subnet? It should not be.

Code:
 addr:192.168.123.109  Bcast:192.168.123.255  Mask:255.255.255.0
If your router is 192.168.0.1
Then eth0 should be 192.168.1.1 or something similar.

Then your mask should be 255.255.0.0

Can you ping your router by IP? If not then you don't have support for the card, correct support for the card, your hardware is defective, cables etc.

If you can ping your router by IP, can you ping Yahoo.com by IP,66.94.234.13 ? If so then it is a DNS issue. You need to specify a correct route. If this is a router that connects to the internet then the route should be the router address. Sometimes it is your ISP's DNS servers address.

One step at a time. Ping the router, get that working first.
http://www.linuxhomenetworking.com/
http://tldp.org/HOWTO/HOWTO-INDEX/categories.html

Last edited by teckk; 12-24-2006 at 05:03 PM.
 
Old 12-24-2006, 05:18 PM   #5
Furlinastis
Member
 
Registered: Dec 2004
Location: Ball of Confusion
Distribution: Artix,Arch,Slackware,Bluewhite64
Posts: 261

Original Poster
Rep: Reputation: 40
Yea, that's the problem I can't ping the router. My router is 192.168.123.254. I don't see what the problem is with having an IP of 192.168.123.109? My windows machines IP is 192.168.123.108. *waits to get hacked* :P

If it was a hardware problem wouldn't ethtool give me an error?
 
Old 12-24-2006, 05:35 PM   #6
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,136
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
If you can't ping the router that the machine is hooked to then,
The support you are using for the network device is not correct, or just does not work right.
You have hardware problems, cable, network card. switch etc.
You have a firewall running that is disallowing communication. Iptables?
If you haven't brought the interface down and back up since you configured it then you may want to.
Code:
#ifconfig eth0 down
then up. Substitute your own parameters.

Have you looked through the HCL to see if your device works with Linux? http://www.linuxquestions.org/hcl/
 
Old 12-24-2006, 06:48 PM   #7
Furlinastis
Member
 
Registered: Dec 2004
Location: Ball of Confusion
Distribution: Artix,Arch,Slackware,Bluewhite64
Posts: 261

Original Poster
Rep: Reputation: 40
well, I have realtek 8139 and 8169 they use modules 8139too and 8169r(?) which are loaded and supported by the kernel. Both of these devices had worked when I had my old motherboard. I also had some weirdness with the PCI bus, I don't know if this has anything to do with it but the kernel couldn't see the PCI bus so I disabled ACPI support in the kernels config file and then everything seemed to work except this. I hope it's not some kernel config option that I left out???

i haven't touched iptables at all. I know it's not the cables because I'm using the same cable to type this post out. I tend to doubt the hardware is bad but it's a possibility. I really just think it's not seeing the router and I don't know why? Like as if it can't send packets out.
 
Old 12-24-2006, 08:14 PM   #8
nuxrl
Member
 
Registered: Jun 2006
Location: NY, USA
Distribution: Slackware, Arch
Posts: 176

Rep: Reputation: 35
Can you,
Code:
$ping 192.168.123.107
 
Old 12-24-2006, 09:10 PM   #9
Furlinastis
Member
 
Registered: Dec 2004
Location: Ball of Confusion
Distribution: Artix,Arch,Slackware,Bluewhite64
Posts: 261

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by nuxrl
Can you,
Code:
$ping 192.168.123.107
Yea, I can ping any device located inside my machine 127.0.0.1, 192.168.123.whatever, but I cannot get it to connect to anything remote.

I'm almost thinking about reformatting and see if it was just something I had inadvertently messed up. But the only thing I really tinkered with was the kernel and I tried booting up with the original 2.4.33 kernel and still the same thing.
 
Old 12-24-2006, 09:37 PM   #10
nuxrl
Member
 
Registered: Jun 2006
Location: NY, USA
Distribution: Slackware, Arch
Posts: 176

Rep: Reputation: 35
If you can ping another ip address, I'd assume that the network stack & the driver in the kernel are all OK. Lets do a cross test. From the Windows, open a cmd window and type,
Code:
ipconfig /all
to see which ip is used as the default gw. Also, try to ping 192.168.123.254 from the Windows box to see what happens.
 
Old 12-25-2006, 03:30 AM   #11
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676
Blog Entries: 7

Rep: Reputation: 32
Did you check the cable..I think you need a crossover..
 
Old 12-25-2006, 07:40 AM   #12
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,136
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
You can ping local host and all devices in the box but you can't get out.

That sounds like a firewall, or bad cable. Or a conflict with 2 devices on the LAN having the same IP.

To eliminate the possibility of a flaky router that does not like Linux, you can put a crossover between 2 machines, set them both with an IP and see if you can ping out.

You only need a gateway to get past the router. If you can't even get to the router by IP then that's not the prob.

Sorry, can't think of anything else. Please let us know when you solve it.

http://www.slackbook.org/
http://www.slackbook.org/html/system...KERNEL-COMPILE
http://www.slackbook.org/html/networ...iguration.html
http://www.slackbook.org/html/networ...ion-tcpip.html

Last edited by teckk; 12-25-2006 at 07:43 AM.
 
Old 12-25-2006, 06:26 PM   #13
Furlinastis
Member
 
Registered: Dec 2004
Location: Ball of Confusion
Distribution: Artix,Arch,Slackware,Bluewhite64
Posts: 261

Original Poster
Rep: Reputation: 40
OK, I have some partial success. I configured my windows to see the linux box as the gateway, and now both of them can talk. I can ping both and they ping fine... But I still can't get my linux box to see the router.

As for what cables to use, I have patch cables. I use a switch between both machines.

Also, if I connect the switch to the router and both machines to router I can ping the router but there is alot of packet loss on both machines. I'm thinking I might have to configure something in my router?
 
Old 12-25-2006, 08:35 PM   #14
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,136
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
I just relooked at your first post. You have eth0 and eth1 on the same subnet. They need to be on different subnets.

If your switch has a port on it made to hook to another switch or router then a patch cable is fine. If not then you need a crossover cable from the switch to router.

If you have a switch then use one network device in the machine and hook all mahines to the switch. Hook the switch to the router. All machines will have internet access, and you can share files, or use the linux machine as a samba server.

Unless you are setting up the linux box as a firewall, or proxy.

Put the 2 cards on different subnets. Give each one a IP like
192.168.1.100
192.168.2.100

Then specify a default route, or gateway, A DNS server to get outside the LAN.
 
Old 01-12-2007, 10:42 AM   #15
Furlinastis
Member
 
Registered: Dec 2004
Location: Ball of Confusion
Distribution: Artix,Arch,Slackware,Bluewhite64
Posts: 261

Original Poster
Rep: Reputation: 40
I'm not sure it's the cable. I forget whether it's crossover or patch but I do know that I've always used that cable and it's always worked. I think I'm ruling out the cable as a factor as I can connect my windows box to the router with that cable and it works fine.

The only thing I haven't ruled out completely is whether or not the 10/100 card is working, but I can ping it. I'm going to have to connect it to the subnet to make certain it works, but I don't think that's the problem. In fact, come to think of it, I'm pretty sure I tried connecting my gigabit card to the router and it still didn't work and I know my gigabit card is working fine since it can talk with my windows box.

What I've done now is set both computers on a subnet 192.168.64.0... and they can both communicate fine. It's just getting my slackware machine to talk with the router. Maybe there's a setting in the router I could change? I'm fairly certain is a linksys befsr41.

My route looks sort of like this: (I'm at work so I don't have my machine on hand)

192.168.64.0 0.0.0.0 255.255.255.0 eth0 (gigabit ethernet device that connects to my windows machine via a switch)
192.168.123.0 0.0.0.0 255.255.255.0 eth1 (megabit ethernet that connects directly to my router)
127.0.0.0 0.0.0.0 255.0.0.0 lo
0.0.0.0 192.168.123.254 ?.?.?.? eth1 (default gateway that refuses to work right)

I was reading in man route that in order to route a connection to a gateway you have to have a static route already in place. How would I do this? The only way I know to establish a route is with the route command. I've tried apropos this and man -k that but I can't find anything.

Last edited by Furlinastis; 01-12-2007 at 10:44 AM.
 
  


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
Gentoo refuses to connect to internet adamb10 Linux - Networking 5 04-07-2005 09:51 AM
ssh internet -> router -> slackbox Tuttle Linux - Networking 5 09-14-2004 01:51 PM
Apollon refuses to connect. Courthold Linux - Software 4 08-01-2004 04:26 PM
MYSQL refuses to connect edhan Linux - Newbie 15 09-08-2003 04:27 AM
Please somone help internet problem for my slackbox. KrazyKid Slackware 3 08-08-2002 01:52 PM

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

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