I have a Debian server running Xen 4.4. The server has multiple ethernet interfaces.
I would like to set up:
- vm1 (IP 10.1.1.2/24) <--> xenbr1 (IP 10.1.1.1/24) <--> eth1
- vm2 (IP 10.1.2.2/24) <--> xenbr2 (IP 10.1.2.1/24) <--> eth2
- eth1 <--> cable <--> eth2
From inside vm1 (10.1.1.2), I want to be able to ping 10.1.2.2 and have the traffic go through the cable. The cable will later be replaced with network equipment under test. I do have the above all set up and working, except that from inside a VM there is no route to the other subnet. (Network is unreachable.)
I tried adding a route to one of the VMs, but no luck:
- (from vm1, 10.1.1.2) route add -net 10.1.2.0 netmask 255.255.255.0 dev eth0
Now ping returns "Destination Host Unreachable." My current thought is to somehow force the routing in Domain0, but it seems like the following would be disastrous:
- (from Domain0) route add -net 10.1.2.0 netmask 255.255.255.0 dev xenbr1
Is what I am trying to do possible using a single server and hypervisor? Or should I change course and use two physical servers?