Skip to content

Instantly share code, notes, and snippets.

@AntonFriberg
Created June 9, 2021 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AntonFriberg/6152e61f0c9f9b16d3679e0118df475c to your computer and use it in GitHub Desktop.
Save AntonFriberg/6152e61f0c9f9b16d3679e0118df475c to your computer and use it in GitHub Desktop.
Configuring user class on DHCP client Ubuntu 20.04

Todo: Add background info

[Match]
# Make sure to match the correct interface
Name=en*
[Network]
# Make sure DHCP is specified (default=no)
DHCP=ipv4
[DHCPv4]
# On Ubuntu 20.04 the following option does not work correctly since wrong some wrong character is inserted before string
#UserClass=this-is-my-user-class-string
# Instead we utilize the other method which is to specify send options manually
SendOption=77:string:this-is-my-user-class-string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment