Pkg_add yields No address record error

Hi guys,

I am new to freebsd. I read the manual really hard and I installed freebsd without much hassle.

Now I go to install packages. I do
pkg_add -r sudo
as root and I get this error:
Error: FTP Unable to get No address record
pkg_add: unable to fetch '' by URL

Internet works. I did ping and all is well with the internet but when installing ports and packages I get this frustrating error.

Thanks for the help!
Hmm, two weird things:

1) if PACKAGESITE and PACKAGEROOT are both unset, the default is not

2) No address record suggests failing DNS, so ping (by hostname) shouldn't work either.

Could you post output of:
cat /etc/resolv.conf
Sorry I just edited my error message for the typo. I didnt copy and paste. It is already pointed to

Here is the output:
PACKAGESITE: Undefined variable.
cat /etc/resolv.conf
search localdomain
nameserver #My IP Address#
;; conection timed out; no servers could be reached
Fix the /etc/resolv.conf entry to point to a working nameserver, such as one provided by your ISP.
I am having trouble figuring out how to get the nameserver to work. I type in the nameserver I have on one computer I have in my house but it does not work.