News, tips, partners, and perspectives for the Oracle Solaris operating system

Having NWAM under control

Guest Author

NWAM (Network Auto-Magic) is a daemon in OpenSolaris 2008.05 which takes care of the connection to the network. As the name suggests, the network connection should work auto-magically, which means that most of the time you don't need to care about your connection - it will find out when you plug in the ethernet cable and try to connect. Similarly it will give you a list of wireless networks you can connect to if you don't have a cable connection.

Unfortunately there is no GUI right now for NWAM in the 2008.05 release. It's under construction and will be included in the future releases. Its specification looks very promising!

So right now the only way to control NWAM is using the command line. Most of the time you don't need to, but I found several cases when it's neccessary:

1. I need to change my wireless network

In case my signal is too low I need to reopen the wifi chooser dialog because I would like to connect to a network with better signal. I found out this can be achieved by restarting NWAM:

$ svcadm restart nwam

The wireless network chooser dialog pops up in a while and gives me the options again and I can choose a better wireless network.

2. I need to switch from wireless connection to ethernet or vice versa.

Sometimes I need to switch the way I am connected (e.g. I need to get on wireless because my cable doesn't have public internet access or I need to get switch to cable because my wireless is not good enough). To achieve that you can modify network priority in file /etc/nwam/llp. Here's how my llp file looks like:

yukonx0 dhcp
wpi0 dhcp

Yukonx0 and wpi0 are names of my drivers for the ethernet card and wireless. I can easily inverse the order if I need to give wireless connection a higher priority:

wpi0 dhcp
yukonx0 dhcp

I could also easily specify the static address for each of the interfaces if I would need it (instead of dhcp).

3. NWAM connects automatically to a wireless network that I don't want to use

NWAM uses another file called /etc/nwam/known_wifi_hosts. It contains names of recently used networks and their addresses. NWAM uses this file to attempt to connect automatically to a recently used network. If you want NWAM to forget about recent networks simply delete this file and it will show the wireless chooser dialog again instead of connecting automatically.

All these use cases and more will be much easier to achieve with the new NWAM GUI once it's part of the release - but even now you can have control over NWAM (and if you prefer the command line you already have a good user interface I suppose :)

If you have any other issues with NWAM, you can try reading the troubleshooting guide.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.