Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
host and vm on isolated network, there is ip but not ping
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message

Joined: 22 Mar 2006
Posts: 5643

PostPosted: Sat Jul 18, 2020 10:45 am    Post subject: host and vm on isolated network, there is ip but not ping Reply with quote


I've setup an vm with openwrt in it, defined a isolated lan between the vm and the host and booted the vm up.
I see the vm is up, made sure the vnic is visible in both the host and guest and added it to the br in the guest.
I've issued an dhcpd call on the vnic (labeled vnic0) in the host and got an ip, see:

dagg@NCC-5001D ~ $ dhcpcd vnet0
DUID 00:01:00:01:23:dd:d8:5b:e0:d5:5e:d9:f2:e2
vnet0: IAID 00:10:20:bf
vnet0: rebinding lease of
vnet0: probing address
vnet0: soliciting an IPv6 router
vnet0: leased for 43200 seconds
vnet0: adding route to
vnet0: adding default route via
forked to background, child pid 26279
dagg@NCC-5001D ~ $ ifconfig       
virtsw0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 52:54:00:3e:3f:88  txqueuelen 1000  (Ethernet)
        RX packets 123098  bytes 16327962 (15.5 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6  bytes 252 (252.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet  netmask  broadcast
        inet6 fe80::fc54:ff:fe10:20bf  prefixlen 64  scopeid 0x20<link>
        ether fe:54:00:10:20:bf  txqueuelen 1000  (Ethernet)
        RX packets 45  bytes 8002 (7.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 39  bytes 2676 (2.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

dagg@NCC-5001D ~ $ ping 
PING ( 56(84) bytes of data.
--- ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1018ms

the vm xml is this:

<domain type='kvm' id='11'>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static'>1</vcpu>
    <type arch='x86_64' machine='pc-q35-5.0'>hvm</type>
    <boot dev='hd'/>
    <bootmenu enable='no'/>
    <vmport state='off'/>
  <cpu mode='custom' match='exact' check='full'>
    <model fallback='forbid'>EPYC-IBPB</model>
    <feature policy='require' name='x2apic'/>
    <feature policy='require' name='tsc-deadline'/>
    <feature policy='require' name='hypervisor'/>
    <feature policy='require' name='tsc_adjust'/>
    <feature policy='require' name='arch-capabilities'/>
    <feature policy='require' name='xsaves'/>
    <feature policy='require' name='cmp_legacy'/>
    <feature policy='require' name='perfctr_core'/>
    <feature policy='require' name='clzero'/>
    <feature policy='require' name='virt-ssbd'/>
    <feature policy='require' name='rdctl-no'/>
    <feature policy='require' name='skip-l1dfl-vmentry'/>
    <feature policy='require' name='mds-no'/>
    <feature policy='disable' name='monitor'/>
    <feature policy='disable' name='svm'/>
    <feature policy='require' name='topoext'/>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/home/virt_admin/Machines/kvm/router_testing_image.qcow2' index='1'/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    <controller type='usb' index='0' model='qemu-xhci' ports='15'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    <controller type='sata' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    <controller type='pci' index='0' model='pcie-root'>
      <alias name='pcie.0'/>
    <controller type='pci' index='1' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='1' port='0x10'/>
      <alias name='pci.1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
    <controller type='pci' index='2' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='2' port='0x11'/>
      <alias name='pci.2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
    <controller type='pci' index='3' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='3' port='0x12'/>
      <alias name='pci.3'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
    <controller type='pci' index='4' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='4' port='0x13'/>
      <alias name='pci.4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
    <controller type='pci' index='5' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='5' port='0x14'/>
      <alias name='pci.5'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
    <interface type='network'>
      <mac address='52:54:00:10:20:bf'/>
      <source network='virtsw0' portid='f64df1d5-07e4-47cf-b1e2-136f71303f02' bridge='virtsw0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    <serial type='pty'>
      <source path='/dev/pts/2'/>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      <alias name='serial0'/>
    <console type='pty' tty='/dev/pts/2'>
      <source path='/dev/pts/2'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    <input type='mouse' bus='ps2'>
      <alias name='input0'/>
    <input type='keyboard' bus='ps2'>
      <alias name='input1'/>
    <graphics type='vnc' port='5900' autoport='yes' listen=''>
      <listen type='address' address=''/>
    <sound model='ich9'>
      <alias name='sound0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
      <model type='virtio' heads='1' primary='yes'>
        <acceleration accel3d='no'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source startupPolicy='optional'>
        <vendor id='0x2357'/>
        <product id='0x0601'/>
        <address bus='1' device='5'/>
      <alias name='hostdev0'/>
      <address type='usb' bus='0' port='1'/>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source startupPolicy='optional'>
        <vendor id='0x148f'/>
        <product id='0x5572'/>
        <address bus='3' device='3'/>
      <alias name='hostdev1'/>
      <address type='usb' bus='0' port='2'/>
    <redirdev bus='usb' type='spicevmc'>
      <alias name='redir0'/>
      <address type='usb' bus='0' port='3'/>
    <redirdev bus='usb' type='spicevmc'>
      <alias name='redir1'/>
      <address type='usb' bus='0' port='4'/>
    <memballoon model='virtio'>
      <stats period='5'/>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
  <seclabel type='dynamic' model='dac' relabel='yes'>

and virtsw0 is:

<network connections='1'>
  <bridge name='virtsw0' stp='on' delay='0'/>
  <mac address='52:54:00:3e:3f:88'/>

I have similar virtsw0 configuration on another machine with Debian and there is works ok.
emerge --info qemu libvirt

Portage 2.3.99 (python 3.7.8-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-10.1.0, glibc-2.30-r8, 5.7.9-gentoo x86_64)
                         System Settings
System uname: Linux-5.7.9-gentoo-x86_64-AMD_Ryzen_7_2700X_Eight-Core_Processor-with-gentoo-2.6
KiB Mem:    32902152 total,   8278696 free
KiB Swap:   16437244 total,  16434416 free
Head commit of repository gentoo: b24e47c083435bf7b7a7257ba22e13b7feddb5eb

sh bash 5.0_p17
ld GNU ld (Gentoo 2.33.1 p2) 2.33.1
app-shells/bash:          5.0_p17::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          2.7.18::gentoo, 3.7.8-r1::gentoo, 3.8.3-r1::gentoo
dev-util/cmake:           3.16.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.33.1-r1::gentoo
sys-devel/gcc:            10.1.0-r2::gentoo
sys-devel/gcc-config:     2.3::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.7::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r8::gentoo

    location: /mnt/portage/tree/official
    sync-type: git
    priority: -1000

    location: /mnt/portage/tree/overlay
    masters: gentoo kde
    priority: 0

    location: /var/lib/layman/kde
    sync-type: laymansync
    masters: gentoo
    priority: 50

ACCEPT_LICENSE="@FREE @FREE AdobeFlash-11.x MPEG-4 Skype-TOS linux-fw-redistributable no-source-code hplip-plugin OPERA-2014 unRAR fs2_open Alasir all-rights-reserved"
CFLAGS="-O2 -pipe -march=native -mtune=native"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native -mtune=native"
EMERGE_DEFAULT_OPTS="--keep-going --quiet-build=n"
FCFLAGS="-O2 -pipe -march=native -mtune=native"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs clean-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userpriv usersandbox usersync"
FFLAGS="-O2 -pipe -march=native -mtune=native"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en es"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
USE="X a52 aac acl acpi activities alsa amd64 berkdb bidi branding bzip2 cairo cdda cdr cli crypt cryptsetup cups d3d9 dbus declarative dri drm dts dvd dvdr elogind emboss encode exif ffmpeg flac fortran gdbm gif gpm gtk iconv icu ipv6 java joystick jpeg kde kipi kwallet lcms ldap libnotify libtirpc lm-sensors lm_sensors lto lvm mad matroska mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opencl opengl openmp osmesa pam pango pcre pdf pdfimport pgo phonon physics plasma png policykit postproc ppds python qml qt5 rar readline samba sdl seccomp sound spell split-usr sqlite ssl startup-notification svg system-harfbuzz system-heimdal system-icu system-jpeg system-jsoncpp system-libevent system-libvpx system-llvm system-sqlite system-webp tcpd tiff truetype udev udisks unicode upower usb vaapi vdpau vlc vorbis vulkan webkit widgets wxwidgets x264 x265 xattr xcb xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="evdev" KERNEL="linux" L10N="he es en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AArch64 ARM AMDGPU BPF" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python3_7" QEMU_SOFTMMU_TARGETS="x86_64 arm aarch64" QEMU_USER_TARGETS="x86_64 arm aarch64" RUBY_TARGETS="ruby25" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="v4l amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

                        Package Settings

app-emulation/qemu-5.0.0-r2::gentoo was built with the following:
USE="aio alsa bzip2 caps curl fdt filecaps gtk jpeg ncurses nls opengl pin-upstream-blobs png python sdl seccomp slirp spice ssh usb usbredir vde vhost-net virgl virtfs vnc xattr xkb -accessibility -capstone -debug -doc -glusterfs -gnutls -infiniband -io-uring -iscsi -jemalloc -lzo -nfs -numa -oss -plugins -pulseaudio -rbd -sasl -sdl-image (-selinux) -smartcard -snappy -static -static-user -systemtap -tci -test -vhost-user-fs -vte -xen -xfs -zstd" ABI_X86="(64)" PYTHON_TARGETS="python3_7 -python3_6 -python3_8" QEMU_SOFTMMU_TARGETS="aarch64 arm x86_64 -alpha -cris -hppa -i386 -lm32 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -moxie -nios2 -or1k -ppc -ppc64 -riscv32 -riscv64 -rx -s390x -sh4 -sh4eb -sparc -sparc64 -tricore -unicore32 -xtensa -xtensaeb" QEMU_USER_TARGETS="aarch64 arm x86_64 -aarch64_be -alpha -armeb -cris -hppa -i386 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -mipsn32 -mipsn32el -nios2 -or1k -ppc -ppc64 -ppc64abi32 -ppc64le -riscv32 -riscv64 -s390x -sh4 -sh4eb -sparc -sparc32plus -sparc64 -tilegx -xtensa -xtensaeb"
FEATURES="fixlafiles usersandbox unmerge-logs binpkg-dostrip pid-sandbox binpkg-docompress clean-logs usersync collision-protect config-protect-if-modified parallel-fetch binpkg-logs qa-unresolved-soname-deps distlocks unknown-features-warn sandbox userpriv assume-digests strict news protect-owned ebuild-locks network-sandbox unmerge-orphans merge-sync multilib-strict sfperms preserve-libs ipc-sandbox"

>>> Attempting to run pkg_info() for 'app-emulation/qemu-5.0.0-r2'

app-emulation/libvirt-6.2.0-r2::gentoo was built with the following:
USE="caps dbus libvirtd lvm macvtap nfs nls parted (policykit) qemu udev vepa virt-network -apparmor -audit -dtrace -firewalld -fuse -glusterfs -iscsi -iscsi-direct -libssh -lxc -numa (-openvz) -pcap -rbd -sasl (-selinux) -virtualbox -wireshark-plugins -xen -zfs" ABI_X86="(64)"

any ideas where to start looking?
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum