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?
The interface configuration file under CentOS are named
/etc/sysconfig/network-scripts/ifcfg-<ifname>
where<ifname>
is the interface name. For interfaceeth0
, the file will be namedifcfg-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.