Two ethernet port with one mac address

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Two ethernet port with one mac address

vrnud
Hi,

I am new to lwip.
basic:
1) I have two ethernt port.(external word interface)
2) Only one ip address is assigned to both the port.
3) RMII interface is used.(3rd port which is going to controller).

Set up:
1) Both ports are connected to external ethernet switch.
2) PC is connected to ethernet switch.

when only one port of DUT (device under test) is connected to ethernet
switch; pinging from pc on individual port is working fine.

Problem:
when both the ports of DUT (device under test) is connected to ethernet
switch; ping is not working.




--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Two ethernet port with one mac address

Sergio R. Caprile
lwIP does not care about RMII, that is between your MAC controller and
your PHY controller. Whatever happens there is your driver's business.
Do you have two MAC controllers ? Or are you trying to handle two PHYs
with one MAC ? (Why would you do that ?)

1 IP 1 MAC 2 PHY: beyond my understanding, needs special driver.
1 IP 2 MAC 2 PHY: needs bridging driver.

Drivers are not a part of lwIP. You could perhaps find someone here
willing to help, though.

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Two ethernet port with one mac address

borkhuis
In reply to this post by vrnud
Looking at your setup, the switch might be blocking your transfers, as it
sees the same MAC address on 2 ports. Connecting two ports with the same MAC
address and/or the same IP address to a network is always a bad idea, as you
don't know what might be happening.

Is the PHY connected to two separate network ports, or is it a 2-port switch
connected to one network port of your processor?

Regards,
Johan


vrnud wrote

> Hi,
>
> I am new to lwip.
> basic:
> 1) I have two ethernt port.(external word interface)
> 2) Only one ip address is assigned to both the port.
> 3) RMII interface is used.(3rd port which is going to controller).
>
> Set up:
> 1) Both ports are connected to external ethernet switch.
> 2) PC is connected to ethernet switch.
>
> when only one port of DUT (device under test) is connected to ethernet
> switch; pinging from pc on individual port is working fine.
>
> Problem:
> when both the ports of DUT (device under test) is connected to ethernet
> switch; ping is not working.
>
>
>
>
> --
> Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html
>
> _______________________________________________
> lwip-users mailing list

> lwip-users@

> https://lists.nongnu.org/mailman/listinfo/lwip-users





--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Two ethernet port with one mac address

vrnud
In reply to this post by Sergio R. Caprile
Hi,

I am using STM32 controller interface with ksz8863.
ksz8863 has two external port which can be connected to ethernet switch.

when any one port of ksz8863 is connected to ethernet switch ping is working
fine.

but when both the ports of ksz8863 is connected to ethernet switch ping is
not working.
it is giving request timeout message.


Regards,
Vrund



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Two ethernet port with one mac address

vrnud
In reply to this post by borkhuis
Hi,

I am using STM32 controller interface with ksz8863.
ksz8863 has two external port which can be connected to ethernet switch.

when any one port of ksz8863 is connected to ethernet switch ping is working
fine.

but when both the ports of ksz8863 is connected to ethernet switch ping is
not working.
it is giving request timeout message.


Regards,
Vrund



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Two ethernet port with one mac address

steelen-2
Hi
You can’t connect 2 Ethernet switch with two ports. I think it’s the problem.


发自我的 iPhone

> 在 2019年3月2日,11:49,vrnud <[hidden email]> 写道:
>
> Hi,
>
> I am using STM32 controller interface with ksz8863.
> ksz8863 has two external port which can be connected to ethernet switch.
>
> when any one port of ksz8863 is connected to ethernet switch ping is working
> fine.
>
> but when both the ports of ksz8863 is connected to ethernet switch ping is
> not working.
> it is giving request timeout message.
>
>
> Regards,
> Vrund
>
>
>
> --
> Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html
>
> _______________________________________________
> lwip-users mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/lwip-users



_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Two ethernet port with one mac address

Johan Borkhuis
In reply to this post by vrnud
Hello,

I have been using this device as well. The KSZ8863 is actually a switch
with one MAC address. So when you connect both ports of this switch to
the external switch you have created a loop in your network, which is
not allowed. So if you want to test both network interfaces you have to
disable one of the ports on the KSZ8863 or on the external switch.

Regards,
Johan

Op 2-3-2019 om 04:49 schreef vrnud:

> Hi,
>
> I am using STM32 controller interface with ksz8863.
> ksz8863 has two external port which can be connected to ethernet switch.
>
> when any one port of ksz8863 is connected to ethernet switch ping is working
> fine.
>
> but when both the ports of ksz8863 is connected to ethernet switch ping is
> not working.
> it is giving request timeout message.
>
>
> Regards,
> Vrund
>
>
>
> --
> Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html
>
> _______________________________________________
> lwip-users mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/lwip-users
>


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Two ethernet port with one mac address

vrnud


thank you


Regards,
vrund



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Two ethernet port with one mac address

potw
In reply to this post by Johan Borkhuis
Hi,

I'm trying to make STM32F407VET6 work with KSZ8863 but no hope. I even can
not do a simple ping :(.
Could you show me how to connect STM32 <=> KSZ? It make me so confused. I
have a lot questions.
Which mode I shoud use between STM32 MAC and KSZ PHY? RMII or MII.
Do I have to config anything (hardware pin/software register)????
If you have spare time, please help me :). Thank you in advance.



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Two ethernet port with one mac address

wilkxt
Hi

I'm trying to make STM32F407VET6 work with KSZ8863 but no hope. I even can
not do a simple ping :(.
Could you show me how to connect STM32 <=> KSZ? It make me so confused. I
have a lot questions.
Which mode I shoud use between STM32 MAC and KSZ PHY? RMII or MII.

RMII use less pin,  but stm32 my work with MII it RMII.

Do I have to config anything (hardware pin/software register)????

In STM32 set Ethernet pin to work with MII or RMII mode, it is depend how you connect KSZ with STM. Do you connect MDIO interface? You must sets registers 
in KSZ to work with MII or RMII mode.

You must sets register to enable Ethernet on proper mode RMII od MII 

ST have examples stm32f4 work with LWIP.

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Two ethernet port with one mac address

Johan Borkhuis
In reply to this post by potw
As this is a 3-port switch you should check if the external connections
work: can you connect two PC's together with your device as a switch
between them? If this works then the ethernet connection for both
external ports is working correctly,
Next is the timing between the processor and the phy, which is quite
critical. The default is to use the external (loopback) clock, but we
have seen issues with that. A better option is to use the internal
clock, by setting the correct bit in register 0xC6.

Hope this helps.
Regards,
Johan

Op 17-9-2019 om 15:38 schreef potw:

> Hi,
>
> I'm trying to make STM32F407VET6 work with KSZ8863 but no hope. I even can
> not do a simple ping :(.
> Could you show me how to connect STM32 <=> KSZ? It make me so confused. I
> have a lot questions.
> Which mode I shoud use between STM32 MAC and KSZ PHY? RMII or MII.
> Do I have to config anything (hardware pin/software register)????
> If you have spare time, please help me :). Thank you in advance.
>
>
>
> --
> Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html
>
> _______________________________________________
> lwip-users mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/lwip-users



_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Two ethernet port with one mac address

vrnud
In reply to this post by potw
Hi,

I have used RMII interfacce and it is working fine.
For hardware connection refer
ksz8863 eval board schematic, datasheet and Microchip forum help.

For software part use stm's STM32CubeMX for generating code.
it has incoporated lwip and basic setting.


Regards,
Vrund



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Two ethernet port with one mac address

potw
In reply to this post by vrnud
Hello,

I'm trying using STM32F407VET6 with KSZ8863 in RMII mode. Still cannot make
a simple ping. Could you show how to correct wiring from STM32 to KSZ8863,
how to config 50MHZ clocks ref.

Thank you in advance



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users