Linux

  1. Home
  2. Computing & Technology
  3. Linux

Linux Network Administrators Guide

From Authors, for About.com


   Linux Network Administrators Guide
   Prev    Chapter 5. Configuring TCP/IP Networking    Next

5.7. Interface Configuration for IP

After setting up your hardware as explained in Chapter 4 , you have to make these devices known to the kernel networking software. A couple of commands are used to configure the network interfaces and initialize the routing table. These tasks are usually performed from the network initialization script each time you boot the system. The basic tools for this process are called ifconfig (where "if " stands for interface) and route .

ifconfig is used to make an interface accessible to the kernel networking layer. This involves the assignment of an IP address and other parameters, and activation of the interface, also known as "bringing up" the interface. Being active here means that the kernel will send and receive IP datagrams through the interface. The simplest way to invoke it is with:


   

ifconfig interface ip-address

This command assigns ip-address to interface and activates it. All other parameters are set to default values. For instance, the default network mask is derived from the network class of the IP address, such as 255.255.0.0 for a class B address. ifconfig is described in detail in the section Section 5.8 ."

route allows you to add or remove routes from the kernel routing table. It can be invoked as:


   

route [add|del] [-net|-host] target [if]

The add and del arguments determine whether to add or delete the route to target . The -net and -host arguments tell the route command whether the target is a network or a host (a host is assumed if you don't specify). The if argument is again optional, and allows you to specify to which network interface the route should be directed—the Linux kernel makes a sensible guess if you don't supply this information. This topic will be explained in more detail in succeeding sections.


5.7.1. The Loopback Interface
5.7.2. Ethernet Interfaces
5.7.3. Routing Through a Gateway
5.7.4. Configuring a Gateway
5.7.5. The PLIP Interface
5.7.6. The SLIP and PPP Interfaces
5.7.7. The Dummy Interface
5.7.8. IP Alias

* License

* Linux Network Administrators Guide Guide Index

Explore Linux

About.com Special Features

Linux

  1. Home
  2. Computing & Technology
  3. Linux
  4. Linux Documentation
  5. Linux Network Admin Guide
  6. Linux Network Administrators Guide - Interface Configuration for IP

©2009 About.com, a part of The New York Times Company.

All rights reserved.