Softpanorama
(slightly skeptical) Open Source Software Educational Society

May the source be with you, but remember the KISS principle ;-)

Google   


Linux networking tips

/etc/sysconfig/network-scripts/ifcfg-ethN /etc/sysconfig/network  
Restart networking    

ip tool can set interfaces.

Restart networking

service network restart

what is -etc-sysconfig-network-scripts-ifcfg-eth0 its counterpart in slackware - LinuxQuestions.org

The script that sets up the network interfaces is:

/etc/rc.d/rc.inet1

But if you are just looking to enter values for the network setup (IP, netmask, etc), you want:

/etc/rc.d/rc.inet1.conf

/etc/sysconfig/network-scripts/ifcfg-ethN

Parameters set in /etc/sysconfig/network-scripts/ifcfg-ethN

The /etc/sysconfig/network-scripts/ifcfg-ethN files

File configurations for each network device you may have or want to add on your system are located in the /etc/sysconfig/network-scripts/ directory with Red Hat Linux 6.1 or 6.2 and are named ifcfg-eth0 for the first interface and ifcfg-eth1 for the second, etc. Following is a example /etc/sysconfig/network-scripts/ifcfg-eth0 file:

 
           DEVICE=eth0
           IPADDR=208.164.186.1
           NETMASK=255.255.255.0
           NETWORK=208.164.186.0
           BROADCAST=208.164.186.255
           ONBOOT=yes
           BOOTPROTO=none
           USERCTL=no
           

 

If you want to modify your network address manually, or add a new network on a new interface, edit this file -ifcfg-ethN, or create a new one and make the appropriate changes.

/etc/sysconfig/network

Parameters set in sysconfig-network

Note the NETMASK should be defined in /etc/sysconfig/network-scripts/ifcfg-eth0

/etc/sysconfig/network

The /etc/sysconfig/network file is used to specify information about the desired network configuration. The following values may be used:



Copyright © 1996-2008 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

Standard disclaimer: The statements, views and opinions presented on this web page are those of the author and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.

Last modified: June 06, 2008