sonic-swss icon indicating copy to clipboard operation
sonic-swss copied to clipboard

COPP trap id map for DHCP

Open viclin-ec opened this issue 4 years ago • 5 comments

In copporch.cpp  there uses below two trap id map for dhcp , should we use  DHCP L2 trap instead 

(https://github.com/opencomputeproject/SAI/pull/1118) for dhcp relay support ? Thanks

{"dhcp", SAI_HOSTIF_TRAP_TYPE_DHCP},
{"dhcpv6", SAI_HOSTIF_TRAP_TYPE_DHCPV6},

viclin-ec avatar Mar 30 '21 06:03 viclin-ec

@vic-lin-accton - Please elaborate on the issue/question. (Please add more details)

anshuv-mfst avatar Apr 14 '21 15:04 anshuv-mfst

In (https://github.com/opencomputeproject/SAI/pull/1118 "Add DHCP L2 trap" ) there added two more DHCP Trap types SAI_HOSTIF_TRAP_TYPE_DHCP_L2 /SAI_HOSTIF_TRAP_TYPE_DHCPV6_L2 .

I assume these DHCP L2 traps are used trap DHCP packets including those DHCP client L2 broadcast packets ( like DHCP discover) and for "SAI_HOSTIF_TRAP_TYPE_DHCP" is used for trap DHCP L3 packet as it is "L3 broadcast or unicast to local router IP address" as in saihostif.h says.

Since for dhcp relay it needs also to trap those DHCP L2 packets from DHCP client to CPU, that is why wonder it needs to change 'SAI_HOSTIF_TRAP_TYPE_DHCP' to 'SAI_HOSTIF_TRAP_TYPE_DHCP_L2' in the copporch.cpp trap_id_map<>.

Thanks

viclin-ec avatar Apr 15 '21 02:04 viclin-ec

@abdosi - can you please provide input.

anshuv-mfst avatar May 26 '21 15:05 anshuv-mfst

@abdosi kind reminder to provide input

zhangyanzhao avatar Jun 23 '21 15:06 zhangyanzhao

Is there any progress with this change ?

It looks like DHCP L2 trap should be configured to have DHCP Relay and ZTP features work. For DHCP Relay the DHCP Discover sent to broadcast L2 addresses and for ZTP the DHCP Offer also sent to broadcast L2 address are expected to be received. So, both traps are not sent to the local router IP and they should be supported by COPP Orch Agent

eddyk-nvidia avatar Jul 06 '22 02:07 eddyk-nvidia