个人工具

“UbuntuHelp:WifiDocs/WirelessNetworkOfUniversityOfMaastricht”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(新页面: {{From|https://help.ubuntu.com/community/WifiDocs/WirelessNetworkOfUniversityOfMaastricht}} {{Languages|UbuntuHelp:WifiDocs/WirelessNetworkOfUniversityOfMaastricht}} == How to Connect to ...)
 
第3行: 第3行:
 
== How to Connect to the wireless MAASnet network of the University of Maastricht ==
 
== How to Connect to the wireless MAASnet network of the University of Maastricht ==
  
I have only tried this guide for Edgy but it will work for Dapper as well with high probability.
+
I have only tried this guide for Edgy and Feisty but it will work for Dapper as well with high probability.
  
 
If you run Ubuntu / Linux and want to connect to the Wireless Network of Maastricht and you have any questions / problems you can contact me : Email: [[MailTo(ubuntu-demon AT SPAMFREE ubuntu DOT com)]]
 
If you run Ubuntu / Linux and want to connect to the Wireless Network of Maastricht and you have any questions / problems you can contact me : Email: [[MailTo(ubuntu-demon AT SPAMFREE ubuntu DOT com)]]
第34行: 第34行:
 
</nowiki></pre>
 
</nowiki></pre>
  
Replace ''12345678901234567890123456'' by any string of 26 numbers
+
* Replace ''12345678901234567890123456'' by any string of '''random''' 26 numbers for security
Replace ''"i******"'' by your student ID number
+
* Replace ''"i******"'' by your student ID number
Replace ''"*******"'' by your student password (which is the same as for email)
+
* Replace ''"*******"'' by your student password (which is the same as for email)
  
 
This show you all your network interfaces :
 
This show you all your network interfaces :
第45行: 第45行:
 
Now make sure all your networkinterfaces are down :
 
Now make sure all your networkinterfaces are down :
 
<pre><nowiki>
 
<pre><nowiki>
$sudo ifdown ''eth0''
+
$sudo ifdown eth0
$sudo ifdown ''eth1''
+
$sudo ifdown eth1
 
.....
 
.....
 
.....
 
.....
 
</nowiki></pre>
 
</nowiki></pre>
Replace ''eth0'' and ''eth1'' for your network interfaces that are up (except ''lo'').
+
Replace eth0 and eth1 for your network interfaces that are up (except lo).
  
Now to actually try to connect to the network :
+
Now to actually try to connect to the network (add more D's for more debugging) :
  
 
<pre><nowiki>
 
<pre><nowiki>
$ sudo wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -i''eth1'' -D''wext''
+
$ sudo wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -i eth1 -D wext
 
</nowiki></pre>
 
</nowiki></pre>
  
Replace ''eth1'' with your wireless interface. $iwconfig will show you your wireless interface(s).
+
Replace eth1 with your wireless interface. $iwconfig will show you your wireless interface(s).
  
Replace ''wext'' with your the wpa-driver you need.
+
Replace wext with your the wpa-driver you need.
  
 
Try ''wext'' if you don't know which one to use. Here's a bit more information from /usr/share/doc/README.modes :
 
Try ''wext'' if you don't know which one to use. Here's a bit more information from /usr/share/doc/README.modes :
第128行: 第128行:
  
 
# The loopback network interface
 
# The loopback network interface
auto ''lo''
+
auto lo
iface ''lo'' inet loopback
+
iface lo inet loopback
  
auto ''eth1''
+
auto eth1
iface ''eth1'' inet dhcp
+
iface eth1 inet dhcp
wpa-driver ''wext''
+
wpa-driver wext
 
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
 
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
 
</nowiki></pre>
 
</nowiki></pre>
  
Don't remove the  ''lo'' lines. You can choose to comment all other lines. Add these four relevant lines for your wireless interface.
+
Don't remove the  lo lines. You can choose to comment all other lines. Add these four relevant lines for your wireless interface.
  
Replace ''eth1'' by your wireless interface.
+
Replace eth1 by your wireless interface.
Replace ''wext'' by the wpa-driver that works best with your wireless card.  
+
Replace wext by the wpa-driver that works best with your wireless card.  
  
 
This shows you all your network interfaces :
 
This shows you all your network interfaces :
第149行: 第149行:
 
Now make sure all your networkinterfaces are down :
 
Now make sure all your networkinterfaces are down :
 
<pre><nowiki>
 
<pre><nowiki>
$sudo ifdown ''eth0''
+
$sudo ifdown eth0
$sudo ifdown ''eth1''
+
$sudo ifdown eth1
 
.....
 
.....
 
.....
 
.....
第160行: 第160行:
  
 
<pre><nowiki>
 
<pre><nowiki>
$sudo ifup ''eth1''
+
$sudo ifup eth1
 
</nowiki></pre>
 
</nowiki></pre>
  
 
You can find wpasupplicant documentation in /usr/share/doc/wpasupplicant. Some documentation is compressed. To uncompress it :
 
You can find wpasupplicant documentation in /usr/share/doc/wpasupplicant. Some documentation is compressed. To uncompress it :
 
<pre><nowiki>
 
<pre><nowiki>
$gunzip ''filename.gz''
+
$gunzip filename.gz
 
</nowiki></pre>
 
</nowiki></pre>
  

2007年11月21日 (三) 17:25的版本

How to Connect to the wireless MAASnet network of the University of Maastricht

I have only tried this guide for Edgy and Feisty but it will work for Dapper as well with high probability.

If you run Ubuntu / Linux and want to connect to the Wireless Network of Maastricht and you have any questions / problems you can contact me : Email: MailTo(ubuntu-demon AT SPAMFREE ubuntu DOT com)

network-manager (WifiDocs/NetworkManager) is able to connect to most normal wireless networks. It's very userfriendly. Sadly network-manager isn't able to connect to the MAASnet network yet (as far as I know). This means we have to configure the network by hand.

First install wpasupplicant by (you need internet for this) :

$sudo aptitude install wpasupplicant

Or download it (so you can burn it on a cd) for Dapper from http://packages.ubuntu.com/dapper/net/wpasupplicant Or download it (so you can burn it on a cd) for Edgy from http://packages.ubuntu.com/edgy/net/wpasupplicant

You have to edit 2 files : /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf

$gksudo gedit /etc/wpa_supplicant/wpa_supplicant.conf

And make it look like this /etc/wpa_supplicant/wpa_supplicant.conf :

network={
ssid="MAASnet"
key_mgmt=IEEE8021X
wep_key0=12345678901234567890123456
phase2="auth=MSCHAPV2"
identity="i******"
password="*******"
}
  • Replace 12345678901234567890123456 by any string of random 26 numbers for security
  • Replace "i******" by your student ID number
  • Replace "*******" by your student password (which is the same as for email)

This show you all your network interfaces :

$ifconfig
$iwconfig

Now make sure all your networkinterfaces are down :

$sudo ifdown eth0
$sudo ifdown eth1
.....
.....

Replace eth0 and eth1 for your network interfaces that are up (except lo).

Now to actually try to connect to the network (add more D's for more debugging) :

$ sudo wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -i eth1 -D wext

Replace eth1 with your wireless interface. $iwconfig will show you your wireless interface(s).

Replace wext with your the wpa-driver you need.

Try wext if you don't know which one to use. Here's a bit more information from /usr/share/doc/README.modes :


1. Specifying the wpa_supplicant driver backend
===============================================

The wext driver backend will be used for all interfaces that do not explicitly
set 'wpa-driver' to the driver type required for that device. Users of linux
2.4 kernels, or 2.6 kernels less than 2.6.14 will be required to specify a
wpa-driver type.

Table of supported drivers
==========================

A summary of supported drivers follows:

Driver          Description
=======          ============
hostap          Host AP driver (Intersil Prism2/2.5/3)
madwifi         MADWIFI 802.11 support (Atheros, etc.)
atmel           ATMEL AT76C5XXx (USB, PCMCIA)
wext            Linux wireless extensions (generic)
ndiswrapper     Linux ndiswrapper
ipw             Intel ipw2100/2200 driver
wired           wired Ethernet driver
test            test driver

Common Driver Recommendations
=============================

The Intel Pro Wireless adapters (ipw2100, ipw2200 and ipw3945) all use the
'wext' backend, unless your kernel is older than 2.6.14.

Madwifi supports both the 'wext' and 'madwifi' driver backends, but 'wext' is
preferred.

Ndiswrapper NO LONGER SUPPORTS the 'ndiswrapper' driver backend as of version
1.16. Therefore, 'wext' must be used unless you use an outdated ndiswrapper
release.

Set the driver type in the interfaces(5) stanza for your device with the
'wpa-driver' option. For example:

iface eth0 inet dhcp
wpa-driver wext
. . . . . more options

If something goes wrong try to change the wpa-driver or dive into wpasupplicant's debugging mode :

$ sudo wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -i eth1 -D wext -d

Once you get something like "successful" remember the wpa-driver you used and press ctrl+c.

Now edit your /etc/network/interfaces by :

$gksudo gedit /etc/network/interfaces

/etc/network/interfaces :

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

auto eth1
iface eth1 inet dhcp
wpa-driver wext
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Don't remove the lo lines. You can choose to comment all other lines. Add these four relevant lines for your wireless interface.

Replace eth1 by your wireless interface. Replace wext by the wpa-driver that works best with your wireless card.

This shows you all your network interfaces :

$ifconfig
$iwconfig

Now make sure all your networkinterfaces are down :

$sudo ifdown eth0
$sudo ifdown eth1
.....
.....

Replace eth0 and eth1 for your network interfaces that are up (except lo).

Now let's hope it works (replace eth1 for your wireless interface :

$sudo ifup eth1

You can find wpasupplicant documentation in /usr/share/doc/wpasupplicant. Some documentation is compressed. To uncompress it :

$gunzip filename.gz

More general wireless documentation : WifiDocs

If you run Ubuntu / Linux and want to connect to the Wireless Network of Maastricht and you have any questions / problems you can contact me : Email: MailTo(ubuntu-demon AT SPAMFREE ubuntu DOT com)