Results 1 to 6 of 6

Thread: Configure WiFi on Linux

  1. #1
    Join Date
    Aug 2005
    Posts
    293

    Configure WiFi on Linux

    If you are using Linux operating system, this guide will help you to configure WiFi on your Linux.

    There are 4 steps included -

    STEP 1 : Diagnosis

    STEP 2 : If the card is not supported (perform this step before proceeding further)

    STEP 3 : Configure the card
    • In WEP
    • With WPA


    STEP 4 : Connect the card to Access Point

  2. #2
    Join Date
    Aug 2005
    Posts
    293

    Re: Configure WiFi on Linux

    STEP 1 : Diagnosis

    Wifi cards are increasingly recognized and often works directly. The wifi is configured with iwconfig, which belongs to the wireless-tools package.

    Under debian, this package is not present by default .
    To install :
    sudo aptitude update
    sudo aptitude safe-upgrade
    sudo aptitude install wireless-tools


    Obviously, it requires another way to connect (say ethernet ,..).
    Otherwise, you may have to note the address of the packet aptitude, trying to download, get them (for example in a system, or Wi-Fi works) and put them in /var/cache/apt/archives.
    Then type the command : sudo aptitude install wireless-tools

    Liston cards are now available. On laptops, make sure that the switch on the wireless card is enabled (the LED should be lit even if Linux does not mean much) :

    (mando @ cenedra) (~) $ /sbin/iwconfig
    no wireless extensions.

    eth0 no wireless extensions.

    wmaster0 no wireless extensions.

    eth1 IEEE 802.11g ESSID: "xxxxx" Nickname: ""
    Mode: Managed Frequency: 2.412 GHz Access Point: xx:xx:xx:xx:xx:xx
    Bit Rate=48 Mb/s Tx-Power=27 dBm
    Retry min limit:7 RTS thr:off Fragment thr=2346 B
    Power Management:off
    Link Quality=57/100 Signal level=-74 dBm Noise level=-96 dBm
    Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
    Tx excessive retries:0 Invalid misc:0 Missed beacon:0


    In this example, everything goes well, a map called eth1 wifi was found. According to the machine and the mark, the card can be named differently (eth2, wlan0, ra0, ...). The only thing that matters is what appears in iwconfig. If the card does not appear in iwconfig, it means that the card is not supported. In this case, proceed to the second stage, otherwise directly go to the third step.

  3. #3
    Join Date
    Aug 2005
    Posts
    293

    Re: Configure WiFi on Linux

    STEP 2 : If the card is not supported

    If the card is not recognized, we must try to support it by brand:

    Search for linux drivers

    For ralink :

    (mando @ cenedra) (~) $ apt-cache search ralink
    RT2400-source - source for rt2400 wireless network driver
    rt2500-source - source for rt2500 wireless network driver
    rt2570-source - source for rt2570 wireless network driver

    For Atheros : using madwifi

    For Intel : You must install the firmware
    (remember to add the non-free repositories in / etc / apt / sources.list if these packages do not appear):

    (mando @ Aldura) (~) $ apt-cache search firmware | grep-i intel | grep-i firmware
    firmware-ipw2x00 - Binary firmware for Intel Pro Wireless 2100, 2200 and 2915
    firmware-iwlwifi - Binary firmware for Intel Wireless 3945 and 4965


    Note - If you have Windows drivers, you can convert the windows driver with ndiswrapper.

  4. #4
    Join Date
    Aug 2005
    Posts
    293

    Re: Configure WiFi on Linux

    STEP 3 : Configure the card

    The next and the important step is to configure the WiFi card.
    Lets assume that the access point dynamically distributes an IP address, roads, DNS, (via DHCP) which is mainly the case for wireless access points (box in particular).

    You can configure the WiFi card with any of the following 2 options -
    • In WEP
    • With WPA


    In WEP

    Simply edit the file /etc/network/interfaces in accordance with this example by typing as root or with sudo:

    sudo nano /etc/network/interfaces

    Then, change the section on the card (eth1 here) without affecting the rest:

    auto eth1
    iface eth1 inet dhcp
    wireless-essid Mon_EssiD
    wireless-key 1234567890ABCDEF


    ... where 1234567890ABCDEF means the WEP key.

    Note - Make sure you are case sensitive when entering the ESSID.

    Save and Exit.

  5. #5
    Join Date
    Aug 2005
    Posts
    293

    Re: Configure WiFi on Linux

    With WPA

    Configuring the card with WPA is just more complicated than in WEP.
    You must first install wpa_supplicant. Suppose this package is missing and if only the wifi connection is possible, then repeat the process in the first step to recover wpasupplicant and its dependencies:
    sudo aptitude install wpasupplicant

    Then correct /etc/network/interfaces :
    sudo nano /etc/network/interfaces

    Change the section for the wireless card (eth1 here):

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


    Now configure wpasupplicant:
    sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

    In this file, put :

    ctrl_interface=/var/run/wpa_supplicant
    eapol_version=1
    ap_scan=1
    fast_reauth=1

    network=(
    ssid="Mon_EssiD"
    scan_ssid=1
    proto=WPA
    key_mgmt=WPA-PSK
    psk=1234567890ABCDEF
    priority=5
    )


    ... where 1234567890ABCDEF means the WPA.

    Make sure you are case sensitive when entering the ESSID.

    Save and Exit.

  6. #6
    Join Date
    Aug 2005
    Posts
    293

    Re: Configure WiFi on Linux

    STEP 4 : Connect to access point

    The final step is to connect the WiFi card to Access Point

    Prepare the router.

    • For holders of a freebox, make sure the wifi is enabled on the web interface of freebox and you are in router mode.
    • If you are in modem mode, remember to configure the port you need.
    • For holders of livebox, press the button the LED flashes wifi (at the bottom of the livebox, or back of the livebox)
    • For holders of wifi routers (that performs filtering on the MAC address), first add the MAC address of your wireless card in the list of interfaces allowed by your router, by connecting with ethernet or USB interface of your router .

    You can retrieve this address with the ifconfig command:

    (mando@cenedra) (~) $ /sbin/ifconfig
    ...
    eth1 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
    inet addr:192.168.0.13 Bcast:192.168.0.255 Mask:255.255.255.0
    ...


    Connect the interface.

    Since / etc / network / interfaces is ready, we can directly use ifup and ifdown :
    sudo ifup eth1

    ifup - connects the interface.
    ifdown - disconnects the interface.

    Note that this is equivalent to:

    sudo ifconfig eth1 up
    sudo dhclient eth1


    If everything works well, it might look like this:

    (mando@cenedra) (~) $ sudo dhclient eth1
    [sudo] password for root:
    Internet Systems Consortium DHCP Client V3.0.6
    Copyright 2004-2007 Internet Systems Consortium.
    All rights reserved.


    wmaster0: unknown hardware address type 801
    wmaster0: unknown hardware address type 801
    Listening on LPF/eth1/00: 19:d2:4d:2e:f5
    Sending on LPF/eth1/00: 19:d2:4d:2e:f5
    Sending on Socket / fallback
    DHCPREQUEST of 192.168.0.13 on eth1 to 255.255.255.255 port 67
    ....
    DHCPACK of 192.168.0.13 from 192.168.0.254
    bound to 192.168.0.13 -- renewal in 343576 seconds

    Here the wireless card has received the local IP 192.168.0.13

    A priori, if the DHCPACK walked, everything should be good because it has also received routes and DNS.
    To make sure :
    /sbin/route-n
    cat/etc/resolv.conf

Similar Threads

  1. How to configure a wifi usb nic on Linux
    By Abhiroopa in forum Networking & Security
    Replies: 5
    Last Post: 30-12-2010, 12:04 AM
  2. How to configure ipad wifi
    By Kallola in forum Portable Devices
    Replies: 5
    Last Post: 28-12-2010, 12:12 AM
  3. How to configure Wifi on YDL 6?
    By Simpson in forum Networking & Security
    Replies: 2
    Last Post: 05-06-2009, 08:53 AM
  4. Need help to configure a WiFi router
    By Kelewyn in forum Networking & Security
    Replies: 2
    Last Post: 03-04-2009, 03:00 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,002,595.06154 seconds with 16 queries