DHCP Option 43 and Sub option

mali77
Here to help

DHCP Option 43 and Sub option

I'm pretty familiar with configuring the option 43 but I need to configure suboption 21 also.  I'm trying to figure out how best to do that in Meraki DHCP.  I have tried the Hex with IP1:SubOption in HEX:IP2 format but no results.

 

Has anyone worked on a similar scenario?

15 REPLIES 15
kYutobi
Kind of a big deal

Not really sure but check out this thread.

 

https://community.meraki.com/t5/Switching/DHCP-Server-Options-Clarification/m-p/5911#M417

 

Hope it helps.

Enthusiast

Hmm interesting.

 

Have you seen this website?

http://blog.schertz.name/2012/05/understanding-dhcp-option-43/

 

At the bottom they build a hex version of DHCP option 43. Perhaps you can use that to generate what you need. For example if you select custom DHCP option 43 and add the following HEX I think it would send suboption 21 with the IP address 192.168.1.1 to the client:

150B3139322E3136382E312E31

The leading 15 means suboption 21.

The 0B is the length of the payload, 22 hex numbers = 11 ASCII characters = length 0x0B.

The rest is the payload which I got by using the hex converter here: http://dolcevie.com/js/converter.html

 

Is this for Ruckus IOT?

Thank you @BrechtSchamp yes I saw that website good read.  So I have no issues converting the two IP's to Hex.  I actually created an excel template that will do it.  

 

I'm not sure if the format I'm using in Meraki is correct or not as it is still not working.  Please see below: (Yes Ruckus IoT)

06:15:IP-IN-HEX-HERE:2c:15:IP-IN-HEX-HERE

 

06 = For VSZ

15 Length of IP

All in bold = VXZ IP in hex

2c = ,

15 = Sub option 21 in Hex

All in bold = IoT controller IP in Hex

 

I think I may be missing something here still.

 

BrechtSchamp
Kind of a big deal

Okay, I don't have experience with Ruckus IOT so I cant test. But I just found this topic:

https://forums.ruckuswireless.com/ruckuswireless/topics/handy_tool_dhcp_option_43_builder

 

According to that the suboptions used are 03 for ZD and 06 for vSZ (whatever those are). What is the 2c you have?

 

Here's a little python script I wrote to do the conversions. Just add the two together with a colon in between if you need both options:

vsz = "192.168.110.112"

vszdhcpoption = ""

vszdhcpoption += "06"

vszdhcpoption += ":" + format(len(vsz),"02x")

for letter in vsz:
	vszdhcpoption += ":" + format(ord(letter),"02x")

print("vSZ DHCP Option: ", vszdhcpoption)

zd = "10.10.10.10"

zddhcpoption = ""

zddhcpoption += "03"

zddhcpoption += ":" + format(len(zd),"02x")

for letter in zd:
	zddhcpoption += ":" + format(ord(letter),"02x")

print("ZD DHCP Option: ", zddhcpoption)

Output with the current IP addresses:

vSZ DHCP Option:  06:0f:31:39:32:2e:31:36:38:2e:31:31:30:2e:31:31:32
ZD DHCP Option:  03:0b:31:30:2e:31:30:2e:31:30:2e:31:30

 

I think one of the problems you have is that you specify the length in decimals instead of hex. 15 would be 0f.

 

If you don't have Python let me know the IPs, I can run it for you.

Thanks again for the reply, so that is actually me in that post asking about the calculation Ruckus uses.  Based on how Ruckus does it I actually already have a template that converts all that.  15 in this case was the hex for 21 actual length of the IP was 21 because there are two IP's that are involved.  VSZ IP and IoT controller IP.  Just like with Cisco WLC if there are two WLC IP's there is a specific hex code to specify that.

 

So in summary trying to figure out how best those two IP's will go in Meraki DHCP.

BrechtSchamp
Kind of a big deal

When you say controller IP, is that the ZD suboption they're talking about?

 

If the VSZ IP and the IoT controller IP are different suboptions then each of them needs it's own length field right?

 

So in total the DHCP option 43 with the two suboptions would be built like this:

2B zz 03 yy xx .. xx 06 ww vv .. vv

 

2B: 43 in hex

zz: total length of the option value (including all suboptions) in hex

03: specifies that the ZD option follows

yy: length of only the 03 suboption in hex

xx .. xx: hex value of the ZD option (the IP address)

06: specifies that the vSZ option follows

ww: length of only the 06 suboption value in hex

vv .. vv: hex value of the vSZ option (the IP address)

 

Those first two would automatically be handled by Meraki when you choose custom and option 43. So the only part you need to fill in in the custom box would be:

03:yy:xx:..:xx:06:ww:vv:..:vv

 

Note that the first field is always the identifier specifying the option and the second one the length.

 

If one suboption really contains two IP addresses in its payload (perhaps for redundancy) I'd start testing with just one. Also capture a DHCP request from you ruckus devices with wireshark so you can see how the DHCP offers are actually sent. This should aid in troubleshooting.

So yes there is ZD that uses sub option 03 and VSZ that uses sub option 06.  In my case I am using 06 (VSZ). 

 

Correct two different IP's and per their documentation IoT controller is option 21 (Hex Length = 15).

 

So here is what I added in Meraki:

 

06:0A:AA:BB:CC:DD:EE:FF:GG:HH:ZZ:ZZ:2C:15:0A:XX:YY:ZZ:XX:YY:ZZ:XX:YY:ZZ:AA

 

06 = VSZ sub option they need

0A = Length of the IP

next

2C = for the ,

15 = Sub option 21

0A = Length o fthe IP

Rest is the actual IP

 

Do you think I need to take out that comma (2C)?  I can try it yeah pcap is the next step I was looking to do as soon as I get a chance.

BrechtSchamp
Kind of a big deal

Yeah I think you need to take out that comma. The reason for the length fields is so you wouldn't need separators.

Tried that and same results.  Also I got a response from Ruckus that sub option 21 would hold the IoT controller IP in ASCII mode.  So in Meraki DHCP I simply just added another custom code and entered 21 there and then the IP of the IoT controller.  Am I missing a step?

So I don't see the AP requesting 21 in Discover, nor do I see it in the Response.dhcp_discover-730.png

BrechtSchamp
Kind of a big deal

Is this a screenshot of the DHCP discover? If it is option 21 is indeed missing, you have no control over the options it requests, that's up to the client. If it's not requesting option 21, then I guess Ruckus gave you wrong information.

 

I see that it does request Option 43. What's in the offer the Meraki MX sends? Can you see the custom suboptions you configured?

Here is the offer, don't see 21 in there either, there is a disconnect some where, another weird thing is I have to manually start the service in the AP and when I do it looks for the default server just like in Cisco AP.

 

So here is what I am thinking:

1- Since the service is not starting automatically it is possible that is why I am not seeing Sub option 21 in there.

2- Or AP doesn't request Sub option 21 but it needs to be part of Option 43 in Hex like I had it before perhaps.  Still working on it will update more later.  This has been so weird.

 

dhcp_offer_730.PNG

BrechtSchamp
Kind of a big deal

I'm mostly interested in the contents of option 43, can you click it open via the +?

It actually shows the HEX value I have specified and the two IP addresses but I don't see Option 21 in there even though I have have added it in the HEX as 15 with the Length of 0A.

 

dhcp_option43.PNG

Thank you @kYutobi , yes I did see that but that doesn't apply to my situation.

Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.
Labels