FS#15404 - [dhcpcd] dhcp client receives a strange ip

Attached to Project: Arch Linux
Opened by Dmitry (veranyon) - Monday, 06 July 2009, 14:35 GMT
Last edited by Ronald van Haren (pressh) - Sunday, 12 July 2009, 16:30 GMT
Task Type Support Request
Category Packages: Core
Status Closed
Assigned To Ronald van Haren (pressh)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
dhcp client receives a strange ip. Not the same as in the other OS Linux / etc.
Under archlinux, I see that the dhcp server gives me an ip address on the same subnet as before, but with a different "tail".
For example I receive 10.32.76.254 address (openSuSE, FreeBSD, win). But under Archlinux OS
I always get the address 10.32.76.220. hardly.
why, mac address all the same.


Additional info:
I watch that one on any Archlinux. Prior to the upgrade and after upgrade
The config file of dhcp client is standart. There won't any changes.
my rc.conf config file:
#

LOCALE="ru_RU.utf8"
HARDWARECLOCK="local"
USEDIRECTISA="no"
TIMEZONE="Europe/Moscow"
KEYMAP="us"
CONSOLEFONT=cyr-sun16
CONSOLEMAP=
USECOLOR="yes"
MOD_AUTOLOAD="yes"
MODULES=(vmnet vmmon vmci ip_nat_ftp ip_nat_pptp ip_conntrack_ftp ip_conntrack_irc)
USELVM="no"
HOSTNAME="estaf"
eth0="dhcp"
INTERFACES=(eth0)
DAEMONS=(acpid syslog-ng network iptables net-profiles crond cups)
#########the end##############

my /etc/host.conf file
order hosts,bind
multi on
###############################

/etc/hosts
127.0.0.1 localhost.localdomain localhost estaf

ethernet card: rlt8139

Steps to reproduce:
/etc/rc.d/network restart

Thanks
This task depends upon

Closed by  Ronald van Haren (pressh)
Sunday, 12 July 2009, 16:30 GMT
Reason for closing:  None
Additional comments about closing:  Thanks Roy for clearing things up.
Comment by Gerardo Exequiel Pozzi (djgera) - Monday, 06 July 2009, 18:21 GMT
maybe because dhcp client sends different hostname? So dhcp server assign other IP.

I think that a better place to your question is in forums. More people read it.

Good Luck!
Comment by Dmitry (veranyon) - Monday, 06 July 2009, 19:52 GMT
I post that one to a lot of Russian forums. nothing.
People were advised to make dumping for that connections (when the client are connecting to dhcp server). But, I do not have an intermediate router that would compare archlinux' asks to srv.. with the other operating system. whet that other OS are connecting to server.

maybe because dhcp client sends different hostname? So dhcp server assign other IP.

I was changing that one.. many/much times

for example I can change my hostname on openSUSE/Slackware and have 10.32.76.254 address anyway. not 10.32.76.220

our provider take ip's by mac. it's hard moment. I had see my mac under arch. it's = mac who I see and under any other OS Linux/BSD/win.
Comment by Dmitry (veranyon) - Monday, 06 July 2009, 19:57 GMT
I have this address (10.32.76.254 internal ip) for three years. tryed many OS'. the same address. ISP by mac (hardware adress) so it is always issued.
Comment by Gerardo Exequiel Pozzi (djgera) - Monday, 06 July 2009, 20:08 GMT
  • Field changed: Summary (dhcp client receives a strange ip → [dhcpcd] dhcp client receives a strange ip)
  • Field changed: Status (Unconfirmed → Assigned)
  • Task assigned to Ronald van Haren (pressh)
can you try with one of two dhcp client packages that are in Arch Linux? 'dhclient' and 'dhcp', both have different versions. I am assume that you are using 'dhcpcd'
Comment by Dmitry (veranyon) - Tuesday, 07 July 2009, 09:49 GMT
In the beginning was dhpcsd.
I installed dhclient now, but how do I to "switch" to it.
I tried to uninstall dhcpcd:
pacman -R dhcpcd
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: netcfg: requires dhcpcd>=4.0
I use netcfg pack for ppp connections. Should it be remove.
Comment by Ronald van Haren (pressh) - Tuesday, 07 July 2009, 11:48 GMT
netcfg doesn't work with dhclient afaik.

as far as your ip, I'm not quite sure what the problem is. dhcpcd seems to assign you a perfectly valid ip adress if I understand correctly? If you want a static ip, why use dhcp altogether?

If I understand it wrong, please try to rephrase your question as from here it doesn't seem to be a problem with dhcpcd.
Comment by Dmitry (veranyon) - Tuesday, 07 July 2009, 18:05 GMT
maybe.
how much I remember, there are three types of destination addresses using dhcp:
dynamic, which is given to the first free address.
dinamic, with links to mac.
and static to dhcp. last case was not considered.
I have a case number two. That is, if I even managed to put hackintosh, then get the ip, which has already scored in the dhcp server. mac account from my card.
windows, freebsd. any linux distrib.
they all receive the same address.
Provider to be released that "old" ip on the Internet. And I can not get access to the Internet using a different ip. Also, in the dns records, he is tied to my name - estaf.trc.local. To request that the case would be changed - is difficult.

I want to understand why the address is changed by ArchLinux and does not change in any other OS, but still old.
I can from scratch to install some FreeBSD - not even configure the network, but simply run dhcpcd command and I get the old address of 10.32.76.254. From dhcp server. - And this will always be.

Very bad that I do not know English, of course.

No intermediate machines that would make dumping. To see the differences in the query ip with ArchLinux and other operating systems.
Comment by Dmitry (veranyon) - Tuesday, 07 July 2009, 18:15 GMT
and under ArchLinux I will get tough 10.32.76.220 ip. by dhcp of my isp. as if I change the network card and it has a different mac
Comment by Ronald van Haren (pressh) - Tuesday, 07 July 2009, 18:35 GMT
do you mean than you only can get a correct ip when you send 'estaf.trc.local' as hostname? dhcpcd sends by default the current hostname of the machine (which is in your case just 'estaf'). You can change this behavior with the -h option (see 'man dhcpcd')

Alternatively you could try to request a specific adress with the -r flag (also see the dhcpcd manpage), or a combination of both (or more options).
I'm sorry if I say irrelevant things, I'm just having a hard time understanding the problem.
Comment by Dmitry (veranyon) - Tuesday, 07 July 2009, 19:26 GMT
>do you mean than you only can get a correct ip when you send 'estaf.trc.local' as hostname?
No, I don't. For example I can install Slacware Linux and set the localhost.localdomain.org name or set noestaf.trc.local name and get 10.32.76.254 address anyway. And I get a train ip.

>Alternatively you could try to request a specific adress with the -r flag (also see the dhcpcd manpage), or a combination of both (or more options).
>I'm sorry if I say irrelevant things, I'm just having a hard time understanding the problem.

I know about it. I do. Exit no.

Just say - I have now installed from scratch any Ubuntu and train I get the old address. Excluding a dns name.


Strange.
Comment by Dmitry (veranyon) - Tuesday, 07 July 2009, 19:28 GMT
I can reinstall ArchLinux - and I get re-10.32.76.> 220 <ip.

Already done so
Comment by Ronald van Haren (pressh) - Tuesday, 07 July 2009, 19:48 GMT
do you mean than you only can get a correct ip when you send 'estaf.trc.local' as hostname? dhcpcd sends by default the current hostname of the machine (which is in your case just 'estaf'). You can change this behavior with the -h option (see 'man dhcpcd')

Alternatively you could try to request a specific adress with the -r flag (also see the dhcpcd manpage), or a combination of both (or more options).
I'm sorry if I say irrelevant things, I'm just having a hard time understanding the problem.
Comment by Ronald van Haren (pressh) - Tuesday, 07 July 2009, 19:53 GMT
does ubuntu use dhcpcd? are there major version differences? any options they use in their config files?

btw, you may want to contact Roy Marples (upstream dhcpcd developer) and link to this bug report, he may just know how you can solve your issue.
Comment by Roy Marples (rsmarples) - Friday, 10 July 2009, 13:49 GMT
DHCP leases are remembered by ClientID, not MAC address. In the absence of a ClientID, DHCP servers generally make a ClientID based on the MAC address.

Older dhcpcd versions created whats called a DUID and used this to make a ClientID that didn't change, regardless of if the network cards changed in the computer. Anyway, this proved problematic when done by default and dhcpcd-5.x ships with the duid feature off by default. However, I suspect this is your problem.

If the file /etc/dhcpcd.duid exists or there is any reference to duid or clientid in /etc/dhcpcd.conf then remove it.
Comment by Dmitry (veranyon) - Friday, 10 July 2009, 14:43 GMT
but:
#cat /etc/dhcpcd.conf | grep duid
#updatedb
#locate duid
#
nothing
Comment by Dmitry (veranyon) - Friday, 10 July 2009, 14:50 GMT
cat /etc/dhcpcd.conf | grep -v "#"

hostname
option domain_name_servers, domain_name, domain_search, host_name
option ntp_servers
require dhcp_server_identifier
nohook lookup-hostname
noipv4ll
Comment by Roy Marples (rsmarples) - Friday, 10 July 2009, 15:13 GMT
Please attach a wireshark trace filtered for bootp from dhcpcd and one from a "working" dhcp client.
Comment by Dmitry (veranyon) - Friday, 10 July 2009, 15:29 GMT
/etc/rc.d/network stop
ifconfig eth0 up
start dumping > dump
dhcpcd
stop dumping
   dump (6 KiB)
Comment by Roy Marples (rsmarples) - Friday, 10 July 2009, 15:33 GMT
That cannot be correct - there is no DISCOVER message there.
Try this -
Start a dump in a terminal, then in another one do this
dhcpcd -dT eth0
Comment by Dmitry (veranyon) - Friday, 10 July 2009, 15:41 GMT
ready
Comment by Dmitry (veranyon) - Friday, 10 July 2009, 15:45 GMT
Exuse me..
was wrong logs.
next..
Comment by Dmitry (veranyon) - Friday, 10 July 2009, 15:58 GMT
easier
killall dhcpcd
ifconfig eth0 down
ifconfig eth0 up
wait 5

dhcpcd -dT eth0
dhcpcd: version 5.0.4 starting
dhcpcd: eth0: broadcasting for a lease
dhcpcd: eth0: sending DHCP_DISCOVER (xid 0x76ddbf9a), next in 4.71 seconds
dhcpcd: eth0: offered 10.32.76.220 from 10.0.0.6
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason TEST
interface=eth0
pid=10410
reason=TEST
skip_hooks=lookup-hostname
new_broadcast_address=10.32.77.255
new_classless_static_routes='192.168.10.0/24 10.32.76.1 192.168.0.0/21 10.32.76.1 10.0.0.0/8 10.32.76.1'
new_dhcp_lease_time=432000
new_dhcp_message_type=2
new_dhcp_rebinding_time=378000
new_dhcp_renewal_time=216000
new_dhcp_server_identifier=10.0.0.6
new_domain_name=users.trc.local
new_domain_name_servers='10.0.0.120 10.0.0.185'
new_ip_address=10.32.76.220
new_network_number=10.32.76.0
new_routers=10.32.76.1
new_subnet_cidr=23
new_subnet_mask=255.255.254.0
Comment by Roy Marples (rsmarples) - Friday, 10 July 2009, 16:06 GMT
Great, now attach a wireshark trace of that and one of a WORKING dhcp client.
Comment by Dmitry (veranyon) - Friday, 10 July 2009, 16:27 GMT
was ready
Comment by Dmitry (veranyon) - Friday, 10 July 2009, 16:38 GMT
or in process
/etc/rc.d/network stop
ifconfig eth0 up
wireshark on
dhcpcd -dT eth0
wait ~10
wireshark off > dhcpcd-d-T
wireshark on
dhcpcd
wait ~10
wireshark off > dhcpcd_simple
Comment by Roy Marples (rsmarples) - Saturday, 11 July 2009, 15:28 GMT
That windows capture shows that it's requesting the old IP address. To do a fair comparison you need to flush the old IP from windows and run another capture. I think you can do this by opening cmd.exe and running ipconfig /releaseall and the ipconfig /renew to get a new one.

Does dhcpcd get the correct address if you request it directly?
dhcpcd -dB -r 10.32.76.237
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 16:25 GMT
I haven't windows or another operating system.
.. be thinking that would make such a ..
ok.
>>time>>
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 17:54 GMT
starting wireshark program
ipconfig /release *
capture eth0 iface on
ipconfig /renew
wait ~10
capture eth0 iface off > out.pcap
   out.pcap (4.5 KiB)
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 18:09 GMT
or tar.gz >
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 18:17 GMT
>Does dhcpcd get the correct address if you request it directly?
>dhcpcd -dB -r 10.32.76.237

# /etc/rc.d/network stop
# ifconfig eth0 up
# dhcpcd -dB -r 10.32.76.254 &
dhcpcd: version 5.0.4 starting
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason PREINIT
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason CARRIER
dhcpcd: eth0: rebinding lease of 10.32.76.254
dhcpcd: eth0: sending DHCP_REQUEST (xid 0x175f3679), next in 3.17 seconds
dhcpcd: eth0: NAK: requested address not available from 10.0.0.6
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason NAK
dhcpcd: eth0: broadcasting for a lease
dhcpcd: eth0: sending DHCP_DISCOVER (xid 0x3f896d25), next in 4.84 seconds
dhcpcd: eth0: offered 10.32.76.220 from 10.0.0.6
dhcpcd: eth0: sending DHCP_REQUEST (xid 0x3f896d25), next in 4.59 seconds
dhcpcd: eth0: acknowledged 10.32.76.220 from 10.0.0.6
dhcpcd: eth0: checking for 10.32.76.220
dhcpcd: eth0: sending ARP probe (1 of 3), next in 1.08 seconds
dhcpcd: eth0: sending ARP probe (2 of 3), next in 1.70 seconds
dhcpcd: eth0: sending ARP probe (3 of 3), next in 2.00 seconds
dhcpcd: eth0: leased 10.32.76.220 for 432000 seconds
dhcpcd: eth0: adding IP address 10.32.76.220/23
dhcpcd: eth0: adding route to 10.32.76.0/23
dhcpcd: eth0: adding route to 192.168.10.0/24 via 10.32.76.1
dhcpcd: eth0: adding route to 192.168.0.0/21 via 10.32.76.1
dhcpcd: eth0: adding route to 10.0.0.0/8 via 10.32.76.1
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason BOUND
dhcpcd: eth0: sending ARP announce (1 of 2), next in 2.00 seconds
dhcpcd: eth0: sending ARP announce (2 of 2)

ifconfig
eth0 Link encap:Ethernet HWaddr 00:80:48:54:16:C1
inet addr:10.32.76.220 Bcast:10.32.77.255 Mask:255.255.254.0
inet6 addr: fe80::280:48ff:fe54:16c1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1818 errors:0 dropped:0 overruns:0 frame:0
TX packets:1953 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:414681 (404.9 Kb) TX bytes:338346 (330.4 Kb)
Interrupt:17 Base address:0x2c00

there's 220th tail. anyway
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 18:48 GMT
trying to understand himself and understand little, if honestly.
Comment by Roy Marples (rsmarples) - Saturday, 11 July 2009, 19:06 GMT
OK, windows is still requesting the same IP address, even in the DISCOVER message, which I find a little odd, but heh.
Anyway, I think your ISP is using a broken DHCP server implementation.

Try this
dhcpcd -dBI -r 10.32.76.254
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 19:13 GMT
/etc/rc.d/network stop
ifconfig eth0 up
dhcpcd -dBI -r 10.32.76.254
dhcpcd: version 5.0.4 starting
dhcpcd: 10.32.76.254: interface not found or invalid
(wait 60)
ifconfig
eth0 Link encap:Ethernet HWaddr 00:80:48:54:16:C1
inet6 addr: fe80::280:48ff:fe54:16c1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
.......
ctrl+C
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 19:14 GMT
stop.
I'm beginning a 10.32.76.219 ip
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 19:14 GMT
I'm beginning to get a 10.32.76.219 ip
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 19:18 GMT
archlinux previously always had get 10.32.76.220 ip
and now 219. 5th time already
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 19:22 GMT
>windows is still requesting the same IP address, even in the DISCOVER message, which I find a little odd, but heh.
>Anyway, I think your ISP is using a broken DHCP server implementation.

when I have opensuse, so that one was get an 10.32.76.254 too. opensuse, gentoo and slackware.
Comment by Roy Marples (rsmarples) - Saturday, 11 July 2009, 20:03 GMT
Sorry, try this command
dhcpcd -dBT -I '' -r 10.32.76.254 eth0

Naming the distro is quite pointless - Slackware uses dhcpcd-3.x, opensuse dhcpcd-4.x with patches and Gentoo dhcpcd-4.x
All of them use other DHCP clients as well, such as dhclient. AFAIK, only dhcpcd is the default on Gentoo.
So if you name a distro also name the DHCP client and version.
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 20:07 GMT
/etc/rc.d/network stop
ifconfig eth0 up

dhcpcd -dBT -I '' -r 10.32.76.254 eth0
dhcpcd: version 5.0.4 starting
dhcpcd: eth0: broadcasting for a lease
dhcpcd: eth0: sending DHCP_DISCOVER (xid 0x45ec384e), next in 4.88 seconds
dhcpcd: eth0: offered 10.32.76.254 from 10.0.0.6
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason TEST
interface=eth0
pid=7826
reason=TEST
skip_hooks=lookup-hostname
new_broadcast_address=10.32.77.255
new_classless_static_routes='192.168.10.0/24 10.32.76.1 192.168.0.0/21 10.32.76.1 10.0.0.0/8 10.32.76.1'
new_dhcp_lease_time=432000
new_dhcp_message_type=2
new_dhcp_rebinding_time=378000
new_dhcp_renewal_time=216000
new_dhcp_server_identifier=10.0.0.6
new_domain_name=users.trc.local
new_domain_name_servers='10.0.0.120 10.0.0.185'
new_ip_address=10.32.76.254
new_network_number=10.32.76.0
new_routers=10.32.76.1
new_subnet_cidr=23
new_subnet_mask=255.255.254.0
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 20:09 GMT
ifconfig eth0 down
/etc/rc.d/network start

ifconfig
eth0 Link encap:Ethernet HWaddr 00:80:48:54:16:C1
inet addr:10.32.76.219 Bcast:10.32.77.255 Mask:255.255.254.0
inet6 addr: fe80::280:48ff:fe54:16c1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:902967 errors:0 dropped:0 overruns:0 frame:0
TX packets:1972911 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:114733323 (109.4 Mb) TX bytes:2100365595 (2003.0 Mb)
Interrupt:17 Base address:0x2c00
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 20:18 GMT
I can hammer that address with hands. an example of that team, but whether is it.
Comment by Roy Marples (rsmarples) - Saturday, 11 July 2009, 20:22 GMT
Add the word clientid on a single line in /etc/dhcpcd.conf and it should work now.
If it does, I'll explain why the ISP DHCP server is "broken". I can problem tell you which DHCP server your ISP is using as well ;)
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 20:42 GMT
/etc/rc.d/network stop
vim /etc/dhcpcd.conf
cat /etc/dhcpcd.conf | grep clientid
clientid
/etc/rc.d/network start
ifconfig
eth0 Link encap:Ethernet HWaddr 00:80:48:54:16:C1
inet addr:10.32.76.219 Bcast:10.32.77.255 Mask:255.255.254.0
inet6 addr: fe80::280:48ff:fe54:16c1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Comment by Roy Marples (rsmarples) - Saturday, 11 July 2009, 20:46 GMT
dhcpcd -x eth0
dhcpcd -d eth0
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 20:46 GMT
I tried also to add not only this line, and add to it a value of my mac address. a similar situation is.
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 20:49 GMT
dhcpcd -x eth0
dhcpcd: open_control: Connection refused
dhcpcd: sending signal 15 to pid 9280
dhcpcd: waiting for pid 9280 to exit

dhcpcd -d eth0
dhcpcd: open_control: Connection refused
dhcpcd: version 5.0.4 starting
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason PREINIT
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason CARRIER
dhcpcd: eth0: rebinding lease of 10.32.76.219
dhcpcd: eth0: sending DHCP_REQUEST (xid 0x75617650), next in 3.51 seconds
dhcpcd: eth0: acknowledged 10.32.76.219 from 10.0.0.6
dhcpcd: eth0: checking for 10.32.76.219
dhcpcd: eth0: sending ARP probe (1 of 3), next in 1.65 seconds
dhcpcd: eth0: sending ARP probe (2 of 3), next in 1.54 seconds
dhcpcd: eth0: sending ARP probe (3 of 3), next in 2.00 seconds
dhcpcd: eth0: leased 10.32.76.219 for 432000 seconds
dhcpcd: eth0: adding IP address 10.32.76.219/23
dhcpcd: eth0: adding route to 10.32.76.0/23
dhcpcd: eth0: adding route to 192.168.10.0/24 via 10.32.76.1
dhcpcd: eth0: adding route to 192.168.0.0/21 via 10.32.76.1
dhcpcd: eth0: adding route to 10.0.0.0/8 via 10.32.76.1
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason BOUND
dhcpcd: forking to background
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 20:52 GMT
/etc/rc.d/network stop
killall dhcpcd
process not found

I had made it before "dhcpcd -x eth0" command
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 20:57 GMT
more precisely

/etc/rc.d/network stop
killall dhcpcd
process not found (ok)
/etc/rc.d/network start
:: Starting Network [BUSY] dhcpcd: open_control: Connection refused
ifconfig is showing 10.32.76.219 ip

dhcpcd -x eth0
dhcpcd: open_control: Connection refused
dhcpcd: sending signal 15 to pid 9742
dhcpcd: waiting for pid 9742 to exit

next:
dhcpcd -d eth0
dhcpcd: open_control: Connection refused
dhcpcd: version 5.0.4 starting
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason PREINIT
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason CARRIER
dhcpcd: eth0: rebinding lease of 10.32.76.219
dhcpcd: eth0: sending DHCP_REQUEST (xid 0x268791d4), next in 4.11 seconds
dhcpcd: eth0: acknowledged 10.32.76.219 from 10.0.0.6
dhcpcd: eth0: checking for 10.32.76.219
dhcpcd: eth0: sending ARP probe (1 of 3), next in 1.87 seconds
dhcpcd: eth0: sending ARP probe (2 of 3), next in 1.81 seconds
dhcpcd: eth0: sending ARP probe (3 of 3), next in 2.00 seconds
dhcpcd: eth0: leased 10.32.76.219 for 432000 seconds
dhcpcd: eth0: adding IP address 10.32.76.219/23
dhcpcd: eth0: adding route to 10.32.76.0/23
dhcpcd: eth0: adding route to 192.168.10.0/24 via 10.32.76.1
dhcpcd: eth0: adding route to 192.168.0.0/21 via 10.32.76.1
dhcpcd: eth0: adding route to 10.0.0.0/8 via 10.32.76.1
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason BOUND
dhcpcd: forking to background

219
Comment by Roy Marples (rsmarples) - Saturday, 11 July 2009, 21:05 GMT
I don't know where arch keeps the dhcpcd lease, but this probably covers it
rm -f /var/db/dhcpcd-eth0.lease /var/lib/dhcpcd-eth0.lease /var/lib/dhcpcd/dhcpcd-eth0.lease

Then try again.
If it works, remove the clientid option from dhcpcd.conf, remove the lease files and re-test.
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 21:17 GMT
/etc/rc.d/network stop
killall dhcpcd
process not found (ok)

locate .lease
/usr/man/man5/dhclient.leases.5.gz
/var/lib/dhcpcd/dhcpcd-eth0.lease
rm /var/lib/dhcpcd/dhcpcd-eth0.lease
ls /var/lib/dhcpcd/dhcpcd-eth0.lease
file not found (ok)

/etc/rc.d/network start
open_control: Connection refused
[DONE]
ifconfig
eth0 Link encap:Ethernet HWaddr 00:80:48:54:16:C1
inet addr:10.32.76.219 Bcast:10.32.77.255 Mask:255.255.254.0
inet6 addr: fe80::280:48ff:fe54:16c1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1661054 errors:0 dropped:0 overruns:0 frame:0
TX packets:3696682 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:203231776 (193.8 Mb) TX bytes:3898469620 (3717.8 Mb)
Interrupt:17 Base address:0x2c00

dhcpcd -x eth0
dhcpcd: open_control: Connection refused
dhcpcd: sending signal 15 to pid 10387
dhcpcd: waiting for pid 10387 to exit

dhcpcd -d eth0
dhcpcd: open_control: Connection refused
dhcpcd: version 5.0.4 starting
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason PREINIT
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason CARRIER
dhcpcd: eth0: rebinding lease of 10.32.76.219
dhcpcd: eth0: sending DHCP_REQUEST (xid 0x7be5ca95), next in 4.52 seconds
dhcpcd: eth0: acknowledged 10.32.76.219 from 10.0.0.6
dhcpcd: eth0: checking for 10.32.76.219
dhcpcd: eth0: sending ARP probe (1 of 3), next in 1.53 seconds
dhcpcd: eth0: sending ARP probe (2 of 3), next in 1.06 seconds
dhcpcd: eth0: sending ARP probe (3 of 3), next in 2.00 seconds
dhcpcd: eth0: leased 10.32.76.219 for 432000 seconds
dhcpcd: eth0: adding IP address 10.32.76.219/23
dhcpcd: eth0: adding route to 10.32.76.0/23
dhcpcd: eth0: adding route to 192.168.10.0/24 via 10.32.76.1
dhcpcd: eth0: adding route to 192.168.0.0/21 via 10.32.76.1
dhcpcd: eth0: adding route to 10.0.0.0/8 via 10.32.76.1
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason BOUND
dhcpcd: forking to background

219
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 21:20 GMT
updatedb
locate .lease
/usr/man/man5/dhclient.leases.5.gz
/var/lib/dhcpcd/dhcpcd-eth0.lease
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 21:21 GMT
Tin..
Comment by Roy Marples (rsmarples) - Saturday, 11 July 2009, 21:21 GMT
You need to remove the lease files AFTER stopping dhcpcd

dhcpcd -x eth0
rm /var/lib/dhcpcd/dhcpcd-eth0.lease
dhcpcd -d eth0
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 21:26 GMT
1. ifconfig command is showing ...219 tail

2. then next:

dhcpcd -x eth0
rm /var/lib/dhcpcd/dhcpcd-eth0.leasedhcpcd -d eth0
dhcpcd: open_control: Connection refused
dhcpcd: version 5.0.4 starting
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason PREINIT
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason CARRIER
dhcpcd: eth0: broadcasting for a lease
dhcpcd: eth0: sending DHCP_DISCOVER (xid 0x18a836ca), next in 3.10 seconds
dhcpcd: eth0: offered 10.32.76.219 from 10.0.0.6
dhcpcd: eth0: sending DHCP_REQUEST (xid 0x18a836ca), next in 3.89 seconds
dhcpcd: eth0: acknowledged 10.32.76.219 from 10.0.0.6
dhcpcd: eth0: checking for 10.32.76.219
dhcpcd: eth0: sending ARP probe (1 of 3), next in 1.93 seconds
dhcpcd: eth0: sending ARP probe (2 of 3), next in 1.20 seconds
dhcpcd: eth0: sending ARP probe (3 of 3), next in 2.00 seconds
dhcpcd: eth0: leased 10.32.76.219 for 432000 seconds
dhcpcd: eth0: adding IP address 10.32.76.219/23
dhcpcd: eth0: adding route to 10.32.76.0/23
dhcpcd: eth0: adding route to 192.168.10.0/24 via 10.32.76.1
dhcpcd: eth0: adding route to 192.168.0.0/21 via 10.32.76.1
dhcpcd: eth0: adding route to 10.0.0.0/8 via 10.32.76.1
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason BOUND
dhcpcd: forking to background
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 21:27 GMT
dhcpcd -x eth0
rm /var/lib/dhcpcd/dhcpcd-eth0.leasedhcpcd -d eth0

dhcpcd -d eth0
dhcpcd: open_control: Connection refused
dhcpcd: version 5.0.4 starting
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason PREINIT
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason CARRIER
dhcpcd: eth0: broadcasting for a lease
dhcpcd: eth0: sending DHCP_DISCOVER (xid 0x18a836ca), next in 3.10 seconds
dhcpcd: eth0: offered 10.32.76.219 from 10.0.0.6
dhcpcd: eth0: sending DHCP_REQUEST (xid 0x18a836ca), next in 3.89 seconds
dhcpcd: eth0: acknowledged 10.32.76.219 from 10.0.0.6
dhcpcd: eth0: checking for 10.32.76.219
dhcpcd: eth0: sending ARP probe (1 of 3), next in 1.93 seconds
dhcpcd: eth0: sending ARP probe (2 of 3), next in 1.20 seconds
dhcpcd: eth0: sending ARP probe (3 of 3), next in 2.00 seconds
dhcpcd: eth0: leased 10.32.76.219 for 432000 seconds
dhcpcd: eth0: adding IP address 10.32.76.219/23
dhcpcd: eth0: adding route to 10.32.76.0/23
dhcpcd: eth0: adding route to 192.168.10.0/24 via 10.32.76.1
dhcpcd: eth0: adding route to 192.168.0.0/21 via 10.32.76.1
dhcpcd: eth0: adding route to 10.0.0.0/8 via 10.32.76.1
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason BOUND
dhcpcd: forking to background
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 21:30 GMT
Exuse me. I past "/var/lib/dhcpcd/dhcpcd-eth0.lease" and "dhcpcd -d eth0" commands in couple. as single line. It's error of pasting symbols. I about Sunday, 12 July 2009, 00:>26< GMT+3 post.

A last post is right.
Comment by Roy Marples (rsmarples) - Saturday, 11 July 2009, 21:30 GMT
Good, no more leases to attempt to rebind.
Now try requesting the address (-r 10.32.76.254) and/or adding/removing the clientid option to /etc/dhcpcd.conf
So that's 4 possible test combinations.
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 21:38 GMT
dhcpcd -d eth0 -r 10.32.76.254
dhcpcd: version 5.0.4 starting
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason PREINIT
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason CARRIER
dhcpcd: eth0: rebinding lease of 10.32.76.254
dhcpcd: eth0: sending DHCP_REQUEST (xid 0x23336704), next in 4.10 seconds
dhcpcd: eth0: acknowledged 10.32.76.254 from 10.0.0.6
dhcpcd: eth0: checking for 10.32.76.254
dhcpcd: eth0: sending ARP probe (1 of 3), next in 1.84 seconds
dhcpcd: eth0: sending ARP probe (2 of 3), next in 1.22 seconds
dhcpcd: eth0: sending ARP probe (3 of 3), next in 2.00 seconds
dhcpcd: eth0: leased 10.32.76.254 for 432000 seconds
dhcpcd: eth0: adding IP address 10.32.76.254/23
dhcpcd: eth0: adding route to 10.32.76.0/23
dhcpcd: eth0: adding route to 192.168.10.0/24 via 10.32.76.1
dhcpcd: eth0: adding route to 192.168.0.0/21 via 10.32.76.1
dhcpcd: eth0: adding route to 10.0.0.0/8 via 10.32.76.1
dhcpcd: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason BOUND
dhcpcd: forking to background

Is manually adding the ip address in the settings?
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 21:41 GMT
I apologize that I have you so torment.
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 21:44 GMT
That is, I am about the fact that the ip address will still hammer by hands?
Comment by Roy Marples (rsmarples) - Saturday, 11 July 2009, 21:50 GMT
OK, now that you have the IP you want in the lease you're probably good to go.
Try using the arch scripts again.
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 22:05 GMT
/etc/rc.d/network restart
:: Stopping Network [DONE]
:: Starting Network [DONE]
bash-4.0# ifconfig
eth0 Link encap:Ethernet HWaddr 00:80:48:54:16:C1
inet addr:10.32.76.254 Bcast:10.32.77.255 Mask:255.255.254.0
inet6 addr: fe80::280:48ff:fe54:16c1/64 Scope:Link

yes :)
but the fact of artificially grown lease file. hm.
anyway I show that topic to admin of my ISP.
I know he. Just, sometimes he is difficult to reach.

Great thanks, Roy. And I do not know how I can to repay you, even.

if the lease file won't "autoremoving", just wait, when released this engineer and show him this page.
Comment by Roy Marples (rsmarples) - Saturday, 11 July 2009, 22:16 GMT
Basically the issue is this - dhcpcd will attempt to renew the last lease obtained on the interface. In your case, the DHCP server agreed to renew your old lease even though it was not the address you were expecting. How you got a lease with a different address I don't know.

This is normal behaviour for a DHCP client, as the DHCP server did not NAK the address.
Comment by Dmitry (veranyon) - Saturday, 11 July 2009, 22:19 GMT
I even had to reinstall this OS and still receive the 220th tail of the ip address.
I didn't know what to do then.
Comment by Ronald van Haren (pressh) - Sunday, 12 July 2009, 12:28 GMT
@Roy: thanks for your help

@Dmitry: I can close this now I assume?
Comment by Dmitry (veranyon) - Sunday, 12 July 2009, 13:35 GMT
>How you got a lease with a different address I don't know.

I didn't change some config files in that OS. I about dhcpcd.conf and other simular files.
Comment by Dmitry (veranyon) - Sunday, 12 July 2009, 13:38 GMT
Ronald, if you can - not close yet. When Roy will not respond within ~three days on my last question, then cover.
If you can, of course.
Comment by Dmitry (veranyon) - Sunday, 12 July 2009, 13:40 GMT
2 Roy
How to determine the cause of such behavior attribution strange ip?
Where to dig?
Comment by Roy Marples (rsmarples) - Sunday, 12 July 2009, 15:18 GMT
As I said earlier, DHCP servers mainly lease addresses by ClientID. However, some also perform matching against hostname or MAC address.
The default for dhcpcd-5.x is not to send a ClientID. This matches the behaviour of in-kernel DHCP clients and the dhclient program most other distributions use.

However, the default on Windows and Mac OSX is to sent a default ClientID of Ethernet + MAC address.
The default for early versions of dhcpcd-4.x and earlier was to sent a ClientID, but this proved troublesome for users migrating from dhclient and users running an NFS / where the kernel DHCP hands over to dhcpcd.

Now some DHCP servers make a distinction between a client that sends a ClientID of Ethernet + MAC address and those that don't, even when there is enough information in the DHCP message to construct a default ClientID of Ethernet + MAC address. One such server is ISC DHCPD, which is probably what your ISP uses. Other servers, such as dnsmasq can interchange quite freely between the default ClientID and no ClientID.

Hope this helps, but there is no "bug" here as such to fix.
However, I have added debugging messages to dhcpcd to indicate if it's reading an old lease to try and reuse which may help others in the future.
Comment by Dmitry (veranyon) - Sunday, 12 July 2009, 16:17 GMT
@Roy: Thanks for your explanation. I understood it.

@Ronald: A topic has been exhausted.

Loading...