Chapter 4. Network Configuration

Table of Contents

4.1. The Network Interface
4.2. Host Information
4.3. Stop and Start Networking
4.3.1. From the command line
4.3.2. Using the network script
4.3.3. Renewing a DHCP lease
4.4. Routing
4.4.1. Routing examples
4.4.2. Default Gateway
4.4.3. Permanent Static Routes
4.4.4. Dynamic Routing
4.4.5. Naming Networks
4.5. Common Network Tools
4.5.1. ping
4.5.2. tcpdump
4.5.3. netstat
4.5.4. arp
4.5.5. traceroute
4.6. Exercises and Summary
4.6.1. Questions
4.6.2. Files
4.6.3. Commands
4.6.4. Exercises

Prerequisites

Goals

4.1. The Network Interface

The network interface card (NIC) must be supported by the kernel. To determine which card you are using you can get information from dmesg, /proc/interrupts, /sbin/lsmod. or /etc/modules.conf

Example 4.1. Determining the NIC model

# dmesg
Linux Tulip driver version 0.9.14 (February 20, 2001)
PCI: Enabling device 00:0f.0 (0004 -> 0007)
PCI: Found IRQ 10 for device 00:0f.0
eth0: Lite-On 82c168 PNIC rev 32 at 0xf800, ...
... 00:A0:CC:D3:6E:0F, IRQ 10.
eth0:  MII transceiver #1 config 3000 status 7829 ...
...  advertising 01e1.
# cat /proc/interrupts
0:     8729602          XT-PIC  timer
1:           4          XT-PIC  keyboard
2:           0          XT-PIC  cascade
7:           0          XT-PIC  parport0
8:           1          XT-PIC  rtc
10:     622417          XT-PIC  eth0
11:          0          XT-PIC  usb-uhci
14:     143040          XT-PIC  ide0
15:        180          XT-PIC  ide1
# /sbin/lsmod
	Module                  Size  Used by
tulip                  37360   1 (autoclean)

From the example above we see that the Ethernet cards chipset is Tulip, the i/o address is 0xf800 and the IRQ is 10. This information can be used either if the wrong module is being used or if the resources (i/o or IRQ) are not available.

This information can either be used to insert a module with a different i/o address (using the modprobe or insmod utilities) or can be saved in /etc/modules.conf (this will save the settings for the next system boot).