Community discussions

MikroTik App
 
cowisp
just joined
Topic Author
Posts: 4
Joined: Mon Mar 23, 2009 10:49 pm

DHCP Option Functionality

Mon Mar 23, 2009 11:00 pm

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?
 
User avatar
nest
Forum Veteran
Forum Veteran
Posts: 822
Joined: Tue Feb 27, 2007 1:52 am
Location: UK
Contact:

Re: DHCP Option Functionality

Tue Mar 24, 2009 2:44 am

 
cowisp
just joined
Topic Author
Posts: 4
Joined: Mon Mar 23, 2009 10:49 pm

Re: DHCP Option Functionality

Tue Mar 24, 2009 4:48 pm

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.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: DHCP Option Functionality

Tue Mar 24, 2009 5:01 pm

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
You do not have the required permissions to view the files attached to this post.
 
cowisp
just joined
Topic Author
Posts: 4
Joined: Mon Mar 23, 2009 10:49 pm

Re: DHCP Option Functionality

Tue Mar 24, 2009 7:31 pm

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.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: DHCP Option Functionality

Wed Mar 25, 2009 2:37 am

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 =)
 
cowisp
just joined
Topic Author
Posts: 4
Joined: Mon Mar 23, 2009 10:49 pm

Re: DHCP Option Functionality

Wed Mar 25, 2009 10:22 pm

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.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: DHCP Option Functionality

Thu Mar 26, 2009 12:42 am

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?
The mikrotik shows the request being made but no address is assigned.
can you show us the log?
 
makstex
newbie
Posts: 49
Joined: Fri Mar 27, 2009 6:31 am

Re: DHCP Option Functionality

Tue Mar 31, 2009 9:24 pm

Option 66 not working. MikroTik version v3.22.
 
desi
just joined
Posts: 22
Joined: Sat Jul 04, 2009 2:41 pm

Re: DHCP Option Functionality

Wed Aug 05, 2009 5:35 pm

Hi Cowisp, can you please confirm if you were able to get DHCP option 82 working on MT?
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: DHCP Option Functionality

Wed Aug 05, 2009 9:43 pm

We use Option82 in RADIUS for DHCP. successfully =)
 
dssmiktik
Forum Veteran
Forum Veteran
Posts: 732
Joined: Fri Aug 17, 2007 8:42 am

Re: DHCP Option Functionality

Thu Aug 06, 2009 11:56 am

Option 66 not working. MikroTik version v3.22.
http://forum.mikrotik.com/viewtopic.php?f=2&t=29769

Who is online

Users browsing this forum: Google [Bot] and 97 guests