VLAN class statement

Everitt, Andrew C ace at ceh.ac.uk
Wed Mar 3 17:43:33 UTC 2010


This is the first time I have posted to this list and I hope you can help.

I have an ISC DHCP server with 2 address ranges on it; at the moment one range is reserved for VoIP phones and one for PC's.  To ensure the phones and PC's use the right range I have setup a class for each and manually populated them.

In the current setup the phone class definition statement for capturing MAC's as follows.

class "VoIP" {
    match (substring (hardware, 1, 6));

Then for every phone we have a subclass & host definition statement.

subclass "VoIP" AA:BB:CC:DD:EE:F1; # VoIP phone
host voippEEF1 { hardware ethernet AA:BB:CC:DD:EE:F1; }

Finally there is an "allow members of VoIP" statement in the phone IP range section.
This works well but adding another 10 or 20 phones is tedious, so I would like to automate the class population for the phones.

We have a Cisco network that's configured to place the Cisco phones into vlan 2.  When the phones send out a DHCP request the server logs reflect the fact its come from vlan 2.  I would like to use the fact that all phones are on vlan 2 to populate the phone (VoIP) class.

After some research I thought that option code 191 is used by the DHCP server for vlan's.  So I set the following class statement up.

option voip-cisco-phone code 191 = text;
class "VoIP-2" {
         match if option voip-cisco-phone = "vlan2";

and added "allow members of VoIP-2" to the phone's range statement.  Unfortunately it has not worked.  At first I thought the problem lay in the match result (vlan2), but after trying multiple different match results, I'm not so sure.

Can someone help?

Thanks in advance,
Andrew Everitt

This message (and any attachments) is for the recipient only. NERC
is subject to the Freedom of Information Act 2000 and the contents
of this email and any reply you make may be disclosed by NERC unless
it is exempt from release under the Act. Any material supplied to
NERC may be stored in an electronic records management system.

More information about the dhcp-users mailing list