On Fri, 2009-07-10 at 08:52 -0400, Sowmini.Varadhan at Sun.COM wrote: > On (07/09/09 17:08), Peter Memishian wrote: > > > will lookup myhost in DNS and configure it on net0. It will fail if > > > myhost resolves to more than one address. If you don't like that, fix > > > the resolver. > > > > "Fix" implies it's broken. It's standard operating procedure at many sites. > > In this context (configure a static address on an interface), what do > you want to do if "cnn.com" resolves to 5 addresses, > some of them v4, and some v6? Do you want to add all 5 of them? Note > that both ifconfig (and, as I understand it, the cv-iptun proposal) > arbitrarily pick "just the first one". We can also do that, though I don't > think this is such a perfect solution either: it *is* totally > arbitrary and lacks determinism. Note that each round through dns can > come back with a different set of addresses, in a different order.
This doesn't bolster either viewpoint, but an observation: I certainly hope that DNS is not the recommended name service for addresses to be configured on the system. /etc/hosts is the only viable place for those name->address mappings for obvious reasons. > >From my conversations with people who ask for this feature, all they > want is really much simpler- they want to be able to control the configured > address by adding a single entry for the node in /etc/hosts. I'm sure > they'd like to be informed, if the DNS resolution produced more than > what they intended. Trying to design this to handle everything that DNS > dumps on your lap seems like overkill. Indeed, the mere mention of DNS in this context is irrelevant. Names can resolve to multiple addresses, regardless of the naming service. I've never heard any complaints that the existing ifconfig semantics regarding the resolution of hostnames were inadequate or ill-defined. -Seb
