SI | EN

Navodila za Linux Pingo 3.x

Navodila so pisana za distribucijo Pingo Linux 3.x. Če uporabljate kakšno drugo distribucijo Linuxa, si lahko zgradite lastne pakete iz datotek .src.rpm, uporabite orodja, ki so priložena vaši distribuciji ali pa prenesete ustrezna orodja z njihovih spletnih strani.

Za vzpostavitev brezžične povezave se potrebuje:
  • Brezžično omrežno kartico, z Linux gonilnikom WPA(2)
  • Paket orodij "wireless-tools" različice 28 ali novejše (rpm) (src)
  • Odjemalec 802.1x "wpa_supplicant" različice 0.2.5-1 ali novejše (rpm) (src)
  • Ustrezni gonilnik, ki podpira WPA(2)
Delovanje pod Linuxom smo uspešno testirali z omrežnima karticama:
  • 3Com 11a/b/g Pc Card "Xjack" - 3CRPAG175
  • D-Link AirExpert 802.11a/b/g Pc Card - DWL-AG650

Obe kartici uporabljata čipovje Atheros, ki je podprt v gonilniku MadWifi.


1. Najprej namestimo pakete rpm Opozorilo: Uporabniki Pinga 3.0 boste lahko v kratkem te pakete namestili z orodjem synaptic ali v ukazni vrstici z orodjem apt. Več o posodabljanju in nameščanju paketov distribucije Pingo si preberite na njeni domači strani. Sicer pa je potrebno zgoraj omenjena paketa rpm najprej prenesti in potem namestiti:

[root@localhost paketi-rpm]# rpm -Uvh wpa_supplicant-0.2.5-1.arnes.1.i386.rpm \
wireless-tools-28-0.arnes.1.i386.rpm

Preparing... ########################################### [100%]
1:wireless-tools ########################################### [ 50%]
2:wpa_supplicant ########################################### [100%]

2. Pretočimo in namestimo gonilnik MadWifi oz. gonilnik za našo omrežno kartico

Najprej si pretočimo najnovejši gonilnik:

[uporabnik@localhost src]$ cvs -z3 \
-d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/madwifi co madwifi

cvs checkout: Updating madwifi
U madwifi/COPYRIGHT
U madwifi/Makefile
U madwifi/Makefile.inc
U madwifi/README
U madwifi/release.h
cvs checkout: Updating madwifi/ath
[...]
U madwifi/net80211/version.h
cvs checkout: Updating madwifi/net80211/linux
cvs checkout: Updating madwifi/patches
U madwifi/patches/README
cvs checkout: Updating madwifi/patches/2.4
U madwifi/patches/2.4/Config.in.patch
U madwifi/patches/2.4/Configure.help.patch
[uporabnik@localhost src]$

... in ga zgradimo (prevedemo za naše trenutno jedro sistema):

[uporabnik@localhost src]$ cd madwifi
[uporabnik@localhost madwifi]$ make
for i in ./ath_hal ath_rate/onoe ./net80211 ./ath; do \
(cd $i; make) || exit 1; \
done
make[1]: Entering directory `/home/uporabnik/work/src/madwifi/ath_hal'
cp ./../hal/linux/ah_osdep.c ah_osdep.c
uudecode ./../hal/linux/i386-elf.hal.o.uu
cp ./../hal/linux/i386-elf.opt_ah.h opt_ah.h
make -C /lib/modules/2.6.9-1.643.pingo.1/build \
SUBDIRS=/home/uporabnik/work/src/madwifi/ath_hal modules
make[2]: Entering directory `/lib/modules/2.6.9-1.643.pingo.1/build'
CC [M] /home/uporabnik/work/src/madwifi/ath_hal/ah_osdep.o
LD [M] /home/uporabnik/work/src/madwifi/ath_hal/ath_hal.o
Building modules, stage 2.
MODPOST
CC /home/uporabnik/work/src/madwifi/ath_hal/ath_hal.mod.o
LD [M] /home/uporabnik/work/src/madwifi/ath_hal/ath_hal.ko
[...]
CC /home/uporabnik/work/src/madwifi/ath/ath_pci.mod.o
LD [M] /home/uporabnik/work/src/madwifi/ath/ath_pci.ko
make[2]: Leaving directory `/lib/modules/2.6.9-1.643.pingo.1/build'
make[1]: Leaving directory `/home/uporabnik/work/src/madwifi/ath'
[uporabnik@localhost madwifi]$

Opozorilo: Za uspešno izgradnjo gonilnika madwifi potrebujete tudi orodje uudecode, ki se nahaja v paketu sharutils-4.2.1-18.rpm. Ker je gonilnik še v razvoju je možno, da se pri tem koraku izpišejo kakšna opozorila. Gonilnik nato namestimo (to moramo storiti kot uporabnik root, pri čemer nam pomaga ukaz "su"):

[uporabnik@localhost madwifi]$ su
Password:
[root@localhost madwifi]# make install
for i in ./ath_hal ath_rate/onoe ./net80211 ./ath; do \
(cd $i; make install) || exit 1; \
done
make[1]: Entering directory `/home/uporabnik/work/src/madwifi/ath_hal'
make -C /lib/modules/2.6.9-1.643.pingo.1/build \
SUBDIRS=/home/uporabnik/work/src/madwifi/ath_hal modules
make[2]: Entering directory `/lib/modules/2.6.9-1.643.pingo.1/build'
Building modules, stage 2.
MODPOST
[...]
make[2]: Leaving directory `/lib/modules/2.6.9-1.643.pingo.1/build'
test -d //lib/modules/2.6.9-1.643.pingo.1/net || \
mkdir -p //lib/modules/2.6.9-1.643.pingo.1/net
strip -S ath_pci.ko
cp ath_pci.ko //lib/modules/2.6.9-1.643.pingo.1/net
make[1]: Leaving directory `/home/uporabnik/work/src/madwifi/ath'
/sbin/depmod -ae
[root@localhost madwifi]#

3. Uredimo omrežni vmesnik ath0 Za delovanje DHCP (samodejno nastavljanje omrežnega vmesnika na ravni IP) moramo v datoteko /etc/sysconfig/network-scripts/ifcfg-ath0 vstaviti vsebino:

DEVICE=ath0
BOOTPROTO=dhcp
ONBOOT=no
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
IPV6INIT=no

Opozorilo: V primeru, da uporabljate kakšno drugo distribucijo, si za ta korak poglejte v njej priloženo dokumentacijo.

4. Nastavimo odjemalec 802.1x Datoteko /etc/wpa_supplicant.conf odpremo v urejevalniku in vnesemo ustrezne podatke:

     ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
network={
    ssid="eduroam"
    proto=WPA WPA2
    key_mgmt=WPA-EAP
    group=CCMP TKIP
    eap=TTLS
    anonymous_identity="anonymous@<domena.organizacije.si>"
    ca_cert="/etc/ssl/cacert.pem"
    phase2="auth=PAP"
    identity="<uporabnisko_ime@domena.organizacije.si>"
    password="<geslo>"
}

Z rdečo označeno besedilo morate zamenjati z ustreznimi podatki, ki jih dobite pri svoji domači organizaciji. Datoteko s certifikatom CA, ki ga uporablja vaša organizacija in jo je potrebno vpisati v polje ca_cert poiščite v imeniku /etc/ssl. Če je tam ni, certifikat poiščite na spletni strani ali pri pomoči uporabnikom vaše domače organizacije.

5. Vstavimo kartico Vstavite kartico PCMCIA v računalnik. Če računalnik kartice ne zazna, je možno da ni zaznal reže PCMCIA. Potem morate zagnati še naslednje ukaze:

[root@localhost root]# service pcmcia stop
Shutting down PCMCIA services: done.
[root@localhost root]# modprobe yenta_socket
[root@localhost root]# service pcmcia start
Starting PCMCIA services: cardmgr[2847]: watching 2 sockets
done.

6. Če je potrebno lahko nastavitev reže PCMCIA uredite ob zagonu z:

[root@localhost root]# echo "/sbin/modprobe yenta_socket" \
>> /etc/rc.modules

[root@localhost root]# chmod +x /etc/rc.modules

7. Z ukazom dmesg preverite ali je bila pravilno zaznana:

[root@localhost root]# dmesg
[...]
divert: allocating divert_blk for ath0
ath0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps
24Mbps 36Mbps 48Mbps 54Mbps
ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
ath0: mac 5.6 phy 4.1 radio 3.6
ath0: 802.11 address: 00:0d:87:c9:a8:5b
ath0: Use hw queue 0 for WME_AC_BE traffic
ath0: Use hw queue 1 for WME_AC_BK traffic
ath0: Use hw queue 2 for WME_AC_VI traffic
ath0: Use hw queue 3 for WME_AC_VO traffic
ath0: Atheros 5212: mem=0x10800000, irq=11
ip_tables: (C) 2000-2002 Netfilter core team

8. Preverite dostopnost omrežja:

[root@localhost root]# ifconfig ath0 allmulti up
[root@localhost root]# iwlist ath0 scan
ath0 Scan completed :
Cell 01 - Address: 00:0F:24:9A:96:D1
ESSID:"eduroam"
Mode:Master
Frequency:2.472 GHz (Channel 13)
Quality=0/94 Signal level=-95 dBm Noise level=-95 dBm
Encryption key:on
Bit Rate:1 Mb/s
Bit Rate:2 Mb/s
Bit Rate:5 Mb/s
Bit Rate:6 Mb/s
Bit Rate:9 Mb/s
Bit Rate:11 Mb/s
Bit Rate:12 Mb/s
Bit Rate:18 Mb/s
Bit Rate:24 Mb/s
Bit Rate:36 Mb/s
Bit Rate:48 Mb/s
Bit Rate:54 Mb/s
Extra:bcn_int=100
Extra:wpa_ie=dd180050e20101000050f10201000050f20201000030f2012800

Opozorilo: Ker so gonilniki še v razvoju vam lahko kdaj malce ponagajajo. Če vam ni zaznalo omrežja eduroam, pa bi vam moralo, je morda kriva motnjo v zaznavanju omrežja. V večini primerov pomaga, če kartico nekajkrat preklopite v način 802.11a in nazaj v samodejni način ali način 802.11b/g in šele potem pokličete "iwlist ath0 scan":

[root@localhost root]# iwpriv ath0 mode 3
[root@localhost root]# iwpriv ath0 mode 0

Prijava v omrežje Če ste v območju omrežja Eduroam se lahko sedaj prijavite v omrežje z ukazom (za bogatejši izpis lahko namesto stikala -B uporabite -d):

[root@localhost root]# wpa_supplicant -B -i ath0 -c \
/etc/wpa_supplicant.conf -D madwifi

9. Nastavite še vmesnik na nivoju IP z ukazom dhclient ath0:

[root@localhost root]# dhclient ath0
Internet Systems Consortium DHCP Client V3.0.1rc14
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP

Listening on LPF/ath0/00:0d:87:c9:a8:5b
Sending on LPF/ath0/00:0d:87:c9:a8:5b
Sending on Socket/fallback
DHCPREQUEST on ath0 to 255.255.255.255 port 67
DHCPACK from 10.0.0.1
SIOCADDRT: File exists
bound to 10.0.0.16 -- renewal in 63 seconds.

Sedaj ste povezani v omrežje.

10. Preverjanje povezave

These instructions are written for the Pingo Linux 3.x distribution. If you use any other Linux distribution you can design your own packages with the .src.rpm files, use the tools that are part of your distribution or transfer all tools required from their websites.

 

To establish a wireless connection the following is required:

The following network cards have been successfully tested with Linux:

  • 3Com 11a/b/g Pc Card "Xjack" - 3CRPAG175
  • D-Link AirExpert 802.11a/b/g Pc Card - DWL-AG650

 

Both cards use the Atheros chipset that is  supported by the MadWifi driver.

 


  1. First install the rpm packages Warning: Pingo 3.0 users will be able to instal these packages shortly, by using the synaptic tool or through a command line using the apt tool. You can read more on updating and installing the Pingo distribution packages on  its homepage. The rpm packages mentiond previously first need to be downloaded and then installed:

    [root@localhost paketi-rpm]# rpm -Uvh wpa_supplicant-0.2.5-1.arnes.1.i386.rpm \
    wireless-tools-28-0.arnes.1.i386.rpm
    Preparing... ########################################### [100%]
    1:wireless-tools ########################################### [ 50%]
    2:wpa_supplicant ########################################### [100%]
  2. Continue by downloading and installing the MadWifi driver or a driver for your network card.

    Begin by downloading the latest driver version:

    [uporabnik@localhost src]$ cvs -z3 \
    -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/madwifi co madwifi
    cvs checkout: Updating madwifi
    U madwifi/COPYRIGHT
    U madwifi/Makefile
    U madwifi/Makefile.inc
    U madwifi/README
    U madwifi/release.h
    cvs checkout: Updating madwifi/ath
    [...]
    U madwifi/net80211/version.h
    cvs checkout: Updating madwifi/net80211/linux
    cvs checkout: Updating madwifi/patches
    U madwifi/patches/README
    cvs checkout: Updating madwifi/patches/2.4
    U madwifi/patches/2.4/Config.in.patch
    U madwifi/patches/2.4/Configure.help.patch
    [uporabnik@localhost src]$

    ... and convert it (modify it for our current kemel)

    [uporabnik@localhost src]$ cd madwifi/
    [uporabnik@localhost madwifi]$ make
    for i in ./ath_hal ath_rate/onoe ./net80211 ./ath; do \
    (cd $i; make) || exit 1; \
    done
    make[1]: Entering directory `/home/uporabnik/work/src/madwifi/ath_hal'
    cp ./../hal/linux/ah_osdep.c ah_osdep.c
    uudecode ./../hal/linux/i386-elf.hal.o.uu
    cp ./../hal/linux/i386-elf.opt_ah.h opt_ah.h
    make -C /lib/modules/2.6.9-1.643.pingo.1/build \
    SUBDIRS=/home/uporabnik/work/src/madwifi/ath_hal modules
    make[2]: Entering directory `/lib/modules/2.6.9-1.643.pingo.1/build'
    CC [M] /home/uporabnik/work/src/madwifi/ath_hal/ah_osdep.o
    LD [M] /home/uporabnik/work/src/madwifi/ath_hal/ath_hal.o
    Building modules, stage 2.
    MODPOST
    CC /home/uporabnik/work/src/madwifi/ath_hal/ath_hal.mod.o
    LD [M] /home/uporabnik/work/src/madwifi/ath_hal/ath_hal.ko
    [...]
    CC /home/uporabnik/work/src/madwifi/ath/ath_pci.mod.o
    LD [M] /home/uporabnik/work/src/madwifi/ath/ath_pci.ko
    make[2]: Leaving directory `/lib/modules/2.6.9-1.643.pingo.1/build'
    make[1]: Leaving directory `/home/uporabnik/work/src/madwifi/ath'
    [uporabnik@localhost madwifi]$

    Warning: For a successful installation of the Madwifi driver you also need the uudecode tool which is included in the sharutils-4.2.1-18.rpm package. Because the driver is still being developed warning messages may appear. Continue by installing the driver (this has to be done as root user – the use of  the ''su'' command is helpful):

    [uporabnik@localhost madwifi]$ su
    Password:
    [root@localhost madwifi]# make install
    for i in ./ath_hal ath_rate/onoe ./net80211 ./ath; do \
    (cd $i; make install) || exit 1; \
    done
    make[1]: Entering directory `/home/uporabnik/work/src/madwifi/ath_hal'
    make -C /lib/modules/2.6.9-1.643.pingo.1/build \
    SUBDIRS=/home/uporabnik/work/src/madwifi/ath_hal modules
    make[2]: Entering directory `/lib/modules/2.6.9-1.643.pingo.1/build'
    Building modules, stage 2.
    MODPOST
    [...]
    make[2]: Leaving directory `/lib/modules/2.6.9-1.643.pingo.1/build'
    test -d //lib/modules/2.6.9-1.643.pingo.1/net || \
    mkdir -p //lib/modules/2.6.9-1.643.pingo.1/net
    strip -S ath_pci.ko
    cp ath_pci.ko //lib/modules/2.6.9-1.643.pingo.1/net
    make[1]: Leaving directory `/home/uporabnik/work/src/madwifi/ath'
    /sbin/depmod -ae
    [root@localhost madwifi]#
  3. Set up the network ath0 interface For DHCP to work (automatic configuring of the  network interface on IP level) the following contents need to be put in the file /etc/sysconfig/network-scripts/ifcfg-ath0:

    DEVICE=ath0
    BOOTPROTO=dhcp
    ONBOOT=no
    TYPE=Ethernet
    USERCTL=no
    PEERDNS=yes
    IPV6INIT=no

    Warning: In case you are using any other distribution check the documentation enclosed to complete this step.

  4. Instal the 802.1x client Open the file /etc/wpa_supplicant.conf in an editor tab and enter the following data:

    ctrl_interface=/var/run/wpa_supplicant
    ctrl_interface_group=0
    eapol_version=1
    ap_scan=1
    network={
        ssid="eduroam"
        proto=WPA WPA2
        key_mgmt=WPA-EAP
        group=CCMP TKIP
        eap=TTLS
        anonymous_identity="anonymous@<domena.organizacije.si>"
        ca_cert="/etc/ssl/cacert.pem"
        phase2="auth=PAP"
        identity="<uporabnisko_ime@domena.organizacije.si>"
        password="<geslo>"
    }

    The writing in red needs to be replaced with the suitable data acquired from your home organisation. The CA certificate file used by your organisation can be found in the /etc/ssl directory and must be entered in the ca_cert field. If it is not there, find the certificate on the website or at the user support department of your home organisation.

  5. Insert card Insert the PCMCIA card in to the computer. If the computer does not recognize the card, it is possible it hasn't registered the PCMCIA slot. In this case the following commands must be run:

    [root@localhost root]# service pcmcia stop
    Shutting down PCMCIA services: done.
    [root@localhost root]# modprobe yenta_socket
    [root@localhost root]# service pcmcia start
    Starting PCMCIA services: cardmgr[2847]: watching 2 sockets
    done.

    If neccessary, the PCMCIA slot configuration can be done by running the following:

    [root@localhost root]# echo "/sbin/modprobe yenta_socket" \
    >> /etc/rc.modules
    [root@localhost root]# chmod +x /etc/rc.modules

    With the dmesg command you can check if it was properly registered:

    [root@localhost root]# dmesg
    [...]
    divert: allocating divert_blk for ath0
    ath0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps
    24Mbps 36Mbps 48Mbps 54Mbps
    ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
    ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
    6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
    ath0: mac 5.6 phy 4.1 radio 3.6
    ath0: 802.11 address: 00:0d:87:c9:a8:5b
    ath0: Use hw queue 0 for WME_AC_BE traffic
    ath0: Use hw queue 1 for WME_AC_BK traffic
    ath0: Use hw queue 2 for WME_AC_VI traffic
    ath0: Use hw queue 3 for WME_AC_VO traffic
    ath0: Atheros 5212: mem=0x10800000, irq=11
    ip_tables: (C) 2000-2002 Netfilter core team

    Go to the site from where you can connect to the Eduroam network, enable your wireless card and check network access:

    [root@localhost root]# ifconfig ath0 allmulti up
    [root@localhost root]# iwlist ath0 scan
    ath0 Scan completed :
    Cell 01 - Address: 00:0F:24:9A:96:D1
    ESSID:"eduroam"
    Mode:Master
    Frequency:2.472 GHz (Channel 13)
    Quality=0/94 Signal level=-95 dBm Noise level=-95 dBm
    Encryption key:on
    Bit Rate:1 Mb/s
    Bit Rate:2 Mb/s
    Bit Rate:5 Mb/s
    Bit Rate:6 Mb/s
    Bit Rate:9 Mb/s
    Bit Rate:11 Mb/s
    Bit Rate:12 Mb/s
    Bit Rate:18 Mb/s
    Bit Rate:24 Mb/s
    Bit Rate:36 Mb/s
    Bit Rate:48 Mb/s
    Bit Rate:54 Mb/s
    Extra:bcn_int=100
    Extra:wpa_ie=dd180050e20101000050f10201000050f20201000030f2012800

    Warning: Since the drivers are still in development some instabilities may occur. If the Eduroam network hasn't been detected these instabilities might be the cause. In most cases it helps to switch the card several times to 802.11a and back to the automatic or 802.11b/g and only then try the ''iwlist ath0 scan'':

    [root@localhost root]# iwpriv ath0 mode 3
    [root@localhost root]# iwpriv ath0 mode 0
    [root@localhost root]# iwpriv ath0 mode 3
    [root@localhost root]# iwpriv ath0 mode 0
  6. Connecting to the network If you are in the Eduroam network area you can now connect to the network by entering (for more details use the –d switch instead of -B):

    [root@localhost root]# wpa_supplicant -B -i ath0 -c \
    /etc/wpa_supplicant.conf -D madwifi

    Continue installing an interface at the IP level by entering the dhclient ath0 command:

    [root@localhost root]# dhclient ath0
    Internet Systems Consortium DHCP Client V3.0.1rc14
    Copyright 2004 Internet Systems Consortium.
    All rights reserved.
    For info, please visit http://www.isc.org/products/DHCP

    Listening on LPF/ath0/00:0d:87:c9:a8:5b
    Sending on LPF/ath0/00:0d:87:c9:a8:5b
    Sending on Socket/fallback
    DHCPREQUEST on ath0 to 255.255.255.255 port 67
    DHCPACK from 10.0.0.1
    SIOCADDRT: File exists
    bound to 10.0.0.16 -- renewal in 63 seconds.

    You are now connected to the network.

  7. Checking the connection The connection can be checked by the ping www.arnes.si command.

    # ping www.arnes.si
    PING kanin.arnes.si (193.2.1.87): 56 data bytes
    64 bytes from 193.2.1.87: icmp_seq=0 ttl=253 time=1.831 ms
    64 bytes from 193.2.1.87: icmp_seq=1 ttl=253 time=5.859 ms
    64 bytes from 193.2.1.87: icmp_seq=2 ttl=253 time=2.626 ms
    64 bytes from 193.2.1.87: icmp_seq=3 ttl=253 time=2.407 ms
    64 bytes from 193.2.1.87: icmp_seq=4 ttl=253 time=1.175 ms --- kanin.arnes.si ping statistics --- 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max/stddev = 1.175/2.780/5.859/2.745 ms