13.5.1. Virtualized Network Interfaces

13.5.1. Virtualized Network Interfaces

Perform the following steps to configure additional network devices for your guest.

Edit your guest configuration file in /etc/xen/YourGuestName replacing YourGuestName with the name of your guest.

The original entry may look like the one below.

vif = [ "mac=00:16:3e:2e:c5:a9,bridge=xenbr0" ]

Add an additional entry to the “vif=” section of the configuration file similar to the one seen below.

vif = [ "mac=00:16:3e:2e:c5:a9,bridge=xenbr0",
    "mac=00:16:3e:2f:d5:a9,bridge=xenbr0" ]

Make sure you generate a unique MAC address for the new interface. You can use the command below.

# echo 'import virtinst.util ; print virtinst.util.randomMAC()' | python

After the guest has been rebooted perform the following step in the guest operating system. Verify the update has been added to your /etc/modules.conf in Red Hat Enterprise Linux 3 or /etc/modprobe.conf in Red Hat Enterprise Linux 4 and Red Hat Enterprise Linux 5. Add a new alias for each new interface you added.

alias eth1 xen-vnif

Now test that each new interface you added make sure it is available inside the guest.

# ifconfig eth1

The command above should display the properties of eth1, repeat the command for eth2 if you added a third interface, and so on.

Now you can configure the new network interfaces using redhat-config-network or Red Hat Enterprise Linux3 or system-config-network on Red Hat Enterprise Linux 4 and Red Hat Enterprise Linux 5.

Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-5 because CentOS-5 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-5 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.