iLO is like an additional little computer inside your server, it's called a Baseboard Management Controller (BMC for short).
iLO network connection can use a dedicated port (only BMC itself, nothing else) or be shared with the one of the server NICs.
If it's dedicated, you need an external switch to connect those interfaces.
If it's shared, the simple circuit just ensures there are no collisions, and nothing else. It is not nearly as advanced as, say, mini Ethernet switch. So there is nothing which could pass packets directly between iLO and NIC. If you connected that shared port to ordinary switch, it won't reflect packets back to the same port from which those originated, so it would be not possible to communicate either.
If the switch could configure a port to be a reflective relay port, it would be possible, because it then will reflect the packets back, but don't do this even if your switch supports that. This port mode is for very different purpose, and in this case you certainly have enough resources to dedicate some switch to connect iLO interfaces of your servers.
Better ask yourself, why do you need to communicate between the server and iLO over the Ethernet in the first place? They are already connected internally (IPMI SMBus interface). In Linux, you can use
ipmiutil to access local IPMI BMC over SMBus, just ensure you've loaded the
ipmi_devintf driver (module).
In general, if you don't have serious reasons to use shared mode (like that you install the server on the colocation where you pay per port), never use it. Always use the dedicated iLO port whenever possible.