# /etc/hosts order question

**URL:** <https://forums.suse.com/t/etc-hosts-order-question/34944>\
**Category:** SLES Networking\
**Created:** [April 10, 2020, 8:44pm UTC](https://forums.suse.com/t/etc-hosts-order-question/34944 "2020-04-10T20:44:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pradhanparas1](https://avatars.discourse-cdn.com/v4/letter/p/d78d45/32.png) [@pradhanparas1](https://forums.suse.com/u/pradhanparas1)\
**Post date:** [April 10, 2020, 8:44pm UTC](https://forums.suse.com/t/etc-hosts-order-question/34944/1 "2020-04-10T20:44:47Z")

</div>

Hi

I have a SLES 15.1 vm and its /etc/hosts looks like

127.0.0.1 localhost

192.168.0.80 [host1.com](http://host1.com)  
10.9.4.80 [host1.com](http://host1.com)

When I ping [host1.com](http://host1.com) it resolves to 10.9.4.80.

My understanding is it should ping 192.168.0.80 because it comes first. The ip of the server is 10.9.4.80 (eth0) and the default route is from this network. How do we change this behavior? . On SLES 11 I do not see this issue.

Thanks  
-P
