LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-16-2010, 08:07 PM   #1
chickonlinux
LQ Newbie
 
Registered: Oct 2010
Location: Northeast PA
Distribution: CentOS
Posts: 21

Rep: Reputation: 1
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 ?
 
Old 10-16-2010, 08:22 PM   #2
johnshen64
LQ Newbie
 
Registered: Jun 2010
Posts: 29

Rep: Reputation: 5
what is the output of the following?

dhclient eth0

and then

ifconfig eth0
 
Old 10-16-2010, 08:41 PM   #3
chickonlinux
LQ Newbie
 
Registered: Oct 2010
Location: Northeast PA
Distribution: CentOS
Posts: 21

Original Poster
Rep: Reputation: 1
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:
Originally Posted by johnshen64 View Post
what is the output of the following?

dhclient eth0

and then

ifconfig eth0
 
Old 10-16-2010, 09:13 PM   #4
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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)?
 
Old 10-16-2010, 09:26 PM   #5
chickonlinux
LQ Newbie
 
Registered: Oct 2010
Location: Northeast PA
Distribution: CentOS
Posts: 21

Original Poster
Rep: Reputation: 1
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:
Originally Posted by paulsm4 View Post
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)?

Last edited by chickonlinux; 10-16-2010 at 09:26 PM. Reason: typo
 
Old 10-17-2010, 01:53 AM   #6
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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
  <= Insure DHCP isn't getting blocked
2. NETCONF EXAMPLE:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
Code:
# Example static: DON'T do this!
# DEVICE=eth0
# BOOTPROTO=static
# HWADDR=00:19:D1:2A:BA:A8
# IPADDR=10.10.29.66
# NETMASK=255.255.255.192
# ONBOOT=yes

# Example DHCP: DON'T specify IP or subnet mask...
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:19:D1:2A:BA:A8
ONBOOT=yes

Last edited by paulsm4; 10-17-2010 at 07:16 PM.
 
Old 10-18-2010, 05:33 PM   #7
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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
 
Old 10-18-2010, 06:03 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,122

Rep: Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866Reputation: 1866
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?
 
Old 10-19-2010, 05:45 AM   #9
chickonlinux
LQ Newbie
 
Registered: Oct 2010
Location: Northeast PA
Distribution: CentOS
Posts: 21

Original Poster
Rep: Reputation: 1
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:
Originally Posted by paulsm4 View Post
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
 
Old 10-19-2010, 05:46 AM   #10
chickonlinux
LQ Newbie
 
Registered: Oct 2010
Location: Northeast PA
Distribution: CentOS
Posts: 21

Original Poster
Rep: Reputation: 1
The adapter appears to be recognized as one can configure it manually. Tell me more about these tools! I am new to these

Quote:
Originally Posted by michaelk View Post
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?
 
Old 10-19-2010, 10:04 AM   #11
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
OK, then please cut/paste the exact output of the following:

1. ifconfig eth0
Code:
  /sbin/ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:0C:76:E2:71:C5
          inet addr:192.168.1.xxx  Bcast:192.168.1.xxx  Mask:255.255.255.0
          inet6 addr: fe80::xxx:76ff:fee2:71c5/64 Scope:Link
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:593541 errors:0 dropped:0 overruns:0 frame:0
          TX packets:386699 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:88323609 (84.2 Mb)  TX bytes:487001350 (464.4 Mb)
          Interrupt:10 Base address:0xcf00
2. dhclient eth0
Code:
/sbin/dhclient eth0
Internet Systems Consortium DHCP Client V3.0.5-RedHat
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

/sbin/dhclient-script: configuration for eth0 not found. Continuing with defaults.
/etc/sysconfig/network-scripts/network-functions: line 78: eth0: No such file or directory
SIOCSIFADDR: No such device
eth0: unknown interface: No such device
eth0: unknown interface: No such device
Failed to get interface index: No such device
3. ethtool eth0 ("ethtool" is generally preferred over "mii-tool"):
Code:
/usr/sbin/ethtool eth0
Settings for eth0:
        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
4. less /var/log/messages
<= Cut/paste any messages related to the failed DHCP request(s)

... and, most importantly ...

5. dhcpcd -r
Code:
/sbin/dhcpcd -r
****  /sbin/dhcpcd: already running
****  /sbin/dhcpcd: if not then delete /var/run//dhcpcd-eth0.pid file

Last edited by paulsm4; 10-19-2010 at 10:06 AM.
 
Old 10-19-2010, 08:39 PM   #12
chickonlinux
LQ Newbie
 
Registered: Oct 2010
Location: Northeast PA
Distribution: CentOS
Posts: 21

Original Poster
Rep: Reputation: 1
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:
Originally Posted by paulsm4 View Post
OK, then please cut/paste the exact output of the following:

1. ifconfig eth0
Code:
  /sbin/ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:0C:76:E2:71:C5
          inet addr:192.168.1.xxx  Bcast:192.168.1.xxx  Mask:255.255.255.0
          inet6 addr: fe80::xxx:76ff:fee2:71c5/64 Scope:Link
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:593541 errors:0 dropped:0 overruns:0 frame:0
          TX packets:386699 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:88323609 (84.2 Mb)  TX bytes:487001350 (464.4 Mb)
          Interrupt:10 Base address:0xcf00
2. dhclient eth0
Code:
/sbin/dhclient eth0
Internet Systems Consortium DHCP Client V3.0.5-RedHat
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

/sbin/dhclient-script: configuration for eth0 not found. Continuing with defaults.
/etc/sysconfig/network-scripts/network-functions: line 78: eth0: No such file or directory
SIOCSIFADDR: No such device
eth0: unknown interface: No such device
eth0: unknown interface: No such device
Failed to get interface index: No such device
3. ethtool eth0 ("ethtool" is generally preferred over "mii-tool"):
Code:
/usr/sbin/ethtool eth0
Settings for eth0:
        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
4. less /var/log/messages
<= Cut/paste any messages related to the failed DHCP request(s)

... and, most importantly ...

5. dhcpcd -r
Code:
/sbin/dhcpcd -r
****  /sbin/dhcpcd: already running
****  /sbin/dhcpcd: if not then delete /var/run//dhcpcd-eth0.pid file
 
Old 10-19-2010, 11:50 PM   #13
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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

Last edited by paulsm4; 10-20-2010 at 12:00 AM.
 
Old 10-20-2010, 08:39 PM   #14
chickonlinux
LQ Newbie
 
Registered: Oct 2010
Location: Northeast PA
Distribution: CentOS
Posts: 21

Original Poster
Rep: Reputation: 1
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:
Originally Posted by paulsm4 View Post
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
 
Old 10-21-2010, 01:01 PM   #15
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

1. At its simplest level (which is absolutely all you need), "tcpdump" is really, really easy:
Quote:
tcpdump -nS
Here's an example:
Code:
tcpdump -nS > tmp.txt
<<wait a few moments, then Ctl-C>>

less tmp.txt
10:55:10.193469 IP zz.183.40.xxx.49985 > zz.99.83.xxx.ssh: . ack 3499409730 win 32920
10:55:10.193509 IP zz.99.83.xxx.ssh > zz.183.40.xxx.49985: P  499409846:3499410146(300) ack 4003329759 win 8576
10:55:10.242646 IP zz.183.40.xxx.49985 > zz.99.83.xxx.ssh: . ack  499410146 win 32504
10:55:12.499468 IP zz.183.40.xxx.49985 > zz.99.83.xxx.ssh: P  003329759:4003329811(52) ack 3499410146 win 32504
2. Here are two tcpdump links:
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
determining IP information for eth0 failed! me99 Linux - Networking 10 01-13-2008 12:01 PM
Determining IP information for eth0... Failed ddan Linux - Networking 21 10-04-2006 08:21 PM
Bringing up interface eth0 Delaying eth0 initialization. [ FA bansal_ashok Linux - Networking 4 05-27-2005 10:09 AM
FC3 fails in bringing up or down interface eth0, network unreachable a_cmmn Linux - Networking 4 03-10-2005 04:10 PM
Bringing up interface eth0: determining ip information for eth0... failed ralphethomas Linux - Networking 0 01-24-2004 05:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:22 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration