EtherCard icon indicating copy to clipboard operation
EtherCard copied to clipboard

Tcp connect w/o gateway?

Open maddogmaycry opened this issue 8 years ago • 5 comments

Hi There! Server 10.0.0.1 Client 10.0.0.2 It's is possible to connect together w/o using a GW in ethercard? When i configure static IP (or dynamic) w/o chosing a GW, all going to ass :(

maddogmaycry avatar Jan 04 '17 19:01 maddogmaycry

I'd try setting the gateway to 10.0.0.1 ...

jcw avatar Feb 12 '17 13:02 jcw

Does the library always send packets to the gateway? Packets destined for the local LAN should be sent as presented not redirected to the gateway.

JohnOH avatar Sep 28 '17 20:09 JohnOH

Hi,

Is there a chance for this to be fixed in the near future?

BR

mp-mba avatar Nov 30 '17 07:11 mp-mba

Even though the client connects to the server in local network that has no gateway, we should to specify gateway address to Ether.staticSetup()... So I just set the gateway as the server's gateway.

like: ether.staticSetup(myip, remoteip, 0, 0); // instead of gw ip.

It works. But, when I wrote my project this bug made me confused.

Other library, EthernetENC works well without g/w setting.

chunghee avatar May 28 '23 10:05 chunghee

ether.staticSetup(myip, remoteip, 0, 0); still has some problem.

When the client begins, without network connection, it fails to resolve arp (of course), but after connect cable into the device, it still does not work.

chunghee avatar Jun 12 '23 08:06 chunghee