DHCP Option Functionality

Hello. Trying to figure out some of the DHCP server option functionality. Specifically whether or not the Option functionality can be used in conjunction with dhcp snooping on a switch to assign ip addresses based on port numbers.

Traditionally with an ISC dhcp server this is accomplished by specifying the circuit-id and remote-id to a specific mac address and port information and then creating a scope of one ip that when the incoming packet matches this information it assigns an ip address.

I have read through the manuals and it appears that the mikrotik supports option 82 functionality, but there is no information in the manner that it needs to be implemented. IE: What commands need to be entered into the option section to get this to work.

anyone have any information?

Does this help?

http://www.mikrotik.com/testdocs/ros/3.0/pnp/dhcp_content.php#.8

Unfortunately no. The document does illustrate the usage as it pertains to other options, but it gives no information regarding setting up the option82 functions. This is primarily because with option 82 you include both the circuit ID (usually the mac address of the switch) and the Remote ID (usually the combination of bits that indicates vlan, port and other information) With the text in the DHCP document, it doesn’t indicate if you have to specify “Circuit ID” prior to entering the value, whether you enter it in HEX, whether you combine the two, or other.

Do you need exactly Option 82 functionality? I think, you may use ‘Agent Circuit ID’ and ‘Agent Remote ID’ fields of DHCP Lease. A few moments:

  1. you should use Option82-enabled switches, and setup switch as DHCP Relay for RouterOS;
  2. generally, ‘Agent * ID’ are binary fields in switches (see picture, switches are D-Link DES-3028), and I don’t know whether you can manage them on RouterOS directly. we do not have troubles because we use RADUIS server for DHCP, but you may need a feature request to display/edit HEX, not RAW data in WinBox/CLI
    Clipboard03.jpg

Thanks for the tips.

I have the option82 set up correctly to work with an external ISC DHCP server. The switch passes the information to the server which then looks at the agent ID and Circuit ID. It then realizes that this fits the profile to allow a lease from a specific ip address.

I am trying to use option 82 to GRANT leases, without having to relay that information past the mikrotik device.

In doing this, I keep the dhcp snooping and I forward the dhcp requests directly to the mikrotik device. The mikrotik sees the dhcp request but doesn’t assign it any ip addresses. Possibly because I don’t know what the configuration in the dhcp option needs to be. Is there a value statement that comes before the hex?

I have attempted to put in the whole circuitID/RemoteID that comes from the debug of the switch I am working on, but this did not allow the device to get an ip address.

heh… you may try to receive address from pool, and then to make a static lease from that dynamic entry with filled in agent and circuit IDs =)

I don’t know if this is a bug or not, but I tried a test.

  1. Created DHCP scope
  2. set device to dhcp request
  3. set switch to do dhcp snooping.

The mikrotik shows the request being made but no address is assigned. I then

  1. Turned off dhcp snooping on switch

Device was then able to get an ip address. No circuit ID or Relay ID listed.

Seems like I am missing something.

well, dhcp snooping is not Option82 insertion, in fact… Option82 settings should be in DHCP Relay settings, as far as I know. what switch do you use?

can you show us the log?

Option 66 not working. MikroTik version v3.22.

Hi Cowisp, can you please confirm if you were able to get DHCP option 82 working on MT?

We use Option82 in RADIUS for DHCP. successfully =)

http://forum.mikrotik.com/t/routeros-not-sending-dhcp-server-option-66/26517/1