Difference between revisions of "Vnx-extnet"
(→Option 1: Bridge associated with external interfce (recomended)) |
|||
Line 6: | Line 6: | ||
<ul> | <ul> | ||
− | <li>Create a virtual bridge associated with external interface (eth0 in this example). For example, for an Ubuntu host you have to edit /etc/network/interfaces file and :</li> | + | <li>Create a virtual bridge associated with the external interface (eth0 in this example). For example, for an Ubuntu host you have to edit /etc/network/interfaces file and change it in the following way (adapt the addresses and masks values to your case):</li> |
auto lo | auto lo | ||
iface lo inet loopback | iface lo inet loopback | ||
Line 20: | Line 20: | ||
bridge_fd 0 | bridge_fd 0 | ||
− | This will create a new bridge, br0, connected to the host interface eth0 and assign the | + | This will create a new bridge, br0, connected to the host interface eth0 and assign the IP address 10.1.1.7 previously assigned to eth0 to the new bridge. |
IMPORTANT: be aware that you are modifying the network configuration of your host interfaces and in case of problem you will connectivity to the host. This modifications should be done from the host console to avoid problems. | IMPORTANT: be aware that you are modifying the network configuration of your host interfaces and in case of problem you will connectivity to the host. This modifications should be done from the host console to avoid problems. | ||
− | + | <li>Restart the host and check that everything is working before continuing.</li> | |
− | |||
− | + | <li>In the VNX scenario define a <net> with the name of the bridge: | |
+ | <net name="br0" mode="virtual_bridge"/> | ||
+ | |||
+ | <li>Configure the interface of the VM you want to externally connect on that net: | ||
<vm name="vm1" type="libvirt" subtype="kvm" os="linux"> | <vm name="vm1" type="libvirt" subtype="kvm" os="linux"> | ||
... | ... | ||
− | <if id="1" net=" | + | <if id="1" net="br0"> |
<ipv4>10.1.1.40/24</ipv4> | <ipv4>10.1.1.40/24</ipv4> | ||
</if> | </if> | ||
Line 36: | Line 38: | ||
</vm> | </vm> | ||
+ | <li>Start the scenario and check that the VM has connectivity with the external networks</li> | ||
+ | </ul> | ||
== Description == | == Description == |
Revision as of 14:42, 21 January 2012
Connecting a Virtual Machine to a external network
There are several ways to connect a virtual machine included in a VNX scenario to an external network:
Option 1: Bridge associated with external interfce (recomended)
- Create a virtual bridge associated with the external interface (eth0 in this example). For example, for an Ubuntu host you have to edit /etc/network/interfaces file and change it in the following way (adapt the addresses and masks values to your case):
auto lo iface lo inet loopback auto br0 iface br0 inet static address 10.1.1.7 netmask 255.255.255.0 gateway 10.1.1.1 bridge_ports eth0 bridge_stp on bridge_maxwait 0 bridge_fd 0
This will create a new bridge, br0, connected to the host interface eth0 and assign the IP address 10.1.1.7 previously assigned to eth0 to the new bridge.
IMPORTANT: be aware that you are modifying the network configuration of your host interfaces and in case of problem you will connectivity to the host. This modifications should be done from the host console to avoid problems.