Bringing up interface eth0 determining IP information fails
CentOS 4.7 a minimal installation with no GUI
Ethernet Controller RTL-8029 Running /sbin/lspci shows the Ethernet card.... ifcfg-eth0 shows BOOTPROTO=dhcp NIC is connected to a LINKSYS WRT54G running DHCP. There are plenty of available IP assignments. All other PC that I have connected to the LINKSYS work fine. The CAT 5 cable is fine. Why is this NIC not taking a DHCP assignment ? |
what is the output of the following?
dhclient eth0 and then ifconfig eth0 |
DHCPDISCOVER on NUMEROUS ports, then No DHCPOFFERS received. Np working leases in persistent database - sleeping
ifconfig eth0 shows the interface but no inet IP assignment. Also to note is 113 dropped RX packets and 8 errors on TX packets Quote:
|
Hi -
From the sounds of it, it *should* work. A couple of observations/suggestions: 1. It sounds like you're knowledgeable, and that you're doing everything right. 2. You imply you've got an Ethernet adapter (not wifi), and you're plugging it directly into your WRT54G router. Q: is this correct? 3. If so, please double-check your /sbin/ifconfig output, and DISABLE all interfaces besides your eth0. Don't mess with multiple interfaces until we get *one* interface working. 4. The problem clearly appears to be DHCP. Q: Have you considered simply assigning a static address (if only for debugging purposes)? |
I have quite a few years of technical experience so Im not exactly a newbie ;-)
Yes, I have a Ethernet card with a CAT 5 cable connected to the router. eth0 is the only interface at this point aside from local loopback. Static assignment ? I still want to understand why assignment is not happening dynamically. If need be, we can go that route. Quote:
|
Well, you can always try a network trace to see who's dropping the ball. You can use tcpdump (cmd-line) on Centos, or Wireshark on any of the other PCs on your LAN.
There might be some kind of conflict between Netmanager and your low-level configuration files (such as /etc/sysconfig/network-scripts/ifcfg-eth0, which I believe you cited in your original post). Who knows - Centos might also have some firewall setting that's blocking DHCP. But I think I'm stretching... If it's no hassle, try seeing if a static address works. And if so, double-check the settings in your /etc/sysconfig/network-scripts and/or go back to DHCP and try taking a network trace. Good luck - and please post back what you find! PS: 1. FIREWALL EXAMPLE: Code:
iptables -I INPUT -i eth0 -p udp --sport 67:68 --dport -j ACCEPT vi /etc/sysconfig/network-scripts/ifcfg-eth0 Code:
# Example static: DON'T do this! |
Hi, Stephanie -
Q: Did you get it working? Q: If so, what was the problem? If not, perhaps maybe I could install CentOS 4.7 on a VM and try reproducing it? (I'm currently running CentOS 5.5 on a VPS, but that's not really applicable to your scenario). Please let us know! TIA .. PSM |
The card may nor may not be configured for auto negotiation. Does mii-tool or ethtool recognize the adapter? If so how is it configured?
|
Nope, I upgraded to CentOS 4.8 because my application allowed that. I acutally ordered a new ethernet card that is stated to be compatible with Linux. My current card uses a RTL8029 chipset which is a commonly used chipset though.
Quote:
|
The adapter appears to be recognized as one can configure it manually. Tell me more about these tools! I am new to these
Quote:
|
OK, then please cut/paste the exact output of the following:
1. ifconfig eth0 Code:
/sbin/ifconfig eth0 Code:
/sbin/dhclient eth0 Code:
/usr/sbin/ethtool eth0 <= Cut/paste any messages related to the failed DHCP request(s) ... and, most importantly ... 5. dhcpcd -r Code:
/sbin/dhcpcd -r |
Getting information off the machine onto this machine is a bit of an issue.
I can summarize the results this way: ifconfig eth0: shows no assigned inet addr, states UP BROADCAST RUNNING MULTICAST, 18 RX packet errors & 7 TX packet errors dhclient eth0: shows several DHCPDISCOVER attempt messages and finally NO DHCP OFFERS received ethtool eth0: showed results similar to your "code" results. Actually, the RTL8029 NIC showed "NO DATA AVAILABLE" after running ethtool. My new DLINK NIC showed a whole table of results. less /var/log/messages: showed ifup failed. Bringing up interfae eth0 failed. Saw a number of NETDEV WATCHDOG eth0 transmit timed out messages dhcpcd does not exist in sbin...this is the client daemon ? If I type dhclient again it tells me its already running. Quote:
|
Sorry :-(
You're *so* doing all the right things - it's frustrating that it hasn't paid off yet. If at all possible, please try a static IP. If only for debugging purposes. IMHO... PS: Some "grasping at straws" suggestions: 1. Disable your Linux firewall, e.g. service iptables stop 2. Disable selinux (frankly, if you're at Centos 4.x, I doubt you even *have* selinux): setenforce 0 3. You could do worse than run a tcpdump trace on Centos, and/or a Wireshark trace anywhere else |
It is frustrating...wah ! lol
I tried setting a static IP. Set a default GW. Flushed iptables of its rules. Still cant ping beyond my NIC. Have any good primers on interpreting tcpdump ? Quote:
|
Hi -
1. At its simplest level (which is absolutely all you need), "tcpdump" is really, really easy: Quote:
Code:
tcpdump -nS > tmp.txt http://www.tcpdump.org/ http://danielmiessler.com/study/tcpdump/ 3. Any luck on the "grasping at straws" suggestions (firewall and/or SELinux)? 4. Any chance to try swapping hardware (swap cable, swap NIC, try on a side-by-side PC, etc)? Crossing my fingers :) |
All times are GMT -5. The time now is 10:57 PM. |