Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using a CentOS virtual machine, i have already assigned two network adapters using the VMware Workstation but the Virtual Network Editor lets you change only the Subnet IP, the Subnet Mask and the MAC.

However, i also need to change the IPADDR, the BROADCAST, the DHCP_HOSTNAME, the ON_BOOT and the DEVICE variables on each network adapter.

I don't see any ifcfg file relevant to those two network adapters inside /etc/sysconfig/network-scripts. And i don't see those network adapters using the Network Administration Tool (system-config-network).

What is the most appropriate way to change those variables?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

The interface configuration file under CentOS are named /etc/sysconfig/network-scripts/ifcfg-<ifname> where <ifname> is the interface name. For interface eth0, the file will be named ifcfg-eth0.

In case someone assign an extra network card or change the configuration of an already existing then make sure to restart the network with service network restart in terminal.

share|improve this answer
    
then how do you explain that when i look into the network-scripts there is only one ifcfg file, the default "ifcfg-lo" and when i hit ifconfig -a in terminal i get both eth1 and eth2 as i expected? –  Deneb May 12 '12 at 14:14
1  
Is it possible Cent was installed before you presented the network adapters to the virtual machine? In any case, add the files with the proper settings, restart networking, and you should be off to the races. –  Rapzid May 12 '12 at 14:49
    
correct! a service network restart was needed! thank you! –  Deneb May 12 '12 at 14:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.