Need Help With Ethercard lib and enc28j60 module

Hi everyone
I am a total newbie with arduino. I am using Ethercard lib to communicate with enc28j60 module. every thing is going well when I connect it to my pc with a patch cord, I can ping the IP and also I can brows the webpage. but when I connect the enc28j60 to my adsl modem I can’t ping or brows the webpage. any idea what might be problem??!!
any help is appreciated.
this is the sketch I use:

// Present a "Will be back soon web page", as stand-in webserver.
// 2011-01-30 <jc@wippler.nl> http://opensource.org/licenses/mit-license.php
 
#include <EtherCard.h>

// ethernet mac address - must be unique on your network
static byte mymac[] = { 0x73,0x69,0x69,0x2D,0x30,0x31 };

// ethernet interface ip & subnet address
static byte myip[] = { 192,168,1,50 };
static byte subnet[] = { 255, 255, 255, 0 };
// gateway ip address
static byte gwip[] = { 192,168,1,1 };


byte Ethernet::buffer[500]; // tcp/ip send and receive buffer

const char page[] PROGMEM =
"HTTP/1.0 503 Service Unavailable\r\n"
"Content-Type: text/html\r\n"
"Retry-After: 600\r\n"
"\r\n"
"<html>"
  "<head><title>"
    "Service Temporarily Unavailable"
  "</title></head>"
  "<body>"
    "<h3>This service is currently unavailable</h3>"
    "<p><em>"
      "The main server is currently off-line.
"
      "Comeback Later"
    "</em></p>"
  "</body>"
"</html>"
;

void setup(){
  //Serial.begin(9600);
  //Serial.println("\n[backSoon]");
  ether.begin(sizeof Ethernet::buffer, mymac,10);
  ether.staticSetup(myip, gwip, 0, subnet);
  
}

void loop(){
  // wait for an incoming TCP packet, but ignore its contents
  if (ether.packetLoop(ether.packetReceive())) {
    memcpy_P(ether.tcpOffset(), page, sizeof page);
    ether.httpServerReply(sizeof page - 1);
  }
}

anyone???!!!!

Might be a couple of silly suggestions but when connected to your gateway does the serial monitor still indicate that it is connecting i.e. shows IP address etc? as I was wondering if it could be a conflicting IP address/MAC address on your home network.

Also are you using a straight through or crossover cable when connecting to your gateway? as I am using the same module as you and had similar problems which were due to using a crossover cable, replaced for a straight through patch lead and worked fine.

tomlo:
Might be a couple of silly suggestions but when connected to your gateway does the serial monitor still indicate that it is connecting i.e. shows IP address etc? as I was wondering if it could be a conflicting IP address/MAC address on your home network.

Also are you using a straight through or crossover cable when connecting to your gateway? as I am using the same module as you and had similar problems which were due to using a crossover cable, replaced for a straight through patch lead and worked fine.

Thanks for your reply.
Actually most of the time these silly suggestions solve lots of problems. but in my case these are not the issue. I use a straight through cable both for connecting directly to my pc and to dsl modem. so I dont think the cable is issue, I used a crossover cable too but no changes. About IP conflicting, I am setting static IP and It can not be.
Actually I have no idea what to do.
I even use net scanners but it can not seen on the network.

Someone please help me!! I really need advices, any Cloe to solve this problem.
And sorry for my bad English because it is my third language.

Are you certain of the DSL modem localnet? What does your computer show for the network settings for the DSL modem interface? Maybe it is not 192.168.1.x?

edit: What make and model of dsl modem do you have? Is the computer connected to the modem by wireless or ethernet?

SurferTim:
Are you certain of the DSL modem localnet? What does your computer show for the network settings for the DSL modem interface? Maybe it is not 192.168.1.x?

edit: What make and model of dsl modem do you have? Is the computer connected to the modem by wireless or ethernet?

Yes I am sure of my localnet my ip on laptop is 192.168.1.34 from modem. and I tested both wireless and ethernet connection to modem but no difference. my modem is D-Link DSL-2730.
regards

Does your laptop get its network settings from the router via DHCP? If so, you might want to try getting the ethernet shield's network settings from the router also. I am not familiar with that version of the enc28j60 library, so I can't help you there.

If you are using a static assignment, insure the IP and mac address you are using are not a duplicate on that localnet.

// ethernet mac address - must be unique on your network
static byte mymac[] = { 0x73,0x69,0x69,0x2D,0x30,0x31 };

// ethernet interface ip & subnet address
static byte myip[] = { 192,168,1,50 };

I checked my laptop network settings, in both condition, getting ip from dhcp and static ip settings. non of them worked. about using dhcp for ethercard, I need to have an static ip so i can find the module in my network without additional codding XD. i will look in to other possibilities. if I came up with the solution I will post it here.