This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x dual ethernet problem in same subnet

Hi,

I am using AM335x processor for our project. My main application is to use the both ethernet outputs of processor in same subnet and different subnet.

Setup: Both ethernet address in same subnet

During testing it is observed that when my both ethernet ip address (i.e. eth0=192.168.100.122 and eth1=192.168.100.116) are in same subnet and connected in ethernet switch, both eth ip are pinging. 

Case1: when i remove eth0 cable from switch but eth1 cable is inserted , both the ethernet ip addresses stop pinging.

Case 2: When i remove eth1 cable cable from switch and eth0 cable is already inserted, then also both the ip address are pinging in LAN.

Setup: Both ethernet address in different subnet

During testing it is observed that when my both ethernet ip address (i.e. eth0=192.168.100.122 and eth1=192.168.2.116) are in different subnet and connected in ethernet switch, both eth ip are pinging. 

Case1: when i remove eth0 cable from switch but eth1 cable is inserted , both the ethernet ip addresses stop pinging. Ideally, only eth0 should stop pinging insteed of both stopping.

Case 2: When i remove eth1 cable cable from switch and eth0 cable is already inserted, eth0 is pinging and eth1 is stopped which is proper.

So, from above both conditions, it is found that both the ethernet outputs are not working independently as it seems that both ethernet depends on eth0 connection in LAN.

Please guide me the cause of problem and its solution.

  • Hi,

    When configured in Dual EMAC mode the AM335X Ethernet ports must be connected to different subnets. See this wiki for details: http://processors.wiki.ti.com/index.php/Linux_Core_CPSW_User's_Guide#Constraints

  • Dear Sir,

    Is there any way so that i can connet both the interfaces in same subnet. As per your mentioned link, it is mentioned that

    Assumptions

    • Interrupt source is common for both eth interfaces
    • CPDMA and skb buffers are common for both eth interfaces
    • If eth0 is up, then eth0 napi is used. eth1 napi is used when eth0 interface is down
    • CPSW and ALE will be in VLAN aware mode irrespective of enabling of 802.1Q module in Linux network stack for adding port VLAN.
    • Interrupt pacing is common for both interfaces
    • Hardware statistics is common for all the ports
    • Switch config will not be available in dual emac interface mode

    I above points, can you please elaborate the meaning of "If eth0 is up, then eth0 napi is used. eth1 napi is used when eth0 interface is down".

    CONSTRAINTS:

      • Manual ip for eth1 is not supported from Linux kernel arguments
    • Both the interfaces should not be connected to the same subnet unless only configuring bridging, and not doing IP routing, then you can configure the two interfaces on the same subnet.

    Can the bridging solution resolve this issue of connection both interfaces in same subnet, so that both the interfaces operate independent of each other connection state. If bridging can resolve the issue, can your please provide me the steps to enable bridging in kernel.

    Thanks.

  • Please explain why you need both ports on the same subnet with unique IP addresses. Usually when users are asking this question they are looking for link redundancy. Is that what you are trying to do?

  • Hi Schuyler Patton,

    Yes. Our requirement for both ports in same subnet is for a redundancy purpose. Our product provides ntp time synchronization frames to various ntp clients. So, our customer configures their ntp clients with our both ports as ntp server address and uses both ports as redundant ntp servers.

    So, you can consider that our product application is for using both ports in same subnet is for link redundancy purpose.

    Hence, if eth0 is down, then eth1 port also comes down which fails the redundant logic as both eth port links depends on eth0 link status.

    Thanks & Regards,

    Ajay

  • I'd guess you are routing out thru eth0 no matter what.
    Care to post your routing tables (route -n)?
  • To get link redundancy you will have to set up a port bonding between the two ports. Additionally you will need a network that understands port bonding.