Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a centos 6.3 server with kvm installed. The server has 4 external ips and one NIC.

176.9.xxx.xx1
176.9.xxx.xx2
176.9.xxx.xx3
176.9.xxx.xx4

I use the following configuration

ifcfg-eth0 as slave to ifcfg-br0

the configuration in ifcfg-eth0 is

DEVICE=eth0
ONBOOT=yes
BRIDGE=br0
HWADDR=14:da:e9:b3:8b:99

and in the ifcfg-br0

DEVICE=br0
TYPE=Bridge
BOOTPROTO=static
BROADCAST=176.9.xxx.xxx
IPADDR=176.9.xxx.xx1
NETMASK=255.255.255.0
SCOPE="peer 176.9.xxx.xxx"

and I have 3 more aliases for br0 , br0:1 to get the trafic from the second external ip

DEVICE=br0:1
IPADDR=176.9.xxx.xx2
NETMASK=255.255.255.248
ONBOOT=yes

br0:2 to get the trafic from the third external ip

DEVICE=br0:1
IPADDR=176.9.xxx.xx3
NETMASK=255.255.255.248
ONBOOT=yes

br0:3 to get the trafic from the second external ip

DEVICE=br0:1
IPADDR=176.9.xxx.xx4
NETMASK=255.255.255.248
ONBOOT=yes

The above settings work fine and I recieve the trafic from all the external ips. My problem is that I want to pass the trafic from external ip to specific virtual guest on my server. ie trafic that comes from 176.9.xxx.xxx2 must pass to virtual machine 1 176.9.xxx.xxx3 must pass to virtual machine 2 176.9.xxx.xxx4 must pass to virtual machine 3

Can you please help me how to achieve this ? What are the settings on the host and what should I do to the guests.

Thank you in advance

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You are using a bridge, not routing. Don't configure the IP addresses on your host machine if you want to use them in the guests. You should not have br0:0 and the rest of them.

share|improve this answer
    
Thank you for the answer! Can you please tell me how to configure the guests so that they have access to the external ips –  user1111702 Sep 10 '12 at 9:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.