Hi...
I can not access internet via domain name, but could use the real IP address to browse !
the system run as the following:
FreeBSD guest os can't resolve domain name under NAT model ?shell>[/b] ping www.freebsd.org
ping: cannot resolve www.freebsd.org: No address associated with name
What should I do? pls help me, thanks!
\----
I list my environments here for your checking:
FreeBSD guest os can't resolve domain name under NAT model ?VMware Network Model:[/b]NAT
FreeBSD guest os can't resolve domain name under NAT model ?My Host OS:[/b] Windows 2003 Server Enterprise
FreeBSD guest os can't resolve domain name under NAT model ?My Guest OS:[/b] FreeBSD 5.4 Release
VMware VMnet8 IP: 192.168.8.1
DHCP start/end IP: 192.168.8.128~192.168.8.254
NAT Gateway ID: 192.168.8.2
in my FreeBSD guest OS:
FreeBSD guest os can't resolve domain name under NAT model ?shell>[/b] ifconfig lnc0
lnc0: flags=108843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet6 fe80::20c:29ff:fe14:e616%lnc0 prefixlen 64 scopeid 0x1
inet 192.168.8.128 netmask 0xffffff00 broadcast 192.168.8.255
ether 00:0c:29:14:e6:16
FreeBSD guest os can't resolve domain name under NAT model ?shell>[/b] more /etc/rc.conf
gateway_enable="YES"
hostname="FreeBSD.home"
ifconfig_lnc0="DHCP"
inetd_enable="NO"
ipv6_enable="NO"
ipv6_gateway_enable="NO"
linux_enable="YES"
moused_enable="YES"
natd_enable="YES"
natd_interface="lnc0"
sendmail_enable="NO"
sshd_enable="YES"
tcp_extensions="YES"
usbd_enable="NO"
usbd_flags="NO"
FreeBSD guest os can't resolve domain name under NAT model ?shell>[/b] more /etc/resolv.conf
search localdomain
nameserver 192.168.8.2
nameserver xxx.xxx.xxx.xxx FreeBSD guest os can't resolve domain name under NAT model ?<-- the ISP DNS Server IP, sorry I marked them.[/b]
Hi
if your guest uses one nic only - this settings look strange:
gateway_enable="YES"
natd_enable="YES"
natd_interface="lnc0"
What is that good for ?
Can your host resolv www.freebsd.org ?
my host OS work well, it can access www.freebsd.org!
about your mentioned some strange, it's from the tips that I lookup from the web! I have not thought about them, just trying\~~~
anybody can help me ?
Why do you want to enable gateway in rc.conf? - you will not need that for VM with one nic only.
Why do you want to run NatD in your VM?
When you run nslookup - do you get the IP of your Host or the one from your provider?
Hi...continuum~\~~~
I changed my /etc/rc.conf with the following:
Re: FreeBSD guest os can't resolve domain name under NAT model ?shell>more /etc/rc.conf[/b]
hostname="FreeBSD.localdomain"
\# for VMware NAT model
ifconfig_lnc0="DHCP"
\# for VMware Bridge model
\# ifconfig_lnc0="inet 10.0.0.2 netmask 255.255.255.0"
\# defaultrouter="10.0.0.138"
inetd_enable="NO"
ipv6_enable="NO"
linux_enable="YES"
moused_enable="YES"
sendmail_enable="NO"
sshd_enable="YES"
tcp_extensions="YES"
usbd_enable="NO"
usbd_flags="NO"
and here is my /etc/hosts
Re: FreeBSD guest os can't resolve domain name under NAT model ?shell>more /etc/hosts[/b]
::1 localhost.localdomain localhost
127.0.0.1 localhost.localdomain localhost
192.168.8.128 FreeBSD.localdomain FreeBSD
192.168.8.128 FreeBSD.localdomain.
the last is my /etc/resolv.conf
Re: FreeBSD guest os can't resolve domain name under NAT model ?shell>more /etc/resolv.conf[/b]
search localdomain
nameserver 192.168.8.2
tonight, I use 'nslookup' for my DNS IP, the result
is :
Re: FreeBSD guest os can't resolve domain name under NAT model ?On my Host OS:[/b]
C:\Documents and Settings\Administrator>nslookup -qt=ns freebsd.org
Server: SpeedTouch.lan
Address: 10.0.0.138
\*** No name server (NS) records available for freebsd.org
Re: FreeBSD guest os can't resolve domain name under NAT model ?On my Guest OS:[/b]
FreeBSD# nslookup freebsd.org
Server: 192.168.8.2
Address: 192.168.8.2#53
Non-authoritative answer:
\*** Can't find freebsd.org: No answer
Should I supply the more information ?
Hi
I would use bridged networking with
rc.conf:
...
ifconfig_lnc0="inet 10.0.0.2 netmask 255.255.255.0"
defaultrouter="10.0.0.138"
...
resolv.conf:
nameserver DNS-server from your provider
Ok...thanks!!!
But could you help to figure out my issues about NAT model ?
I found some strange things!
without anything changed in my guest OS, I just modified my NAT DNS policy to 'Rotate', and add the ISP server to the DNS server list! then\~~~
I ping freebsd.org was failure at first time!
but when I try again, everything work well...
Re: FreeBSD guest os can't resolve domain name under NAT model ?the first time that command execute:[/b]
>ping freebsd.org
ping: cannot resolve freebsd.org: No address associated with name
Re: FreeBSD guest os can't resolve domain name under NAT model ?try again...[/b]
>ping freebsd.org
PING freebsd.org (216.136.204.21): 56 data bytes
64 bytes from 216.136.204.21: icmp_seq=0 ttl=128 time=250.040 ms
64 bytes from 216.136.204.21: icmp_seq=1 ttl=128 time=223.445 ms
64 bytes from 216.136.204.21: icmp_seq=2 ttl=128 time=267.763 ms
64 bytes from 216.136.204.21: icmp_seq=3 ttl=128 time=302.181 ms
^C
\--- freebsd.org ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 223.445/260.857/302.181/28.601 ms
what happing...! - -b