LinuxQuestions.org
Visit Jeremy's Blog.
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-31-2007, 03:39 PM   #1
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,533

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
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 03:41 PM.
 
Old 10-31-2007, 05:22 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,896

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
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
Quote:
eth0 to 255.255.255.255
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 05:23 PM.
 
Old 10-31-2007, 05:26 PM   #3
The_JinJ
Member
 
Registered: Apr 2004
Location: Scotland
Distribution: Suse, OpenWRT
Posts: 299

Rep: Reputation: 30
Does it work with a static IP assigned?
 
Old 10-31-2007, 06:52 PM   #4
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,533

Original Poster
Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
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?
 
Old 11-01-2007, 02:40 PM   #5
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,533

Original Poster
Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
I still cannot get the network setup on my system. Can someone please help?
 
Old 11-01-2007, 09:20 PM   #6
seelenbild28
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: Reputation: 30
are you sure that your router is working? perhaps it does really not offer dhcp? perhaps some misconfiguring?
 
Old 11-02-2007, 07:59 AM   #7
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,533

Original Poster
Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
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.
 
Old 11-02-2007, 10:07 AM   #8
seelenbild28
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: Reputation: 30
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 10:08 AM.
 
Old 11-02-2007, 12:47 PM   #9
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,533

Original Poster
Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
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.
 
Old 11-02-2007, 01:56 PM   #10
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
Quote:
Originally Posted by dwhitney67 View Post
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.
 
Old 11-02-2007, 05:17 PM   #11
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,533

Original Poster
Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
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.
 
  


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
Single DHCP server ,to provide the ip address to a MAC address in two different subne alix123 Linux - Software 5 05-09-2007 12:16 AM
define dhcp ip address from router true_atlantis SUSE / openSUSE 10 01-06-2006 04:47 PM
Unable to acquire an IP Address ras777 Linux - Wireless Networking 13 12-03-2005 12:07 PM
Home network: connecting to a Linksys router for DHCP IP address - no ping gunther Linux - Networking 28 05-20-2005 11:14 PM
dhcp no ip address and netmask dont match route address pengy666 Linux - Wireless Networking 1 05-08-2005 10:33 AM

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

All times are GMT -5. The time now is 08:16 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