<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Verdana","sans-serif";
color:blue;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:blue'>Hello<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:blue'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:blue'>When I do bridge in Linux machine, the br interface will get the ip address to represent your guest PC. Then you bridge your VPS to br interface to let the network work.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:blue'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:blue'>/Matthew<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:blue'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Jun Yang [mailto:jyang825@gmail.com] <br><b>Sent:</b> 2011</span><span lang=ZH-CN style='font-size:10.0pt;font-family:宋体'>年</span><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>9</span><span lang=ZH-CN style='font-size:10.0pt;font-family:宋体'>月</span><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>18</span><span lang=ZH-CN style='font-size:10.0pt;font-family:宋体'>日</span><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> 12:20<br><b>To:</b> lxc-users@lists.sourceforge.net<br><b>Subject:</b> [Lxc-users] question about bridged networking<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hi all,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>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:<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><blockquote style='margin-left:30.0pt;margin-right:0cm'><div><div><p class=MsoNormal>auto eth0<o:p></o:p></p></div><div><p class=MsoNormal>iface eth0 inet static<o:p></o:p></p></div><div><p class=MsoNormal> address 192.168.0.202<o:p></o:p></p></div><div><p class=MsoNormal> netmask 255.255.255.0<o:p></o:p></p></div><div><p class=MsoNormal> gateway 192.168.0.1<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>auto br101<o:p></o:p></p></div><div><p class=MsoNormal>iface br101 inet static<o:p></o:p></p></div><div><p class=MsoNormal> address 192.168.0.101<o:p></o:p></p></div><div><p class=MsoNormal> network 192.168.0.0<o:p></o:p></p></div><div><p class=MsoNormal> netmask 255.255.255.0<o:p></o:p></p></div><div><p class=MsoNormal> broadcast 192.168.0.255<o:p></o:p></p></div><div><p class=MsoNormal> gateway 192.168.0.1<o:p></o:p></p></div><div><p class=MsoNormal> bridge_ports eth0<o:p></o:p></p></div><div><p class=MsoNormal> bridge_stp off<o:p></o:p></p></div><div><p class=MsoNormal> bridge_maxwait 5<o:p></o:p></p></div><div><p class=MsoNormal> post-up /usr/sbin/brctl setfd br101 0<o:p></o:p></p></div></div></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>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:<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><blockquote style='margin-left:30.0pt;margin-right:0cm'><div><div><p class=MsoNormal>lxc.network.type = veth<o:p></o:p></p></div><div><p class=MsoNormal>lxc.network.flags = up<o:p></o:p></p></div><div><p class=MsoNormal>lxc.network.link = br101<o:p></o:p></p></div><div><p class=MsoNormal>lxc.utsname = vps101<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>lxc.tty = 4<o:p></o:p></p></div><div><p class=MsoNormal>lxc.pts = 1024<o:p></o:p></p></div><div><p class=MsoNormal>lxc.rootfs = /var/lib/lxc/vps101/rootfs<o:p></o:p></p></div><div><p class=MsoNormal>lxc.mount = /var/lib/lxc/vps101/fstab<o:p></o:p></p></div></div><div><p class=MsoNormal>...<o:p></o:p></p></div></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>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.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>How is bridged networking supposed to work in this case? I thought 192.168.0.101 would be routed to the guest. Thanks!<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Jun<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>