Two arduino connected via ethernet shield

Hi all,

I need an advise for using two arduinos uno with arduinos Ethernet shields. This is my first time using arduino, so I new to this area. I have just did some research on arduino and Ethernet shield. So, for my project, I need to send Ethernet packet (TCP or UDP) from first arduino to Ethernet switch (Ethernet switch is my device which is basically a simple router. It has 12 channels/ports each with receive and transmit signals. It routes received packets to the destination port based on IP address. The 12 Ethernet switch ports are assigned unique IP address. The Ethernet switch is designed using four Broadcom BCM5325 chips). So then, the Ethernet switch transmit packet to the second arduino. The first arduino will act as a transmitter and second arduino will act a receiver.

Flow of packets: 1st arduino to my Ethernet switch to 2nd arduino

The whole idea of using arudinos is that I need to test my Ethernet switch by sending packets and seeing if packet is routed correctly. If I use two arduinos, then I would manually switch cables before each test on the Ethernet switch and change ip address configuration inside the code. This is my idea of doing this project.

My concern is that I am not sure if this possible by connecting arduino to my Ethernet switch rather than PC or network router. Since all the example I show uses arduino connected to PC or network router. I will use PC for powering board and using serial monitor, but not for Ethernet connection. I could be wrong on this because I haven't seen code for Ethernet library. I am think of using UDPSendReceive example with some code modification on each of my arduino: https://www.arduino.cc/en/Tutorial/UDPSendReceiveString I also looked at ICMP Ping for my project: http://playground.arduino.cc/Code/ICMPPing

Can you please see if I can do my project using arduinos? If any have any other better idea to do, I would really appreciate. I am okay for using 12 arduinos if have to. Thank you in advance for advice.

What ethershield are you going to use?

You're project is possible. Just give you're arduino devices static IP.

Thank you codingKnight! I'll be using Arduino Ethernet Shield. Here's the link: https://www.arduino.cc/en/Main/ArduinoEthernetShield Do you know if there is any example code for sending packets and receiving packets for each arduinos. That would great start for me.

I’d look at:

File->Examples->Ethernet->UDPSendReceiveString

It shows how to receive and send UDP packets.