:: [DNG] I'm going to need to make a b…
Top Page
Delete this message
Reply to this message
Author: Steve Litt
Date:  
To: dng
CC: oclug
Subject: [DNG] I'm going to need to make a block diagram of bridge/tap/qemu networking
Hi all,

I've been hoping to discover a cookbook recipe for shellscripts to
create the necessary scripts for networking on the host, the necessary
scripts for spawning the qemu guest, and the necessary scripts/config
on the qemu guest, to make the qemu guest just another peer on my
192.168.0.0/24 LAN.

Well, that just didn't work. The Internet is full of contradictory
anecdotes and guesses, most of which are series of mouseclicks rather
than shellscripts. And I've ruled out VirtualBox and Gnome Boxes
because I want to automate this process. For the same reason plus
entangulation with dbus I've ruled out virt-manager. So like it or not,
pure command line qemu is the horse I'm going to ride.

For three days I've tried various combinations based on Internet
writings and advice from friends, but there are just too many variables
to get it exactly right. There's only one solution: I need to learn
enough about bridge devices, tap devices, and VM guest networking that
I can draw a block diagram of the entire networking situation, so I can
intelligently probe any interaction point for troubleshooting, enabling
me to intelligently narrow down the root cause of failure.

Here's what *seems* to be true according to my readings:

A bridge (software bridge) passes TCP packets between separate network
segments (or maybe Ethernet frames???), and more importantly, although
not necessarily universally true, between IP subnets. So it can pass
packets between 192.168.0.0/24 and 10.0.2.0/24. So a bridge
kinda-sorta-but-not-really resembles a physical network switch, in
which each physical port is a software port (not to be confused with
the kind of port like ssh's port 22) to which can be attached a TAP
device.

A TAP device is a *virtual* network *device* (I think of it as a
virtual network card) that operates at OSI level 2, meaning it passes
entire Ethernet frames (whereas TUN is level 3 and passes only IP
packets). It can be connected to a software network bridge to
communicate with everyone else.

That's all I know right now, but I intend to find out more and more,
until I have a complete understanding of qemu/bridge/tap/tun
networking. Any knowledge anyone can give me is greatly appreciated.

Thanks,

SteveT

Steve Litt
Autumn 2020 featured book: Thriving in Tough Times
http://www.troubleshooters.com/thrive