iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
If Linux can ping a server’s IP address but reports unknown host for the same server name, the network path is probably working and hostname resolution is not. An IP ping skips DNS and the rest of the host-name service (NSS) chain; a hostname ping must pass through it. Check the name, then trace the exact lookup path with getent, inspect /etc/resolv.conf and /etc/nsswitch.conf, and repair the resolver service that owns those settings.
What “unknown host” means when the IP responds
When you run ping 203.0.113.25, Linux already has an address, so it sends packets without looking up a name. When you run ping app.example.net, the ping program first asks the system name-service path to translate app.example.net into an address. That path can include /etc/hosts, DNS, systemd-resolved, multicast DNS (mDNS), caches and other NSS modules.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Therefore, a successful IP ping proves only that routing and basic reachability to that address work. It does not prove that a DNS server is configured, reachable, authoritative for the name, or being consulted by applications. SUSE’s administration guidance summarizes the symptom directly: if ping fails with unknown host, “the name service is not configured correctly or the host name used was incorrect.”
Start by checking spelling and whether you are using a short name that requires a search domain. A name such as database may need to become database.corp.example; a typo will produce the same error as a broken resolver.
#1 Best Overall
- 𝐇𝐢𝐠𝐡-𝐒𝐩𝐞𝐞𝐝 𝐔𝐒𝐁 𝐄𝐭𝐡𝐞𝐫𝐧𝐞𝐭 𝐀𝐝𝐚𝐩𝐭𝐞𝐫 - UE306 is a USB 3.0 Type-A to RJ45 Ethernet adapter that adds a reliable wired network port to your laptop, tablet, or Ultrabook. It delivers fast and stable 10/100/1000 Mbps wired connections to your computer or tablet via a router or network switch, making it ideal for file transfers, HD video streaming, online gaming, and video conferencing.
- 𝐔𝐒𝐁 𝟑.𝟎 𝐟𝐨𝐫 𝐅𝐚𝐬𝐭𝐞𝐫, 𝐌𝐨𝐫𝐞 𝐒𝐭𝐚𝐛𝐥𝐞 𝐃𝐚𝐭𝐚 𝐓𝐫𝐚𝐧𝐬𝐟𝐞𝐫𝐬- Powered via USB 3.0, this adapter provides high-speed Gigabit Ethernet without the need for external power(10/100/1000Mbps). Backward compatible with USB 2.0/1.1, it ensures reliable performance across a wide range of devices.
- 𝐒𝐮𝐩𝐩𝐨𝐫𝐭𝐬 𝐍𝐢𝐧𝐭𝐞𝐧𝐝𝐨 𝐒𝐰𝐢𝐭𝐜𝐡- Easily connect your Nintendo Switch to a wired network for faster downloads and a more stable online gaming experience compared to Wi-Fi.
- 𝐏𝐥𝐮𝐠 𝐚𝐧𝐝 𝐏𝐥𝐚𝐲- No driver required for Nintendo Switch, Windows 11/10/8.1/8, and Linux. Simply connect and enjoy instant wired internet access without complicated setup.
- 𝐁𝐫𝐨𝐚𝐝 𝐃𝐞𝐯𝐢𝐜𝐞 𝐂𝐨𝐦𝐩𝐚𝐭𝐢𝐛𝐢𝐥𝐢𝐭𝐲- Supports Nintendo Switch, PCs, laptops, Ultrabooks, tablets, and other USB-powered web devices; works with network equipment including modems, routers, and switches.
Run the same lookup path that applications use
Use this sequence in order. It separates a bad name from a DNS-server problem and from a local NSS configuration problem.
- Ask NSS with
getent. Rungetent hosts NAME. This uses the host lookup order in/etc/nsswitch.conf, which is normally the path used by programs such as ping, curl and many package managers. If it prints an address, the system resolver can resolve the name even if ping was given a different spelling or search context. - Query DNS-oriented tools for comparison. Run
host NAMEor, on a system using systemd-resolved,resolvectl query NAME. SUSE recommendshostto check whether a hostname translates to an address. These commands help show whether DNS itself answers independently of the NSS order. - Record the exact error and name form. Test the fully qualified name (for example,
server.example.net.with a final dot) and the short name separately. A fully qualified query bypasses search-list mistakes; a short name depends on thesearchsettings in the resolver configuration.
The combinations are useful:
getent |
host/resolvectl |
Likely direction |
|---|---|---|
| Fails | Fails | No usable DNS answer, unreachable or incorrect nameserver, wrong name, or a name that is not published in the queried DNS domain. |
| Fails | Works | NSS order, an early-return rule, a local cache/module, or an application-facing resolver path is preventing DNS from being used. |
| Works | Works | The resolver is functioning; check the ping command, spelling, search-domain behavior, or an application-specific environment. |
| Works for a fully qualified name only | Works for a fully qualified name only | The short name is missing a correct search domain or the intended suffix is not being applied. |
Inspect /etc/resolv.conf and identify its owner
/etc/resolv.conf records the nameserver and domain information currently used by the host. Display it with:
cat /etc/resolv.conf
Look for one or more nameserver lines and, where short names are expected, a search line. A missing nameserver, an unreachable private address, or a stale VPN nameserver explains why IP connectivity can continue while names fail. A search list that belongs to an old network can also make a valid short name expand incorrectly.
Do not assume that this file is the authoritative configuration. On many Linux installations it is generated by DHCP, NetworkManager, systemd-resolved or another resolver manager. Check whether it is a symbolic link and which service is active:
ls -l /etc/resolv.confsystemctl status systemd-resolvedresolvectl status
Rank #2
- Connects a USB 3.0 device (computer/laptop) to a router, modem, or network switch to deliver Gigabit Ethernet to your network connection. Does not support Smart TV or gaming consoles (e.g.Nintendo Switch).
- Supported features include Wake-on-LAN function, Green Ethernet & IEEE 802.3az-2010 (Energy Efficient Ethernet)
- Supports IPv4/IPv6 pack Checksum Offload Engine (COE) to reduce Cental Processing Unit (CPU) loading
- Compatible with Windows 8.1 or higher, Mac OS
If systemd-resolved is active, resolvectl status shows the global and per-link DNS servers, search domains and routing domains. Confirm that /etc/resolv.conf points to the file or stub interface used by that design. A hand-edited file can appear correct briefly and then be replaced at reboot, DHCP lease renewal or network restart.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →If NetworkManager or a DHCP client owns the file, change DNS in that service’s connection profile instead of repeatedly editing the generated file. For a managed workstation, the correct nameserver may be supplied by the router, VPN or organization; replacing it with a public resolver can break internal names and split DNS.
Check NSS lookup order in /etc/nsswitch.conf
NSS decides where Linux looks for host information and when it stops. Inspect the hosts entry:
grep '^[[:space:]]*hosts:' /etc/nsswitch.conf
A common baseline is:
hosts: files dns
Here, Linux checks /etc/hosts first and DNS second. Other systems include modules for systemd-resolved, mDNS or a local cache. The order matters: a module can return a negative result before DNS is attempted.
Check local entries
Open /etc/hosts and look for a wrong address, duplicate name or missing private mapping. A stale entry can send a name to an old server; an expected internal hostname that exists only in a local hosts file will never resolve if that file is absent or malformed.
Rank #3
- [Expansion Ports] The USB C to Ethernet Adapter expands the device to three USB 3.0 ports and one Gigabit Ethernet port. Provides you more peripheral ports while maintaining a stable network connection, plug and play, no driver required.
- [Gigabit Network Port] ALL-LUCKY USB Ethernet Adapter transmission rate up to 1000Mbps, also compatible with 10/100Mbps bandwidth. It allows you to enjoy a smooth and stable network connection and avoid too much lag. (Note: To reach 1Gbps, please use CAT6 or above Ethernet cable connection)
- [Convertible Connector]This usb hub with ethernet not only has USB-A connector, but also can be converted to USB-C connector, so that you can easily convert the connector according to the device port, improve the convenience of use.
- [High-Speed Data Transfer] The usb to ethernet adapter adopts USB 3.0 transmission technology, supports up to 5Gbps transmission rate, and is compatible with USB 2.0(480Gbps),USB 1.0(12Mbps), easily transfer video, files and other data for you in seconds. (Note: Maximum output current is 900mA, does not support charging devices.)
- [Widely Compatible]The usb c ethernet adapter for iMac, MacBook Pro, iPad Pro, XPS and many other devices. Compatible with Windows 11/10/8.1/8, Mac OS, iPad OS, Chrome OS.(Note: Driver is required on Win 7) It can be used in office, school, library and other occasions, compact and portable, easy to carry around.
Look for early-return rules
Rules such as [NOTFOUND=return] deliberately stop processing when a module says that a name is not found. Red Hat documents failures in which NSS or a caching module prevents DNS from being attempted because of an inappropriate return condition. If host NAME succeeds but getent hosts NAME fails, inspect these bracketed actions and the modules listed before dns. Remove or reorder an erroneous rule according to the resolver design used by the distribution; do not copy a different distribution’s line blindly.
Test the configured DNS server directly
If the dig utility is installed, query the server shown in /etc/resolv.conf or resolvectl status:
dig NAME @SERVER
Replace NAME and SERVER with the real hostname and nameserver address. A timeout indicates that the server is unreachable, blocked, unavailable over the current interface or not listening on DNS. A response containing an address proves that this server can answer the question, but it does not prove that applications are using it.
When dig NAME @SERVER returns a valid answer while getent hosts NAME fails, focus on NSS, a local cache, systemd-resolved routing, or policy software. When the direct query returns NXDOMAIN, the server is reachable but says that the name does not exist in that DNS view. That can be correct for a misspelled name or the wrong split-DNS domain.
Recommended Free Tools
Apply the fix that matches the resolver design
Restore DNS through DHCP, NetworkManager or the active resolver manager
First restore the configuration source that should own DNS. Renew the network connection or reconnect the VPN so the correct nameservers and search domains are supplied. On a system using systemd-resolved, change the DNS settings through the network manager or resolved configuration and then verify with resolvectl status. This is the durable fix because it survives restarts and network changes.
Rank #4
- The Anker Advantage: Join the 65 million+ powered by our leading technology.
- Instant Internet: Connect to the internet instantly from virtually any USB-C 3.0 device, and enjoy stable connection speeds of up to 1 Gbps.
- Lightweight and Compact: The space-saving and portable design measures just over half an inch thick and weighs about the same as a AA battery.
- Premium Build: Features a sleek aluminum exterior and braided-nylon cable to complement the design of high-end devices.
- What You Get: PowerExpand USB-C to Gigabit Ethernet Adapter, welcome guide, 18-month worry-free warranty, and friendly customer service.
Use a temporary nameserver only to confirm the diagnosis
In the documented systemd incident, adding nameserver 8.8.8.8 to /etc/resolv.conf restored hostname queries. A similar edit can be a short diagnostic test when policy permits it:
sudo sh -c 'printf "nameserver 8.8.8.8n" > /etc/resolv.conf'
Use the DNS address approved for your network instead when internal names, filtering or split DNS are required. Treat a manual edit as temporary unless you have confirmed that no service manages the file; otherwise it will be overwritten and may expose private queries to an unintended resolver.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteCorrect NSS ordering and return behavior
Adjust the hosts: line so that the required sources are present and DNS is reached for ordinary DNS names. Preserve modules your environment needs, such as local files, systemd-resolved or mDNS, and test after each change with getent hosts NAME. Make a backup before editing /etc/nsswitch.conf; a syntax or ordering error can affect every program that resolves hostnames.
Handle .local names as mDNS when appropriate
.local is commonly used for multicast DNS on a local link, not public DNS. Check for an mDNS entry such as mdns4_minimal [NOTFOUND=return] in the hosts: line. Micro Focus has documented cases where that rule makes ping report unknown host even though host or nslookup can resolve the same label through ordinary DNS. Decide whether the name is meant to be mDNS or unicast DNS, then configure the corresponding NSS module and return behavior. A public DNS answer does not automatically make a .local service reachable through mDNS, and vice versa.
Best Value
- COMPACT DESIGN - The compact-designed portable BENFEI USB A/C to Ethernet adapter connects your computer or tablet to a router,modem or network switch for network connection. It adds a standard RJ45 port to your Ultrabook, notebook or Macbook Air for file transferring, video conferencing, gaming, and HD video streaming.
- SUPERIOR STABILITY - Built-in advanced IC chip works as the bridge between RJ45 Ethernet cable and your USB A/C devices. The driver-free installation with native driver support in Chrome, Mac, and Windows OS; The USB A/C Ethernet adapter dongle supports important performance features including Wake-on-Lan (WoL), Full-Duplex (FDX) and Half-Duplex (HDX) Ethernet, Crossover Detection, Backpressure Routing, Auto-Correction (Auto MDIX).
- INCREDIBLE PERFORMANCE - Supports full 10/100/1000Mbps gigabit ethernet performance over USB A/C's 5Gbps bus, faster and more reliable than most wireless connections. Link and Activity LEDs. USB powered, no external power required. Backward compatible with USB 2.0/1.1.✅ To reach 1Gbps, make sure to use CAT6 & up Ethernet cables.
- BROAD COMPATIBILITY - The USB A/C-Ethernet adapter is compatible with Windows 11/10/8.1/8/7/Vista/XP, Mac OSX 10.6/10.7/10.8/10.9/10.10/10.11/10.12, Linux kernel 3.x/2.6, Android and Chrome OS.Compatible with IEEE 802.3, IEEE 802.3u and IEEE 802.3ab. Supports IEEE 802.3az (Energy Efficient Ethernet).❌Do Not Support Windows RT. (NOT compatible with Nintendo Switch.)
- 18 MONTH WARRANTY - Exclusive BENFEI Unconditional 18-month Warranty ensures long-time satisfaction of your purchase; Friendly and easy-to-reach customer service to solve your problems timely.
Align systemd-resolved with /etc/resolv.conf
If systemctl status systemd-resolved shows the service is running, confirm that the interface has DNS servers and that the resolver file points to the active design. A running service with an empty link configuration, or a file that points somewhere else, can produce the exact symptom in which IP pings succeed while name pings fail. Correct the link or global DNS settings through the owning network manager, then repeat resolvectl query NAME and getent hosts NAME.
Account for split DNS, search domains and VPNs
Corporate VPNs often provide DNS servers that know internal zones while ordinary internet DNS knows only public names. systemd-resolved can route different domains to different links. If an internal fully qualified name resolves only while the VPN is connected, that behavior may be intentional. Check per-link DNS servers, search domains and routing domains in resolvectl status rather than replacing them with a public server.
For a short name, test the expanded form shown by the intended search domain. If getent hosts printer fails but getent hosts printer.office.example succeeds, repair the search list supplied by DHCP, NetworkManager or the VPN profile. Do not add a search suffix globally if it could cause a sensitive short name to be sent to the wrong DNS service.
Use the results to choose the next action
| Observation | Next check | Typical correction |
|---|---|---|
IP ping works; both getent and host fail |
Read /etc/resolv.conf; run direct dig against its server. |
Restore a reachable, authoritative nameserver through the service that owns DNS. |
host works; getent fails |
Inspect the hosts: line, bracketed return actions and local cache modules. |
Correct NSS order or an early-return rule. |
resolvectl query fails on one link only |
Review per-link DNS and routing domains in resolvectl status. |
Repair the VPN, DHCP or interface-specific DNS configuration. |
| FQDN works; short name fails | Check search and routing-domain settings. |
Restore the intended search suffix or use the FQDN. |
.local fails in ping but appears in DNS tools |
Inspect mDNS NSS modules and [NOTFOUND=return]. |
Configure mDNS for a local-link name or use the correct unicast DNS name. |
Verify the repair and make it persistent
- Run
getent hosts NAMEand confirm the expected address. - Run
host NAMEorresolvectl query NAMEto confirm the DNS view you intend to use. - Ping the hostname with a limited count, for example
ping -c 3 NAME. A resolved name with packet loss is now a reachability or firewall issue, not an unknown-host error. - Restart the network connection or renew its lease, then repeat the lookup. This catches fixes that were only temporary edits to a generated file.
- Test both an internal name and a public name if the machine uses split DNS, and test a
.localname separately if mDNS is required.
The durable solution is the one that survives the event that originally caused the failure: reboot, DHCP renewal, VPN connect or disconnect, network-manager restart, or resolver-service restart. Keep the nameserver ownership, NSS order and name type aligned; changing only the command that happens to work can leave other applications broken.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

