4

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
Cutton Eye
  • 3,207
  • 3
  • 20
  • 39

2 Answers2

14

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

Cutton Eye
  • 3,207
  • 3
  • 20
  • 39
-2

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.

Abhyam Gupta
  • 147
  • 4
  • 4
  • 4
    I'm not sure in total if you've understood the question and accordingly the answer. If you not have initialized a "br0" you'll have no luck. I took in this question "br0" as an example name, cause this name is taken in most examples. What you do with ifconfig is listing all interfaces known as status up ( saying online ) to the system. And what ever you've done this probably works best with a already existing adapter instead of a non existing adapter. The solution was that basically the fundament for providing a virtual bridge, was not installed. ;) – Cutton Eye May 15 '20 at 00:26
  • 1
    I don't have much knowledge regarding this particular problem, I told just what I did and that solved my problem, I thought this may help someone that's why I wrote, But for further info, thanks. – Abhyam Gupta Nov 30 '20 at 08:40