Re: [Lug-bg] [SPAM] Re: Проблем с dhcpd и static ip.
- Subject: Re: [Lug-bg] [SPAM] Re: Проблем с dhcpd и static ip.
- From: "Kristian Kirilov" <d3v1ous@xxxxxxxxxxxx>
- Date: Wed, 4 Mar 2009 15:57:46 -0200 (EET)
- Importance: Normal
:) Бозица малко ама..
Тествах с на Спас конфиг-а.
root@router:~# cat /etc/dhcp3/dhcpd.conf
option domain-name "d3v1ous.info";
option domain-name-servers 192.168.0.1;
#subnet declaration
subnet 192.168.0.0 netmask 255.255.255.0 {
#обхват на DHCP мрежата трябва да е по-голям от 50,
#ако искаш да включиш 50-то ИП. ИП-та извън този обхват
# можеш да настроиваш на машини като STATIC IP
range 192.168.0.2 192.168.0.64;
# gateway, който да получат клиентите
option routers 192.168.0.1;
# маска, която да получат клиентите, тук е добре да е 255.255.255.0
option subnet-mask 255.255.255.0;
# broadcast , който да получат клиентите
option broadcast-address 192.168.0.255;
default-lease-time 600;
max-lease-time 7200;
}
# и сега дефиниция за машини които получават по DHCP винаги един и същ адрес
host d3v1ous {
hardware ethernet 00:1a:4d:4c:4a:a6;
fixed-address 192.168.0.50;
}
root@router:~#
лог от syslog:
Mar 4 15:52:19 router dhcpd: Internet Systems Consortium DHCP Server V3.0.4
Mar 4 15:52:19 router dhcpd: Copyright 2004-2006 Internet Systems
Consortium.
Mar 4 15:52:19 router dhcpd: All rights reserved.
Mar 4 15:52:19 router dhcpd: For info, please visit
http://www.isc.org/sw/dhcp/
Mar 4 15:52:21 router dhcpd: Internet Systems Consortium DHCP Server V3.0.4
Mar 4 15:52:21 router dhcpd: Copyright 2004-2006 Internet Systems
Consortium.
Mar 4 15:52:21 router dhcpd: All rights reserved.
Mar 4 15:52:21 router dhcpd: For info, please visit
http://www.isc.org/sw/dhcp/
Mar 4 15:52:21 router dhcpd: Wrote 0 deleted host decls to leases file.
Mar 4 15:52:21 router dhcpd: Wrote 0 new dynamic host decls to leases file.
Mar 4 15:52:21 router dhcpd: Wrote 5 leases to leases file.
Mar 4 15:53:52 router dhcpd: DHCPREQUEST for 192.168.0.5 from
00:1a:4d:4c:4a:a6 via eth1: lease 192.168.0.5 unavailable.
Mar 4 15:53:52 router dhcpd: DHCPNAK on 192.168.0.5 to 00:1a:4d:4c:4a:a6
via eth1
Mar 4 15:53:52 router dhcpd: uid lease 192.168.0.5 for client
00:1a:4d:4c:4a:a6 is duplicate on 192.168.0/24
Mar 4 15:53:52 router dhcpd: DHCPDISCOVER from 00:1a:4d:4c:4a:a6 via eth1
Mar 4 15:53:52 router dhcpd: DHCPOFFER on 192.168.0.50 to
00:1a:4d:4c:4a:a6 via eth1
Mar 4 15:53:52 router dhcpd: Dynamic and static leases present for
192.168.0.50.
Mar 4 15:53:52 router dhcpd: Remove host declaration d3v1ous or remove
192.168.0.50
Mar 4 15:53:52 router dhcpd: from the dynamic address pool for 192.168.0/24
Mar 4 15:53:52 router dhcpd: uid lease 192.168.0.5 for client
00:1a:4d:4c:4a:a6 is duplicate on 192.168.0/24
Mar 4 15:53:52 router dhcpd: DHCPREQUEST for 192.168.0.50 (192.168.0.1)
from 00:1a:4d:4c:4a:a6 via eth1
Mar 4 15:53:52 router dhcpd: DHCPACK on 192.168.0.50 to 00:1a:4d:4c:4a:a6
via eth1
Mar 4 15:53:53 router spamd[668]: prefork: periodic ping from spamd parent
Mar 4 15:53:53 router spamd[668]: prefork: sysread(11) not ready, wait
max 300 secs
Mar 4 15:53:53 router spamd[666]: prefork: periodic ping from spamd parent
Mar 4 15:53:53 router spamd[666]: prefork: sysread(10) not ready, wait
max 300 secs
Mar 4 15:53:58 router dhcpd: Dynamic and static leases present for
192.168.0.50.
Mar 4 15:53:58 router dhcpd: Remove host declaration d3v1ous or remove
192.168.0.50
Mar 4 15:53:58 router dhcpd: from the dynamic address pool for 192.168.0/24
Mar 4 15:53:58 router dhcpd: uid lease 192.168.0.5 for client
00:1a:4d:4c:4a:a6 is duplicate on 192.168.0/24
Mar 4 15:53:58 router dhcpd: DHCPREQUEST for 192.168.0.50 from
00:1a:4d:4c:4a:a6 via eth1
Mar 4 15:53:58 router dhcpd: DHCPACK on 192.168.0.50 to 00:1a:4d:4c:4a:a6
via eth1
Обаче компютъра си е взел 50. Сега остава да ми кажете как да махна тази
грешка и защо въобще се получава?
> On Wednesday 04 March 2009 18:41:22 Kristian Kirilov wrote:
>> Така, това е от syslog
>>
>> root@router:~# cat /var/log/syslog
>> Mar 4 14:38:35 router dhcpd: Internet Systems Consortium DHCP Server
>> V3.0.4 Mar 4 14:38:35 router dhcpd: Copyright 2004-2006 Internet
>> Systems
>> Consortium.
>> Mar 4 14:38:35 router dhcpd: All rights reserved.
>> Mar 4 14:38:35 router dhcpd: For info, please visit
>> http://www.isc.org/sw/dhcp/
>> Mar 4 14:38:37 router dhcpd: Internet Systems Consortium DHCP Server
>> V3.0.4 Mar 4 14:38:37 router dhcpd: Copyright 2004-2006 Internet
>> Systems
>> Consortium.
>> Mar 4 14:38:37 router dhcpd: All rights reserved.
>> Mar 4 14:38:37 router dhcpd: For info, please visit
>> http://www.isc.org/sw/dhcp/
>> Mar 4 14:38:37 router dhcpd: Wrote 0 deleted host decls to leases file.
>> Mar 4 14:38:37 router dhcpd: Wrote 0 new dynamic host decls to leases
>> file. Mar 4 14:38:37 router dhcpd: Wrote 5 leases to leases file.
>>
>> И сега requestvam,
>>
>> root@router:~# cat /var/log/syslog
>> Mar 4 14:40:22 router dhcpd: DHCPREQUEST for 192.168.0.5 from
>> 00:1a:4d:4c:4a:a6 (d3v1ous) via eth1
>> Mar 4 14:40:22 router dhcpd: DHCPACK on 192.168.0.5 to
>> 00:1a:4d:4c:4a:a6
>> (d3v1ous) via eth1
>> Mar 4 14:40:25 router dhcpd: DHCPREQUEST for 192.168.0.5 from
>> 00:1a:4d:4c:4a:a6 (d3v1ous) via eth1
>> Mar 4 14:40:25 router dhcpd: DHCPACK on 192.168.0.5 to
>> 00:1a:4d:4c:4a:a6
>> (d3v1ous) via eth1
>> root@router:~#
>>
>> Според мен би трябвало да си вземе 50, а не 5.
>
> Здравейте,
>
> Май ще трябва да се повтаряме:
> Ако предположим че eth1 ти е с ИП 192.168.0.1 и МАСКА 255.255.255.0, то
> dhcp,conf трябва да ти изглежа по следния начин
>
> option domain-name "d3v1ous.info";
> option domain-name-servers 192.168.0.1;
>
> #subnet declaration
> subnet 192.168.0.0 netmask 255.255.255.0 {
> #обхват на DHCP мрежата трябва да е по-голям от 50,
> #ако искаш да включиш 50-то ИП. ИП-та извън този обхват
> # можеш да настроиваш на машини като STATIC IP
> range 192.168.0.2 192.168.0.64;
>
> # gateway, който да получат клиентите
> option routers 192.168.0.1;
>
> # маска, която да получат клиентите, тук е добре да е 255.255.255.0
> option subnet-mask 255.255.255.0;
>
> # broadcast , който да получат клиентите
> option broadcast-address 192.168.0.255;
> default-lease-time 600;
> max-lease-time 7200;
> }
>
> # и сега дефиниция за машини които получават по DHCP винаги един и същ
> адрес
> host d3v1ous {
> hardware ethernet 00:1a:4d:4c:4a:a6;
> fixed-address 192.168.0.50;
> }
>
> Спас Павлов
> _______________________________________________
> Lug-bg mailing list
> Lug-bg@xxxxxxxxxxxxxxxxxx
> http://linux-bulgaria.org/mailman/listinfo/lug-bg
>
-----------------------------------------
http://mail-lists.co.cc/ - Българската мейл листа.
_______________________________________________
Lug-bg mailing list
Lug-bg@xxxxxxxxxxxxxxxxxx
http://linux-bulgaria.org/mailman/listinfo/lug-bg
|