I'm configuring a CentOS 5.5 2.6.18-194.17.1.el5.centos.plus server in order to have multiple VirtualMachines in it. The throughput of the machine is at least 300KBps (yes KB), I configured two web servers one on the virtual machine and the other in the physical machine, the difference was:
300bps-3 KBps on the virtual machine
230KBps on the physical machine.
The configuration is as follows:
Code:
Physical machine:
modprobe 8021q
vconfig eth0 4
ifconfig 10.4.0.1
iptables-save (this is the summarized output):
*filter
-A FORWARD -d 10.0.0.0/255.0.0.0 -j ACCEPT
-A FORWARD -s 10.0.0.0/255.0.0.0 -j ACCEPT
-A FORWARD -j REJECT --reject-with icmp-port-unreachable
*nat
-A PREROUTING -d <public_ip> -p tcp -m tcp --dport 80 -j DNAT --to-destination 10.4.0.3:80
-A PREROUTING -d <public_ip> -p tcp -m tcp --dport 443 -j DNAT --to-destination 10.4.0.3:443
-A POSTROUTING -s 10.0.0.0/255.0.0.0 -o eth0 -j MASQUERADE
cat /proc/net/vlan/config
VLAN Dev name | VLAN ID
Name-Type: VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD
eth0.2 | 2 | eth0
eth0.4 | 4 | eth0
eth0.5 | 5 | eth0
cat /proc/net/vlan/eth0.4
eth0.4 VID: 4 REORDER_HDR: 1 dev->priv_flags: 81
total frames received 0
total bytes received 0
Broadcast/Multicast Rcvd 0
total frames transmitted 68669
total bytes transmitted 4957056
total headroom inc 0
total encap on xmit 0
Device: eth0
INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0
EGRESSS priority Mappings:
Virtual machine:
ifconfig eth0 10.4.0.3
route add default gw 10.4.0.1
If I attach the public ip address to the virtual machine this gets smoothly. Someone Help please!?