sonic-net / sonic-buildimage

Scripts which perform an installable binary image build for SONiC
Other
728 stars 1.4k forks source link

DHCP/DHCPv6 packets are not forwarded to CPU when dhcp_relay container is not running #20338

Closed johndexter1 closed 1 week ago

johndexter1 commented 1 week ago

Description

I would like to run custom DHCP relay but DHCP/DHCPv6 packets are not forwarded to CPU when dhcp_relay container is not running.

Steps to reproduce the issue:

  1. Disable dhcp_relay container
  2. Run your isc-dhcp-relay (can install with apt get install isc-dhcp-relay)
  3. start tcpdump to capture dhcp packets
  4. Run dhclient on host
  5. tcpdump output is empty
  6. As soon as you enable dhcp_relay container you start to see those packets

Describe the results you received:

I don't see any dhcp packets when dhcp_relay container is stopped, despite isc-dhcp-server is listening on (as example) UDP/547

Describe the results you expected:

I assume that dhcp packets should be forwarded to cpu, so it would be visible from within the kernel.

Is there anything else that has to be enabled? Is it possible to COPY specific packets to the CPU?

Output of show version:

202405 branch

johndexter1 commented 1 week ago

was able to achieve this with COPP, I didn't know that SONiC has it.