You can set up communications between the host and guests, between guests, and between guests and the outside world.
When you design a network interface for a guest, you can use:
The iopkt-* devnp-vdevpeer-net.so driver runs in the hypervisor host. It enables the iopkt-* instance that is running in the hypervisor host to communicate with guests through appropriately configured virtual devices in the qvm process instances hosting guests (see devnp-vdevpeer-net.so in the Utilities and Drivers Reference chapter).
A virtio-net vdev offers peer-to-peer communication, either to another virtio-net in a guest, or to the devnp-vdevpeer-net.so driver running in the hypervisor host (see vdev virtio-net in the Virtual Device Reference chapter).
Note the following about assigning MAC addresses:
To support connectivity between guests in your hypervisor system, and between guests and the outside world, peer-to-peer networking must be be enabled in the host, along with a network driver (e.g., e1000).
You can do this by starting io-pkt-* in the host, using the -d vdevpeer-net option, specifying a physical network driver and the peer interfaces you want to create. You can use the command line to start io-pkt-* after the host has booted, or you can add theio-pkt-* startup instructions to the hypervisor host's startup scripts.
For reference, the following starts the host network driver that will be shared, and creates three interfaces, one for each guest in a hypervisor system with three guests:
io-pkt-v6-hc -d e1000 -d vdevpeer-net \ peer=/dev/qvm/qnx7-guest1/p2p,bind=/dev/vdevpeers/vp0,\ peer=/dev/qvm/qnx7-guest2/p2p,bind=/dev/vdevpeers/vp1,\ peer=/dev/qvm/linux-guest/p2p,bind=/dev/vdevpeers/vp2
The io-pkt-* -d option starts devnp-* drivers (see io-pkt-v4-hc, io-pkt-v6-hc in the QNX SDP Utilities Reference). In the example above, the e1000 driver is required only if your system needs to connect to the outside world (see Guest-to-world in this chapter). If you only need to connect guests to each other, you can omit this driver.
For more information about configuring peer interfaces, see vdev virtio-net in the Virtual Device Reference chapter. See also, devnp-vdevpeer-net.so in the Utilities and Drivers Reference chapter.