Bridge to a used eth1 card without losing connection via that card

Dave asked:

How can I set bridge between a real eth card on a remote machine without losing my ssh connection to that machine.

I ssh into a machine via its eth1 iinterface.

I want to join eth1 to a tun/tap device ‘tun0’. How can I do this without bringing down eth1 and losing my ssh connection.

tunctl -u root
brctl addbr br0
brctl addif br0 tun1
brctl addif br0 eth1

Result, connection will be lost

My answer:

  1. Connect to the machine via a different interface.
  2. Connect to the machine at the console.
  3. Set up the bridge in the system’s startup scripts (you didn’t specify what sort of system) and then reboot.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.