Dear Jesse, Thanks very much for your timely reply. It works. But I have some confusion about the concept.
I assign public ip for xenbr0 on each host, and private ip (172.16) for xenbr1 on each site. On Xenserver Host 1 ovs-vsctl add-port xenbr1 gre1 -- set interface gre1 type=gre options:remote_ip=129.X.X.X (public ip address on xenbr0 of xenserver host 2) On Xenserver Host 2 ovs-vsctl add-port xenbr1 gre1 -- set interface gre1 type=gre options:remote_ip=198.X.X.X (public ip address on xenbr0 of xenserver host 1) Note that we add gre port onto Xenbr1 but we use the ip of xenbr 0 as the remote accessible ip. I attached the vif onto the xenbr1 so that VMs on two xenserver hosts can ping each other. It seems like the tunnel is established between two Xenbr1 but they talk to each other through the public ip on Xenbr0. So, when packet sent from VM1, the packet will go from VIF to Xenbr1, then will the packet pass from xenbr1 to xenbr0 since it has to go through the public ip and internet to arrive at Xenserver host 2, right ? So, my final question is, how xenbr1 know that it has to forward this packet to xenbr0, and how these two xenbr1 and xenbr0 are connected ? Also, what are the gre tunnel established between ? Xenbr1 to Xenbr1 ? or Xenbr0 to Xenbr0 ? Highly appreciate your kind reply to make that tunnel work and thanks again for your timely reply. On Thu, Sep 29, 2011 at 2:46 PM, Jesse Gross <[email protected]> wrote: > On Thu, Sep 29, 2011 at 2:36 PM, terryxing <[email protected]> wrote: > > Hi, > > > > I am so frustrated on setting up the tunnel between the open vswitch on > > xenservers. I have two xenserver. I use one NIC as the interface to talk > to > > another remote xenserver host. I add a port name gre1 on the xenbr1 for > > both two servers. > > > > I run, > > > > ovs-vsctl add-port xenbr1 gre1 -- set interface gre1 type=gre > > options:remote_ip=129.X.X.X (public ip address on xenbr1 of xenserver > host 1 > > ) > > ovs-vsctl add-port xenbr1 gre1 -- set interface gre1 type=gre > > options:remote_ip=198.X.X.X (public ip address on xenbr1 of xenserver > host 2 > > ) > > You can't add a GRE port to the same bridge as the interface on which > the packet will be sent. Doing so will create a loop because a packet > sent to the GRE port will get encapsulated and sent to interface > associated with the remote_ip. This is xenbr1, which can in turn sent > the packet to the GRE port, etc. You need to create a separate bridge > for VMs that are inside the tunnel. > > > I run this command on both xenserver host. They are success to be run. > > > > I check the ovs-vsctl list-ports xenbr1 on both xenserver host. > > > > Both of two server shows : > > eth1 (physical NIC attached to xenbr1) > > gre1 (The one I created above) > > Sometimes, It has another port shown which is vif4.1 (is that the VIF of > one > > VM with VLAN ID ? because I attach one virtual interface for each VM, > that > > interface has vlan id say 100 on it.) > > It's the first interface of VM 4, not a vlan. > -- Best regards, Terry xing
_______________________________________________ discuss mailing list [email protected] http://openvswitch.org/mailman/listinfo/discuss
