Enabling DHCP Option 82

171 views
Skip to first unread message

aurgho bhattacharjee

unread,
Sep 21, 2021, 4:57:20 PM9/21/21
to sonicproject
Hi,

I tried going through this issue and tried using:
ip dhcp relay information option 
ip dhcp relay sub-option circuit-id format-type string format "%h:%p"
but got 
Object "dhcp" is unknown, try "ip help" for both commands.

I also tried going through this old PR:
and tried using:
dhcrelay [-4] [-d] [-q] [-a] [-D]\n"
which didn't work either.

What's the command to enable DHCP option 82 in Sonic?

Thanks,
Aurgho

Shlomi Bitton

unread,
Sep 27, 2021, 1:27:52 AM9/27/21
to aurgho bhattacharjee, sonicproject

Hi,

In SONiC the DHCP option 82 is enabled by default, following a patch added to the isc-dhcp relay package.
You can check the implementation here:
https://github.com/Azure/sonic-buildimage/blob/master/src/isc-dhcp/patch/0002-Customizable-Option-82-circuit-ID-and-remote-ID-fiel.patch

When starting the DHCP docker with the daemon for DHCP relay the J2 template will generate a dhcpd instance with this option, you can see it here:
https://github.com/Azure/sonic-buildimage/blob/c668f2ab5e54363cd717cfcba8bf1b4ded94de84/dockers/docker-dhcp-relay/dhcpv4-relay.agents.j2#L12

You can check the CLI reference for how to use the DHCP relay from host perspective, since starting the application from the host will not work as expected, SONiC CLI commands are required for it will start the service and the application within the docker.
https://github.com/Azure/sonic-utilities/blob/master/doc/Command-Reference.md

Shlomi

--
You received this message because you are subscribed to the Google Groups "sonicproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonicproject...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonicproject/45ae5052-3c08-47b2-ba14-e29a991d1402n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages