(no subject) Vendor Class
Jose Amengual M.
pepe at rdc.cl
Wed Jun 13 03:07:58 UTC 2007
I never sow a user list like this one.I never get answer so professional in any other list.I'm impress of the accurate answers.Thanks and congratulations. ----- Original Message -----From: Chuck Anderson Date: Tuesday, June 12, 2007 17:59Subject: Re: (no subject)To: dhcp-users at isc.org> On Tue, Jun 12, 2007 at 04:46:26PM -0700, Jose Amengual wrote:> > I have this configuration in my dhcp server, and i try to give > to an > > Ip phone with the string "MTA3308" one of the ip address pool > bellow, > > but is not working.> > class "pepe" {> > match if substring (option vendor-class-identifier, 0, 4) = > "MTA3308";> }> > > In this part "(option vendor-class-identifier, 0, 4)" where i > can > > find this two numbers (in red ) ?( tcpdump, manufacture manual ).> > This is documented in the dhcp-eval(5) manual page:> > 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.> > Since you have a 7-character string to match, this should work:> > class "pepe" {> match if substring (option vendor-class-identifier, 0, 7) = > "MTA3308";}> > > > Can I use part of the mac address to give a range of ip > address ? > > ( like give from 192.168.1.10 to 20 to all mac address > starting with > > 00:15:00 ?)> > You might be able to match on hardware address (the 'hardware' > data > expression includes the one byte hardware type field, htype. 1 > is > Ethernet).> > class "hardware-vendor-x" {> match if substring (hardware, 0, 4) = 1:00:15:00;> }> > 'hardware' is also documented in dhcp-eval(5).> >
More information about the dhcp-users
mailing list