<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/the-curious-case-of-ip-host-configuration-command-ipspace-net-blog-bmmmjylit" -->

---
title: The Curious Case of 'ip host' Configuration Command «...
description: The `ip host` router configuration command behaves differently across Cisco IOS versions and Arista EOS. On Cisco IOS Classic (e.g., IOSv 15.6.1), the first IP...
canonical: https://daily.dev/posts/the-curious-case-of-ip-host-configuration-command-ipspace-net-blog-bmmmjylit
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: The Curious Case of 'ip host' Configuration Command « ipSpace.net blog | daily.dev
og:description: The `ip host` router configuration command behaves differently across Cisco IOS versions and Arista EOS. On Cisco IOS Classic (e.g., IOSv 15.6.1), the first IP...
og:url: https://daily.dev/posts/the-curious-case-of-ip-host-configuration-command-ipspace-net-blog-bmmmjylit
og:image: https://api.daily.dev/og/posts/BmMMjyLIt.png
og:image:alt: The Curious Case of 'ip host' Configuration Command « ipSpace.net blog
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# The Curious Case of 'ip host' Configuration Command « ipSpace.net blog

**[ipSpace.net Blog](https://daily.dev/sources/ipspace)** · 5 min read · 0 upvotes · 0 comments

## Summary

The `ip host` router configuration command behaves differently across Cisco IOS versions and Arista EOS. On Cisco IOS Classic (e.g., IOSv 15.6.1), the first IP address listed is used for pings. On Cisco IOS/XE, addresses are stored in reverse order and the last-listed address is used. On Arista EOS, addresses are sorted by routing table distance (directly connected first, then by route metric), regardless of the order specified in the command — a behavior traced to the underlying Linux `getaddrinfo` function following RFC 3484 rules.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.ipspace.net/2025/09/ip-hosts-configuration>

## Questions this post answers

### Why does ping use the wrong IP address when I configure multiple IPs with 'ip host' on Cisco IOS/XE?

On Cisco IOS/XE, the `ip host` command stores IP addresses in reverse order internally and always uses the last IP address listed in the command for ping. This is a behavioral change from Cisco IOS Classic, which uses the first listed address. The workaround is to put the desired target IP address last in the `ip host` command.

_Network engineers troubleshooting IOS/XE host mapping quirks share findings like this on daily.dev._

### How does Arista EOS decide which IP address to use when multiple IPs are configured with 'ip host'?

Arista EOS sorts IP addresses configured via `ip host` using the Linux `getaddrinfo` function, which applies RFC 3484 address selection rules. In practice, this means directly connected addresses are tried first, followed by addresses reachable via routing protocols like OSPF, and finally addresses with no route in the routing table — regardless of the order specified in the configuration.

_Engineers navigating multi-vendor networking behavior track edge cases like this on daily.dev._

## Similar posts on daily.dev

- [The Never-Ending IPv6 Loopback Prefix Saga « ipSpace.net blog](https://daily.dev/posts/the-never-ending-ipv6-loopback-prefix-saga-ipspace-net-blog-4nlhgh10l) · ipSpace.net Blog · 0 upvotes · 0 comments
- [Arista cEOS Does Not Apply ACLs to Control-Plane Traffic « ipSpace.net blog](https://daily.dev/posts/arista-ceos-does-not-apply-acls-to-control-plane-traffic-ipspace-net-blog-ieh2uzhm7) · ipSpace.net Blog · 0 upvotes · 0 comments

---

Tags: [#dns](https://daily.dev/tags/dns), [#networking](https://daily.dev/tags/networking)

[View this post on daily.dev](https://daily.dev/posts/the-curious-case-of-ip-host-configuration-command-ipspace-net-blog-bmmmjylit)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"The Curious Case of 'ip host' Configuration Command « ipSpace.net blog","url":"https://daily.dev/posts/the-curious-case-of-ip-host-configuration-command-ipspace-net-blog-bmmmjylit","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/the-curious-case-of-ip-host-configuration-command-ipspace-net-blog-bmmmjylit"},"datePublished":"2026-08-11T08:52:57.947Z","dateModified":"2026-10-14T02:28:40.413Z","description":"The `ip host` router configuration command behaves differently across Cisco IOS versions and Arista EOS. On Cisco IOS Classic (e.g., IOSv 15.6.1), the first IP...","image":"https://media.daily.dev/image/upload/s--OHB84bZF--/f_auto/v1722860399/public/Placeholder%2010","thumbnailUrl":"https://media.daily.dev/image/upload/s--OHB84bZF--/f_auto/v1722860399/public/Placeholder%2010","isAccessibleForFree":true,"articleSection":"ipSpace.net Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"ipSpace.net Blog","logo":"https://media.daily.dev/image/upload/s--xS7E82MT--/f_auto,q_auto/v1786438303/logos/ipspace?_a=BAMAMicg0","url":"https://daily.dev/sources/ipspace"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/the-curious-case-of-ip-host-configuration-command-ipspace-net-blog-bmmmjylit","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"dns,networking","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"ipSpace.net Blog","item":"https://daily.dev/sources/ipspace"},{"@type":"ListItem","position":3,"name":"The Curious Case of 'ip host' Configuration Command « ipSpace.net blog"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/the-curious-case-of-ip-host-configuration-command-ipspace-net-blog-bmmmjylit#faq","mainEntity":[{"@type":"Question","name":"Why does ping use the wrong IP address when I configure multiple IPs with 'ip host' on Cisco IOS/XE?","acceptedAnswer":{"@type":"Answer","text":"On Cisco IOS/XE, the `ip host` command stores IP addresses in reverse order internally and always uses the last IP address listed in the command for ping. This is a behavioral change from Cisco IOS Classic, which uses the first listed address. The workaround is to put the desired target IP address last in the `ip host` command. Network engineers troubleshooting IOS/XE host mapping quirks share findings like this on daily.dev."}},{"@type":"Question","name":"How does Arista EOS decide which IP address to use when multiple IPs are configured with 'ip host'?","acceptedAnswer":{"@type":"Answer","text":"Arista EOS sorts IP addresses configured via `ip host` using the Linux `getaddrinfo` function, which applies RFC 3484 address selection rules. In practice, this means directly connected addresses are tried first, followed by addresses reachable via routing protocols like OSPF, and finally addresses with no route in the routing table — regardless of the order specified in the configuration. Engineers navigating multi-vendor networking behavior track edge cases like this on daily.dev."}}]}
```

