Is it possible to set duplicate host entries with different IPs in /etc/hosts?

Solution In Progress - Updated -

Issue

  • Is it possible to set duplicate host entries with different IPs in /etc/hosts?
 192.168.0.1   test01
 192.168.0.2   test01
 192.168.0.3   test02
  • If we set this and try to access "test01", how does name resolution work?

Environment

  • Red Hat Enterprise Linux (All version)
  • /etc/hosts file
  • /etc/host.conf

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content