特殊:Badtitle/NS100:WifiDocs/WiFiTroubleshooting

来自Ubuntu中文
Wikibot留言 | 贡献2007年12月6日 (四) 15:51的版本
跳到导航跳到搜索
可打印版本不再受到支持且可能有渲染错误。请更新您的浏览器书签并改用浏览器默认打印功能。

{{#ifexist: :WifiDocs/WiFiTroubleshooting/zh | | {{#ifexist: WifiDocs/WiFiTroubleshooting/zh | | {{#ifeq: {{#titleparts:WifiDocs/WiFiTroubleshooting|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:WifiDocs/WiFiTroubleshooting|1|-1|}} | zh | | }}

I think this page should be merged with: WifiDocs/WirelessTroubleShootingGuide A lot of people seem to have some problems with setting up their wireless. As Ubuntu's Wiki already supplies Howtos for setting up wireless, I just want to add a small howto for troubleshooting those networks.

  1. Plug in your card and restart the computer.
  2. Check whether the card hardware can be seen. Note the reported model number and manufacturer (which may be different from what is written on the manufacturers label). This information can help when tracking down driver issues). For PCI cards use
      $ lspci
  3. (Esp. for notebooks) Look at the output of the messages as you insert the PCMCIA card. Something should happen. You should be able to see that the drivers are loaded or a statement that the driver is already loaded
      $ tail -f /var/log/messages
  4. Check the wireless extension output. Have a look whether there is a wireless extension available on any network adapter; there should be at least one if you have inserted a wireless card
      $ iwconfig
    Note some information is only printed if iwconfig is run as root ("sudo iwconfig").
  5. Bring up your wireless interface and see what happens (for help on mailing lists, please post the output of the command)
    $ sudo ifup <ath0>
  6. If so far everything works, the card should send DHCP Requests to the broadcast IP. If you have not got this far, you're most likely to have a problem with your wireless card driver! And that's a problem by its own ;)
  7. Look again at the output of 'iwconfig'. The MAC address of the Access Point should be stated there near the first line. That shows that the card is able to "see" the AP (access point e.g. the router). You may need to use open security mode instead of restricted depending on the setup of your AP ('iwconfig wlan0 key open PASSWORD'). If you want to write the key in ASCII use 's:' e.g. 'iwconfig wlan0 key restricted s:password'. Set the network name
  8. **WHAT MOST PEOPLE FORGET** Check whether the AP can "see" you! Log into your AP and check the logfiles. The MAC of your wireless card should appear there somewhere.
  • If this is not the case then you most likely have mismatching wireless settings: Check 'iwconfig' for "Rx invalid nwid" (wrong ESSID), "Rx invalid crypt" (mismatching authentification method/key), "Rx invalid frag" (I haven't got a clue).
  • Usually they show up all together, which should tell you to check your config! Have a look at '/etc/network/interfaces' (post the output for further inquiries) and compare the settings to the configuration of your AP.
  • In case the settings don't match, change the interfaces file and change the setting with the according iwconfig command (see '$ man iwconfig')
  • If your settings match, one possibility is to try another wireless card if you can.
  1. Check the wireless data rate with 'iwconfig'. With 6.06/Dapper, the default rate seems set at 1 Mbit/sec. Most APs prefer 11M or 54M. Set this manually by
    $ iwconfig <interface> rate 11M
    Change permanently by adding a line
    wireless-rate 11M
    into /etc/network/interfaces.
  2. If you are connecting to an Ad Hoc (peer-to-peer) network, such as another computer with a peer-to-peer network set up, you'll need to set this manually by
    $ iwconfig <interface> mode Ad-Hoc
  3. If your card sees the AP and the AP sees you, you are likely to have a problem within your network, as this state compares to a plugged-in wire where both interfaces (and the wire) work perfectly fine.
  • If you don't get an IP check your DHCP Server settings

$ less /etc/dhcp3/dhcpd.conf

  • If you have an IP try pinging your Server to see whether the connection is OK

$ ping <your server's IP>

  • If you can ping the server there must be a problem with your service settings. But that has nothing to do anymore with your wireless (so I can finally stop here) ;)