Hello,
I have a network composed of two computers (A and B).
On computer A I want to run qemu with the unikernel, the unikernel should
connect to computer B.
When I do this, the connect() call fails with "No route to host".
I configured a tap interface for qemu:
ip tuntap add tap0 mode tap
ip addr add 10.0.120.100/24 dev tap0
ip link set dev tap0 up
rumprun -D ...:
qemu-system-x86_64 -net nic,model=virtio,macaddr=52:54:00:5c:15:50 -net
tap,script=no,ifname=tap0 -no-kvm -drive if=virtio,file=fs.img,format=raw -m 64
-curses -kernel camera.bin -append {,,
"net" : {,,
"if": "vioif0",,
"type": "inet",,
"method": "static",,
"addr": "10.0.120.101",,
"mask": "24",,
},,
"blk" : {,,
"source": "dev",,
"path": "/dev/ld0a",,
"fstype": "blk",,
"mountpoint": "/data",,
},,
"cmdline": "camera.bin 12312",,
},,
The computer A is at 192.168.0.101/24, while B is at 192.168.0.251.
So because the unikernel (10.0.120.101) is on another subnet it cannot reach
computer B.
So I tried to set up a bridge [1] and "ip a" shows this (while qemu is running):
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group
default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
master br0 state UP group default qlen 1000
link/ether f0:76:1c:4a:0c:69 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default
qlen 1000
link/ether 4c:bb:58:52:25:1e brd ff:ff:ff:ff:ff:ff
7: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group
default qlen 1000
link/ether 62:9b:f2:c2:a5:29 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.101/24 brd 192.168.0.255 scope global br0
valid_lft forever preferred_lft forever
inet6 fe80::ec08:9cff:fe2b:d645/64 scope link
valid_lft forever preferred_lft forever
8: tap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0
state UP group default qlen 500
link/ether 62:9b:f2:c2:a5:29 brd ff:ff:ff:ff:ff:ff
inet 10.0.120.100/24 scope global tap0
valid_lft forever preferred_lft forever
inet6 fe80::609b:f2ff:fec2:a529/64 scope link
valid_lft forever preferred_lft forever
"brctl show":
bridge name bridge id STP enabled interfaces
br0 8000.629bf2c2a529 no eth0
tap0
Regardless of the bridge, the backed application fails at connect() with "No
route to host".
I do not have experience with networking, but my gut says that I should
configure qemu to route everything through 192.168.0.1 (my router).
Can you guys tell me what I got wrong?
[1] https://github.com/rumpkernel/wiki/wiki/Howto%3A-Networking-with-if_virt
PS: If I run the baked applicatio directly on computer A, it works fine.
--
Barbu Paul - Gheorghe
Common sense is not so common - Voltaire
Visit My GitHub profile to see my open-source projects -
https://github.com/paulbarbu