LU Greetings & Welcome to Microsoft Q&A forum!
Did you check these docs Functional Components of Azure RTOS NetX Duo and Overview of Azure RTOS NetX Duo already?
NetXDuo TCP/IP stack does support custom layer 2 protocols, and it is possible to handle a custom Ethernet protocol with a custom EthType in parallel with IP and upper layers protocols.
To implement this, you can use the NetXDuo TCP/IP stack APIs to create a custom Ethernet driver that handles the custom EthType. You can refer to the above documentation for NetXDuo TCP/IP stack to get more detailed information on how to implement custom layer 2 protocols.
Let us know if you have any further queries.