Re: [Lug-bg] [SPAM] Re: Проблем с dhcpd и static ip.
- Subject: Re: [Lug-bg] [SPAM] Re: Проблем с dhcpd и static ip.
- From: Spas Pavlov <spas@xxxxxxxxxxx>
- Date: Wed, 4 Mar 2009 15:34:32 +0200
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
|