Hi user_4224945,
At Layer 2, you can use LLDP. LLDP is a standard Layer 2 discovery mode to discover information such as the management address, device ID, and interface ID of the peer device.
Huawei switch
Run the display lldp neighbor [ interface interface-type interface-number ] command to view neighbor information in the system or on an interface.
Run the display lldp neighbor brief command to view brief information about neighbors.
Cisco switch
show lldp neighbors [interface-id]
[detail]
Display information about neighbors, including device type, interface type and
number, hold time settings, capabilities, and port ID.
You can limit the display to neighbors of a specific interface or expand the display
to provide more detailed information.
At Layer 3, you can view the connected Huawei devices by IP address.