isc-dhcp-server w/Onie for Cumulus ZTP vendor-class-identifier

  • 1
  • Problem
  • Updated 2 years ago
The below doesn't relate to CumulusOS in any way, however I am implementing CumulusOS, and was having issues with ZTP, specifically matching the vendor-class-identifier to download a specific version of CumulusOS. I hope that this post saves someone like me, a CLI-jockey convert to Linux, some time.

This is for those people that are looking to implement ZTP with an isc-dhcp-server. The Onie documentation has you insert the following snippet into your DHCP server to match on the vendor-class-identifier:

class "onie-vendor-X-class" {
match if substring(option vendor-class-identifier, 0, 27) = "onie_vendor:powerpc-VendorX";
option default-url = "http://image-server/VendorX-onie-inst...";

This class statement will most likely not work, and for those of us without a programming or linux background, the issue may not be readily apparent, possibly leading to unnecessary and fruitless troubleshooting.

The issue lies in the "match if" statement of the example. Pay attention to the digits beside the vendor-class-identifier in the "match if" statement.

substring is an operator that excepts DHCP option 60 from Onie and matches on the 0 to nth character, in the example '27'. If your vendor-class-id is longer than 26 characters, the match will fail, and Onie will not return DHCP Option 114 to the client.

For example, I'm running an Edgecore AS4610. The vendor-id is:
This is 34 characters.

My "match if" statement looks like this, taking into account that the vendor-id is 34 characters:
match if substring(option vendor-class-identifier, 0, 35) = "onie_vendor:arm-accton_as4610_54-r0"
Photo of Joshua Bowers

Joshua Bowers

  • 154 Points 100 badge 2x thumb
  • Stoked, as usual

Posted 2 years ago

  • 1
Photo of Scott Suehle

Scott Suehle, Alum

  • 3,772 Points 3k badge 2x thumb
Thanks for sharing this with us.This is great stuff!