Network Auto-Magic » Troubleshooting Phase 1 NWAM
en

Troubleshooting Phase 1 NWAM

Is NWAM enabled?

To determine if NWAM is running, run:

# svcs physical

If NWAM is running, you should see:

STATE          STIME    FMRI
disabled       15:18:18 svc:/network/physical:default
online         16:44:23 svc:/network/physical:nwam

If you see

STATE        STIME    FMRI
online       15:18:18 svc:/network/physical:default
disabled     16:44:23 svc:/network/physical:nwam

...NWAM is not enabled; doing the following will fix this:

# svcadm disable network/physical:default
# svcadm enable network/physical:nwam

Wireless problems

First, ensure that your wireless device is present:

# dladm show-link

Now to determine if the wireless device can see any WLANs, run

# dladm scan-wifi

If the scan is picking up WLANs, we know wireless is working, so there may be an NWAM-specific problem.

Wireless/WEP/DHCP problems

Because of the way authentication works with WEP, there is no definitive indication of keying problems: if an incorrect key is given, the connection to the AP will succeed, but packets will not move. From the perspective of the nwam daemon, the connect operation succeeds, and then DHCP is started, but never acquires a lease. Since the DHCP protocol does not have a time limit, the DHCP client will continue to try to connect; in this case, there is no protocol-defined way to distinguish between an authentication failure and a missing/slow DHCP server.

If you suspect you might be running into this problem, confirm that you are connected:

# dladm show-wifi
LINK       STATUS            ESSID               SEC    STRENGTH   MODE   SPEED
wpi0       connected         foo                 wep    good       g      36Mb

 ...and that there are no responses coming from the DHCP server:

# ifconfig wpi0 dhcp status
Interface  State         Sent  Recv  Declined  Flags
wpi0       SELECTING        5     0         0  

To recover, you must delete the incorrect key, and restart the nwam service. It will then walk you through the process of choosing a WLAN and entering the key again.

Use the dladm command to delete the incorrect key. The name of the key will be in the format "nwam-<essid>". You can use dladm to see the names of all stored keys, as well:

# dladm show-secobj
OBJECT               CLASS
nwam-foo             wep
nwam-bar             wep
# dladm delete-secobj nwam-foo
#

After deleting the incorrect key, restart the nwam service:

# svcadm restart nwam

None of the above

If NWAM appears to be finding all your interfaces and attempting to bring them up, but you still don't have the expected network connectivity, it's often useful to know how far NWAM got in its attempt to bring things up. Some helpful things to check are:

  • The output of 'ipadm show-if' and 'ipadm show-addr': which interface(s) is/are in the 'ok' state?  What address objects have been configured, are they of the expected type (static vs. dhcp vs. addrconf), and are they in the 'ok' state?
  • For a wireless link, the output of 'dladm show-wifi': is the link connected to a WLAN?
  • The output of 'netstat -rn': do you have a default route?
  • Are name services set up properly? The typical dhcp-based configuration will include a file called /etc/resolv.conf, which configures DNS for network name resolution; does that file exist, with data entered in it?

Enable Debugging

Enabling debugging in NWAM can also help diagnosis. First, /etc/syslog.conf needs to be modified to ensure syslogging captures daemon debug messages. Add a line such as this (note that the syslog.conf fields must be TAB-separated, so if you copy and paste the text from this page, you'll probably need to manually insert a tab before the filename):

daemon.debug /var/tmp/nwam.log

followed by

# touch /var/tmp/nwam.log
# svcadm refresh system-log
# svcadm restart system-log

This tells syslog to dump daemon messages in /var/tmp/nwam.log. Now, enable debugging in NWAM:

# svccfg -s nwam setprop nwamd/debug = true
# svcadm refresh nwam

To restart and try and reproduce the problem, it may help to run

# svcadm restart nwam

When contacting nwam-discuss about problems, the debug log will be helpful in diagnosing the issue.

Tags:
Created by mph on 2010/04/19 17:57
Last modified by Renee Sommerfeld on 2011/07/06 22:27

XWiki Enterprise 2.7.1.34853 - Documentation