Last Review: May-02-2014

Some remarks on Debian based Linux networking defaults

or how to get your network hardware running (October 2013, updated May 2014)

Installing a Debian based Linux distribution can result in some surprises when you want to connect your machine to a network. There seems to be a differece in handling resp. defaulting networking hardwares, so the recipes of the past aren't valid any more. I learned that with my hardwares working up to now correctly but refusing any activities being connected to a newly installed operating system. This affected both ethernet and wifi cards. This article applys to the named kind of hardwares and Debian based Linux distributions using the widely spread NetworkManager software.


In the older days you've put up a system, plugged in an ethernet cable coming from a connection-ready router, configured your network/IP settings and after a few seconds you've been online. Now you stay offline, the network does not work although you did the same things as for years. I experienced this effect on two different (older) machines with different hardwares, a desktop and a laptop, when testing several Linux distributions.

This is no fun at all until you find the solution. It's really simple: Just edit the configurations file /etc/NetworkManager/NetworkManager.conf and change the ifupdown managed value to true as shown in the picture below:



Restart your machine or NetworkManager itself (sudo service network-manager restart) and you can work with ethernet in the familiar way.

In some cases this isn't enough (namely if you use static IPs) because it is not possible to (re)configure the network interfaces within NetworkManger's "Edit Connections" in a sustainable way. To get a running network edit the file /etc/network/interfaces to provide your interfaces configuration as shown in this example:

# 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

# Ethernet
auto eth0
iface eth0 inet static

# Wireless
iface wlan0 inet static

This example might use other IP sets than your system, so be sure to use the correct ones! Every entry names the target network interface and you can configure a multitude of interfaces for your machine. Ethernet devices are named eth* while wireless devices are called wlan*; the asterisk indicates a number, the first device is numbered 0. This can be important for example with laptops having an incompatible internal wireless card when using an external wireless device (wlan1). If you want to use a device at startup the line "auto devicename" will fire it up automatically.

Wifi (W-LAN)

My laptop has a built-in Intel Wifi card, which wasn't good for Linux from the beginning so Wifi connections were made with the famous Zyxel Zyair G-202 USB stick. In the older days I plugged in this stick fired up my Linux and everything was fine. Now nothing was fine since NetworkManager claimed all of my Wifi hardwares were blocked by a hardware switch. Well - a laptops internal Wifi could be blocked but the Zyair G-202 surely not. So what the heck happened?

I believe that presently Linux defaults to the first Wifi card found on the system and stays with it regardless of any other findings. Nowadys the Zyair G-202 is a bit outdated so I first thought, its driver has been dropped, but you will see that this wasn't the problem.

Apparently the kernel has loaded the driver module for the Intel Wifi card while nothing was done for the Zyair G-202. I remembered the word blacklisting (a possibility to exclude driver modules from loading) and searched the net. The first information was to edit the file /etc/modprobe.d/blacklist but this file did not exist on my system, creating and editing it was'nt successful too... Below there is a two-step solution:

1) Get hardware ID numbers

First we need to identify the involved hardwares. We do this using console commands. The following listings only show relevant output, so you may see more information on your display. For better reading targets are marked red and console output begins with ╚==>.

For PCI devices:

We want lspci to show us textual and numeric device ID's and the corresponding kernel drivers, having the output filtered for "net" (not case sensitive) and showing the following two lines of text for each hit:

user@workstation:~$ lspci -nnk | grep -i net -A2

╚==> 01:00.0 Network controller [0280]: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection [8086:4222] (rev 02)

For USB devices:

lsusb gives us a list of the known USB devices:

user@workstation:~$ lsusb

╚==> Bus 003 Device 002: ID 0586:3410 ZyXEL Communications Corp. ZyAIR G-202 802.11bg

The ID numbers needed are groups of two four-character-blocks separated by a colon. We need them to get the names of the corresponding drivers. We can ask modprobe to show the known kernel driver(s) for such an ID, as here shown for the network controller of the first example; the -i parameter for grep searches case insensitively which is important if the ID strings contain alphabetic characters. Since the two parts of our ID strings are only parts in longer strings within the list of results we have to look for two strings separated by one, more or zero of any characters exept end of lines.

user@workstation:~$ sudo modprobe -c | grep -i "8086.*4222"

╚==> alias pci:v00008086d00000891sv*sd00004222bc*sc*i* iwlwifi
     alias pci:v00008086d00004222sv*sd*bc*sc*i* iwl3945
     alias pci:v00008086d00004222sv*sd00001005bc*sc*i* iwl3945
     alias pci:v00008086d00004222sv*sd00001034bc*sc*i* iwl3945
     alias pci:v00008086d00004222sv*sd00001044bc*sc*i* iwl3945

We get two drivers, this seems to be a wide-spread peace of hardware. I choosed the second one since it occured in most cases and it was the right one...

2) Blacklist the unwanted hardware driver

Now we have to exclude the unwanted driver from loading to the kernel. We could do that just for one session with sudo modprobe -r xxxyyyy (to run network hardware the wanted driver must be loaded afterwards) or provide a permanent solution:

Edit the /etc/modprobe.d/fbdev-blacklist.conf file as root. Just add one line naming the driver to be blacklisted.

blacklist savagefb
blacklist sisfb
blacklist tdfxfb
blacklist tridentfb
blacklist viafb
blacklist vt8623fb
blacklist iwl3945

From now on the driver of the misbehaving Wifi card is prevented from loading at system startup, instead the next available hardware's driver will be loaded automatically (so you need not explicitly load its driver yourself), being in this case the one for my faithful Zyair G-202.