Re: Option 82 Sub-option 5

Simon Hobson <[email protected]>
Newsgroups gmane.network.dhcp.isc.dhcp-client
Message-ID <985AC30B-BE07-45C4-8F6B-036BF8B3C7AD__48542.5809559942$1624012670$gmane$org@thehobsons.co.uk>
Kraishak Mahtha <[email protected]> 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) = "192.168.1.0"); }
> 
>  shared-network BD-1Net 
>  { 
>   subnet 192.168.1.0 netmask 255.255.255.0 
> { 
>   option routers 192.168.1.1;
>   option subnet-mask 255.255.255.0;
> pool {
>  allow members of "BD-1Net";
>  range 192.168.1.101 192.168.1.110; 
>  } 
>  }
> }
> 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.

Simon

_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/dhcp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.