Ethernet shield client.conect return 0

it worked fine till some time ago(a recompile to change ip’s) and now it fails to connect

the shied is a HanRun clone using the W5100 ci

the connection is like this: arduino → router/swich → target server

here is the code

#include <Arduino.h>
#include <DHT.h>
#include <Ethernet.h>
#include <EthernetClient.h>
#include <HardwareSerial.h>
#include <IPAddress.h>
#include <pins_arduino.h>
#include <Print.h>
#include <stdint.h>
#include <WString.h>

const int pinSmov = 7;
const int pinFire = 6;
unsigned long timer = 0;
boolean Sfire = false;
boolean Smov = false;

//08 00 27 02 DF 9D
byte mac[] = {0x00,0x1A,0x64,0x1F,0xDF,0x9F};
const IPAddress ip(192, 168, 25, 241);
const IPAddress ipT(192, 168, 25, 4);
//const IPAddress ip = IPAddress(192, 168, 1, 241);
//const IPAddress ipT = IPAddress(192, 168, 1, 39);
EthernetClient client;

DHT SenseUT(DHT11,A1);


void setup()
{
	pinMode(pinSmov,INPUT);
	pinMode(pinFire,INPUT);
	Serial.begin(9600);
	Serial.println("started");
	if(Ethernet.begin(mac) == 0){ //inicia a placa ethernet
		Ethernet.begin(mac,ip);
		Serial.println("dhcp fail");
		Serial.println(Ethernet.localIP());
	}else {
		Serial.println("dhcp ok");
		Serial.println(Ethernet.localIP());
	}

	delay(1000);// deleay para a placa ethernet ter tempo de iniciar completamente

	SenseUT.begin();// inicia o sensor temperatura e umidade

}

void loop()
{
	boolean pinState = digitalRead(pinSmov);
	boolean pinState2 = digitalRead(pinFire);
	if(!Smov and pinState){
		Smov = pinState;
	}
	if(!Sfire and pinState2){
		Sfire = pinState2;
	}
	if (timer+10000<=millis()) {
		timer=millis();
		int errorcode = client.connect(ipT, 80);
		if (errorcode == 1){
			float h = SenseUT.readHumidity();
			float t = SenseUT.readTemperature();
			Serial.print("conected: ");
			Serial.print(t);
			Serial.print(" ");
			Serial.print(h);
			Serial.print(" ");
			Serial.print(Smov);
			Serial.print(" ");
			Serial.println(Sfire);
			client.println("GET /tcc/save.php?t=" + (String)t + "&h=" + (String)h + "&m="+ (int)Smov +"&f=" + (int)Sfire +" HTTP/1.1");
			client.println("Host: " + (String)ipT + "Connection: close");
			client.println();
			client.stop();
			Smov = false;
			Sfire = false;
		}
		else {
			Serial.println("error conecting");
			Serial.println(errorcode);
		}
	}
}

and here is the wire-shark output

203	4.759798	0.0.0.0	255.255.255.255	DHCP	317	DHCP Discover - Transaction ID 0x331	00:1a:64:1f:df:9f
218	5.991901	0.0.0.0	255.255.255.255	DHCP	329	DHCP Request  - Transaction ID 0x331	00:1a:64:1f:df:9f

What's the output of the serial connection? Are the firewall settings (router and server) correct?

Do you have a SD card in the shield's slot? If so, remove it and try again. An uninitialized or enabled SD card will cause UDP/DHCP to fail.