LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-27-2011, 12:54 PM   #1
don_wombat_73
Member
 
Registered: Sep 2005
Posts: 60

Rep: Reputation: 15
ISC DHCP Class match statement


I'm a bit green at creating classes in ISC. Could someone proofread this for me? I think I'm missing a semi-colon somewhere...
Code:
class "STB" {
 match if (
  (
   (substring (option vendor-class-identifier, 0, 12) = "minerva3800w") or
   (substring (option vendor-class-identifier, 0, 13) = "minerva5810wx") or
   (substring (option vendor-class-identifier, 0, 12) = "ADB-3721WN") or
   (substring (option vendor-class-identifier, 0, 12) = "ADB-5721WNX") or
   (substring (option vendor-class-identifier, 0, 14) = "minerva2500w")
   ) and
    match if substring(hardware, 1,3) = 00:03:91;
 )
}
TIA
 
Old 02-02-2011, 03:33 PM   #2
BenLogan79
LQ Newbie
 
Registered: Feb 2011
Posts: 4

Rep: Reputation: 0
Quote:
Originally Posted by don_wombat_73 View Post
I'm a bit green at creating classes in ISC. Could someone proofread this for me? I think I'm missing a semi-colon somewhere...
Code:
class "STB" {
 match if (
  (
   (substring (option vendor-class-identifier, 0, 12) = "minerva3800w") or
   (substring (option vendor-class-identifier, 0, 13) = "minerva5810wx") or
   (substring (option vendor-class-identifier, 0, 12) = "ADB-3721WN") or
   (substring (option vendor-class-identifier, 0, 12) = "ADB-5721WNX") or
   (substring (option vendor-class-identifier, 0, 14) = "minerva2500w")
   ) and
    match if substring(hardware, 1,3) = 00:03:91;
 )
}
TIA
I don't think you are missing a semicolon, I think the problem is with your second match statement. Try this instead:
Code:
class "STB" {
 match if (
  (
   (substring (option vendor-class-identifier, 0, 12) = "minerva3800w") or
   (substring (option vendor-class-identifier, 0, 13) = "minerva5810wx") or
   (substring (option vendor-class-identifier, 0, 12) = "ADB-3721WN") or
   (substring (option vendor-class-identifier, 0, 12) = "ADB-5721WNX") or
   (substring (option vendor-class-identifier, 0, 14) = "minerva2500w")
  ) and
  (substring(hardware, 1,3) = 00:03:91);
 )
}
Note that there is no second "match if" clause. I could be wrong, but I think that'll do what you want. Interesting that you are using Minerva and ADB STBs. We do the same here. We are just starting to test the 5721 and 3721. We do it a little differently than you are here, but it is always interesting to see how others do things.

Regards,
Ben

Last edited by BenLogan79; 02-02-2011 at 03:43 PM.
 
Old 02-04-2011, 04:32 PM   #3
don_wombat_73
Member
 
Registered: Sep 2005
Posts: 60

Original Poster
Rep: Reputation: 15
ACK! I knew it was something simple. It works now. THANK YOU FOR THE HELP!

Since I've peeked your interest, how are you doing this?

Last edited by don_wombat_73; 02-04-2011 at 04:48 PM.
 
Old 02-15-2011, 10:03 PM   #4
BenLogan79
LQ Newbie
 
Registered: Feb 2011
Posts: 4

Rep: Reputation: 0
Quote:
Originally Posted by don_wombat_73 View Post
ACK! I knew it was something simple. It works now. THANK YOU FOR THE HELP!

Since I've peeked your interest, how are you doing this?
Don,

The way we do this is to define two classes for each model STB--one for when the box first boots (ADB's firmware pulls this IP), and a second for when Minerva takes over. (The boxes actually pull an IP twice in the boot process.) For example, for a 3800, the two classes look like this:

Code:
class "ADB3800W boot"
{
    match if substring (option vendor-class-identifier, 0, 11) = "minerva3800";
}

class "ADB3800W sw"
{
    match if substring (option vendor-class-identifier, 0, 24) = "udhcp_MRV3X_1_
3800W(ADB)";
}
We then allow members of those classes to the appropriate range(s). It's not too hard to keep up with, but I'm always trying to find easier ways to do things, ha. We are a telephone co-op, and have about 8 exchanges we offer TV service in. Our DSLAMs relay the DHCP traffic to the DHCP server, and they set the option 82 info along the way. With our other services (Internet and VOIP), I can target specific DSLAMs within an exchange and treat them differently, but the way we do the video right now, I can only do an exchange at a time. So I've been thinking about changing it up. One of the ways I was thinking about was using subclassing--I haven't played with it yet though.

Sorry it took so long to respond to you. I just realized tonight that I never finished posting.

Regards,
Ben
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ISC DHCP - class matching based on mac address sinthetic Linux - Networking 3 08-17-2010 12:48 PM
A question about ISC-DHCP 22978316 Linux - Newbie 3 05-03-2009 09:08 PM
A question about ISC-DHCP 22978316 Linux - Server 1 05-02-2009 08:14 AM
Migrate DHCP from Microsoft to ISC DHCP on Linux rsmccain Linux - Networking 4 10-27-2006 08:47 PM
Dhcp Isc Help x86br Linux - Networking 6 04-19-2003 07:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration