# The DNS server can't resolve the Gentoo host.

## clouds222

I encountered the issue again. I have 2 hosts working with gentoo, about a harf year ago, I set up one of the hosts, but the router can't resolve the hostname unless I installed and configured samba. 

And now, I encounterred the same issue. I set a host in my working block, and I can't vist it via hostname but can via IP. what's the problem? I have set the IP to a fixed IP. Need I install samba? But the host name can be visted once I use DHCP.

hosts

```

127.0.0.1      testlink.xxxx.com testlink

10.130.4.8      testlink

127.0.0.1       localhost testlink.xxxx.com

::1             localhost

```

/etc/conf.d/net

```
config_eth0=( "10.130.4.8 netmask 255.255.252.0" )

routes_eth0=(

   "default via 10.130.7.250"      # IPv4 default route

#   "10.0.0.0/8 via 192.168.0.1"      # IPv4 subnet route

#   "::/0"               # IPv6 unicast

)

dns_domain_eth0="xxxx.com"

dns_servers_eth0="10.130.1.10 10.130.100.50"

dns_search_eth0="10.130.1.10"

ntp_servers_eth0="10.1.100.250"

nis_domain_eth0="xxxx.com"

nis_servers_eth0="10.130.1.10 10.130.100.50"
```

----------

## magic919

If your DNS server can't resolve it, then it won't work.  It'll work with Samba if you have Windows boxes that need to find the Gentoo host.

----------

## clouds222

But is there any difference between DHCP and fixed IP? The previouse HOST which is Fedora 5 can be resolved. So I think this issue can be solved by some configuration or utility. But I don't know how.

----------

## Logicien

Did you ever check the hostname and the file /etc/hosts after configurating your network via dhcp? A dhcp server can give a hostname and associate an IP address to it automaticaly unless the dhcp client decide otherwise. If you configure your network manually, you need to associate a (FQDN) hostname to this address in /etc/hosts to be able to connect to it with both hostname and IP address.

----------

## clouds222

There is no change in hosts. And the reply of hostname is testlink, the same as that via fixed IP.

From the outside of the host, I can see the differance is the hostname testlink exists in DNS pool while using DHCP, but it doesn't while using manual configuration.

----------

