Setting up virtual bridge: Cannot find device "br0"

12.1k views Asked by At

Setting up a virtual bridge with Ubuntu with following config in /etc/network/interfaces

auto brOffline 
iface brOffline inet static
 address 192.168.5.10
 netmask 255.255.255.0
 bridge_ports eth11
 bridge_stp off
 bridge_fd 0.0
 pre-up ifdown eth11
 pre-up ifup eth11
 post-down ifdown eth11 

code: creating a bridge interface. Every bridge needs an adapter, here my physical network card eth11. To make sure it's working bringing the interface down and up again.

causes the restarting of the networking service ...

service networking restart
service networking status

... to display an error simmilar to

 ifup[2304]: Cannot find device "brOnline"
 dhclient[2330]: Error getting hardware address for "brOffline": No such device

if your interface is called as the standard br0 it would sound like:

 default:
 Error getting hardware address for "br0": No such device
2

There are 2 answers

0
Cutton Eye On BEST ANSWER

Bridge util was not installed

I moved from one system to an other. Target OS was a newly installed 17.10. the thing what was missing were the bridge utileties:

sudo apt-get install -y bridge-utils

The bridge simply could not be created because of missing tools...

Now ifconfig shows my shiny bridge

brOffline: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 192.168.5.10  netmask 255.255.255.0  broadcast 192.168.5.255
    inet6 fe80::6a05:caff:fe51:8eff  prefixlen 64  scopeid 0x20<link>
    ether 68:05:ca:51:8e:ff  txqueuelen 1000  (Ethernet)
    RX packets 2  bytes 501 (501.0 B)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 107  bytes 10316 (10.3 KB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Hint which helped me to find the solution

2
Abhyam Gupta On

first type command

ifconfig

then see all the headings of the output as wlp2s0, enp3s0, lo etc.

try all the above-mentioned headings in place of "br0".

in my case when I replaced "br0" with "enp3s0" it worked fine.

Hope this helps.