Skip to main content
Visitor II
June 27, 2020
Question

how to use two ethernet port with one mac ?

  • June 27, 2020
  • 4 replies
  • 3278 views

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.

    This topic has been closed for replies.

    4 replies

    Visitor II
    June 27, 2020

    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.

    KN.2Author
    Visitor II
    June 29, 2020

    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??

    Super User
    June 27, 2020

    Or simply use VLANs.

    -- pa

    KN.2Author
    Visitor II
    June 29, 2020

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

    Super User
    June 29, 2020
    Visitor II
    June 29, 2020

    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.

    KN.2Author
    Visitor II
    June 29, 2020

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

    Visitor II
    June 29, 2020

    There are some on the homepage I have linked.