Strona 1 z 1

isc-dhcp-server - statycznie po adresach MAC dla różnych podsieci

: 04 listopada 2013, 14:13
autor: sethiel
Chciałbym dla różnych podsieci posiadać różne ale statyczne po MAC adresy IP.
W konfigurację wpisuję więc:

Kod: Zaznacz cały

shared-network eth7
    {
    subnet 192.168.49.0 netmask 255.255.255.0
        {
        option routers 192.168.49.1;
        option subnet-mask 255.255.255.0;
        option domain-name-servers  213.134.128.20;
        default-lease-time 86400;
        max-lease-time 172800;
        }
        host PC11 {hardware ethernet 00:1a:21:2d:7d:59;fixed-address 192.168.49.49;} #(notek) Bartosz
    }

shared-network eth8
    {
    subnet 10.0.49.0 netmask 255.255.255.128
        {
        option routers 10.0.49.1;
        option subnet-mask 255.255.255.128;
        range 10.0.49.50 10.0.49.127;
        option domain-name-servers 10.33.0.20, 194.204.152.34, 194.204.159.1;
        default-lease-time 16000;
        max-lease-time 36000;
        }
        host PC11 {hardware ethernet 00:1a:21:2d:7d:59;fixed-address 10.0.49.49;} #(notek) Bartosz
}
I mam WARNING (ostrzeżenie).

Kod: Zaznacz cały

Nov  4 14:02:37 router dhcpd: WARNING: Host declarations are global.  They are not limited to the scope you declared them in.
Oczywiście jak wpisuję w:

Kod: Zaznacz cały

global host declaration
to mam:

Kod: Zaznacz cały

ERROR
Czy można tak to napisać aby nie mieć:

Kod: Zaznacz cały

WARNING

: 04 listopada 2013, 14:27
autor: LordRuthwen
Masz inną maskę w dhcpd.conf niż na interface.

: 04 listopada 2013, 14:27
autor: pone13
Nazwa hosta musi być unikatowa, a tym masz ja byk dla każdej z podsieci nazwę hosta PC11. Wpisz dla jednej z podsieci nazwę np. PC11a, a dla drugiej PC11b i powinno być ok.

: 04 listopada 2013, 16:28
autor: sethiel
Hosty nazwane różnie, maska poprawiona.

Kod: Zaznacz cały

Nov  4 16:26:07 router dhcpd: WARNING: Host declarations are global.  They are not limited to the scope you declared them in.
Nov  4 16:26:09 router dhcpd: WARNING: Host declarations are global.  They are not limited to the scope you declared them in.
Nov  4 16:26:09 router dhcpd: WARNING: Host declarations are global.  They are not limited to the scope you declared them in.

Na wszelki wypadek serwer informuje mnie trzykrotnie.
Generalnie można to oczywiście zignorować bo działa. Ale jak ma być ładnie to czemu ma być ostrzeżenie.

: 04 listopada 2013, 20:19
autor: pone13
A spróbuj może wpisać hosta w ten sposób w części globalnej, poza zasięgiem subnet:

Kod: Zaznacz cały

host PC11 {
  hardware ethernet [color=#333333]00:1a:21:2d:7d:59;[/color]
  fixed address [color=#333333]192.168.49.49[/color], [color=#333333]10.0.49.49[/color];
}
Podobno jest możliwy taki zapis ;)

: 05 listopada 2013, 02:36
autor: sethiel
Druga w nocy - ale stwierdziłem, że sprawdzę.
Biję pokłony.
Poszedłem nawet dalej

Kod: Zaznacz cały

host PC11 {hardware ethernet 00:1a:21:2d:7d:59; fixed address 192.168.49.49, 10.0.49.49, 10.99.99.100;}

: 05 listopada 2013, 07:10
autor: pone13
Widać ma być w jednym miejscu :p , a nie rozstrzelone po podsieciach.