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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
10-31-2007, 02:39 PM
|
#1
|
Senior Member
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,541
|
Cannot acquire DHCP IP address from router
Hello,
I have attempting without success to setup a DHCP client on a CLFS distro. I piggy-backed on an existing thread in the LFS forum, but it appears that it is not getting much visibility, and thus the reason for this new post.
Here's the situation... when I run "/etc/sysconfig/ifup eth0" all I get is the following output:
Code:
Bringing up the eth0 interface...
Starting dhclient on the eth0 interface...
Internet Systems Consortium DHCP Client V3.0.5
[snip]
Listening on LPF/eth0/00:30:59:02:42:ea
Sending on LPF/eth0/00:30:59:02:42:ea
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
No DHCPOFFERS received.
Unable to obtain a lease on the first try. Exiting.
The /etc/sysconfig/ifconfig.eth0/dhcpcd file looks like:
Code:
ONBOOT="no"
SERVICE="dhclient"
DHCP_START="-1"
DHCP_STOP="-q -r"
PRINTIP="no"
PRINTALL="no"
The /etc/dhclient.conf file looks like:
Code:
timeout 10;
interface eth0{
prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name;
require subnet-mask, domain-name-server;
}
When I run "ifconfig eth0":
Code:
eth0 Link encap:Ethernet HWaddr 00:30:59:02:42:EA
UP BROADCAST MULTICAST MTU:1500 Metric:1
[snip]
Interrupt:5
When I run "lspci | grep -i ethernet":
Code:
00:12.0 Ethernet controller: Intel Corporation 8255xER/82551IT Fast Ethernet Controller (rev 10)
When I run "dmesg | grep eth0":
Code:
eth0: OEM i82557/i82558 10/100 Ethernet, 00:30:59:02:42:EA, IRQ 5.
When I run "lsmod":
Code:
Module Size Used by
eepro100 23824 0
mii 4224 1 eepro100
evdev 6912 0
apm 15468 0
rtc 8628 0
With all of this information, can someone tell me why I cannot acquire an IP address from the Linksys router? All of my other systems (Ubuntu, Fedora Core 5, Fedora 7) work fine on my LAN, as does the actual cable running to the non-working system.
Please... I need help sorting out this issue.
Last edited by dwhitney67; 10-31-2007 at 02:41 PM.
|
|
|
10-31-2007, 04:22 PM
|
#2
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908
|
Quote:
00:12.0 Ethernet controller: Intel Corporation 8255xER/82551IT Fast Ethernet Controller (rev 10)
|
Can you determine which kernel module is required for the ethernet controller, and whether or not that module is currently loaded.
I think this
refers to local network or local host, something of the sort. You aren't getting past your firewall (if you have one) to the outside world. And, without the module refered to above, you won't.
Last edited by bigrigdriver; 10-31-2007 at 04:23 PM.
|
|
|
10-31-2007, 04:26 PM
|
#3
|
Member
Registered: Apr 2004
Location: Scotland
Distribution: Suse, OpenWRT
Posts: 299
Rep:
|
Does it work with a static IP assigned?
|
|
|
10-31-2007, 05:52 PM
|
#4
|
Senior Member
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,541
Original Poster
|
Yes, I tried using a static IP address before, by creating within /etc/sysconfig/ifconfig.eth0 a file using these instructions:
Code:
cd /etc/sysconfig/network-devices &&
mkdir -v ifconfig.eth0 &&
cat > ifconfig.eth0/ipv4 << "EOF"
ONBOOT=yes
SERVICE=ipv4-static
IP=192.168.1.1
GATEWAY=192.168.1.2
PREFIX=24
BROADCAST=192.168.1.255
EOF
Still no joy with getting the networking up and running. Anyhow, I went back to my attempts to use DHCP because ultimately I must have a DHCP capable system/OS.
When I tried to "force" settings onto the eth0 interface using ifconfig, I still was not able to ping my router. I used a statement similar to the following:
Code:
# ifconfig eth0 192.168.1.107 netmask 255.255.255.0 broadcase 192.168.1.255
What I cannot do is to get the eth0 to "run", or in other words have ifconfig display that it is RUNNING.
bigrigdriver-
What module are you referring to? The ethernet adapter I have requires the 'eepro100' kernel module, which is loaded (see my lsmod output). However, I cannot be certain that is being used by any service. How can I verify that it is?
|
|
|
11-01-2007, 01:40 PM
|
#5
|
Senior Member
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,541
Original Poster
|
I still cannot get the network setup on my system. Can someone please help?
|
|
|
11-01-2007, 08:20 PM
|
#6
|
Member
Registered: Oct 2005
Location: Germany, Berlin
Distribution: SuSE Linux 9.1/9.2/9.3/10.0/10.1, openSuSE 10.2, 10.3, Slackware, Debian, Redhat, BSD
Posts: 315
Rep:
|
are you sure that your router is working? perhaps it does really not offer dhcp? perhaps some misconfiguring?
|
|
|
11-02-2007, 06:59 AM
|
#7
|
Senior Member
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,541
Original Poster
|
The router, a Linksys WRT54G, is working just fine. I use both wired and wifi setups for my other systems. The system for which I am seeking help to configure is using a wired-connection... and yes, the CAT-5 cable it uses is fine.
|
|
|
11-02-2007, 09:07 AM
|
#8
|
Member
Registered: Oct 2005
Location: Germany, Berlin
Distribution: SuSE Linux 9.1/9.2/9.3/10.0/10.1, openSuSE 10.2, 10.3, Slackware, Debian, Redhat, BSD
Posts: 315
Rep:
|
I only found this thread in LX:
http://www.linuxquestions.org/questi...oot-up-563550/
but since your module is loaded and working for other distros I don't know what could be problem besides the distro itself....
and sorry, yes you know that thread!*g google does not help much... hmm..
Last edited by seelenbild28; 11-02-2007 at 09:08 AM.
|
|
|
11-02-2007, 11:47 AM
|
#9
|
Senior Member
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,541
Original Poster
|
I've been through the thread you posted. In fact, you may have noticed that I posted a query at the very end of it... of course, never getting a response. I was hoping the OP of that thread could help me.
|
|
|
11-02-2007, 12:56 PM
|
#10
|
Senior Member
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,992
|
Quote:
Originally Posted by dwhitney67
Yes, I tried using a static IP address before, by creating within /etc/sysconfig/ifconfig.eth0 a file using these instructions:
Code:
cd /etc/sysconfig/network-devices &&
mkdir -v ifconfig.eth0 &&
cat > ifconfig.eth0/ipv4 << "EOF"
ONBOOT=yes
SERVICE=ipv4-static
IP=192.168.1.1
GATEWAY=192.168.1.2
PREFIX=24
BROADCAST=192.168.1.255
EOF
|
notice in your static config you have the gateway, you also need that for dhcp to work. your NIC has no clue were to pull its IP from if you do not provide it with a gateway.
|
|
|
11-02-2007, 04:17 PM
|
#11
|
Senior Member
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,541
Original Poster
|
lleb -
Are you sure about needing to specify a Gateway? That seems unusual because that is information that I would normally not be required to supply when I connect via DHCP. That information is obtained from the lease-holder (i.e. the router) and it is supposed to be inserted into /etc/resolv.conf by dhclient.
My issue is that dhclient can't talk/communicate with the router to get such information. It almost appears that a port (68) is being blocked.
Btw, from the dhclient man-page:
The DHCP client normally transmits any protocol messages it sends before acquiring
an IP address to, 255.255.255.255, the IP limited broadcast address.
|
|
|
All times are GMT -5. The time now is 06:39 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|