why device br0 already exists

1

In my Ubuntu 16.04 desktop, I am trying to setup a bridge nic named br0 in my /etc/network/interfaces as below

auto enp2s0
iface enp2s0 inet manual

auto br1
iface br1 inet dhcp
  pre-up ip link add veth0 type veth peer name veth1
  pre-up ifconfig veth0 up
  pre-up ifconfig veth1 up
  bridge_ports enp2s0 veth0
  bridge_maxwait 5
  bridge_stp off
  bridge_hw a8:20:66:06:71:50

While booting, it shows networking failed, and I use systemctl status networking.service got the message:

● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
  Drop-In: /run/systemd/generator/networking.service.d
           └─50-insserv.conf-$network.conf
   Active: failed (Result: exit-code) since Mon 2016-11-28 02:21:12 CST; 56s ago
     Docs: man:interfaces(5)
  Process: 889 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
  Process: 884 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ]
 Main PID: 889 (code=exited, status=1/FAILURE)

Nov 28 02:21:09 iMac systemd[1]: Starting Raise network interfaces...
Nov 28 02:21:11 iMac ifup[889]: /sbin/ifup: waiting for lock on /run/network/ifstate.enp2s0
Nov 28 02:21:12 iMac ifup[889]: device br0 already exists; can't create bridge with the same name
Nov 28 02:21:12 iMac ifup[889]: run-parts: /etc/network/if-pre-up.d/bridge exited with return code 1
Nov 28 02:21:12 iMac ifup[889]: Failed to bring up br0.
Nov 28 02:21:12 iMac systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Nov 28 02:21:12 iMac systemd[1]: Failed to start Raise network interfaces.
Nov 28 02:21:12 iMac systemd[1]: networking.service: Unit entered failed state.
Nov 28 02:21:12 iMac systemd[1]: networking.service: Failed with result 'exit-code'.

I am so confused why it says br0 already exists. If I replaced br0 with br1 in /etc/network/interfaces, everything works fine.

In my another desktop within the same LAN(wired to the same wifi router), I already named a bridge as br0, is that makes I cannot name my bridge br0 in this desktop?

CSJ

Posted 2016-11-28T02:11:51.737

Reputation: 141

No answers