Got it

How to configure the DHCP Option 43 on a Linux machine? (FAQ)

Latest reply: Sep 27, 2016 03:30:43 13195 3 1 0 1

Hello, guys!


This post is about the procedure of how to configure the DHCP Option 43 on a Linux machine. Please see below for more details.


DHCP Option 43

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


BACKGROUND


Some scenarios require the use of an external DHCP server and I would like to describe which should be the format of the IP address configured in the DHCP option 43 on such a server because some time could be helpful to know this.


USAGE SCENARIO


In more complex wireless networks or in some special scenarios we might not have the possibility to deploy or configure a dhcp server in the same network segment as the AP. In this kind of situations the AP cannot discover the ACs through broadcast after it obtains an IP address from the DHCP server.


To address this problem, we have to configure Option 43 on the DHCP server to advertise the IP addresses of the ACs to the APs.


After Option 43 has been configured, the AP sends unicast Discover Request packets to the IP addresses carried in Option 43. If the IP addresses specified by Option 43 do not respond, the AP broadcasts Discover Request packets to request IP addresses of the ACs in the local network segment.


As you already know, on our devices the dhcp server configuration offers the possibility to implement option 43 and to specify the IP addresses in more than one format : ascii string, hex or decimal with the following command:


dhcp serveroption 43 sub-option sub-code ] { ascii ascii-string | hex hex-string | ip-address ip-address &<1-8> }


The unfortunate thing is that on some other servers we might not have this liberty. For instance if we want to configure the dhcp sever on a linux machine we would have to type the ip addresses in an ascii hex format so that our AP would understand.


In the next lines, I want to exemplify the method of converting the IP address to this format.


We would take as example the following configuration where the DHCP server assigns IP address from the 10.1.101.1/24 while the AC can be found somewhere else in the network, at 10.1.201.100.


option serverip code 43 = string;                   

subnet 10.1.101.1 netmask 255.255.255.0         

range  10.1.101.2 10.1.101.254;               

option routers 10.1.101.1;                          

option subnet-mask 255.255.255.0;                       

option serverip 03:0C:31:30:2E:31:2E:32:30:31:2E:31:30:30;  

 

As you can see, instead of the 10.1.201.100 IP address we have 03:0C:31:30:2E:31:2E:32:30:31:2E:31:30:30.


To obtain this string, it is not that hard :


--> The value 03 from the beginning is a fixed value and we should not forget it.


--> The next two digits 0C represents the HEX value of the length of the IP address. The length includes the dots or commas if there are more than one ip addresses in HEX.


For instance, in our example, the length of the 10.1.201.100 IP address is 12, because it has 12 characters , 8 digits and 4 dots. And 12 in hex is 0C.


--> The rest of the string, the 31:30:2E:31:2E:32:30:31:2E:31:30:30 value is the ASCII string value of the IP address 10.1.201.100.


After this configuration, the option 43 will be encapsulated in the DHCP Offer packets and the AP will easily learn the correct IP address of the AC and won’t have a problem when establishing the CAPWAP tunnel.


If you don’t believe me, you can verify this with a packet sniffer, just to make sure.


Thank you :)

Thank you.
View more
  • x
  • convention:

How to implement option 43 with two ip addresses? For dual-link backup scenario
View more
  • x
  • convention:

Hello you have hsb or/and dual-link scenario you can use above method for first AC IP and continue to adding "," and second IP address...

Example : AC1 IP Address is : 10.1.2.97 and AC2 IP Address is : 10.1.2.99

option serverip 03:13:31:30:2E:31:2E:32:2E:39:37:2C:31:30:2E:31:2E:32:2E:39:39

first 03: sub option and constant

13: lenght of ip address include dot and comma ( 18 IP and dot(.) plus one comma(,) = 19 = hex 13 )

2C: for comma(,)

followings include 2 ip address 10.1.2.97 and 10.1.2.99 ...


also following link may be helpfull :

http://support.huawei.com/enterprise/KnowledgebaseReadAction.action?idAbsPath=7919710|21782164|21782201|21782208|7974000&contentId=KB1000098025

 

View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.