Routed network can't reach outside network
Greetings folks. I've setup libvirtd on my manjaro linux laptop. Got a couple of VM's running (Win10 and Debian10) through NAT without any issues. This is what the current network diagram looks like and it works fine: +---+ | +-+ | | | +--+| | | | |Win 10 VM || | | | |10.1.1.10 || | | | +--+| | | Laptop| | | | Manjaro | +-+ | | | 10.0.0.10 | |Debian 10 VM | | | +>+ | |10.1.1.11| | | | | | +-+ | | | | |NAT | | | | |10.1.1.0/24 | | | | +-+ | ++ | +---+ |router | | |switch +---+ |10.0.0.0/24 | | +-+ ++ | |Desktop | +>+Manjaro | |10.0.0.11| +-+ But now I need the debian machine to be accessible from another host on the lan 10.0.0.0/24 which of course is outside the host. That network diagram would look like this: +-+ | +--+ | | | +--+ | | | | |Win 10 VM | | | | | |10.1.1.10 | | | | | NAT +--+ | | | | 10.1.1.0/24 | | | +--+ | | Laptop | +>+ Manjaro ++ | | | 10.0.0.10 |+-+ | | | | ||Debian 10 VM | | | | | ||10.2.2.10| | | | | | Routed +-+ | | ++ | | | 10.2.2.0/24| | |router | | | ++ | |switch +---+ +-+ |10.0.0.0/24 | | ++ | | | +-+ | |Desktop | +>+Manjaro | |10.0.0.11| +-+ So, I've setup a 'routed network' for the Debian 10 VM but it's not working as I would expect. The host can ping the Debian VM and the Debian VM can ping the host but the Debian VM cannot ping the router 10.0.0.1 or any ip address on the internet. I've been using Virtual Machine Manager to set everything up. And this is how the routed network is configured routed 970a25f7-29b6-4a6b-b890-f593eae4fc15 Any idea on what i might be doing wrong? Thanks in advance. Cheers Rui Correia
Re: Routed network can't reach outside network
On Sun, Jul 19, 2020 at 11:54:06AM +0100, Rui Correia wrote: > Greetings folks. > I've setup libvirtd on my manjaro linux laptop. > Got a couple of VM's running (Win10 and Debian10) through NAT without any > issues. > > This is what the current network diagram looks like and it works fine: > >+---+ >| +-+ | >| | +--+| | >| | |Win 10 VM || | >| | |10.1.1.10 || | >| | +--+| | >| Laptop| | | >| Manjaro | +-+ | | >| 10.0.0.10 | |Debian 10 VM | | | > +>+ | |10.1.1.11| | | > | | | +-+ | | > | | |NAT | | > | | |10.1.1.0/24 | | > | | +-+ | > ++ | +---+ > |router | | > |switch +---+ > |10.0.0.0/24 | | +-+ > ++ | |Desktop | > +>+Manjaro | >|10.0.0.11| >+-+ > > But now I need the debian machine to be accessible from another host on the > lan 10.0.0.0/24 which of course is outside the host. > That network diagram would look like this: > >+-+ >| +--+ | >| | +--+ | | >| | |Win 10 VM | | | >| | |10.1.1.10 | | | >| | NAT +--+ | | >| | 10.1.1.0/24 | | >| +--+ | >| Laptop | > +>+ Manjaro ++ | > | | 10.0.0.10 |+-+ | | > | | ||Debian 10 VM | | | > | | ||10.2.2.10| | | > | | | Routed +-+ | | > ++ | | | 10.2.2.0/24| | > |router | | | ++ | > |switch +---+ +-+ > |10.0.0.0/24 | | > ++ | > | > | +-+ > | |Desktop | > +>+Manjaro | >|10.0.0.11| >+-+ > > > So, I've setup a 'routed network' for the Debian 10 VM but it's not working > as I would expect. > The host can ping the Debian VM and the Debian VM can ping the host but the > Debian VM cannot ping the router 10.0.0.1 or any ip address on the internet. > I've been using Virtual Machine Manager to set everything up. > And this is how the routed network is configured > > routed > 970a25f7-29b6-4a6b-b890-f593eae4fc15 > > > > > > > > > > > > > > Any idea on what i might be doing wrong? Is net.ipv4.ip_forward set to 0 ? Also, for this to work fully, your router switch needs to know where to send traffic for the 10.2.2.1/24 network. IOW, you need to configure static routes on your router switch for 10.2.2.1 I've covered a similar setup to yours here: https://www.berrange.com/posts/2009/12/13/routed-subnets-without-nat-for-libvirt-managed-virtual-machines-in-fedora/ Regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :| |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|
host and vm on isolated network, there is ip (via dhcp) but not ping
Greetings, 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 192.168.1.130 vnet0: probing address 192.168.1.130/24 vnet0: soliciting an IPv6 router vnet0: leased 192.168.1.130 for 43200 seconds vnet0: adding route to 192.168.1.0/24 vnet0: adding default route via 192.168.1.1 forked to background, child pid 26279 dagg@NCC-5001D ~ $ ifconfig virtsw0: flags=4163 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 mtu 1500 inet 192.168.1.130 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::fc54:ff:fe10:20bf prefixlen 64 scopeid 0x20 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 192.168.1.1 PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. ^C --- 192.168.1.1 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1018ms the vm's xml can be found at https://pastebin.com/1gXBGcPb virtsw0 is defined as follows: virtsw0 c8eb15a3-cc5c-4bd6-8f3b-5790792ddccc the os is gentoo, the versions are libvirt-6.2.0 qemu-5.0.0. I have another server running debian 10 with the same virtsw0 definition, there the connection is working. /var/lib/libvirt/dnsmasq/virtsw0.macs has only [] in it, can that be the issue? Thanks, Dagg.
dns test
please ignore