[Gelistirici] dhcpcd 2.x ve 3.x serisi

Faik Uygur faik at pardus.org.tr
15 Kas 2007 Per 15:17:12 EET


Öntanımlı dhcpcd timeout süremiz 20 saniye. Bazı kartlarda bu süre yeterli 
olmuyor. e1000 ve skge sürücüleri kullanan kartlar bir örnek.

dhcpcd 3.x serisinde dhcp'den ip alamıyor diyerek 2.x serisine geri döndük ama 
burada sorun bir olasılık timeout süresi idi. Bir de daha önceden bir yama 
linki vermiştim. Bu yama zaten kullandığımız 3.x serisi içerisindeymiş. Yani 
3.x serisi 2.x serisine göre daha bir sorunsuz aslında. dhcpcd 2.x'in ip 
alamadığı çok oluyor.

20 saniye'nin yetmediğini ekteki dosya'dan çıktıları takip ederek 
görebilirsiniz. Kart e1000. İlk testlerde dhcpcd 2.x serisi kurulu. Ip alma 
timeout'unu 60 saniye veriyorum, bir sefer almayı beceriyor ardından 60 
saniye dolmasına rağmen alamıyor arka arkaya. 

Arada 3.x e upgrade edip deniyorum ve yaklaşık 30-35 saniye sürmesine rağmen 
alıyor.

Önerim dhcpcd 3.x serisine geri dönelim ve timeout'u 60 saniye yapalım. Alan 
zaten alabiliyor kısa sürede. e100 kartlı makinemde 5-10 saniye arası 
sürüyor. Geç alana da 20 saniye timeout yetersiz geliyor.

Aslında daha da güzeli dh-client'a geçmek. Dağıtımların çoğu buna geçmiş 
durumda. Baktığımda ip alma süresi aslında yine uzun sürüyor fakat geçte olsa 
alıyor. Kodlarını da inceledim biraz ve dh-client çok daha temiz görünüyor.

2008 için dh-client'ı düşünelim; 2007 serisinde 3.x'e yeniden geçelim ve 
timeout'u 60 saniye yapalım derim.

- Faik
-------------- sonraki bölüm --------------

----------------> dhcpd-2.0.8-4-6 kurulu

cure ~ # dhcpcd -k eth1;ifconfig eth1 down;sleep 2;time dhcpcd -R -Y -N -d -t 60 eth1
Error, dhcpcd: not running
Info, MAC address = 00:15:17:13:86:0c
Debug, broadcasting DHCP_DISCOVER
Debug, dhcpIPaddrLeaseTime=86400 in DHCP server response.
Debug, dhcpT1value is missing in DHCP server response. Assuming 43200 sec
Debug, dhcpT2value is missing in DHCP server response. Assuming 75600 sec
Debug, DHCP_OFFER received from  (172.16.61.100)
Debug, broadcasting DHCP_REQUEST for 172.16.202.65
Debug, dhcpIPaddrLeaseTime=86400 in DHCP server response.
Debug, dhcpT1value is missing in DHCP server response. Assuming 43200 sec
Debug, dhcpT2value is missing in DHCP server response. Assuming 75600 sec
Debug, DHCP_ACK received from  (172.16.61.100)
Debug, broadcasting ARPOP_REQUEST for 172.16.202.65
Info, verified 172.16.202.65 address is not in use
Info, your IP address = 172.16.202.65
Debug, orig hostname = cure
Debug, about to exec "/etc/dhcpc/dhcpcd.exe /var/lib/dhcpc/dhcpcd-eth1.info new"

real    0m29.357s        <------------------------------------------------------------------- ~30 saniye
user    0m0.000s
sys     0m0.009s
cure ~ # dhcpcd -k eth1;ifconfig eth1 down;sleep 2;time dhcpcd -R -Y -N -d -t 60 eth1
Info, MAC address = 00:15:17:13:86:0c
Debug, broadcasting DHCP_DISCOVER
Error, timed out waiting for a valid DHCP server response

real    1m0.006s
user    0m0.000s
sys     0m0.006s
cure ~ # dhcpcd -k eth1;ifconfig eth1 down;sleep 2;time dhcpcd -R -Y -N -d -t 60 eth1
Error, dhcpcd: not running
Info, MAC address = 00:15:17:13:86:0c
Debug, broadcasting DHCP_DISCOVER
Error, timed out waiting for a valid DHCP server response

real    1m0.007s
user    0m0.000s
sys     0m0.006s
cure ~ # dhcpcd -k eth1;ifconfig eth1 down;sleep 2;time dhcpcd -R -Y -N -d -t 60 eth1
Error, dhcpcd: not running
Info, MAC address = 00:15:17:13:86:0c
Debug, broadcasting DHCP_DISCOVER
Error, timed out waiting for a valid DHCP server response

real    1m0.006s
user    0m0.000s
sys     0m0.006s

-------------------------> dhcpd-3.1.5-14-7 ye yükseltiliyor

cure ~ # sudo pisi it --reinstall dhcpcd
Emniyet mandalı: taban sistem system.base'den bu paketler yükseltilecek:dhcpcd
Paket(ler)in toplam boyu: 32.00 KB
Paket dhcpcd, pardus-2007 deposunda bulundu
dhcpcd-3.1.5-14-7.pisi [önbellekte]
dhcpcd paketi, versiyon 3.1.5, sürüm 14, inşa 7 kuruluyor
Yeni orijinal versiyona yükseltiliyor
dhcpcd paketi kaldırılmak üzere yapılandırılıyor
dhcpcd paketinin dosyaları arşivden çıkartılıyor
dhcpcd paketi yapılandırılıyor
dhcpcd paketi yapılandırıldı
dhcpcd paketi yükseltildi
cure ~ # dhcpcd -k eth1;ifconfig eth1 down;sleep 2;time dhcpcd -R -Y -N -d -t 60 eth1
Error, eth1: dhcpcd not running
Info, eth1: dhcpcd 3.1.5 starting
Info, eth1: hardware address = 00:15:17:13:86:0c
Info, eth1: DUID = 00:01:00:01:0e:ce:6f:14:00:15:17:13:86:0c
Info, eth1: broadcasting for a lease
Debug, eth1: sending DHCP_DISCOVER with xid 0xc21b98d
Debug, eth1: waiting on select for 60 seconds
Debug, eth1: sending DHCP_DISCOVER with xid 0xc21b98d
Debug, eth1: sending DHCP_DISCOVER with xid 0xc21b98d
Debug, eth1: sending DHCP_DISCOVER with xid 0xc21b98d
Debug, eth1: sending DHCP_DISCOVER with xid 0xc21b98d
Debug, eth1: sending DHCP_DISCOVER with xid 0xc21b98d
Debug, eth1: sending DHCP_DISCOVER with xid 0xc21b98d
Debug, eth1: sending DHCP_DISCOVER with xid 0xc21b98d
Debug, eth1: sending DHCP_DISCOVER with xid 0xc21b98d
Debug, eth1: sending DHCP_DISCOVER with xid 0xc21b98d
Debug, eth1: sending DHCP_DISCOVER with xid 0xc21b98d
Debug, eth1: sending DHCP_DISCOVER with xid 0xc21b98d
Debug, eth1: got a packet with xid 0xc21b98d
Info, eth1: offered 172.16.202.62 from 172.16.61.100
Debug, eth1: sending DHCP_REQUEST with xid 0xc21b98d
Debug, eth1: waiting on select for 26 seconds
Debug, eth1: sending DHCP_REQUEST with xid 0xc21b98d
Debug, eth1: got a packet with xid 0xc21b98d
Info, eth1: checking 172.16.202.62 is available on attached networks
Debug, eth1: sending ARP probe #1
Debug, eth1: sending ARP probe #2
Debug, eth1: sending ARP probe #3
Debug, eth1: sending ARP claim #1
Debug, eth1: sending ARP claim #2
Info, eth1: leased 172.16.202.62 for 43200 seconds
Debug, eth1: renew in 21600 seconds
Debug, eth1: rebind in 37800 seconds
Info, eth1: adding IP address 172.16.202.62/24
Info, eth1: adding default route via 172.16.202.1 metric 0
Debug, eth1: no dns information to write
Debug, eth1: writing /var/lib/dhcpcd/dhcpcd-eth1.info
Debug, eth1: forking to background

real    0m37.502s
user    0m0.001s
sys     0m0.005s
cure ~ # dhcpcd -k eth1;ifconfig eth1 down;sleep 2;time dhcpcd -R -Y -N -d -t 60 eth1
Info, eth1: dhcpcd 3.1.5 starting
Info, eth1: hardware address = 00:15:17:13:86:0c
Info, eth1: DUID = 00:01:00:01:0e:ce:6f:14:00:15:17:13:86:0c
Info, eth1: broadcasting for a lease
Debug, eth1: sending DHCP_DISCOVER with xid 0x2faa6dd5
Debug, eth1: waiting on select for 60 seconds
Debug, eth1: sending DHCP_DISCOVER with xid 0x2faa6dd5
Debug, eth1: sending DHCP_DISCOVER with xid 0x2faa6dd5
Debug, eth1: sending DHCP_DISCOVER with xid 0x2faa6dd5
Debug, eth1: sending DHCP_DISCOVER with xid 0x2faa6dd5
Debug, eth1: sending DHCP_DISCOVER with xid 0x2faa6dd5
Debug, eth1: sending DHCP_DISCOVER with xid 0x2faa6dd5
Debug, eth1: sending DHCP_DISCOVER with xid 0x2faa6dd5
Debug, eth1: sending DHCP_DISCOVER with xid 0x2faa6dd5
Debug, eth1: sending DHCP_DISCOVER with xid 0x2faa6dd5
Debug, eth1: sending DHCP_DISCOVER with xid 0x2faa6dd5
Debug, eth1: sending DHCP_DISCOVER with xid 0x2faa6dd5
Debug, eth1: got a packet with xid 0x2faa6dd5
Info, eth1: offered 172.16.202.62 from 172.16.61.100
Debug, eth1: sending DHCP_REQUEST with xid 0x2faa6dd5
Debug, eth1: waiting on select for 27 seconds
Debug, eth1: sending DHCP_REQUEST with xid 0x2faa6dd5
Debug, eth1: got a packet with xid 0x2faa6dd5
Info, eth1: checking 172.16.202.62 is available on attached networks
Debug, eth1: sending ARP probe #1
Debug, eth1: sending ARP probe #2
Debug, eth1: sending ARP probe #3
Debug, eth1: sending ARP claim #1
Debug, eth1: sending ARP claim #2
Info, eth1: leased 172.16.202.62 for 43200 seconds
Debug, eth1: renew in 21600 seconds
Debug, eth1: rebind in 37800 seconds
Info, eth1: adding IP address 172.16.202.62/24
Info, eth1: adding default route via 172.16.202.1 metric 0
Debug, eth1: no dns information to write
Debug, eth1: writing /var/lib/dhcpcd/dhcpcd-eth1.info
Debug, eth1: forking to background

real    0m37.043s
user    0m0.000s
sys     0m0.005s
-------------- sonraki bölüm --------------
cure ~ # killall dhclient;ifconfig eth1 down;sleep 2;time dhclient eth1
Internet Systems Consortium DHCP Client V3.0.5
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth1/00:15:17:13:86:0c
Sending on   LPF/eth1/00:15:17:13:86:0c
Sending on   Socket/fallback
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 12
DHCPOFFER from 172.16.202.10
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPACK from 172.16.202.10
bound to 172.16.202.60 -- renewal in 16638 seconds.

real    0m37.683s
user    0m0.013s
sys     0m0.027s
cure ~ # killall dhclient;ifconfig eth1 down;sleep 2;time dhclient eth1
Internet Systems Consortium DHCP Client V3.0.5
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth1/00:15:17:13:86:0c
Sending on   LPF/eth1/00:15:17:13:86:0c
Sending on   Socket/fallback
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 7
DHCPOFFER from 172.16.202.10
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPACK from 172.16.202.10
bound to 172.16.202.60 -- renewal in 17589 seconds.

real    0m35.460s
user    0m0.015s
sys     0m0.024s
cure ~ # killall dhclient;ifconfig eth1 down;sleep 2;time dhclient eth1
Internet Systems Consortium DHCP Client V3.0.5
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth1/00:15:17:13:86:0c
Sending on   LPF/eth1/00:15:17:13:86:0c
Sending on   Socket/fallback
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
DHCPOFFER from 172.16.202.10
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPACK from 172.16.202.10
bound to 172.16.202.60 -- renewal in 18782 seconds.

real    0m36.466s
user    0m0.014s
sys     0m0.025s
cure ~ #


Gelistirici mesaj listesiyle ilgili daha fazla bilgi