0

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

kevin
  • 191
  • 5
  • 16

1 Answers1

1

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
Mike
  • 22,310
  • 7
  • 56
  • 79
  • mike could u tell me,why this will not work,if we assign ip of same sub net. – kevin Mar 05 '13 at 06: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 05 '13 at 07: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 05 '13 at 08:39