[email protected] wrote:
On (04/22/09 10:58), Erik Nordmark wrote:
...
What is the name of the object created using link0/myhost.com i.e., what
name would I use with set-addrprop and delete?
If I can have two (-f inet link0/myhost.com, and -f inet6
link0/myhost.com), then wouldn't you need '-f' to become part of the
name?
Furthermore, if myhost.com resolves to >1 IPv4 addresses (or IPv6
addresses), does the above create a single address object with N
addresses in it?
I would expect that in both cases, it would only use the first address
unless additional flags like -f were specified..
if we use ping/traceroute behavior as the template here, then you'd have
to use "-a" to add all addresses.
I can see two ways forward on that one:
1. Do not allow hostnames for create-addr at all.
that would be the simplest solution. I was looking at DNS as a simple
way of creating "labels" for static addresses.
2. Make a hostname lookup all the IPv4 and IPv6 addresses and create a
single object with all those addresses in it. I.e., not need for a -f.
But DNS could return unexpected records, right? And having the -f
flag give you some control over this..
We should probably be just talking in terms of what getnameinfo()
returns, not whether the information comes from DNS. Using DNS to
configure the primary NIC address seems a little bit like putting the
cart before the horse: it is likely that the interface needs to be
configured with an address of some sort before queries can be sent to a
DNS server.
In light of that, it's more important to think of what role
/etc/inet/hosts plays, rather than DNS. Despite the fact that functions
like getnameinfo() all use nsswitch and that nsswitch gets to mix it all
up, the role of /etc/inet/hosts in early bringup of networking is
currently more important than DNS or NIS as it allows hostnames to be
placed in /etc/hostname.* files, not just addresses.
There are a number of places throughout the /etc directory heirarchy
where the hostname of the box is used to configure networking. For at
least the sake of continuity in administration of the system, it would
make a certain amount of sense to see us continue to be able to use
hostnames as the means by which an address is configured on an interface.
So if we accept that using names needs to remain so that we have
consistent network configuration, then the question becomes what to do
with getnameinfo() reuturning multiple addresses. As Erik points out,
DNS returns a set of addresses, a set that may have a different order
with each query (the DNS server might be doing round robin with its
replies) or it might have the same order due to extra configuration of
/etc/resolv.conf for sorting of addresses. In short, it seems fraught to
try and rely on any particular behaviour except for one: to configure
all addresses available at the time the command is executed.
Darren
_______________________________________________
networking-discuss mailing list
[email protected]