qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

QEMU support a mesh network of Tiny Linux VMs


From: Gary Lazarus
Subject: QEMU support a mesh network of Tiny Linux VMs
Date: Fri, 4 Feb 2022 08:15:58 +1100

Hi all,

I'm running QEMU 2.2.1 on RHEL 8.5 (Ootpa) on an i5.

I'm in the process of simulating a meshed network of small Tiny Linux (v12.0) dual interface systems using PXE. The first VM is connected to the default virtual network while the rest of the mesh is connected to isolated virtual networks which at present are just daisy chained.

Topology,
QEMU DHCP & NAT <-> default virt. Network <-> VM_1 <-> Isolated virt. Net_1 <-> VM_2 <-> Isolated virt. Net_2

I would like the DHCP service bound to the default network to service the entire mesh network of PXE devices. I want to use the inherent routing function of each VM node to pass the IP traffic and the DHCP requests via DHCRELAY on each Tiny Linux VM node.

I have done much experimenting and pouring through online posts and made solid progress but my remaining question is,
How do you configure the DHCP server via XML using the QEMU VIRT manager to support multiple subnets and define the IP address based on the IF MAC address?

My current default Virtual Network configuration is,

<network connections="1">
  <name>default</name>
  <uuid>54f3dcfa-addb-408f-b37f-0131cbb3a0de</uuid>
  <forward mode="nat">
    <nat>
      <port start="1024" end="65535"/>
    </nat>
  </forward>
  <bridge name="virbr0" stp="on" delay="0"/>
  <mac address="52:54:00:82:63:51"/>
  <ip address="192.168.100.1" netmask="255.255.255.0">
    <tftp root="/tftpboot"/>
    <dhcp>
      <range start="192.168.100.128" end="192.168.100.254"/>
      <host mac="52:54:00:6a:17:5c" name="vm1_0" ip="192.168.100.2"/>
      <host mac="52:54:00:4b:83:a0" name="vm1_1" ip="192.168.101.5"/>
      <host mac="52:54:00:f8:f3:c1" name="vm2_0" ip="192.168.101.3"/>
      <host mac="52:54:00:d9:bf:e9" name="vm2_1" ip="192.168.102.1"/>
      <bootp file="pxelinux.0"/>
    </dhcp>
  </ip>
</network>

The isolated network config is,

<network connections="1">
  <name>network-1</name>
  <uuid>9cd3ac49-0f1e-41b1-9816-ef2dc329219d</uuid>
  <bridge name="virbr1" stp="on" delay="0"/>
  <mac address="52:54:00:8a:f1:41"/>
  <domain name="network-1"/>
  <ip address="192.168.101.1" netmask="255.255.255.0">
  </ip>
</network>

Any help would be appreciated,
Thank you,
Gary

reply via email to

[Prev in Thread] Current Thread [Next in Thread]