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.

running xen with 2 guests

i have been trying to assign public ip addresses to two virtual nic, one each which is sharing bridge networking with host.

tried this

Host x.x.116.2

created two nic on guest which is using same bridge with host

eth0 x.x.116.3
eth1 x.x.116.4

but at a time only one is active,how can i enable both

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You are better off just aliasing the .4 to the eth0 interface and not placing it on it's separate interface since they are the same subnet.

ifconfig eth0:1 x.x.116.4 netmask 255.255.255.0
share|improve this answer
    
mike could u tell me,why this will not work,if we assign ip of same sub net. –  kevin Mar 5 '13 at 6:56
    
because you probably gave it a /24 so the kernel will send all traffic out eth0 for .4 and it won't like coming back in via eth0.. You can do it but it requires a lot of tricky ip route commands. Why are you even doing multiple interfaces anyway? If you use multiple ips on the same subnet.. it should be aliased –  Mike Mar 5 '13 at 7:04
1  
Interface aliases are deprecated, as is ifconfig on linux. The same effect can be achieved more naturally with ip addr add x.x.116.4/24 dev eth0. –  BatchyX Mar 5 '13 at 8:39

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.