Hello

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.

/Matthew

From: Jun Yang [mailto:[email protected]]
Sent: 2011年9月18日 12:20
To: [email protected]
Subject: [Lxc-users] question about bridged networking

Hi all,

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:

auto eth0
iface eth0 inet static
    address 192.168.0.202
    netmask 255.255.255.0
    gateway 192.168.0.1

auto br101
iface br101 inet static
    address 192.168.0.101
    network 192.168.0.0
    netmask 255.255.255.0
    broadcast 192.168.0.255
    gateway 192.168.0.1
    bridge_ports eth0
    bridge_stp off
    bridge_maxwait 5
    post-up /usr/sbin/brctl setfd br101 0

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:

lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br101
lxc.utsname = vps101

lxc.tty = 4
lxc.pts = 1024
lxc.rootfs = /var/lib/lxc/vps101/rootfs
lxc.mount  = /var/lib/lxc/vps101/fstab
...

I can bring it up.  But when I do "ssh 
[email protected]<mailto:[email protected]>", I get into host rather than the 
guest.

How is bridged networking supposed to work in this case?  I thought 
192.168.0.101 would be routed to the guest.  Thanks!

Jun

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Lxc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to