Connecting to the Internet

Basic Procedure

This section describes the basic procedure for connecting to the internet.

[Note]

If you have a wireless connection, or connect to the internet through a modem (including an ADSL modem), and this section does not work, you should read the section called “Wireless Cards” or the section called “ADSL Connections”.

To connect to the internet:

  1. Open System->Administration->Networking.

  2. Select the connection you wish to use, then click Properties.

  3. Ensure Enable this connection is turned on.

  4. If your ISP or network administrator has given you an IP address, set Configuration to Static IP address, then enter the address in the IP address field and click OK. Otherwise, set Configuration to DHCP and click OK.

  5. To activate or deactivate network connections, select your connection, then click Activate/Deactivate.

Wireless Cards

Many wireless cards are automatically detected by Ubuntu during installation. To see if your card is supported, open System->Administration->Networking. If your wireless card is listed, you can follow the section called “Basic Procedure” to connect to the internet. A complete listing of wireless cards which work with Ubuntu can be found online at the Ubuntu Wiki. Please add your wireless card to the list if it works with Ubuntu.

Some cards may not work automatically with Ubuntu. If this is the case, please look at the Wireless Troubleshooting Guide on the Ubuntu Wiki which is an excellent resource for troubleshooting wireless cards.

If your wireless card does not work with Ubuntu, you may have to do some research in order to activate it. A good way of getting a wireless card to work is to use the ndiswrapper tool which allows Ubuntu to use the Microsoft Windows driver for the wireless card. To do this, follow the instructions below in the section called “Windows Wireless Drivers”.

All other information regarding wireless networking on Ubuntu is collected at Wireless Networking Central on the Ubuntu Wiki.

Windows Wireless Drivers

Even if your wireless network card does not have a native Linux driver, you may still be able to get it working with ndiswrapper. Ndiswrapper is a Linux module which allows Ubuntu to use the Windows driver for wireless cards (in most cases).

[Note]

These instructions apply only to the x86 and AMD64 versions of Ubuntu, and not to Ubuntu for Power PC (PPC).

[Tip]

If you have access to the internet, you can see if your wireless cards is in the list of cards supported by ndiswrapper on the ndiswrapper website.

To install ndiswrapper, install the package ndiswrapper-utils (see Chapter 3, Adding, Removing and Updating Applications). This package is provided on the Ubuntu CD. If you have access to the internet, you can also optionally install a graphical tool, ndisgtk from the Universe repository (see ghelp:add-applications#extra-repositories).

In order to set up ndiswrapper, it is necessary to obtain the Windows driver for your wireless card. Generally, the best way to do this is from the CD supplied with your wireless card. You should copy two files to the same place on your computer, one ending in .SYS and one ending in .INF. If you find any files which end in .BIN, also copy those. If you are not able to find the right files, and have alternative access to the internet, you may be able to obtain help from the ndiswrapper website.

If you have installed the graphical tool ndisgtk, to set up ndiswrapper, simply select System->Administration-> Windows Wireless Drivers from the menu, and follow the instructions given.

If you have not installed the graphical tool, use this procedure:

  1. Open Applications->Accessories->Terminal and type:

    sudo ndiswrapper -i ~/Desktop/drivername.inf
    [Note]

    The above command assumes that your .INF file is named drivername.inf and was copied to your Desktop. Replace these values if necessary.

  2. To check if it is working correctly, type:

    ndiswrapper -l

    If it is working correctly, you should see:

    Installed ndis drivers:
    {name of driver}  driver present, hardware present

  3. For ndiswrapper to function, you need to load a module. To do this, type:

    sudo depmod -a
    sudo modprobe ndiswrapper

  4. To ensure that the module is loaded each time you boot the computer, type:

    sudo ndiswrapper -m

You should now be able to connect to the internet by following the instructions at the section called “Basic Procedure”.

ADSL Connections

All PPPOE and router-style ADSL modems that use an Ethernet connection are supported by Ubuntu, and some USB ADSL modems are supported too.

For a router-style ADSL modem, simply follow the section called “Basic Procedure”

For information on setting up a PPPOE ADSL modem see the section called “PPPoE Modems”.

For information on setting up a USB ADSL modem see the section called “USB ADSL Modems”.

PPPoE Modems

This section is about setting up an ADSL Internet connection using an ethernet PPPoE modem.

You will need to have subscribed to an Internet Service Provider, and your Internet connection must be installed and functional. A "DSL" light on your modem usually shows that the line is synchronized.

You will need your username and password for the account. You must also have an ethernet card connected to your PPPoE modem with the correct type of cable.

Finally, you need the PPPoE package to be installed in order for the following command to work. This package is installed by default, but can be missing if the configuration has been changed. If the following command does not work, you will need to install this package, which can be found on the Ubuntu CD.

To set up the modem:

  1. Open Applications->Accessories->Terminal

  2. In the terminal type:

    sudo pppoeconf
  3. A text-based menu program will guide you through the next steps, which are:

    1. Confirm that your Ethernet card is detected.

    2. Enter your username.

    3. Enter your password.

    4. If you already have a PPPoE Connection configured, you will be asked if it may be modified.

    5. Popular options: you are asked if you want the 'noauth' and 'defaultroute' options and to remove 'nodetach' - choose "Yes".

    6. Use peer DNS - choose "Yes".

    7. Limited MSS problem - choose "Yes".

    8. When you are asked if you want to connect at start up, you will probably want to say yes.

    9. Finally you are asked if you want to establish the connection immediately.

  4. Once you have finished these steps, your connection should be working.

To start your ADSL connection on demand, in a terminal type:

sudo pon dsl-provider

To stop your ADSL connection, in a terminal type:

sudo poff dsl-provider

USB ADSL Modems

Often parts of ADSL USB modem drivers are proprietary, closed source software, with a restrictive licence, and so the whole driver cannot be supplied with Ubuntu. To get a modem to work with these drivers, you will need to download files from Internet with a computer having a working connection, then transfer the downloaded files to you Ubuntu installation.

[Warning]

USB is far from the ideal medium for network access, if you have a modem that can connect both via USB and ethernet or a ethernet router, you should use the ethernet connection instead of the USB modem.

Since any USB modem installation will require Internet access to download the necessary proprietary drivers, as well as extensive configuration which is beyond the scope of this guide, all we can do here is to list the USB Modem models known to work with Ubuntu with links to the relevant installation instructions on the Ubuntu community help site.

The installation procedure of USB modems differs depending on the specific make and model of your modem. To identify model of your modem, Note the name and number on the front. Occasionaly you may have to look for a label to discover the exact model. Consult the list below to see which driver your modem requires and note the link.

When you go online to download the necessary drivers, you can access the relevant driver download links from the page with the installation instructions relevant to that model of USB modem.


Dialup Modems

Most dialup modems are not supported by Ubuntu, but drivers can be found that will enable the use of such modems. First you need to identify what chipset your dialup modem is using:

wget -c http://linmodems.technion.ac.il/packages/scanModem.gz 
gunzip -c scanModem.gz > scanModem 
chmod +x scanModem
sudo ./scanModem 
gedit Modem/ModemData.txt

Read this file, it should list what modem chipset you have. Once you are aware of the chipset you have, see http://www.linmodems.org/ and follow the directions for your modem. More infomation can be found at SettingUpModems on the Ubuntu Wiki.