precisa de ajuda com o entendimento do dhcpd.conf

1

Como posso interpretar o seguinte:

class "blade-1-01-1" {
            match if substring (option dhcp-client-identifier, 9, 1) = 01 and
                     substring (option dhcp-client-identifier, 5, 1) = 01 and
                     substring (option dhcp-client-identifier, 6, 1) = 00;
        }

BR

    
por user1977050 12.05.2014 / 15:04

1 resposta

2

É apenas uma seção que estabelece uma classe de cliente chamada blade-1-01-1 como definida pelas partes da cadeia do identificador de cliente no pacote DHCPDISCOVER do cliente.

O identificador do cliente é usado para identificar o cliente DHCP que está fazendo a solicitação. Portanto, por exemplo, se você estiver com dual boot entre Windows e Linux, terá o mesmo endereço MAC, mas duas sequências de identificadores diferentes.

As classes

dhcpd podem ser usadas para definir opções específicas, definir limitações de concessão, vinculá-las a conjuntos de endereços específicos, etc.

Se a sua pergunta for sobre a função substring você pode verificar a página man do dhcp-eval :

substring (data-expr, offset, length)

The substring operator evaluates the data expression and returns the substring of the result of that evaluation that starts offset bytes from the beginning, continuing for length bytes. Offset and length are both numeric expressions. If data-expr, offset or length evaluate to null, then the result is also null. If offset is greater than or equal to the length of the evaluated data, then a zero-length data string is returned. If length is greater then the remaining length of the evaluated data after offset, then a data string containing all data from offset to the end of the evaluated data is returned.

    
por 12.05.2014 / 15:34

Tags