Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

9.2. 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.

  • DEVICE=devicename, where devicename is the name of the physical network device.

  • IPADDR=ipaddr, where ipaddr is the IP address.

  • NETMASK=netmask, where netmask is the netmask IP value.

  • NETWORK=network, where network is the network IP address.

  • BROADCAST=broadcast, where broadcast is the broadcast IP address.

  • ONBOOT=answer, where answer is yes or no. Do the interface need to be active or inactive at boot time.

  • BOOTPROTO=proto, where proto is one of the following :

    1. none - No boot-time protocol should be used.

    2. bootp - The bootp now pump protocol should be used.

    3. dhcp - The dhcp protocol should be used.

  • USERCTL=answer, where answer is one of the following:

    1. yes - Non-root users are allowed to control this device.

    2. no - Only the super-user root is allowed to control this device.

 
 
  Published under the terms of the Open Publication License Design by Interspire