Adding an Interface

For redhat-based systems

After adding an interface in your VMConsole, look in the host with the following command, you'll notice an additional interface with a DOWN status

ip -o link

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN \    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000\    link/ether 00:50:56:a8:5d:8a brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000\    link/ether 00:50:56:a8:2a:7d brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000\    link/ether 00:50:56:a8:28:d1 brd ff:ff:ff:ff:ff:ff

Look in the network-scripts folder and take one of the existing interface configuration scripts and adjust it to your needs. 

cd /etc/sysconfig/network-scripts/
sudo cp ifcfg-eth0 ifcfg-eth2

Make sure the numbered part matches up with the link number from above and don't forget the MAC address

sudo vim ....
sudo ifup eth2

Comments