Centos Temporary failure in name resolution.

I installed Centos 5.4 on a PC server.
I SSH to it and try to use yum to update the system.
But, always give me the error as below

[root@10 ~]# yum update
Repository base already added, not adding again
Setting up Repos
http://mirror.centos.org/centos/4/up...ta/repomd.xml: [Errno 4] IOError:
Trying other mirror.
Cannot open/read repomd.xml file for repository: update
failure: repodata/repomd.xml from update: [Errno 256] No more mirrors to try.

The key is Temporary failure in name resolution.
I think the domain resolution has problem. So Google it and find the answer.
Check file /etc/resolv.conf and make sure it only has the following entries.
nameserver xx.xx.xx.xx
I edit this file and add Google public DNS server into it.
So the file looks like following.