please provide some basic configurations like
1> interface on which ur trying to connect ... i guess its eth0 coz ur talkin of gateway n all
2> paste the output of ifconfig
3> ping www.google.com
4> is ur DNS in order .. ?
5> nslookup www.google.com
6> wot are the entries of /etc/resolv.conf maybe u can do
# cat /etc/resolv.conf # to be executed at shell