Arduino Ethernet Shield (W5100) Cannot Access Outside Network

Hello,

I have changed my code from 0022 to 1.0 version concerning Ethernet.
Internal (local) netwok: everything works fine. (ping, web-server)
external: Not OK. (e.g smtp client sending mail out).

I've installed wireshark (network sniffer). I saw that Arduino mega was looking for the mac-address of 255.255.255.0.
That is the subnet!!
version 0022 Ethernet.begin(mac, ip, gateway, subnet);
version 1.0 Ethernet.begin(mac, ip, subnet, gateway);

maybe this will help someone.

version 0022 Ethernet.begin(mac, ip, gateway, subnet);
version 1.0 Ethernet.begin(mac, ip, subnet, gateway);

I tested with 1.0 and that seems to be true.

I have just found out the problem at another topic [1] of this forum. The signature of Ethernet.begin method had changed at Arduino 1.0.

Ethernet.begin(mac);
Ethernet.begin(mac,ip);
Ethernet.begin(mac,ip,dns);
Ethernet.begin(mac,ip,dns,gateway);
Ethernet.begin(mac,ip,dns,gateway,subnet);

I hope it can help you too.

Thanks
[1] Arduino Ethernet no network connection(toolchain problem on amd64 linux) - #18 by SurferTim - IDE 1.x - Arduino Forum