cancel
Showing results for 
Search instead for 
Did you mean: 

how to use two ethernet port with one mac ?

KN.2
Associate II

we were developed iot using stm32f746 with single ethernet port using lan8742 .now we are in need of 2 ethernet ports in a same design.kindly tell me the possibilities.

8 REPLIES 8
berendi
Principal

There are dual port PHYs e.g. KSZ8863RLL (I assume you need the RMII variant) which I have used with a non-STM MPU.

It has an integrated 3 way switch, 2 ports facing ethernet connectors, and the third one is a "backwards" RMII facing the MCU.

By default it would act as a switch, forwarding packets between interfaces as needed. It can be reconfigured through its I2C port to act as two independent ethernet interfaces having distinct MAC addresses, somehow tagging each packets source/destination. I have used it in switch mode only.

Pavel A.
Evangelist III

Or simply use VLANs.

-- pa

WHEN WE USE IT IN SWITCH MODE,IN 2 ETHERNET PORT IF ONE IS CONNECTED WITH SERVER,MAY I GET THE MODBUS TCP INPUT FROM EXTERNAL DEVICE THROUGH 2ND PORT??IS IT POSSIBLE??

WILL YOU GIVE ME ANY LINKS OR REFERENCE REGARDING VLAN??

berendi
Principal

It would behave exactly like a simple ethernet switch. As long as the IP address/subnet/netmask combination allows it, it will work with anything.

Take the existing device and a common ethernet switch. Connect your device to one port, the server to another, and the modbus thing to a third port. Does it work? Then it should work with the KSZ8863 too.

Do not worry about straight or crossover ethernet cabling, the KSZ8863 should figure that out too, like most switches do.

may i get any schematic reference or eval board reference for that.

Pavel A.
Evangelist III
berendi
Principal

There are some on the homepage I have linked.