What is DHCP Option 43? Have you learned it?

2022.11.20
What is DHCP Option 43? Have you learned it?
Option 43 is a custom option used to indicate the AC IP address. The AP obtains the AC IP address information through the option 43 field of DHCP, and then sends a unicast packet to find the corresponding AC, so that the AP can go online with zero configuration. The AP mentioned here refers to FIT AP.

background

When the AP and AC are on the same network segment, the AP will actively send broadcast packets to directly find the AC in the network segment. When the AP and AC are on different network segments, broadcast packets cannot be transmitted across network segments. Only by specifying the AC IP address on the AP can the AP find the AC and go online.

picture

If there are only a few APs, you can use a simple method of manually specifying the AC, that is, log in to the AP and type in the command to specify the AC on the AP. If there are a large number of APs, manually assigning ACs requires a large workload, which is not applicable. Instead, assign ACs in batches, that is, assign AC IP addresses through the DHCP option 43 field to implement APs to go online in batches.

option 43

Option 43 is a custom option used to indicate the AC IP address. The AP obtains the AC IP address information through the option 43 field of DHCP, and then sends a unicast packet to find the corresponding AC, so that the AP can go online with zero configuration. The AP mentioned here refers to FIT AP.

picture


picture

The prerequisite for using option 43 is that the route between the AP and the DHCP server is reachable, ensuring that the AP can exchange packets with the DHCP server normally; the route between the AP and the AC is reachable, ensuring that the AP can exchange packets with the AC.

option 43 format

The value of option 43 has three representations: hexadecimal, decimal, and ASCII. For example, when the AC IP address is 192.168.100.1, the value in hexadecimal is c0a86401; in decimal, the value is 192.168.100.1; in ASCII, the value is 3139322e3136382e3130302e31, where "." Corresponds to 2e. The most common format is hexadecimal values ​​and is the most compatible.

Sometimes, it is also used in conjunction with the option 60 field, and option 60 indicates the name of the device manufacturer.

Huawei configuration option 43

Take Huawei equipment as an example, configure option 43, and the AC IP address is 192.168.100.1.

dhcp server option 43 hex 0104c0a86401。

Among them, 01 means type 1. Huawei has three types in total, namely hexadecimal, decimal, and ASCII. 04 indicates the field length, each IP address occupies 4 bytes, and the calculation formula is the number of IP addresses multiplied by 4. c0a86401 is the hexadecimal number of 192.168.100.1.

H3C configuration option 43

Take the H3C device as an example, configure option 43, and the AC IP address is 192.168.100.1.

[AC]dhcp server ip-pool vlan10[AC-dhcp-pool-vlan100] network 192.168.10.0 mask 255.255.255.0[AC-dhcp-pool-vlan100] gateway-list 192.168.10.1[AC-dhcp-pool-vlan100] option 43 hex 80070000 01 C0A86401。

Among them, 80​indicates the type and is a fixed value. 07​Indicates the length of the following content, which means that there are 7 hexadecimal numbers behind, and there is an AC IP address. If the value is 0B, it means there are 11 hexadecimal numbers behind, that is, two AC IP addresses. 0000​Indicates the service type and is a fixed value. 01​Indicates the number of subsequent IP addresses. c0a86401 is the hexadecimal number of 192.168.100.1.

cisco configure option 43

Take the Cisco device as an example, configure option 43, and the AC IP address is 192.168.100.1.

Cisco(config)#ip dhcp pool APCisco(dhcp-config)#network 192.168.10.0 /24Cisco(dhcp-config)#default-route 102.168.10.1Cisco(dhcp-config)#option 43 hex f1040c0a86401。

Among them, f1 represents the type and is a fixed value. 04 indicates the length of the following content, that is, 4 hexadecimal numbers, and there is an AC IP address. c0a86401 is the hexadecimal number of 192.168.100.1.

Linux ISC DHCP server configuration option 43

Take the Linux ISC DHCP server as an example, configure option 43 and option 60, the Cisco AC IP address is 192.168.247.5, and the Huawei AC IP address is 192.168.247.55.

configuration file path

/etc/dhcp/dhcpd.conf

#ddns-update-style interim;option space Cisco_LWAPP_AP; option Cisco_LWAPP_AP.server-address code 241 = array of ip-address; option space Huawei-AP6050DN; option Huawei-AP6050DN.server-address code 1 = array of ip-address;
 subnet 192.3.1.0 netmask 255.255.255.0 { authoritative; range 192.3.1.100 192.3.1.254; option subnet-mask 255.255.255.0; option broadcast-address 192.3.1.255; option routers 192.3.1.1; option domain-name "huawei.com"; option domain-name-servers 192.168.247.2, 192.168.247.3; default-lease-time 300;
 class "Cisco-AP-c1700" { match if option vendor-class-identifier = "Cisco-AP-c1700"; option vendor-class-identifier "Cisco-AP-c1700"; vendor-option-space Cisco_LWAPP_AP; option Cisco_LWAPP_AP.server-address 192.168.247.5; }
 class "huawei AP" { match if option vendor-class-identifier = "huawei AP"; option vendor-class-identifier "huawei AP"; vendor-option-space Huawei-AP6050DN; option Huawei-AP6050DN.server-address 192.168.247.55; }
 subnet 192.168.1.0 netmask 255.255.255.0 { }#
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.

Windows DHCP server configuration option 43

Take the Windows DHCP server as an example, configure option 43, and the AC IP address is 192.168.22.1.

Enter the Window DHCP server configuration interface

picture

Write a hexadecimal number in "binary"

picture

Among them, 03 means type 3, 0C means the length of the following content, that is to say, there are 12 hexadecimal numbers behind, and 192.168.22.1 is regarded as a string and converted into hexadecimal. 31 39 32 2E 31 36 38 2E 32 32 2E 31 is the ASCII code corresponding to the IP address 192.168.22.1. 0-9 corresponds to 30-39 respectively, and "." corresponds to 2E. "ASCII" does not need to be filled in, it is automatically generated according to the content of "binary".

Infoblox DHCP server configuration option 43

Take the Infoblox server as an example, configure option 43, and the AC IP address is 10.6.2.1.

The IP address 10.6.2.1 is converted into the format of 03:08:31:30:2e:36:2e:32:2e:31, and the two characters need to be separated by a colon.

picture

Among them, 03 means type 3, and 08 means the length of the following content, which means that there are 8 hexadecimal numbers behind, and 10.6.2.1 is regarded as a string and converted into hexadecimal. 31:30:2e:36:2e:32:2e:31 is the ASCII code corresponding to the IP address 10.6.2.1.

at last

The above option 43 configuration is for example only. In actual use, you need to check the product descriptions of the DHCP server and AP separately, and use a matching format or type to ensure that the AP can recognize the content of option 43. For example: when configuring aruba ap, you can directly fill in the AC IP address on Infoblox without converting the format.