Can you add a class match with omshell?

Marc Perea marccp at
Mon Jan 5 20:02:32 UTC 2009

I'm trying to determine if it's possible to use omshell (omapi) to add a class and pool statement to dhcpd. For example, I'd like to add:
class "my.1st-class" { match if (option agent.circuit-id = "my.1st-class"); }
pool { authoritative; allow members of "my.1st-class"; range; }

it seems that the release notes show that something like this might be supported, but I must be looking in the wrong places for documentation (or perhaps not since others appear to have asked and gone unanswered).

I use omshell for lease modification on occasion, so that part is working. When I try to add the class using omshell, I do:
>new class
obj: class
>set name="my.1st-class"
obj: class
name = "my.1st-class"
can't open object: invalid argument

I get the same error if I try to also:
>set match="option agent.circuit-id=my.1st-class"
but if I add the match, nothing will be added to dhcpd.leases, whereas the former adds:
class "my.1st-class" {

Not able to get further than this, I also don't know how I'd go about associating a pool with an allow statement.

Anyone know if what I want to do with omshell can be done? TIA.

Marc Perea
Network Support Engineer
SRT Communications, Inc.
marccp at

More information about the dhcp-users mailing list