Hi all,<div><br></div><div>I am trying to set up a VPS using LXC 0.7.4. I want the VPS to have a static IP address on the same subnet as the host. Here is what I have in host (Ubuntu 11.04)'s /etc/network/interfaces:</div>
<div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>auto eth0</div><div>iface eth0 inet static</div><div> address 192.168.0.202</div><div> netmask 255.255.255.0</div>
<div> gateway 192.168.0.1</div><div><br></div><div>auto br101</div><div>iface br101 inet static</div><div> address 192.168.0.101</div><div> network 192.168.0.0</div><div> netmask 255.255.255.0</div><div> broadcast 192.168.0.255</div>
<div> gateway 192.168.0.1</div><div> bridge_ports eth0</div><div> bridge_stp off</div><div> bridge_maxwait 5</div><div> post-up /usr/sbin/brctl setfd br101 0</div></div></blockquote><div><br></div><div>Problem 1, when I reboot the host, the host's br101 get 192.168.0.101 (expected) but eth0 gets no IP address. I can bring up eth0 manually at this point and it gets 192.168.0.202 (expected). But at this point, 192.168.0.101 is really an IP address of the host. I set up my VPS as:</div>
<div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>lxc.network.type = veth</div><div>lxc.network.flags = up</div><div>lxc.network.link = br101</div>
<div>lxc.utsname = vps101</div><div><br></div><div>lxc.tty = 4</div><div>lxc.pts = 1024</div><div>lxc.rootfs = /var/lib/lxc/vps101/rootfs</div><div>lxc.mount = /var/lib/lxc/vps101/fstab</div></div><div>...</div></blockquote>
<div><br></div><div>I can bring it up. But when I do "ssh <a href="mailto:root@192.168.0.101">root@192.168.0.101</a>", I get into host rather than the guest.</div><div><br></div><div>How is bridged networking supposed to work in this case? I thought 192.168.0.101 would be routed to the guest. Thanks!</div>
<div><br></div><div>Jun</div><div><br></div>