[Tecnica] Configurazione ISC DHCP

Michele Pinassi o-zone a zerozone.it
Mer 12 Set 2012 09:35:03 BST


Buongiorno a todos,

ho la necessità di configurare un server DHCP per assegnare sia
indirizzi IP che opzioni a seconda di:

* MAC Address
* Vendor

(si tratta di telefoni VoIP con autoprovisioning, per capirsi...)

Ho "n" sedi dove io conosco quali MAC ci sono in ogni sede. Ad esempio,
MAC1 in SEDE1, MAC2 in SEDE2 etc etc etc...

Ho la necessità di configurare il server DHCP in modo che:

* assegni un certo range di IP per la SEDE1 e altro range per la SEDE2
(per il routing)

e che, a seconda della stringa Vendor, restituisca una "option 66"
differente. Attualmente, per partire, ho una configurazione come questa:


class "polycom" {
    match if substring (option vendor-class-identifier,0,7) = "Polycom";
    option tftp-server-name "tftp://voip.unisi.it";
}

class "cisco" {
    match if substring (option vendor-class-identifier,0,5) = "Cisco";
    option tftp-server-name "voip.unisi.it";
}

class "snom" {
    match if substring (option vendor-class-identifier,0,4) = "Snom";
    option tftp-server-name "voip.unisi.it";
}

class "yealink" {
    match if substring (option vendor-class-identifier,0,7) = "yealink";
    option tftp-server-name "voip.unisi.it";
}

shared-network 1-10 {
    subnet 172.20.1.0 netmask 255.255.1.0 {
    option routers 172.20.1.1;
    pool {
        range 172.20.1.10 172.20.1.254;
        allow members of "polycom";
        allow members of "cisco";
        allow members of "yealink";
        allow members of "snom";
    }
    }
    subnet 172.20.2.0 netmask 255.255.2.0 {
    option routers 172.20.2.1;
    pool {
        range 172.20.2.10 172.20.2.254;
        allow members of "polycom";
        allow members of "cisco";
        allow members of "yealink";
        allow members of "snom";
    }
    }
}

Come potete vedere, in questa situazione non viene fatto il controllo
del MAC address, cosa assolutamente necessaria.

Inoltre stavo valutando l'uso di LDAP per poter gestire dinamicamente la
configurazione del DHCP (
https://answers.launchpad.net/ubuntu/+source/isc-dhcp/+question/172939)

Michele

-- 
O-Zone ! No (C) since 1996
On the road with VFR VTec 2002 "Vuffy", on the net with Linux Slackware.
Home+BLOG @ http://www.zerozone.it - Travels @ http://www.openitaly.net




Maggiori informazioni sulla lista Tecnica