On Fri, Jul 24, 2009 at 09:54:44AM -0500, Harry Putnam wrote: > James Carlson <[email protected]> > writes: > > > Harry Putnam wrote: > >> James Carlson <[email protected]> > >> writes: > >>> The big problem you'll run into with restarting physical:default is CR > >>> 6181431 -- that service lacks a 'stop' method, so restarting it doesn't > >>> really do what you want. (And restarting NWAM should just never be > >>> necessary. If you have to do that, then at least contact the NWAM team, > >>> and perhaps also file a bug.) > >> > >> So do you mean to say then that if I wanted to change from a dhcp > >> provided address to a static address... I could just edit > >> /etc/nwam/llp to say: > >> > >> rge0 static 192.168.0.29 > >> > >> And edit /etc/hosts to comply with that. > >> > >> And from there on that's my new static address... no retarting of > >> anything required? > > > > Not exactly. The new NWAM (in development now) has a configuration > > interface -- comand line and GUI tools -- and doesn't force you to edit > > text files to control the system. > > > > But, yes, the broader idea is that. You shouldn't have to go through > > acrobatics to do something simple like this. > > I guess I'm wondering how it is less acrobatic to work thru some kind > of config tool, than to edit a text file. > > To do the job I mentioned (change from dhcp served IP to a static IP). > What would these cmdline configuration tools require me to do?
For this specific change: you would modify the profile setting that says "use dhcp" to say "use static", and then specify the static address. Once you apply the change, via the CLI or GUI, the underlying library code will notify nwamd about the change, and the change will be applied. But the same idea applies for any profile change you wish to make: by making the changes via the nwam framework, they can be immediately applied with no further work on your part. The problem with editing a file is that nwamd has no way of finding out about the change. The only mechanism to do so is to restart the daemon (by restarting the service), which causes it to re-read the file. I think you might have hit a second problem in trying to make the dhcp-to-static change: dns server configuration information is obtained from the dhcp server. The current nwam implementation is very coarse-grained; you can't use a static address and still get dns config info from the dhcp server. And to add to the confusion, when dns configuration is "torn down" (because the configuration was changed), it's only partially removed: the /etc/nsswitch.conf file is changed, to remove the dns entry for hosts and ipnodes, but the resolv.conf file is not changed. If you subsequenty get dns infor- mation from a dhcp server, /etc/nsswitch.conf will be updated, and /etc/resolv.conf will be overwritten. So in your case, the dns configuration was (partially) removed, but nothing ever replaced it, because the static address implied no dhcp information at all. If you're regularly using static addresses, and your configuration is dynamic (i.e. the dns server data could change, or you don't always want to use dns), you'll need to make the name service configuration changes explicitly. The nwam ULP is one way of doing this; refer to the 'Upper-Layer Profiles' section at the bottom of http://www.opensolaris.org/os/project/nwam/prototype/ for more information about those, or follow up on nwam-discuss. Note, though, that this mechanism will change pretty dramatically with the integration of phase 1. It's pretty messy and confusing right now; sorry about that. The nwam phase 1 configuration will hopefully improve the situation, offering greater flexibility in what you can configure, and better tools to make those configuration changes. -renee > > And what changes would take place in the filesystem? > > > _______________________________________________ > networking-discuss mailing list > [email protected] _______________________________________________ networking-discuss mailing list [email protected]
