NWAM (Network Auto Magic) is a very easy way of getting a DHCP lease on OpenSolaris. It runs as a service, enabled by default on install, which will automatically try and get you a DHCP address when Solaris detects that you plugged your ethernet cable in! To most people thats nothing special, but theres more to it.
You can also use it to automatically configure a static IP address upon boot too.
Simply edit the file
/etc/nwam/llp to your desired settings. For example:
e1000g0 static 192.168.0.45/24
The /24 part of that string represents the netmask. in this case, it would be expressed as 255.255.255.0 in decimal notation.
Then create /etc/defaultrouter so that your machine can reach the outside world! For example…
…as this is the address of the router on my LAN
Finally, create the /etc/resolv.conf file, so that the OS knows where to look to resolve DNS names!
On my LAN , this would be:
If your still having trouble resolving host names, you may need to check that the /etc/nsswitch.conf file reflects the fact that you want to look in both files and the DNS to resolve host names. The hosts and ipnodes entries should look like this:
hosts: files dns
ipnodes: files dns
Once all that is done you can simply restart the NWAM service:
pfexec svcadm restart nwam