On (06/02/10 14:04), Edward Pilatowicz wrote:
> i'm thinking that the "on first boot only" is very difficult to detect,
> even after you define "first boot" (which i think is also non-trivial).
> also, "first boot" wouldn't take into account changes made via
> zonecfg(1m).

The implementation detail is that ipmgmtd will set a persistent private
property on the first boot. On each boot it checks if the property is
set - if it is set, then it is not the first boot. Else it is the first boot.
Thus it is implementable, and works. 

> > The behavior matches the behavior for DHCP, where you always acquire
> > both the IP address and default router from the "address acquisition
> > protocol" (DHCP, or "from_gz", where the latter is set up as kernel 
> > nvlists).
> > As with DHCP, if you acquire the from_gz address, you also get the default
> > route. If, otoh, you persistently delete the from_gz interface
> > using ipadm, you do not acquire either address or defrouter (which
> > would be analogous to not starting DHCP).
> >
> 
> last i check, dhcp and l3 protect are incompatible.  if you specify an
> ip address in zonecfg, you get l3 protect and you can't use dhcp

I did not say this *was* DHCP. I said it was *like* dhcp in perceived
(address acquisition) behavior.. FWIW, to quote Erik's mail

> From [email protected] Wed May 19 22:38:55 2010
 :
> These addresses provided and enforced by the GZ are provided by an 
> external entity (the GZ) the same way as the addresses in a dhcp or 
> addrconf address object are provided by an external entity 

The keywords are "in the same way as", which is not the same as
"is".

> what i was trying to compare this to is the default route behavior of:
> if you have an interface configured with a default route in zonecfg, and
> you delete that default route from with the zone, and then reboot the
> zone, that default route will re-appear.  ie, you can't persistently
> delete just a default route. 

If the interface is configured with an IP address set up by zonecfg,
then the default router set up with that IP address will appear.

If the interface has been deleted using 'ipadm delete-if', neither
the from_gz IP address nor the default route  will be configured.

Though this is *not* DHCP, it is identical in behavior to: 

   if I got my address from a dhcp server, then I would get any default
   route that dhcpserver handed with the address. If I delete the
   default route, the next time  I refresh the dhcp address, the
   default route is added back.  If I drop my dhcp address on the
   IP interface (or unplumb it), the default route will not get created.

> i think that this same behavior would be
> fine wrt network interfaces.  i mean, what is the use case for assigning
> an interface to a zone via zonecfg if the admin of that zone is going to
> persistently disable that interface?

I'll let Erik take that one, since he felt it was an important use case.

--Sowmini

_______________________________________________
opensolaris-arc mailing list
[email protected]

Reply via email to