User Tools

Site Tools


sysconfig:networking

Network Configuration

Cucumber Linux network configuration is handled by the network-scripts package. This package provides the network init script (/etc/rc.d/init.d/network) as well as the /sbin/ifup, /sbin/ifdown and /sbin/ifhelp scripts. The actual configuration files are stored in /etc/network.

Configuring a Network Interface

Each network interface to be configured by the network scripts has a config file under /etc/network/interfaces. The file name is the name of the interface to configure. Each config file is required to define the following two fields:

ONBOOT=<yes|no>
METHOD=static

The ONBOOT field tells the network init script whether or not this interface should automatically be brought up when the system boots. A value of yes tells the network script to bring it up with the system. Any other value tells the network script not to.

The METHOD field tells the network scripts how the interface should be configured (i.e. static for a static ip address). For a list of valid configuration methods for your system, run ls /etc/network/methods. Each method works differently, and each method requires different fields in the /etc/network/interfaces/<interface> file. For documentation about a specific method, run ifhelp <method>. Additionally, most methods provide a template file for you in /etc/network/templates.

Manually Bringing Interfaces Up and Down

The ifup script allows you to manually bring a network interface up. The syntax is ifup <interface>. The interface must exist in /etc/network/interfaces for this to work.

The ifdown script allows you to manually bring a network interface down. The syntax is ifdown <interface>. The interface must exist in /etc/network/interfaces for this to work.

sysconfig/networking.txt · Last modified: 2017/05/06 12:24 (external edit)