This question already has an answer here:
At my company, many of our configuration scripts, etc use just the server name. For example,
http://server rather than
http://server.company.com. I have configured the search domain in the GUI Network Connections tool. I have also configured it in
/etc/resolvconf/resolv.conf.d/head, but it is not working correctly.
The strange thing is certain tools like nslookup or host resolve to the correct IP, but other tools like ssh, ping, git, and web browsers do not. I can connect if I use the FQDN. What could be preventing the search domain from resolving correctly?
Below, find the relevant output from some commands.
$ nslookup server Server: 192.168.200.53 Address: 192.168.200.53#53 server.company.com canonical name = server001.company.com. Name: server001.company.com Address: 192.168.200.103
$ host server server.company.com is an alias for server001.company.com. server001.company.com has address 192.168.200.103
$ ping server ping: unknown host server $ ping server.company.com PING server001.company.com (192.168.200.103) 56(84) bytes of data. 64 bytes from server001.company.com (192.168.200.103): icmp_seq=1 ttl=64 time=4.61 ms
I use ping as an example because it's simple, but most of the other tools I need to use show the same results as ping.
Let me know if you need any more config files or info.
/etc/hosts has no info related to the server I'm trying to connect to.
Here is /etc/resolv.conf, which was generated by resolvconf.
# Add Company Nameservers and Domain nameserver 192.168.200.53 nameserver 192.168.200.65 search company.com nameserver 127.0.1.1 search company.com # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 127.0.1.1 search hsd1.co.comcast.net
# interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback