WHAT'S HOT
Prev | Current Page 72 | Next

Prabhakar Chaganti

"Xen Virtualization: A Practical Handbook"

In the previous chapter each of our
virtual machines had a separate public IP address assigned to it that made things
easier. However in this section, we will use a single IP address and still provide
the ability to connect to any port on a virtual machine on our VLAN by using
address translation.
We will set up a VLAN with one webserver and one database. Each of these has a
private IP address that is not available on the regular network. The only public IP
address will be that of dom0. When a request comes in to dom0 with its IP address
but a webserver port of 80, we will use NAT to forward the request to the webserver
virtual machine inside the VLAN, and similarly when a request is made for the
database port we will send it on to the database vm.
Time for Action??”Using VLAN with NAT
We will create a virtual network with the IP address 192.168.2.0 with one webserver
and a database. All the virtual machines in this network will have IP addresses in
that range. We will create two virtual machines in this network and access them
from a single public IP address. The ports will be forwarded to the respective virtual
machines by dom0.
1. The first network interface is being used by dom0. We are going to create a
new network interface that will be used by our VLAN. This interface will be
created using a dummy network driver and named dummy0. Create a new
file named /etc/sysconfig/network-scripts/ifcfg-dummy0:
A DEVICE=dummy0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet
NETMASK=255.


Pages:
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84