TCP/IP Configuration  «Prev   Next»

Lesson 5Configuring an interface in Linux
Objective Examine output of dmesg command/identify network devices

Configuring Linux Network Interface

Examine output of dmesg command to identify network devices
Examine the output of the dmesg command to identify the network devices attached to the system. Now that you have seen how to set up name service, we will return to the more fundamental problems of configuring an interface with its IP address and netmask.[1]
As you have learned, the kernel probes the hardware during the boot process. During this probing, the kernel will recognize the network devices attached to the system and report on them.
The results of this hardware probe are available from the dmesg command.

This particular ethernet interface is eth0

  1. This particular ethernet interface is eth0. Later references to it will be through that name.
  2. Every ethernet card is shipped with a hard-wired ethernet address. This address is 48 bits long, and is usually written as six colon-separated sets of two-digit hexadecimal numbers. In this example, the ethernet address is 00:A0:C9:8A:A0:09.

dmesg command output

Click the link to examine the following output, which describes an Intel EtherExpress card identified by the kernel.
Not all UNIX systems are this informative about installed devices.
Later, during our discussion of the ifconfig command, we will see another way to determine the ethernet address (or other link-layer addresses) for network devices. Here is another example of kernel output relevant to network devices:

PPP: version 2.2.0 (dynamic channel allocation)
PPP Dynamic channel allocation code 
    copyright 1995 Caldera, Inc.
PPP line discipline registered.
registered device ppp0

This output means that the PPP[2] link-layer protocol is installed in the kernel, and that a PPP device (ppp0) is available.
On a Linux machine, such as the one from which this output was taken, the PPP kernel code is part of a loadable kernel module. This module is installed only when needed, such as when a PPP phone connection starts.
Therefore, this message may not always appear, even when PPP is available.

[1]Netmask: A 32-bit bit mask which shows how an Internet address is to be divided into network, subnet and host parts.
[2]Point-to-point protocol (PPP): A protocol for connecting to the Internet. PPP provides error checking and compression of the IP and TCP headers.