creating vnics in rhel 6.7

Latest response

I am trying to create 6 vnics to use for internal bridging on KVM. I have tired to cp my eth0 but that isn't working. Can anyone point me in the right direction for this.

Responses

If you just want to add an interface to a bridge, create a dummy. This seems a good explanation: http://www.pocketnix.org/posts/Linux%20Networking%3A%20Dummy%20Interfaces%20and%20Virtual%20Bridges

If you want to shuffle traffic around between bridges, you want a veth pair: http://backreference.org/2013/06/20/some-notes-on-veth-interfaces/

If you want to have a device where one end is a network interface and the other end is a userspace file descriptor, look into tuntap: http://backreference.org/2010/03/26/tuntap-interface-tutorial/

I used dummy create in this article.
http://serverfault.com/questions/516366/how-virbr0-nic-is-created

The problem I ran into is that the nics are not persistent on reboot. Do I have to create a ifcfg file for each dummy to enable them to stick?

This worked for me:

# cat /etc/modprobe.d/dummy.conf 
alias dummy0 dummy
options dummy numdummies=1

# cat /etc/sysconfig/network-scripts/ifcfg-dummy0 
DEVICE=dummy0
TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
HOTPLUG=no
IPADDR=172.16.100.1
PREFIX=24

Note the numdummies module option which specifies the number of dummy interfaces to create.

Interesting, I tired upgrading to Rhel 7 but these commands do not work. I also noticed the dummy.conf file is MIA.

Is there any doc on how to create the vnics and keep them permanent?

The dummies keep clearing on pc restart even if I create a Ifcfg file and connect the dummy to a bridge.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.