0

A bridge brOnline is connected to eth0 which provides access to the LAN / Internet. The setup is archived within modifying /etc/network/interfaces like below.

Why? The aim of this adventure is establish a virtual network between several virtual machines and the system hosting the virtual bridge an the virtual machines (host).

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto MyBridge
iface MyBridge inet dhcp
    bridge_port eth0
    bridge_stp on
    bridge_fd 0.0

How can I connect to the bridge from my host?

One important thing: Adding eth0 to the bridge makes it somehow unavailable to the host!

So before adding the interface eth0 to the bridge, which magic was connected to eth0 which enabled my browser the access to the local network? Can or how can I connect this magic to the bridge to have access to the LAN and can talk to the other clients connected to the bridge?

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

1 Answers1

1

The attempts have been wrong. For the host it is not necessary to connect over an tap-device to the bridge, it has the abilety to connect directly to the bridge. In Other words if you set your default route to bridge connecting to the gateway, than you can connect to the LAN-Interface too.

# see actual settings
# The displayed via is the default gw which may be provided by your dhcp
ip route
default via 42.69.42.69 dev eth0
...

# delete the default route, otherwise error: "file exists" will show up
sudo ip route del default via 42.69.42.69 dev eth0

# Add your bridge as default route
sudo ip route add default via 42.69.42.69 dev brOnline

# check
ip route
default via 10.13.0.10 dev brOnline

ping/ssh to the outside are possible, also firefox is working with those settings.

Hint:

  • Those changes are not permanent. To do so, you need to edit /etc/network/interfaces.
  • I'm still not able to ping to the other VM's and vice versa, but this might be an other topic.
Cutton Eye
  • 3,207
  • 3
  • 20
  • 39