APC 7xxx models, DHCP Option 43 and Mikrotik DHCP servers
Posted by jpluimers on 2017/06/07
When switching my DHCP to a Mikrotik CCR1009, both the AP7920 and AP7921 failed to get IP addresses. The APC7921 would look bounce between waiting and offered states like this:
The cause is the need of DHCP Option 43 (Vendor Class Identifier) specified in RFC2132 – based on [WayBack] RFC 2131 – Dynamic Host Configuration Protocol and [WayBack] RFC 1533 – DHCP Options and BOOTP Vendor Extensions – which I found first via these links:
- AP7930 not getting DHCP IP | Racks, Rack Accessories, & Cooling
- AP7920 | Racks, Rack Accessories, & Cooling
- How do I configure APC Network Management Card network settings?

“Vendor specific cookie” means “DHCP Option 43” is set.
I then found more details in the ASTE-6Z6K56_R0_EN.pdf documentation:
DHCP. You can use a RFC2131/RFC2132-compliant DHCP server to configure the TCP/IP settings for the Switched Rack PDU.
This section briefly summarizes the Switched Rack PDU communication with a DHCP server. For more detail about how a DHCP server is used to configure the network settings for the Switched Rack PDU, see “DHCP Configuration” in the User’s Guide.
- The Switched Rack PDU sends a DHCP request that uses the following to identify itself:
- Vendor Class Identifier (APC by default)
- Client Identifier (by default, the Switched Rack PDU’s MAC address value)
- User Class Identifier (by default, the identification of the Switched Rack PDU’s application firmware)
- A properly configured DHCP server responds with a DHCP offer that includes all of the settings that the Switched Rack PDU needs for network communication. The DHCP offer also includes the Vendor Specific Information option (DHCP option 43). By default, the Switched Rack PDU ignores DHCP offers that do not encapsulate the APC cookie in the Vendor Specific Information option using the following hexidecimal format:
Option 43 = 01 04 31 41 50 43where
– The first byte (01) is the code
– The second byte (04) is the length
– The remaining bytes (31 41 50 43) are the APC cookieSee your DHCP server documentation to add code to the Vendor Specific Information option.
To disable the APC cookie requirement, see “Local access to the control console” on page 10. To change the control console’s DHCP Cookie Is setting, an Advanced option in the TCP/IP menu, see “Remote access to the control console” on page 10.
It starts with a very simple Mikrotik command
Luckily the solution was this very simple Mikrotik command to add a DHCP Option:
/ip dhcp-server option add code=43 name=APC value=0x010431415043
From APC’s web site:
Option 43 = 0x01 0x04 0x31 0x41 0x50 0x43
Source: problem with dhcp options on a APC ups – MikroTik RouterOS
What it does is add an Option 43 (with any name: apparently that works) with a hex value of the bytes that APC requires.
But then it still didn’t work, but Google Cache to the rescue via mikrotik 0x010431415043:
/ip dhcp-server
add address-pool=dhcp_pool3 disabled=no interface=ether19 lease-time=3d name=\
dhcp1 relay=192.168.168.1
/ip dhcp-server option
add code=43 name=APC value=0x010431415043
/ip dhcp-server lease
add address=192.168.168.2 dhcp-option=APC mac-address=00:C0:B7:74:54:E5
/ip dhcp-server network
add address=192.168.68.0/24 gateway=192.168.68.254
add address=192.168.168.0/24 dhcp-option=apc gateway=192.168.168.1
What that does (and is not documented in the DHCP LEASE ptions) is force this specific lease to use the APC option that specifies code 43 with the correct value for APC Power Management Units.
Note that besides the actual leases, you can also apply the dhcp-option, for instance on the network level as explained by Mikrotik DHCP Option 43 Tutorial ~ Binary Heartbeat.
Another thing not in the documentation is that you can even assemble multiple DHCP-options into an dhcp-option-set and bind those at the same levels as a dhcp-option: lease or network.
I only want to have DHCP Option 43 for the APC devices and only have two of these devices, so configured them on the actual DHCP leases.
ARP stuffing
Later I found out I could have used ARP stuffing to force a specific known IP-address into it using the combination of setting that address in the ARP table and then pinging with a non-standard packet size of 113. This is specific to APC and explained at [WayBack] Ever heard of ARP Stuffing? Me neither. | VirtuallyMikeBrown. Many sites show the trick, but fail to explain it. This page shows the trick for Windows, Linux and Mac OS X: APC PDU configuration trick | Patrick Kremer.
After stuffing, you can reach the APC PDU at the stuffed address, then configure it further.
Resetting through serial
Finally, I could have manually configured the IP address or removed the DHCP Cookie Requirement over a serial connection. This is cumbersome and requires a serial to RJ-12 cable. Steps are at Configuring an APC AP7900 – AN!Wiki. If you don’t have the cable, you can easily make it based on the APC RJ12 serial cable pinout diagram @ pinouts.ru
Resetting to factory defaults
If I ever want to reset my AP7920 or AP7920, here is how:
- Press 15 seconds on reset button
- Let the reset button go for a second
- Press the reset button again for 2 seconds
- Use your serial terminal to continue the reset proceudre
Some interesting videos
Some of the above information and much more interesting tidbits (including a tear-down) are in these videos:
- [WayBack] APC 7920 PDU #1 overview, usage scenarios and teardown
- [WayBack] APC 7920 PDU #2 DIY cheap serial console cable for password reset
- [WayBack] APC PDU #3 Howto reset the password under linux and windows step-by-step
–jeroen
Kelvin W said
Great stuff, thank you.. This helped with the DHCP config on my Palo Alto and it finally picked up an IP!
jpluimers said
Cool. What Palo Alto equipment do you use?
juanchomza2 said
Muchas gracias, desde Mendoza, Argentina.