eth0 can't get IP with DHCP, static config. attempts can't ping
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
eth0 can't get IP with DHCP, static config. attempts can't ping
I'm using SuSE 9.1 personal and can't seem to get my wired connection to my router working. I have cable internet service, routed with a Linksys BEFW11S4 router. I have an XP box and a Mac connected wirelessly, and a Win98 box and my linux box with a wired connection. I have a Netgear NIC that SuSE recognizes. Yast wants to use the "tulip" module for this NIC.
When I boot SuSE, it requests an IP for eth0 via DHCP, but then puts the waiting process in the background.
I had been configuring eth0 through Yast, but then decided to try a command-line configuration with a static IP. My router is 192.168.1.1, and I assigned eth0 the IP 192.168.1.110 with ifconfig and set the default gateway to 192.168.1.1 with the route command. I also included DNS server IP's (confirmed to be working by the Win98 box) in the resolv.conf file. I was then able to ping eth0 (192.168.1.110), had all packets dropped when trying to ping any other ip on my LAN, or the gateway, or any IP on the internet.
So... I used Yast to delete the configuration for eth0, and then went back to having Yast configure eth0 for DCHP, and that's where I am now. (In the end, I'd prefer DHCP but will accept a static IP if necessary) You'll see below that the current routing table doesn't have the defaulty gateway, but I get an error ("Network not reachable", IIRC) when I try to add it with the route command.
With the current configuration, ping attempts (to 192.168.1.1) return "Network not reachable". Same response for ping attempts to local LAN IPs.
One additional tidbit, before I post the diagnostic info: With the SuSE 9.1 live CD, I had a working internet connection via DHCP once, but have been unable to duplicate it. For those concaerned about hardware issues, I tried the above (unsuccessful) DHCP process with the cable and router slot that the Win98 box uses, and had no better luck.
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
/etc/hosts: (I added the router entry during the static setup)
Code:
#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#
127.0.0.1 localhost
# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback
fe00::0 ipv6-localnet
ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
192.168.1.1 router
127.0.0.2 lemonade.comcast.net lemonade
resolv.conf: (I think this is leftover from the static setup)
Well, the tulip driver should be the right one. The LNE100TX is actually a linksys chipset, I believe. Try running mii-tool eth0 to see if it's properly recognizing the connection and achieving autonegotiation.
Got it! Of course, after a week of googling and searching here and trying new things, I find the answer 30 minutes after I post a last resort plea for help.
Look at your ifconfig. It says inet6 addr! Are you using IPv6 ? I guess not so I bet the problem is here. Your DHCP provided you IPv6 address. Do not use any configuration tool because the setting may be lost after reboot, instead check the network configuration files:
1. /etc/sysconfig/network-scripts/ifcfg-eth0
It may be located in a different place. Google a little to see how this file is constructed.
Ok, it's working again. Just for kicks, I climbed behind my desk and noticed (to my dismay) no LEDs on the NIC, and wiggled the Cat5 cable. Sure enough, I got a connection. I ran "dhcpcd eth0" and we're off and running! (posting right now from the box in question)
So the solution was the acpi=off option during boot (see post above), and everything after that was just a truly "bad connection." It's a good reminder to always double check the basics!
I'm a long-time-reader and first-time-poster so thanks everyone for the help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.