You can use nwam if you only have one interface, but if you have more...or an aggregate interface:
add 'dns' after 'files' in /etc/nsswitch.conf, in the section for host resolution
make sure you set up '/etc/resolv.conf'
svcadm disable network/physical:nwam; svcadm enable network/physical:default
make sure you do both commands at once, since this will temporarily break a remote connection