How to connect two Arduino directly via Ethernet cable

How to create connection between two Arduino directly via Ethernet without router/AP?

Answer

To create communication between two Arduino directly via Ethernet, we need to:

Arduino #1 (Ethernet Shield) Arduino #2 (Ethernet Shield)
IP address10.101.1.210 10.101.1.211
Subnet mask255.255.255.0 255.255.255.0
Gateway 10.101.1.211 10.101.1.210
DNS 0.0.0.0 0.0.0.0

And then create a TCP connection between two Arduino: one Arduino acts as TCP server and the other acts as TCP client

For detail about TCP creation, please refer to communication between two Arduino via TCP

Disclosure: Some links in this section are Amazon affiliate links. If you make a purchase through these links, we may earn a commission at no extra cost to you.
Additionally, some links direct to products from our own brand, DIYables.

The Best Arduino Starter Kit

※ OUR MESSAGES