You are not logged in.

#1 2007-12-29 00:50:42

Koven
Member
Registered: 2006-06-13
Posts: 154

Problem with DHCP

I've read som older posts about my issue but I've tried everything and nothing works. My problem is that connect to internet using dhcp, but now it's absolutly imposible, I don't know what's going on, I've read every web page  about the problem

I' ve configured dhcp in my eth0 device but nothing works, with the same cable in a windows OS I get internet in a easy way, but if you look in this file

7:47# cat /var/lib/dhcpcd/dhcpcd-eth0.info                                                                                 ~
IPADDR='169.254.96.56'
NETMASK='255.255.0.0'
BROADCAST='169.254.255.255'
LEASEDFROM='0'
LEASETIME='10'
RENEWALTIME='5'
REBINDTIME='8'
INTERFACE='eth0'
CLASSID='dhcpcd 3.1.4'
CLIENTID='01:00:0b:6a:0d:ed:8d'
DHCPCHADDR='00:0b:6a:0d:ed:8d'

you see one of that address related with the RFC 3330 that says this..

169.254.0.0/16 - This is the "link local" block.  It is allocated for
   communication between hosts on a single link.  Hosts obtain these
   addresses by auto-configuration, such as when a DHCP server may not
   be found.

I've changed the parameters in /etc/conf.d/dhcpcd, now I've these but I really don't know what means, I hven´t been able to find info about this topic

#
# Arguments to be passed to the DHCP client daemon
#

DHCPCD_ARGS="-R -t 30 -h $HOSTNAME -L"

Any help would be appreciated. The only thing happened this computer is that I haven't used for three months, last time I used it I hadn't any problem with this configuration but now nothing works.

Regards

Offline

#2 2007-12-29 01:27:43

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: Problem with DHCP

I think you are definitely doing something wrong.
In Linux (and I have user a wide variety of them) you never have to touch those files you mentioned in order to get an address from your DHCP server.

Given that you are indicating that you get an address in the same machine from Windows I must assume that the machine in question is going to be a client to the DHCP server, so here is what you need:
1. edit /etc/rc.conf
2. add the following lines if not there:

lo="lo 127.0.0.1"
eth0="dhcp"
INTERFACES=(lo eth0)

gateway="default gw 192.168.0.1"
ROUTES=(!gateway)

3. restart the network, and you should get an address.

Offline

#3 2007-12-29 02:08:24

Koven
Member
Registered: 2006-06-13
Posts: 154

Re: Problem with DHCP

I didn't say that I touch any of these files, unfortunately I've investigated about any dhcp file and I found  /var/lib/dhcpcd/dhcpcd-eth0.info, and I deleted before but now it's created automatically but something, I really don't know what. The /etc/rc.conf file is found in the same way you show in your reply, it's really rare because dhcp protocol just meakes a request to a server, no more, so that's the reason I don't understand why I'm assigned an IP that's is not useful at all.

Thanx for reply somehow. But I don't know if it's a bug or something like that.

Regards

Offline

#4 2007-12-29 02:15:39

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: Problem with DHCP

In a console issue : ifconfig and post the result here.
Also post your /etc/rc.conf

R.

Last edited by ralvez (2007-12-29 02:17:09)

Offline

#5 2007-12-29 02:24:33

Koven
Member
Registered: 2006-06-13
Posts: 154

Re: Problem with DHCP

Check it out

eth0      Link encap:Ethernet  HWaddr 00:0B:6A:0D:ED:8D
          inet addr:169.254.96.56  Bcast:169.254.255.255  Mask:255.255.0.0
          inet6 addr: fe80::20b:6aff:fe0d:ed8d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6067 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2447 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:446683 (436.2 Kb)  TX bytes:235415 (229.8 Kb)
          Interrupt:18 Base address:0xd800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:74 errors:0 dropped:0 overruns:0 frame:0
          TX packets:74 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3700 (3.6 Kb)  TX bytes:3700 (3.6 Kb)

LOCALE="es_ES.utf8"
HARDWARECLOCK="UTC"
TIMEZONE="America/Bogota"
KEYMAP="es.map.gz"
CONSOLEFONT="lat0-16"
CONSOLEMAP=
USECOLOR="yes"

MOD_AUTOLOAD="yes"
MOD_BLACKLIST=()
MODULES=(!usbserial)
USELVM="no"

HOSTNAME="koven"
lo="lo 127.0.0.1"
eth0="dhcp"
INTERFACES=(lo eth0)
ROUTES=(!gateway)

DAEMONS=(syslog-ng !hotplug !pcmcia network netfs crond !hplip @cups gpm !adsl @sshd ddclient @alsa @ntpd @ntpdate gdm)

Regards

Offline

#6 2007-12-29 14:12:09

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: Problem with DHCP

Well ... the only part that does not make sense is your IP address.
inet addr:169.254.96.56  Bcast:169.254.255.255  Mask:255.255.0.0 is **not** a private address. It should be:
10.0.0.0 to 10.255.255.255 or 172.16.0.0 to 172.31.255.255 or 92.168.0.0 to 192.168.255.255.

The address you posted is like a public address but I verified it not to be a valid one, so ... that's your problem.

How do you get the address, via your router? If so, verify your router's settings.

R.

Offline

#7 2007-12-29 15:32:14

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: Problem with DHCP

http://en.wikipedia.org/wiki/Zeroconf#C … _addresses

It's a DHCP issue and he already explained that IP in his first post.

Last edited by byte (2007-12-29 15:34:58)


1000

Offline

#8 2007-12-29 17:01:39

fed359
Member
Registered: 2007-11-21
Posts: 46

Re: Problem with DHCP

Have you checked /var/log/messages.log for any messages from dhcpcd? A clean run of dhcpcd should look like this:

Dec 28 22:24:34 Luigi dhcpcd[7398]: eth0: dhcpcd 3.1.8 starting
Dec 28 22:24:34 Luigi dhcpcd[7398]: eth0: hardware address = 00:16:c4:1f:e2:4a
Dec 28 22:24:34 Luigi dhcpcd[7398]: eth0: broadcasting for a lease
Dec 28 22:24:40 Luigi dhcpcd[7398]: eth0: offered 192.168.0.20 from 192.168.0.1
Dec 28 22:24:40 Luigi dhcpcd[7398]: eth0: checking 192.168.0.20 is available on attached networks
Dec 28 22:24:41 Luigi dhcpcd[7398]: eth0: leased 192.168.0.20 for 86400 seconds
Dec 28 22:24:41 Luigi dhcpcd[7398]: eth0: adding IP address 192.168.0.20/24
Dec 28 22:24:41 Luigi dhcpcd[7398]: eth0: adding default route via 192.168.0.1 metric 0
Dec 28 22:24:41 Luigi dhcpcd[7398]: eth0: adding route to 169.254.0.0/16 metric 0
Dec 28 22:24:41 Luigi dhcpcd[7398]: eth0: exiting

Offline

#9 2007-12-29 21:20:09

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: Problem with DHCP

@byte,

I know it is a DHCP issue, because his local DHCP server should not be giving addresses alloted to the public block for the LAN users, and that is my point precisely. lol
In Koven's first post it seems that he configured it by hand; that's why I specifically asked about it.

Further, the issue must be related to the DHCP server and that should be in the router, which (unless is something special) is double homed and has one card looking at the public network (or DSL modem) and the other to the internal network. The DHCP serving the LAN should only distribute addresses withing the private block.

@Koven,

What type of router are you using? Is it one you purchased or one you made? It may also help to know what range of address you get when you connect with your Windows machine. Can you tell us that?

R.

Offline

#10 2007-12-30 01:35:54

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: Problem with DHCP

ralvez:
Please, read the link. That IP isn't "public", it's "link-local" which means he's most probably not getting a DHCP response at all.
Yes, that's unhelpful nitpicking. Sorry.

Last edited by byte (2007-12-30 01:37:27)


1000

Offline

#11 2007-12-30 02:37:39

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: Problem with DHCP

@byte,

I understand your point. I should have used "link-local" as opposed to "public block" in my reply. Your point is taken. smile

Having said that, "link-local" addresses are only delivered when no DHCP addresses are available (eg. no DHCP service is running), so the problem has to be linked to his DHCP server, whatever that is. I'm guessing that is one of those boxes you can purchase in the store (like the DLink thing) and not one he has built.  We will have to wait for his answer on this one.

R.

Offline

#12 2007-12-30 06:42:48

fed359
Member
Registered: 2007-11-21
Posts: 46

Re: Problem with DHCP

The DHCP server, as well as all other hardware is operating correctly, as stated in the first post it works on windows. To me it sounds software related, I've seen times where dhclient wouldn't work, and dhcpcd would, and it wouldn't surprise me too much if the reverse of that was true here. As you said though, we will have to wait for an answer smile

Offline

#13 2007-12-30 11:53:49

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: Problem with DHCP

i get the same msg as koven.. that strange ip i'm pretty sure of and i never got why... This was back when i used the wifi-router though, i had to switch to cable because of it..


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#14 2007-12-30 12:44:37

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Problem with DHCP

test1000 wrote:

i get the same msg as koven.. that strange ip i'm pretty sure of and i never got why... This was back when i used the wifi-router though, i had to switch to cable because of it..

that'd be because you hadn't connected to the wireless properly first.

Successfull wireless association THEN dhcp.

Koven: are you using wireless?

Offline

#15 2007-12-30 17:14:29

Koven
Member
Registered: 2006-06-13
Posts: 154

Re: Problem with DHCP

Sorry for the delay...

I really appreciate all your answers and right now I'm writing you from my arch linux desktop. I am using only a normal connection, no wireless, I really don't know what happens to these routers.

It was a problem about the Cable-Modem, the model it's a Motorola SBV5121, and I really tried everything, I changed every parameter in the Operating System related with DHCP, and never worked, in a laptop with WinXP nothing worked, so I just supposed it was a problem of the Motorola.

Fortunately I did the most obvious thing when nothing works and I powered off the motorola, and waited for a minute, then I retried from my arch linux and everything worked again. I really don't know why the behaviour of the modem, but now it's all ok.

Thanks for your time, sincerely.

Regards

Offline

Board footer

Powered by FluxBB