> The expected usage is something like > # ipadm create-addr -i net5 -a 1.2.3.4/24 net5addr > with the /etc/hosts stuff only being used as a pnemonic for numeric > addresses (as Jim had mentioned in PSARC comments). > > What I'm trying to say is that with vanity naming of any sort, > one can do strange things like > # dladm rename-link bge0 nge0 > but that's not advisable.
Yes, that is not advisable. It's also something that is obviously dirty by inspection. In contrast, on its face it appears very natural to use an already-established name (and likely the name the administrator already uses every day) for an IP address when creating a label for an address object tied to that IP address. Is it reasonable to expect the administrator to create another set of names for all of their local IP addresses just so they can use ipadm? If it's not, then we need to expect for the administrator to end up with two distinct namespaces with equivalent names in many situations, which seems ripe for confusion. > Also, if you really did do > # ipadm create-addr -i net0 -a cetus5 cetus5 > with cetus5 mapping to something like 1.2.3.4, when you do > # ipadm delete-addr cetus5 > you'd want to delete 1.2.3.4 (and not the current address in /etc/hosts), > right? So, in some sense, isn't the oddity only in the tautology used > in the create-addr command (which is only required so that we don't > have to mandate a label in some cases and use a default in others)? You lost me there. -- meem
