Networking

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:

A virtio-net vdev offers peer-to-peer communication; for more information, see vdev virtio-net in the “Virtual Device Reference” chapter.

The devnp-vdevpeer-net.so driver runs in the hypervisor host. It enables the iopkt-* service in the host to communicate with guests through appropriately configured vdevs in the qvm process instances that host the guests. For more information, see devnp-vdevpeer-net.so in the “Utilities and Drivers Reference” chapter.

Note: Support for tap interfaces for virtio-net is deprecated.

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 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 the io-pkt-* startup instructions to the hypervisor host's startup scripts.

The following command starts the host network driver that will be shared, and creates one interface for each of three guests in a hypervisor system:

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.