LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   No DHCP on wired internet connection (Realtek RTL8139) (https://www.linuxquestions.org/questions/linux-networking-3/no-dhcp-on-wired-internet-connection-realtek-rtl8139-508461/)

p41elvis 12-08-2006 02:47 AM

No DHCP on wired internet connection (Realtek RTL8139)
 
Hi everybody,

I am running Mandriva 2007 and have a wired network card, the Realtek RTL8139. If I connect to a network I do not receive DHCP offers, I assume that my DHCP requests do not even come through. If I connect to the network running Windows everything works fine, so it is not a network issue. I have this problem on all the networks I connect to using the wired NIC. It always works on Windows and never on Linux. When I set a fixed IP it still does not work, I can not ping any other machine in the network and I can not make use of the Internet.

This is what happens:
Quote:

[root@localhost network-scripts]# ifconfig eth0 up
[root@localhost network-scripts]# dhclient eth0
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

wifi0: unknown hardware address type 801
wifi0: unknown hardware address type 801
Listening on LPF/eth0/00:a0:d1:2f:9a:6a
Sending on LPF/eth0/00:a0:d1:2f:9a:6a
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 17
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
This is what my ifcfg-eth0 looks like:
Quote:

[root@localhost jethro]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
METRIC=10
MII_NOT_SUPPORTED=no
USERCTL=yes
RESOLV_MODS=no
IPV6INIT=no
IPV6TO4INIT=no
DHCP_CLIENT=dhclient
NEEDHOSTNAME=yes
PEERDNS=yes
PEERYP=yes
PEERNTPD=no
This is what I have done to try to fix this:
- putting "alias net-pf-10 off" in /etc/modprobe.conf
- disable apic and lapic

This is how my /etc/modprobe.conf looks:
Quote:

[root@localhost jethro]# cat /etc/modprobe.conf
alias eth0 8139too
alias sound-slot-0 snd-hda-intel
install scsi_hostadapter /sbin/modprobe sata_sil; /bin/true
remove snd-hda-intel /sbin/modprobe -r snd-pcm-oss; /sbin/modprobe --first-time -r --ignore-remove snd-hda-intel
install snd-hda-intel /sbin/modprobe --first-time --ignore-install snd-hda-intel && { /sbin/modprobe snd-pcm-oss; /bin/true; }
install usb-interface /sbin/modprobe ohci-hcd; /sbin/modprobe ehci-hcd; /bin/true
alias eth1 eth1394
alias ieee1394-controller ohci1394
alias ath0 ath_pci
alias net-pf-10 off
This is what I extracted from /var/log/messages:
Quote:

Dec 5 13:37:56 localhost kernel: NET: Registered protocol family 17
Dec 5 13:37:56 localhost kernel: ath_hal: module license 'Proprietary' taints kernel.
Dec 5 13:37:56 localhost kernel: ath_hal: 0.9.18.0 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
Dec 5 13:37:56 localhost kernel: wlan: 0.8.4.2 (svn r1753)
Dec 5 13:37:56 localhost kernel: ath_rate_sample: 1.2 (svn r1753)
Dec 5 13:37:56 localhost kernel: ath_pci: 0.9.4.5 (svn r1753)
Dec 5 13:37:56 localhost kernel: ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 11
Dec 5 13:37:56 localhost kernel: ACPI: PCI Interrupt 0000:02:04.0[A] -> Link [LNKB] -> GSI 11 (level, low) -> IRQ 11
Dec 5 13:37:56 localhost kernel: wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
Dec 5 13:37:56 localhost kernel: wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
Dec 5 13:37:56 localhost kernel: wifi0: H/W encryption support: WEP AES AES_CCM TKIP
Dec 5 13:37:56 localhost kernel: wifi0: mac 7.8 phy 4.5 radio 5.6
Dec 5 13:37:56 localhost kernel: wifi0: Use hw queue 1 for WME_AC_BE traffic
Dec 5 13:37:56 localhost kernel: wifi0: Use hw queue 0 for WME_AC_BK traffic
Dec 5 13:37:56 localhost kernel: wifi0: Use hw queue 2 for WME_AC_VI traffic
Dec 5 13:37:56 localhost kernel: wifi0: Use hw queue 3 for WME_AC_VO traffic
Dec 5 13:37:56 localhost kernel: wifi0: Use hw queue 8 for CAB traffic
Dec 5 13:37:56 localhost kernel: wifi0: Use hw queue 9 for beacons
Dec 5 13:37:56 localhost kernel: wifi0: Atheros 5212: mem=0xc0200000, irq=11
Dec 5 13:37:56 localhost kernel: 8139too Fast Ethernet driver 0.9.27
Dec 5 13:37:56 localhost kernel: ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 10
Dec 5 13:37:56 localhost kernel: ACPI: PCI Interrupt 0000:02:07.0[A] -> Link [LNKC] -> GSI 10 (level, low) -> IRQ 10
Dec 5 13:37:56 localhost kernel: eth0: RealTek RTL8139 at 0xf9126000, 00:a0:d1:2f:9a:6a, IRQ 10
Dec 5 13:37:56 localhost kernel: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
Dec 5 13:37:56 localhost kernel: ACPI: PCI Interrupt 0000:00:14.2[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
Dec 5 13:37:57 localhost dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
Dec 5 13:37:58 localhost kernel: hda_codec: Unknown model for ALC861, trying auto-probe from BIOS...
Dec 5 13:38:01 localhost dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
Dec 5 13:38:09 localhost dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
Dec 5 13:38:16 localhost dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 18
Dec 5 13:38:17 localhost kernel: tun: Universal TUN/TAP device driver, 1.6
Dec 5 13:38:17 localhost kernel: tun: 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
Dec 5 13:38:17 localhost udevd-event[3402]: udev_node_symlink: symlink(../tun, /dev/net/tun) failed: File exists
Dec 5 13:38:17 localhost avahi-daemon[3509]: Found user 'avahi' (UID 71) and group 'avahi' (GID 71).
Dec 5 13:38:18 localhost avahi-daemon[3509]: Successfully dropped root privileges.
Dec 5 13:38:18 localhost avahi-daemon[3509]: avahi-daemon 0.6.13 starting up.
Dec 5 13:38:18 localhost avahi-daemon[3509]: WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
Dec 5 13:38:18 localhost avahi-daemon[3509]: Successfully called chroot().
Dec 5 12:38:18 localhost avahi-daemon[3509]: Successfully dropped remaining capabilities.
Dec 5 12:38:18 localhost avahi-daemon[3509]: Failed to read /etc/avahi/services.
Dec 5 12:38:18 localhost avahi-daemon[3509]: socket() failed: Address family not supported by protocol
Dec 5 12:38:18 localhost avahi-daemon[3509]: Network interface enumeration completed.
Dec 5 12:38:18 localhost avahi-daemon[3509]: Registering HINFO record with values 'I686'/'LINUX'.
Dec 5 12:38:18 localhost avahi-daemon[3509]: Server startup complete. Host name is localhost.local. Local service cookie is 2248768130.
Dec 5 13:38:18 localhost rpc.statd[3649]: Version 1.0.9 Starting
Dec 5 13:38:19 localhost xinetd[3599]: xinetd Version 2.3.14 started with libwrap options compiled in.
Dec 5 13:38:19 localhost xinetd[3599]: Started working: 0 available services
Dec 5 13:38:19 localhost kdm_config[3671]: Invalid option value 'All' at /usr/share/config/kdm/kdmrc:359
Dec 5 13:38:21 localhost crond[3811]: (CRON) STARTUP (V5.0)
Dec 5 13:38:22 localhost kernel: mtrr: no more MTRRs available
Dec 5 13:38:23 localhost kernel: NETDEV WATCHDOG: eth0: transmit timed out
Dec 5 13:38:25 localhost nmbd[3874]: [2006/12/05 13:38:25, 0] nmbd/nmbd_subnetdb.c:create_subnets(188)
Dec 5 13:38:25 localhost nmbd[3874]: create_subnets: No local interfaces !
Dec 5 13:38:25 localhost nmbd[3874]: [2006/12/05 13:38:25, 0] nmbd/nmbd_subnetdb.c:create_subnets(189)
Dec 5 13:38:25 localhost nmbd[3874]: create_subnets: Waiting for an interface to appear ...
Dec 5 13:38:26 localhost kernel: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

Dec 5 13:38:34 localhost dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 21
Dec 5 13:38:51 localhost kernel: hda-intel: Invalid position buffer, using LPIB read method instead.
Dec 5 13:38:55 localhost dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
Dec 5 13:38:55 localhost net_applet[4368]: ### Program is starting ###
Dec 5 13:38:55 localhost mdkapplet[4370]: ### Program is starting ###
Dec 5 13:38:58 localhost dhclient: No DHCPOFFERS received.
Dec 5 13:38:58 localhost ifplugd(eth0)[1988]: client: Determining IP information for eth0... failed.
Dec 5 13:38:58 localhost ifplugd(eth0)[1988]: Program execution failed, return value is 1.
Dec 5 13:38:58 localhost ifplugd(eth0)[1988]: Exiting.
I am out of options at this point so I have no idea how to fix this problem. Any help will be greatly appreciated.

Best regards,
Jethro Borsje

MaizeNBlue2 12-09-2006 01:40 AM

The only thing I see that stands out is in "ifcfg-eth0" the metric is set to 10, but when in /var/log/messages it's showing it's going up as 100 Mbps Full Duplex. If I recall correctly (it's been a while) this isn't right. If it's trying to start as 100 Mbps and your metric is 10 Mbps, then it might affect it? You could try setting the metric in "ifcfg-eth0" to 100 and see what happens. If it doesn't help, you can always change it back.

-Josh-

davide879 12-09-2006 01:41 AM

Realtek 8139 W/ Mandriva 2007
 
I have the same problem. Everything works in MShit but nodda in Mandriva. I even disabled the onboard Realtek and installed a pci nic and the same thing occurs.

I am using ALICE DSL connection here in Italy and in the configuration, it ask for user name and password (for pppoa). I enter this info correctly but nodda.

I am using the ASUS A8N-ALI mainboard with the built in NIC Realek 8139

Thanks for any information,
David :confused:

p41elvis 12-09-2006 10:22 AM

Quote:

Originally Posted by j_houch
The only thing I see that stands out is in "ifcfg-eth0" the metric is set to 10, but when in /var/log/messages it's showing it's going up as 100 Mbps Full Duplex. If I recall correctly (it's been a while) this isn't right. If it's trying to start as 100 Mbps and your metric is 10 Mbps, then it might affect it? You could try setting the metric in "ifcfg-eth0" to 100 and see what happens. If it doesn't help, you can always change it back.

Thanks for your reply. However changing the metric from 10 to 100 in ifcfg-eth0 does not change anything. Something else I noticed was this line in the shutdown message sequence:
Quote:

Bringing down network interface eth0: Failed to shutdown deamon (no such file or directory)
This does not sound ok to me.

I looked more closely and /var/log/messages and this part also looks strange to me:
Quote:

Dec 9 16:36:00 localhost kdm_config[3671]: Invalid option value 'All' at /usr/share/config/kdm/kdmrc:359
Dec 9 16:36:02 localhost crond[3833]: (CRON) STARTUP (V5.0)
Dec 9 16:36:02 localhost kernel: mtrr: no more MTRRs available
Dec 9 16:36:04 localhost dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13
Dec 9 16:36:05 localhost nmbd[3930]: [2006/12/09 16:36:05, 0] nmbd/nmbd_subnetdb.c:create_subnets(188)
Dec 9 16:36:05 localhost nmbd[3930]: create_subnets: No local interfaces !
Dec 9 16:36:05 localhost nmbd[3930]: [2006/12/09 16:36:05, 0] nmbd/nmbd_subnetdb.c:create_subnets(189)
Dec 9 16:36:05 localhost nmbd[3930]: create_subnets: Waiting for an interface to appear ...
Dec 9 16:36:08 localhost kernel: bootsplash 3.1.6-2004/03/31: looking for picture...<6>...found (800x600, 12533 bytes, v3).
Dec 9 16:36:08 localhost kernel: bootsplash: status on console 0 changed to on
Dec 9 16:36:08 localhost kernel: bootsplash 3.1.6-2004/03/31: looking for picture...<6>...found (800x600, 12533 bytes, v3).
Dec 9 16:36:08 localhost kernel: bootsplash: status on console 1 changed to on
Dec 9 16:36:08 localhost kernel: bootsplash 3.1.6-2004/03/31: looking for picture...<6>...found (800x600, 12533 bytes, v3).
Dec 9 16:36:08 localhost kernel: bootsplash: status on console 2 changed to on
Dec 9 16:36:08 localhost kernel: bootsplash 3.1.6-2004/03/31: looking for picture...<6>...found (800x600, 12533 bytes, v3).
Dec 9 16:36:08 localhost kernel: bootsplash: status on console 3 changed to on
Dec 9 16:36:08 localhost kernel: bootsplash 3.1.6-2004/03/31: looking for picture...<6>...found (800x600, 12533 bytes, v3).
Dec 9 16:36:08 localhost kernel: bootsplash: status on console 4 changed to on
Dec 9 16:36:08 localhost kernel: bootsplash 3.1.6-2004/03/31: looking for picture...<6>...found (800x600, 12533 bytes, v3).
Dec 9 16:36:08 localhost kernel: bootsplash: status on console 5 changed to on
Dec 9 16:36:09 localhost kernel: ACPI Error (evevent-0312): No installed handler for fixed event [00000000] [20060127]
Dec 9 16:36:17 localhost dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
Dec 9 16:36:27 localhost kernel: NETDEV WATCHDOG: eth0: transmit timed out
Dec 9 16:36:28 localhost dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
Dec 9 16:36:29 localhost kernel: hda-intel: Invalid position buffer, using LPIB read method instead.
Dec 9 16:36:30 localhost kernel: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
Dec 9 16:36:37 localhost dhclient: No DHCPOFFERS received.
Dec 9 16:36:37 localhost ifplugd(eth0)[1988]: client: Determining IP information for eth0... failed.
Dec 9 16:36:37 localhost ifplugd(eth0)[1988]: Program execution failed, return value is 1.
Dec 9 16:36:37 localhost ifplugd(eth0)[1988]: Exiting.
Perhaps it helps solving this incredibly annoying Linux problem?

Best regards,
Jethro Borsje

acid_kewpie 12-09-2006 03:33 PM

ok, the METRIC value is a routing metric (a cost per hop if used as a router) it is *not* the bandwidth, so that's not relevant.

does seem an odd scenario though. i would try to look at the situation from the DHCP server side though... can you try running a tcpdump or wireshark on the DHCP server to see what it is recieving? obviosuly if it's an ADSL router or somethign then that's not possible, but also you could just run wireshark on any other network pc, whcih because DHCP is a broadcast, will actually be recieved by all other machines. so that way you can actually pull apart the DCP request when the machine is booted in to Linux or Winodws (it was dual boot right?) and compare and contrast.

also i would suggest trying to temporarily hard code the normal IP you get under windows and use that to force the interface up, and see that you are happily able to access the lan at IP level after that's done, thus removing issues about card drivers etc...

p41elvis 12-10-2006 02:56 AM

If I manually set a static IP (being the IP I get under Windows) I can not ping to any server in the network, so I have no connection on the IP level. Even when forcing it with the correct IP adress, subnetmask and gateway. So there is something wrong with the driver then?

acid_kewpie 12-10-2006 07:29 AM

if would certainly seem so. check the contents of dmesg (specifically run "dmesg | grep eth0"), also the output of ifconfig and lsmod to show the driver for eth0 is loaded and in use. having said that, things look good above. erm, oh see what ethtool says about the physical status of the nic too. you might also try changing the driver from 8139too ro rtl8139, but i've always prefered the 8139too, works better in general, but that's about the only real variable i can suggest worth looking at at present.

p41elvis 12-11-2006 03:04 AM

This is what ethtool says when I did not plug in an UTP cable:
Quote:

[root@dhcppc3 jethro]# 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: 10Mb/s
Duplex: Half
Port: MII
PHYAD: 32
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: no
Some things mean more to me than others, but I guess this is ok?

These are the things I think are relevant from lsmod:
Quote:

8139too 22880 0
mii 5664 1 8139too
wlan_wep 7008 1
wlan_scan_sta 12640 1
ath_pci 88416 0
ath_rate_sample 13408 1 ath_pci
wlan 186428 5 wlan_wep,wlan_scan_sta,ath_pci,ath_rate_sample
ath_hal 190704 3 ath_pci,ath_rate_sample
I am not sure what the numbers behind the modules mean, does it look ok to you guys?

This is the relevant part of ifconfig (again with cable unplugged):
Quote:

eth0 Link encap:Ethernet HWaddr 00:A0:D1:2F:9A:6A
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 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:0x6000
I have two concerte questions about the things I have posted in this post:
1 - do they look ok to you?
2 - should I have done this with the cable plugged in? (I don't have one present at this moment)

Best regards,
Jethro Borsje

acid_kewpie 12-11-2006 04:22 AM

well the ethtool and ifconfig output when the cable is plugged in your really be more useful to be honest... you should see the "Link detected" entry go to yes and the speed shoudl go up to 100/full.

another potentially useful poin tof call would be to run a tcpdump on the client in question and see if it hears any broadcasts on the line without without an IP address. make some other clients generate broadcasts by renewing dhcp leases etc...

p41elvis 12-15-2006 02:24 AM

Alright, I finally was at my workplace again and had the time to execute the commands WITH the cable PLUGGED IN. These are the results, firt ifconfig:
Quote:

[root@localhost jethro]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:A0:D1:2F:9A:6A
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 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:0x8000
And then ethtool:
Quote:

[root@localhost jethro]# 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
It looks like the link it detected, but even with a static IP I cannot ping to any pc on the network.

p41elvis 12-17-2006 07:48 AM

By the way, I also have madwifi configured and running for my wireless adapter. This does work on the same network. If I connect via my wireless adapter on a network which offers both wired and wireless access my Wireless adapter gets an IP-adress, my wired adapter does not.


All times are GMT -5. The time now is 12:27 AM.