Hi guys, I’m trying to test a server I’m writing and I’ve been wondering if I can simulate a LAN with Gnome Boxes. I need to be able to send requests to the server in the Guest OS from the Host and receive the replies.
From what I could find online, I would need to setup a tap device to do this. However it seems like I already have one:
▶ ifconfig
enp5s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.10 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::28b1:c96:58c8:b461 prefixlen 64 scopeid 0x20<link>
ether 08:60:6e:7b:cf:e8 txqueuelen 1000 (Ethernet)
RX packets 5914311 bytes 8383048729 (7.8 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3336213 bytes 253513648 (241.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 2450 bytes 1076315 (1.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2450 bytes 1076315 (1.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tap0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::fc05:50ff:fe2a:88a3 prefixlen 64 scopeid 0x20<link>
ether fe:05:50:2a:88:a3 txqueuelen 1000 (Ethernet)
RX packets 39 bytes 4704 (4.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 51 bytes 4974 (4.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:52:0b:c0 txqueuelen 1000 (Ethernet)
RX packets 39 bytes 4158 (4.0 KiB)
RX errors 0 dropped 5 overruns 0 frame 0
TX packets 6 bytes 492 (492.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
However pinging and trying to ping/connect to tap0
doesn’t work. I always get an Invalid Argument
Error.
My host is Fedora 31 (kernel 5.5) and my guest is Ubuntu 19.10 (kernel 5.3).
Do I need some to setup something else, or get into qemu’s configuration?