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. >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. --Sowmini
