Networking in Linux

Saturday, 26 November 2005, michuk

GNU/Linux is a networking system. It has been designed with networking in mind and it is prepared to handle multiple network models. What is a benefit for servers can be sometimes a real pain for desktops. Most Linux distributions more or less require an Internet connection (at least every now and then) for normal functioning. Newbies can be lost in Linux without the Internet access also because most of the knowledge (to solve their problems) is… in the Internet. Getting an Internet connection working is the first step to switch to GNU/Linux, so we’re going to cover this issue with special care.

Network interfaces

Each networking adapter in GNU/Linux, when activated, has an interface name assigned to it. The default interface names are:

  • eth0 — for first networking interface (usually an ethernet card),
  • ppp0 — a dial-up interface (for different modems like DSL, GPRS, softmodems, etc),
  • wlan0 — for wireless adapters.

These names are symbolic and they can be altered to anything else. The presented ones are the defaults in most of the distributions. The list of currently detected network adapters with the assigned interfaces can be obtained by issuing the following command:

ifconfig

For those who find it familiar — yes, this is the Windows shell equivallent of the command: ipconfig /all

Find out your type of connection

There are many possible types of connections and you need to know which is available at your place in order to be able to configure it. It’s possible that GNU/Linux does it for you automatically in case of simple network models, but if it doesn’t or can’t (e.g. because you need to enter some password or provide some extra driver) you need to take care of this yourself. So, if you don’t know what your connection type is, call the company which set it up for you or read the brochure they gave you when they installed it. It’s very likely that you have a cable or DSL connection since they are the most popular ones. We’re going to cover them first and then take a look at possible alternatives including many types of wireless connections as well.

Cable connection

Cable connection is the most popular way to access the Internet and the easiest to set up at the same type. Usually you don’t need to do anything, just connect the network cable to your computer. Everything else is done automatically by GNU/Linux, which always tries to discover the DHCP connections by itself. In case of problems, you can easily fix it manually.

Read more about setting up cable network connection in Linux.

(A)DSL connection

DSL or ADSL is another popular option for broadband Internet access. It is a bit more tricky to set up in GNU/Linux since most of the DSL modems require specific drivers, not all of them being available as free software. Still, the great majority of DSL modems are possible to be configured to work with GNU/Linux.

Read more about configuring DSL modems in GNU/Linux.

Wireless connection (WiFi access)

If you have a modern laptop it is likely that it comes with a built-in WiFi modem. If you are lucky (or did some research before buying one) and your modem is fully supported under GNU/Linux (the free software drivers are available) it may just work out-of-the-box. This is the case with Intel PRO/Wireless line of modems and many other. If you are not lucky (and performed no research) it may occur that the only way to get your WiFi working under GNU/Linux is by emulating the Windows drivers.

Read more about configuring wireless connection under GNU/Linux.

GPRS, EDGE, UTMS – connecting via cell phone

Linux can also use the mobile phone’s build-in modems in order to connect to the Internet. All you need is a fairly new phone and a Bluetooth or IRDA port in your computer or alternatively, an USB or firewire cable to connect your phone to your computer.

Read more about connecting to the Internet using a mobile phone modem.

Regular modems, ISDN

It may also be the case that you still have a regular or ISDN modem at home. These modems have been very popular in the 90-ties but during the last 10 years have been replaced with modern solutions based on cable or DSL. Still, if you own such a modem, it is possible to connect with it to the Internet (although the speed you get won’t be impressive at all.

Read more about using ISDN and old-school modems in GNU/Linux.