Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-27-2011, 12:54 PM
|
#1
|
Member
Registered: Sep 2005
Posts: 60
Rep:
|
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
|
|
|
02-02-2011, 03:33 PM
|
#2
|
LQ Newbie
Registered: Feb 2011
Posts: 4
Rep:
|
Quote:
Originally Posted by don_wombat_73
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.
|
|
|
02-04-2011, 04:32 PM
|
#3
|
Member
Registered: Sep 2005
Posts: 60
Original Poster
Rep:
|
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.
|
|
|
02-15-2011, 10:03 PM
|
#4
|
LQ Newbie
Registered: Feb 2011
Posts: 4
Rep:
|
Quote:
Originally Posted by don_wombat_73
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
|
|
|
All times are GMT -5. The time now is 06:16 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|