XEN How to configure dom0 and domu with different ip subnet?

dedetok's picture

Forums: 

please help me to configure dom0 network. dom0 host is Debian jessie. I need to configure domu to accept different subnet from ip main/host (dom0) in OVH. Here is topology my network:

A.B.C.254 ---- A.B.C.81
(Gateway)       (br0/dom0)
                 X.Y.X.150 ---- X.Y.X.144 - X.Y.Z.149 (domu)
                 (br1/dom0)

Here is my dom0 /etc/network/interface:
auto eth0
iface eth0 inet manual

auto br0
iface br0 inet static
   bridge_ports eth0
        address A.B.C.81
        netmask 255.255.255.0
        network A.B.C.0
        broadcast A.B.C.255
        gateway A.B.C.254
   bridge_stp on
   bridge_maxwait 0
   pre-up /sbin/ipset restore < /etc/ipset.up.rules
   pre-up /sbin/iptables-restore < /etc/iptables.up.rules

auto br1
iface br1 inet static
        address X.Y.X.150
        netmask 255.255.255.248
        broadcast X.Y.X.151
   pre-up brctl addbr br1

Output form route -v
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         A.B.C.254  0.0.0.0         UG    0      0        0 br0
A.B.C.0    *               255.255.255.0   U     0      0        0 br0
X.Y.X.144  *               255.255.255.248 U     0      0        0 br1

Output from ip route:
default via A.B.C.254 dev br0
A.B.C.0/24 dev br0  proto kernel  scope link  src A.B.C.81
X.Y.X.144/29 dev br1  proto kernel  scope link  src X.Y.X.150

output from brctl show:
# brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.e03f49e8149b       yes             eth0
br1             8000.feffffffffff       no              vif3.0

From dom0, I can ping br1 and br1 but not domu with error "Do you want to ping broadcast? Then -b".
With option -b ping was reply:
# ping X.Y.Z.144 -c 2 -b
WARNING: pinging broadcast address
PING X.Y.Z.144 (X.Y.Z.144) 56(84) bytes of data.
64 bytes from X.Y.Z.144: icmp_seq=1 ttl=64 time=0.163 ms
64 bytes from X.Y.Z.174.144: icmp_seq=2 ttl=64 time=0.127 ms

--- X.Y.Z.144 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.127/0.145/0.163/0.018 ms

From domu, I can ping br1 and br0 but I can not ping internet ( 8.8.8.8 ) .
From outside I can ping br0 and br1 but I can not ping domu.

Thank you Sincerely
Dedetok

misconfigured domu ip (done)

dedetok's picture

I change domu ip from X.Y.Z.144 to X.Y.Z.145. I can't use X.Y.Z.144 for network /29.
ping from outside:

>ping x.y.z.145

Pinging x.y.z.145 with 32 bytes of data:
Reply from x.y.z.145: bytes=32 time=276ms TTL=50
Reply from x.y.z.145: bytes=32 time=270ms TTL=50
Reply from x.y.z.145: bytes=32 time=288ms TTL=50
Reply from x.y.z.145: bytes=32 time=269ms TTL=50

Ping statistics for x.y.z.145:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 269ms, Maximum = 288ms, Average = 275ms