Networking

You can up 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.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.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.so driver running in the hypervisor host (see vdev virtio-net).

Transmit Segmentation Offload (TSO)

When setting up your peer-to-peer network, consider using Transmit Segmentation Offload (TSO), which allows your NIC to manage the packets. For example, the ifconfig startup in your guest might look something like this:

ifconfig vt1 tcp4csum udp4csum tcp6csum udp6csum tso4 tso6

If you use TSO, you should use the virtio-net vdev peerfeats option. For example:

vdev virtio-net
    ...
    peerfeats 0x00007fc3

See vdev virtio-net in the Configuration chapter.

For more information about TSO, see “Transmit Segmentation Offload (TSO)” in the Core Networking Stack User's Guide, and ifconfig in the Utilities Reference.

MAC addresses in a hypervisor system

Note the following about assigning MAC addresses:

Enabling peer-to-peer networking

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.

You can do this by starting io-pkt-* in the host, using the vdevpeer option and specifying the 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. This is already implemented in the QNX Hypervisor reference images.

For reference, the following creates three interfaces, one for each guest in a hypervisor system with three guests:

io-pkt-v6-hc -d e1000 -d vdevpeer \
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

For more information about configuring peer interfaces, see vdev virtio-net in the Configuration chapter. See also, devnp-vdevpeer.so in the Utilities and Drivers Reference chapter.