On (04/22/09 10:58), Erik Nordmark wrote:
>
> I assume there can be an optional prefixlen/netmask with those.
>
> Question is whether than becomes part of the name or is an option.
> For instance, with
>       ipadm create-addr link0/10.1.2.3/24
> it looks like it is part of the name, and as a result I'd expect to  
> state the /24 with the delete.
>
> But things are different if we do
>       ipadm create-addr -prefixlen 24 link0/10.1.2.3

I think the version in the design doc has this a
  ipadm create-addr -i link0 10.1.2.3/24

and the dhcp command is "create-dhcp", with the "create-v6addrs"
covering dhcpv6. 

>
> As I compare this with the create-addr the names are different. In  
> create-addr the name includes "link0" but it does not in create-dhcpv4.

The dhcp syntax becomes

  ipadm create-dhcp -i link0 <label>

> If I created the address object with
>       ipadm create-dhcp4 -i link0 default
> would I do properties with
>       ipadm set-addrprop [...] link1/default

You would do

  ipadm  set-addrprop -i link1 <[address][label]>

the design doc doesn't spell this out clearly..  and as you point out
further below, it doesn't make sense for all properties to be tuned
on address-groups that we get from dhcp/autoconfig.  But one would,
for example, want to disable dhcpv6 on the label.

> What is the name space for that name? By that I mean whether or not I can do
>       ipadm create-dhcp4 -i link0 default
>       ipadm create-dhcp6 -i link0 default
> or whether that tells me the object called "default" already exists.

If you specified it as above, then "default" would be considered the label.
A label must be specified at all times. 

>>   ipadm delete-dhcp4 [-all | mydhcgrp4]  
>
> If -all is useful for dhcp, wouldn't it also be useful for static?  
> Perhaps it isn't needed in either case.

Right, we removed the -all after subsequent discussion 

>> For IPv6
>>   ipadm create-dhcp6 -i link0 [other dhcpv6 options] mydhcgrp6
>>   ipadm delete-dhcp6 [-all | mydhcgrp6]  
>
> This means that the semantics of set-addrprop for link0/mydhcpgrp6 will  
> apply to all the addresses. Thus one wouldn't be able to tweak the  
> deprecated property for one of the DHCPv6 assigned addresses in the  
> mydhcpgrp6 set. (I don't think it makes sense in any case, since DHCP  
> will manage those properties.)

see discussion above..

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

> My high-order comment was that stateless and dhcpv6 are welded together  
> per the RFCs since DHCPv6 is triggered from the router advertisements.  
> We could potentially have an administrative override for this (some  
> customer has asked for it), but if we want the default to be  
> stateless+dhcpv6 (where the resulting address set is a function of how  
> the routers and DHCPv6 agents have been configured) it would make some  
> sense to have a create-ipv6.

right- we have this as create-v6addrs in the design doc (though
create-ipv6 is less typing :-))

>
>> Here's a somewhat radical thought for v6-autoconf: it's not supposed to
>> need configuration (or, at least, it needs minimal configuration). So
>> why not treat it as interface property:
>>
>>    ipadm set-intfprop -p ip6_token=<..> link0
>>    ipadm set-intfprop -p enable-ipv6=true link0
>>
>> Does that have potential/appeal? 
>
> Too limited, since I want more control and also have additional address  
> sets with different tokens.
>
> ipadm set-ifprop ipv6_token
> is useful when I want to override the default token.
> But I also want to be able to do a default plus an additional with  
> something like
>       ipadm create-ipv6 link0/defaultv6
>       ipadm create-ipv6 ipv6_token=0:1:2:3:4:5:6:7 link0/specialv6

right.. I think we have this as 
  ipadm create-v6addrs [-T <token>] <label>

(we should return an error if the same token is created with different labels,
though the design doc does not spell this out)

> In summary, the fundamental questions I have above are around
> 1. making sure the name of the created object is clear for all the ways  
> they can be created
> 2. we need to decide how to handle the fact that IPv6 stateless and  
> DHCPv6 are welded together in the RFCs

We have this under create-v6addrs, and dhcpv6 can be disabled as
a address property.  Maybe we should also allow the setting of this
property as part of the create-v6addrs (so that we don't have a window
where the dhcpv6 address  is available and then disabled)?


--Sowmini
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to