On 09/02/16 18:52, Barbu Paul - Gheorghe wrote:
On 02/09/2016 08:41 PM, Barbu Paul - Gheorghe wrote:
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",,
},,

Can you guys tell me what I got wrong?

I think I got it.
I should've used the router's subnet when setting up the unikernel:

So instead of:
ip addr add 10.0.120.100/24 dev tap0

I did:
ip addr add 192.168.0.102/24 dev tap0

An also, when running qemu, I didn't run it with 10.0.120.101, but with
192.168.0.103.

Sounds like you solved it, but just to clarify:

The IP address of machine A is irrelevant (unless you wish A to talk also with B, but that's sort of beyond the scope of the problem).

For the peers (B & unikernel) to be able to talk to one another, traffic must be routed. The easiest way is to put them on the same LAN, but you can also add an explicit route, both on the unikernel *and* host B. Page 223 of the blue book contains a slightly related example (well, one from the time before unikernels existed, but the principle is the same nonetheless). There is currently no easy to configure the routing table for a Rumprun guest except by using the route utility from rumpctrl.

In other words, networking as usual ;)

Reply via email to