Twittering with Arduino+Ethernet Shield

I tried with Atmega2560 board and still no luck.
The result is:

117.17.80.199
255.255.255.0
117.17.80.1
117.17.80.1
connecting ...
failed : code 0

I don’t know much about networks, but is it okay to have the same IPs for gateway and dns as shown in the result. I used this statement: Ethernet.begin(mac, ip);
When I included dns i.e Ethernet.begin(mac, ip, dns); the dns IP changes:

117.17.80.199
255.255.255.0
117.17.80.1
6.0.0.0
connecting ...
failed : code 0

In either case the IP of dns server is different compared to my desktop computer.
Is there way to declare the dns IP?