Option 82 Sub-option 5

Simon Hobson dhcp1 at thehobsons.co.uk
Fri Jun 18 10:37:29 UTC 2021

Kraishak Mahtha <kraishak.edu at gmail.com> wrote:
> Hi All,
> I have been trying to understand the option 82 sub option 5 (agent.link-selection) working prototype, I have been searching in the forums and many of them suggest as below
> class "BD-1Net" { match if(binary-to-ascii(10, 8, ".", option agent.link-selection) = ""); }
>  shared-network BD-1Net 
>  { 
>   subnet netmask 
> { 
>   option routers;
>   option subnet-mask;
> pool {
>  allow members of "BD-1Net";
>  range; 
>  } 
>  }
> }
> I have a doubt of why to add a shared-network line statement in the config though it has only one subnet, Is it mandatory to add that shared-network statement?
> I tried testing without adding the shared-network statement line and it works fine, but before I use in my prod I want to know full details,

Yes, if there is only one subnet then the shared-network is optional. AFAIK in this situation it will provide no additional features.

BTW - it's not necessary to use binary-to-ascii, you can (I think) compare the raw data :
match if( option agent.link-selection = 0xc0a80100 );
which is less processing though less readable.


More information about the dhcp-users mailing list