# <Solved> Gentoo can't resolve local hostnames. Win10 can

## peakeyed

I have Arris router with DNS enabled and IP address reservation so all boxes get static IPs. Windows 10 boxes can resolve all local hostnames. The gentoo box cannot resolve any other hostnames. zenithU is the gentoo box. panther is the windows box. Please help.

```
$cat /etc/resolv.conf

# Generated by net-scripts for interface enp6s0

search myhomenet.com

nameserver 192.168.0.1
```

```
$cat /etc/conf.d/net

config_enp6s0="192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255"

routes_enp6s0="default via 192.168.0.1"

config_enp5s0="192.168.22.1/24 brd 192.168.22.255"
```

```
$cat /etc/nsswitch.conf

passwd:      compat

shadow:      compat

group:       compat

hosts:       files dns wins

networks:    files dns

services:    db files

protocols:   db files

rpc:         db files

ethers:      db files

netmasks:    files

netgroup:    files

bootparams:  files

automount:   files

aliases:     files
```

```
$cat /etc/hosts

127.0.0.1       localhost

::1             localhost

192.168.0.2     zenithU
```

```
$ping panther

PING panther.myhomenet.com [b](74.117.114.119)[/b] 56(84) bytes of data.

^C

--- panther.myhomenet.com ping statistics ---

5 packets transmitted, 0 received, 100% packet loss, time 3999ms
```

```
$ping gentoo.org

PING gentoo.org (89.16.167.134) 56(84) bytes of data.

64 bytes from www.gentoo.org (89.16.167.134): icmp_seq=1 ttl=51 time=178 ms

64 bytes from www.gentoo.org (89.16.167.134): icmp_seq=2 ttl=51 time=172 ms

^C

--- gentoo.org ping statistics ---

2 packets transmitted, 2 received, 0% packet loss, time 1001ms
```

```
$dig panther

; <<>> DiG 9.11.0-P3 <<>> panther

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61163

;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:

; EDNS: version: 0, flags:; udp: 512

;; QUESTION SECTION:

;panther.                       IN      A

;; ANSWER SECTION:

panther.                0       IN      A       92.242.140.2

;; Query time: 28 msec

;; SERVER: 192.168.0.1#53(192.168.0.1)

;; WHEN: Tue Mar 14 22:08:21 MST 2017

;; MSG SIZE  rcvd: 52
```

```
$nslookup panther

Server:         192.168.0.1

Address:        192.168.0.1#53

Non-authoritative answer:

Name:   panther.myhomenet.com

Address: 74.117.114.119
```

Last edited by peakeyed on Mon Mar 20, 2017 2:58 pm; edited 3 times in total

----------

## bbgermany

Hi,

first off, please use code tags next time!

second: Windows usually use NetBIOS or WINS for resolving names in a local network first, before using DNS. You should either setup a DNS server in your local network which will be asked for local hostnames or you add all hosts (since you have static dhcp) to your /etc/hosts.

greets, bb

----------

## Ant P.

Unless you actually own the domain name "myhomenet.com" (74.117.114.119, which is correct), you probably shouldn't configure your system to blindly trust it to handle all relative hostnames (those without a dot at the end).

----------

## peakeyed

Yep changed that domain named to one with dot at the end.

Starting winbindd resolves the internal hostnames now. It had to be configured in /etc/conf.d/samba

Thanks all

----------

