Give precedence to hosts file over DNS for name resolution
Is there a way, maybe feature needed, to give name resolution precedence to the locally created hosts file over DNS discovered A records?
If I've predefined the name in hosts, it's more readable than the equivalent DNS discovered FQDN and I'd like to give my given name in hosts file priority over the DNS discovered FQDN.
You can disable use of DNS but I need to use both with priority given to local hosts file.
Comments
"hosts file" - do you mean the Wireshark
hosts
file or the operating systemhosts
file?the Wireshark
hosts
file"DNS discovered A records" - does that mean records from
captured DNS packet data
or queries toexternal network name resolver
?Preferences/Name-Resolution (WSUG doesn't have all Preference pages - added to Wiki)
Is your
hosts
file in the Global config folder or in the profile folder? The WSUG and man pages say that one will be read from the Personal config folder but that's incorrect.You can verify that the host file is read in properly by starting the Wireshark Gui then looking at:
Statistics -> Resolved Addresses
and changeAll entries
toHosts
.If the host file was read properly, the host entries will be in the table.
hosts
file in personal config folder works fine. The discovered FQDNs via DNS pkts in the pcap works as well. If IP is defined inhosts
file and also in the DNS pkts in pcap the DNS pkt discovery takes precedence overhosts
file. I want the personalhosts
file to be top priority. I can turn off usage of DNS pkts in pcap for name resolution but I do need that functionality for those IPs that are not in thehosts
file.