Solved Host name lookup failure

I had some problems with my FreeBSD 10.1, it didn't boot. I solved them by fsck. But now I have a problems with lookup. For example:
ping google.com
Code:
host name lookup is failure
It is very strange, because my FreeBSD worked yesterday and I didn't make any changes.

In /etc/resolv.conf I have nameservers. I see the DNS names of google.com using host google.com, but the Internet doesn't work. I tried to test internet access from VirtualBox using Windows 7, it's ok. I tried to ping google.com from port my Cisco ASA with another notebook, it's ok too. DHCP from ASA works well, I get IP on my FreeBSD and on test PC.

Please help me, I read different information, but I can't understand and solve my problem.
 
Ping the IP address of the default gateway to ensure it's connected properly. Then try to ping the Google servers by IP address. Post any results.
 
No problems.
host google.com
Code:
google.com has address 173.194.122.230
google.com has address 173.194.122.227
google.com has address 173.194.122.225
google.com has address 173.194.122.226
google.com has address 173.194.122.238
google.com has address 173.194.122.229
google.com has address 173.194.122.224
google.com has address 173.194.122.228
google.com has address 173.194.122.231
google.com has address 173.194.122.233
google.com has address 173.194.122.232
google.com has IPv6 address 2a00:1450:4010:c08::64
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 10 aspmx.l.google.com.
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.
ping 173.194.122.230
Code:
--- 173.194.122.230 ping statistics ---
35 packets transmitted, 35 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 3.151/3.346/4.276/0.222 ms
ifconfig
Code:
ath0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
ether e4:d5:3d:a6:67:13
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
alc0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=c3198<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MCAST,WOL_MAGIC,VLAN_HWTSO,LINKSTATE>
ether 54:04:a6:41:f1:45
inet 10.0.3.2 netmask 0xfffffff0 broadcast 10.0.3.15
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
vboxnet0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 0a:00:27:00:00:00
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect
status: active
ping 10.0.3.3
Code:
--- 10.0.3.3 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.901/0.901/0.901/0.000 ms
And my configuration.
/etc/rc.conf
Code:
hostname=dark_star
ifconfig_alc0="DHCP"
local_unbound_enable="YES"
sshd_enable="YES"
moused_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
hald_enable="YES"
dbus_enable="YES"
gdm_enable="YES"
gdm_lang="ru_RU.UTF-8"
webcamd_enable="YES"
linux_enable="YES"
transmission_enable="YES"
transmission_conf_dir="/usr/local/etc/transmission/"
transmission_download_dir="/usr/home/transmission/downloads"
transmission_user="transmission"
transmission_flags=""
clamav_freshclam_enable="YES"
clamav_clamd_enable="YES"
devfs_system_rulesset="localrules"
vboxnet_enable="YES"
avahi_daemon_enable="YES"
network_interfaces=ath0
#ifconfig_ath0="dhcp ssid Home_Wii"

/etc/resolv.conf
Code:
nameserver 85.21.192.5
nameserver 213.234.192.7
nameserver 192.168.100.133
nameserver 176.109.144.2
nameserver 127.0.0.1
#nameserver 10.0.3.1
#options edns0

/etc/hosts
Code:
# $FreeBSD: releng/10.1/etc/hosts 109997 2003-01-28 21:29:23Z dbaker $
#
# Host Database
#
# This file should contain the addresses and aliases for local hosts that
# share this file.  Replace 'my.domain' below with the domainname of your
# machine.
#
# In the presence of the domain name service or NIS, this file may
# not be consulted at all; see /etc/nsswitch.conf for the resolution order.
#
#
::1 localhost localhost.my.domain
#127.0.0.1 localhost dark_star.
127.0.0.1 localhost localhost.my.domain
#
# Imaginary network.
#10.0.0.2 myname.my.domain myname
#10.0.0.3 myfriend.my.domain myfriend
#
# According to RFC 1918, you can use the following IP networks for
# private nets which will never be connected to the Internet:
#
# 10.0.0.0 -  10.255.255.255
# 172.16.0.0 -  172.31.255.255
# 192.168.0.0 -  192.168.255.255
#
# In case you want to be able to connect to the Internet, you need
# real official assigned numbers.  Do not try to invent your own network
# numbers but instead get one from your network provider (if any) or
# from your regional registry (ARIN, APNIC, LACNIC, RIPE NCC, or AfriNIC.)
#
 
ping google.com
Code:
ping: cannot resolve google.com: Host name lookup failure
host google.com
Code:
google.com has address 173.194.122.224
google.com has address 173.194.122.226
google.com has address 173.194.122.230
google.com has address 173.194.122.225
google.com has address 173.194.122.233
google.com has address 173.194.122.232
google.com has address 173.194.122.227
google.com has address 173.194.122.238
google.com has address 173.194.122.231
google.com has address 173.194.122.228
google.com has address 173.194.122.229
google.com has IPv6 address 2a00:1450:4010:c01::8a
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.
google.com mail is handled by 10 aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.
host 173.194.122.224
Code:
Host 224.122.194.173.in-addr.arpa not found: 3(NXDOMAIN)
 
I understand that it is stupid, but now it works:
$ ping google.com
Code:
PING google.com (173.194.122.230): 56 data bytes
64 bytes from 173.194.122.230: icmp_seq=0 ttl=55 time=3.399 ms
64 bytes from 173.194.122.230: icmp_seq=1 ttl=55 time=4.508 ms
64 bytes from 173.194.122.230: icmp_seq=2 ttl=55 time=3.273 ms
^C
--- google.com ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 3.273/3.727/4.508/0.555 ms
It is not a joke, I edited /etc/resolv.conf
Code:
85.21.192.5
213.234.192.7
192.168.100.133
176.109.144.2
And then I made an reboot. Of course my problem was with me after this.
Then I edited /etc/resolv.conf
Code:
nameserver 85.21.192.5
nameserver 213.234.192.7
nameserver 192.168.100.133
nameserver 176.109.144.2
So after reboot, I have a normal resolv!
 
Back
Top