22
submitted 5 months ago* (last edited 5 months ago) by FrostyPolicy@suppo.fi to c/linux@lemmy.ml

I have on the host machine two network interfaces. One is lan and the other is a wlan. For libvirt I have created a nat network which is bound to the wlan. From the guest I can access other machines in the network host wlan is connected to. Also DNS lookup works. The problem is that there's no connection to the internet at all, e.g. pinging something gives "Destination network unreachable". ~~This only happens when both network connection on the host are active.~~ Running qemu/libvirt on OpenSuse Tumbleweed.

The nat network in question:

<network>
  <name>natToWlan</name>
  <uuid>a44c939c-e6bf-44d0-8f86-376056d418a4</uuid>
  <forward dev="wlp19s0f4u1u1" mode="nat">
    <nat>
      <port start="1024" end="65535"/>
    </nat>
    <interface dev="wlp19s0f4u1u1"/>
  </forward>
  <bridge name="virbr1" stp="on" delay="0"/>
  <mac address="52:54:00:1f:64:95"/>
  <ip address="192.168.100.1" netmask="255.255.255.0">
    <dhcp>
      <range start="192.168.100.128" end="192.168.100.254"/>
    </dhcp>
  </ip>
</network>
you are viewing a single comment's thread
view the rest of the comments
[-] FrostyPolicy@suppo.fi 1 points 5 months ago

Have an idea which might solve this.

  1. Change the vm net config to NOT bind to specific host interface
  2. Change host networks so that there's only one default route (lan)
  3. Add routing to host that all traffic which goes to 192.168.102.x goes through the host wlan connection
this post was submitted on 20 May 2024
22 points (84.4% liked)

Linux

48179 readers
950 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS