Squeeze, Realtek r8169 PCI, and a PCI Identity Crisis
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Squeeze, Realtek r8169 PCI, and a PCI Identity Crisis
GAHHH!!!!! Alright, now that that's out of the way... Hello Linux Questions. For years this site has saved my ass time and time again all without ever even needing to register. Today is a different story. Quick summary: I run a small record label, music studio, internet radio station, post production and mixing services for artists over the interwebs, and a Worldgroup BBS. Our computer network resembles what the Millennium Falcon must have had on board, that is, a bunch of old beat up gear that all works, just not all at the same time. For years our trusty linux box, a beast of a machine at over 50kg named Jupiter, has keep the whole shebang running.
We're in the middle of implementing a somewhat more sane backup policy and have begun purchasing external drives along with a shiney new 1000baseT network card, an Encore ENLGA-1320. I selected the 1320 mainly because it was less than 10 bucks and included drivers for Linux in the box. Figured that was a good sign. Yesterday, the card was installed along side two 10/100 cards and the instructions provided followed to the letter. This worked GREAT! ...for about 35 seconds. Then the machine stopped sending data. I did an ifdown, and an ifup and froze the SSH session. I did the same locally and froze the tty session. After a few reboots the card came back up and worked again for a few minutes, sending data happily faster than ever. Again, it stopped mid file transfer (over SAMBA. I know, im sorry.) This time, I went straight for the terminal and ifdown/ifupped it and was greeted with another freeze and this time a kernel panic (I assume? The machine actually squeeked. I didn't even know it could do that.) Figuring that our Debian install was just old and beat up, mainly by my own hastily issues apt-get upgrade commands (a la 'eh, whatever, get new stuff, it's gotta be better. New Debian out? Sweet! Switch repositories and update from THERE! Bwahahaha').
I assumed a clean install was the way to go and the machine was backed up and wiped. I installed Debian Squeeze (from a newly burned net install CD) and in this order:
apt-get update, apt-get upgrade (no packaged updated)
apt-get install nano, then downloaded webmin deb package. Ran in to some dependency problems, so I apt-get installed gcc (even tho it's not listen in it's requirements, I find it fixes broken dependencies with perl. I have no idea why.) GCC was installed, along with perl, libnet-ssleay-perl, libauthen-pam-perl, libio-pty-perl, and apt-show-versions. Webmin was then successfully installed without any -f options.
I was about to test the new gigabit network interface when I realized ifconfig -a didn't list it. Oh no. So I started snooping around with lspci and found that it is now reporting something different than it did with Debian lenny installed. Lenny correctly reported Realtek r8169. (I don't have this output as the system was wiped) What? I didn't even know that was possible!
So, I figured I'd do it right this time and come to you guys. After the card was listed incorrectly, I signed up to Linux Questions and haven't issued as much as an LS command yet. Please help. I'd really love for this thing to work and get all these computers back up and backing up. (ooo, wordplay). Without further ado;
TL;DR: Realtek r8169 PCI network card not being detected by Debian Squeeze and being misreported by lspci.
output of uname -r:
--------------------------------
2.6.32-5-686
--------------------------------
trimmed output of lspci -vv (formerly read Realtek 8169):
--------------------------------
00:10.0 Ethernet controller: Hynix Semiconductor Device 8169 (rev 10)
Subsystem: Hynix Semiconductor Device 8169
Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin A routed to IRQ 0
Region 0: I/O ports at e800 [disabled] [size=256]
Region 1: Memory at febfff00 (32-bit, non-prefetchable) [disabled] [size=256]
[virtual] Expansion ROM at 40000000 [disabled] [size=128K]
--------------------------------
A few quick answers to possible 'Why the hell did you....'
Three cards because I'd like to finally get rid of this consumer broadband router and replace it with the linux machine. I'd like to offer wireless at the many events we host here but don't want random joe public to be able to do funny things to files in the studio.
Nuked and paved because the lenny install was limping along due to my own incompetence, and after installing another hard drive for incomming FTP files, I wanted to do away with the /media mount point and mount the big drive as /home
This post is so long because you guys are awesome and deserve some entertainment after all the years of fixing this machine and not even knowing it. Thanks!
First off, great post! I can't believe no one's replied to you yet....
Okay, the Realtek chipsets have given me a fair shake of heartburn over the years. So let me first part with some sage advice;
a) Some Realtek hipsets don't play nice-nice when there's more than one card in there.
If you want three NICs, you *literally* have to have three different cards in there.
b) Some times this isn't the fault of the Realtek chipsets on the NICs, but the driver your Linux distro is using.
Quite honestly, some of the NIC drivers are just implementations of the reference PCI NIC driver. Heck, the code is sometimes line-by-line the same.
The driver for the Realtek you have should be compiled as a module, so you might have to "modprobe" it. If you're curious about the code, here's the gist of it; http://www.cs.fsu.edu/~baker/devices...rs/net/r8169.c
c) With a little patience (or maybe a lot, not sure how much compiling you've done in your time), you can get the Realtek drivers from Realtek *themselves* to work.
Here's the page on their website I'm talking about. They have support for the following cards in the "UNIX" section (scroll down a bit).
Now, if you really want to know if it's a problem with the Realtek, or a problem with your Linux Distribution (or it's System Administrator ;P), grab a KNOPPIX Live CD and boot off of that. In my experience, if KNOPPIX don't find it, it's a hardware problem.
First, thanks for the replies! Quick update! Still working on this machine. I got drivers from Realtek to compile (after some digging around in order to get the linux headers installed), modprobed them in to the kernel and verified that lsmod showed the 8169 driver, and still, nothing. Damn dirty bastard machine. Then, I'll assume the machine heard all the cursing and insults flying around the house and retaliated. ...power supply went. Sweet baby jesus. Right in the middle of copying all the web data back to it no less (about 20gb of client mp3 and wav files). I'm now waiting for a power supply to arrive. Also considering on upgrading the processors while I'm at it. Currently installed: Dual PIII Xeons, 500mhz, slot 1. Fancy! That is, if I can find some super el-cheapo like.
@xeleema: It's very likely the admin. He's a jerk. Also, I might try removing the other cards and see how that works out, then perhaps add one by one.
Will post back when I get the machine booting again. Can anyone recommend an inexpensive gigabit pci network card?
You should check /etc/apt sources.list to see if "non-free contrib" are included it'll make your job easier.
I will certainly do that. Can you give a quick explanation as to why that will help? Does it have something to do with Debian and them not making certain packages available due to licensing? I don't fully understand why they do that, or what packages I can expect to have trouble with.
Hardware update, seems 500mhz is about as quick as it's gonna get on the Tyan Tiger 100 main board. (550 max, but extra 50mhz x2 is not worth the time required to track down legacy processors, install them, and risk breaking more crap in my opinion)
The saga continues! New power supply, mainboard, processor, and NIC. Take THAT, r8169, jerk. Got the machine up and running again after loads of hardware swapping, new copy of squeeze installed and all three NICs happily sending and receiving data, so I got bold and did away with our crappy consumer broadband router (and in the process, saw our max download speed increase from 1.1mB to 3.2mB!). Now it's an epic battle with iptables. I'll be starting another post here soon, but figured I'd start here as you guys awesome.
The long short of it is; eth0 is our LAN (the new gigabit card), eth1 is the interwebs, and eth2 will be public WIFI. I need the machine to accept connections on 21, 22, and 80, and forward 23 to another internal address.
Through sheer persistence and manual reading, I've got NAT working (I think at least, I'm posing this from another internal machine...as for the whole masquerading bit, well.. read below), nasty traffic being blocked, and I think I'm even keeping the angry Russian script kiddies at bay with a neat SSH chain.
Two problems; The machine will not forward incoming connections to another internal machine, and;
I'm able to remove a line from our NAT section without any noticeable effect. Does that mean the iptables are badly configured and im inviting disaster? Here is the script I'm using for IP table setup:
#!/bin/bash
# eth0 LAN, eth1 Internet, eth2 public wireless
# Flush all current rules from iptables
iptables -F
# Set default policies for INPUT, FORWARD and OUTPUT chains
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
# Set access for localhost and LAN
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -i eth0 -j ACCEPT
# Accept packets belonging to established and related connections
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Open ports for public services
iptables -A INPUT -i eth1 -p tcp --dport ftp -j ACCEPT
iptables -A INPUT -i eth1 -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -i eth1 -p tcp --dport ssh -j ACCEPT
# Limit SSH attempts
iptables -N SSH_CHECK
iptables -A INPUT -p tcp --dport 22 -m state --state NEW -j SSH_CHECK
iptables -A SSH_CHECK -m recent --set --name SSH
iptables -A SSH_CHECK -m recent --update --seconds 300 --hitcount 4 --name SSH -j DROP
# Open ports for other machines. (Forwarding)
iptables -t nat -A PREROUTING --in-interface eth1 -p tcp --dport 23 -j DNAT --to-destination 192.168.1.60:23
iptables -A FORWARD -p tcp --destination 192.168.1.60 --dport 23 -j ACCEPT
# Network Address Translation
iptables -A POSTROUTING -t nat -o eth1 -j MASQUERADE
iptables -A FORWARD -t filter -o eth1 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -t filter -i eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
# Logging
# Save settings with /sbin/service iptables save
# List iptables chains with 'iptables -L -v'
/sbin/iptables-save
#Display config
iptables -L -v
And the iptables -L output:
Chain INPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- lo any anywhere anywhere
2 80 ACCEPT all -- eth0 any anywhere anywhere
0 0 ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED
0 0 ACCEPT tcp -- eth1 any anywhere anywhere tcp dpt:ftp
0 0 ACCEPT tcp -- eth1 any anywhere anywhere tcp dpt:www
0 0 ACCEPT tcp -- eth1 any anywhere anywhere tcp dpt:ssh
0 0 SSH_CHECK tcp -- any any anywhere anywhere tcp dpt:ssh state NEW
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- any any anywhere 192.168.1.60 tcp dpt:telnet
0 0 ACCEPT all -- any eth1 anywhere anywhere state NEW,RELATED,ESTABLISHED
0 0 ACCEPT all -- eth1 any anywhere anywhere state RELATED,ESTABLISHED
Chain OUTPUT (policy ACCEPT 4 packets, 4328 bytes)
pkts bytes target prot opt in out source destination
Chain SSH_CHECK (1 references)
pkts bytes target prot opt in out source destination
0 0 all -- any any anywhere anywhere recent: SET name: SSH side: source
0 0 DROP all -- any any anywhere anywhere recent: UPDATE seconds: 300 hit_count: 4 name: SSH side: source
The line I can pull from the script is:
iptables -A POSTROUTING -t nat -o eth1 -j MASQUERADE
What does that line do, or do not do? Why do things work without it?
I can't give any advice other than, is the other machine configure to accept new connection?
The plot thickens. I can connect to the internal server from the gateway and also from an external machine, but connection requests form the LAN are ignored.
('Auto-sensing...' = good connection. And nostalga inducing awesomeness for any old dudes in here.)
From the gateway via IP:
telnet 192.168.1.60 23
Trying 192.168.1.60...
Connected to 192.168.1.60.
Escape character is '^]'.
Auto-sensing...
From our vps@remote dc:
telnet bbs.empulserecords.com 23
Trying 184.91.47.188...
Connected to bbs.empulserecords.com.
Escape character is '^]'.
Auto-sensing...
From our vps using via IP:
telnet 184.91.47.188 23
Trying 184.91.47.188...
Connected to 184.91.47.188.
Escape character is '^]'.
Auto-sensing...
But from the gateway using domain name;
telnet bbs.empulserecords.com 23
Trying 184.91.47.188...
telnet: Unable to connect to remote host: Connection refused
This has provided more entertainment than most video games do.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.