Create a bash script using cat << quotes and put your commands there and finally bash it, that way you keep your current SSH connection and a new daemon modifies the interfaces and ask for the new IP in the bridge.
Make sure you get the same IP you had when you ask the DHCP request with dhclient, consult your DHCP server about that. I use this method all the time to move interfaces to bridges without losing connection. From: David Gabriel Sent: Wednesday, March 8, 2017 1:13 PM To: Zhao Jun Cc: ovs-discuss Subject: Re: [ovs-discuss] setting remote ovs bridge with ssh Thanks for your proposal but it does not work ! regards 2017-02-27 12:36 GMT+01:00 Zhao Jun <zhaoju...@mails.tsinghua.edu.cn>: Hi David, I have never used OpenStack, but I had the similar issue when I was using AWS EC2. Have you tried the following commands. killall dhclient && ovs-vsctl add-br mybridge -- set Bridge mybridge other-config:hwaddr=MAC && ovs-vsctl add-port mybridge eth0 && /sbin/ifconfig eth0 0.0.0.0 && /sbin/dhclient mybridge You need replace MAC with the actually MAC of eth0. Thank you Sent from Zhao Jun's iPhone 8 Plus From: David Gabriel Date: 2017-02-27 18:59 To: Scott Lowe CC: ovs-discuss Subject: Re: [ovs-discuss] setting remote ovs bridge with ssh Thanks for the answer but I am looking for solving the issue regardless openstack. Because, I also handle other remote machines that are not openstack-based VMs. Please advise me how to fix this issue ? Thanks in advance. kind regards. 2017-02-14 18:32 GMT+01:00 Scott Lowe <scott.l...@scottlowe.org>: Please see my reply below. On 02/14/2017 10:03 AM, David Gabriel wrote: > Dears, > > I want to configure an ovs bridge located in one VM in a an openstack > environment. > I am using the following commands after logging to the remote VM using > ssh command : > ovs-vsctl add-br mybridge && ifconfig mybridge up && ifconfig eth0 0 && > ovs-vsctl add-port mybridge eth0 && dhclient mybridge && ip tuntap add > mode tap vport1 && ifconfig vport1 up && ovs-vsctl add-port mybridge vport1 > > The problem is when 'eth0' is set to 0, I loose the connection so I can > not connect any more to my remote VM. The simplest solution that comes to mind would be to use the VM console that is available via OpenStack to perform your configuration (instead of using SSH). -- Scott _______________________________________________ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
_______________________________________________ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss