Previous page

Next page

Locate page in Contents

Print this page

Network Adapter Management Options

This group of options is used to manage virtual network adapters in a virtual machine.

Syntax

prlctl set <vm_ID|vm_name> { --device-add net | --device-set net <N> }

{ --type < routed> | --network <network_ID> } [ --mac <addr|auto> ]

[ --ipadd <addr [ / mask ] > | --ipdel <addr [ / mask ] > |

--dhcp < yes | no > | --dhcp6 < yes | no >] [ --gw <gw> ] [ --gw6 <gw> ]

[ --nameserver <addr> ] [ --searchdomain <addr> ]

[ --configure < yes | no >] [ --ipfilter < yes | no >] [ --macfilter < yes | no >]

[ --preventpromisc < yes | no >] [ --enable | --disable ]

[ --connect | --disconnect ] [ --adapter-type < e1000 | rtl | virtio >]

Options

Name

Description

<vm_ID|vm_name>

The virtual machine ID or name.

--device-add net

Adds a new virtual network adapter to the virtual machine.

--device-set net <N>

Modifies an existing virtual network adapter. To obtain the list of the available adapters, use the prlctl list command with the --info option.

--type < routed >

Sets the networking mode for the virtual network adapter to "routed". In this mode, the network adapter is communicating with the outside world through an internal virtual network adapter.

--network <network_ID>

Sets the networking mode for the virtual network adapter to "virtual_network". In this mode the adapter is connected to a virtual network specified by <network_ID> .

--mac < addr | auto >

Specifies the MAC address to assign to an existing network adapter. Specify a desired MAC address using the addr parameter value or use the auto option to generate the existing address automatically

--ipadd <addr [ / mask ] >

Adds an IP address and a mask (optional) to the network adapter.

--ipdel <addr [ / mask ] >

Deletes an IP address from the network adapter.

--dhcp < yes | no >

Specifies whether the virtual network adapter should obtain the IPv4 settings through a DHCP server.

--dhcp6 < yes | no >

Specifies whether the virtual network adapter should obtain the IPv6 settings through a DHCP server .

--gw <gw>

The default gateway to be used by the virtual machine.

--gw6 <gw>

The default IPv6 gateway to be used by the virtual machine.

--nameserver <addr>

The default DNS server address to be used by the virtual machine.

--searchdomain <addr>

The default search domain to be used by the virtual machine.

--configure < yes | no >

If set to "yes", the settings above are applied to the virtual network adapter instead of its original settings. Configuring any of the settings above automatically sets this option to "yes".

--ipfilter < yes | no >

Determines if the specified network adapter is configured to filter network packages by IP address. If set to "yes", the adapter is allowed to send packages only from IPs in the network adapter IP addresses list.

--macfilter < yes | no >

Determines if the specified network adapter is configured to filter network packages by MAC address. If set to "yes", the adapter is allowed to send packages only from its own MAC address.

--preventpromisc < yes | no >

Determines if the specified network adapter should reject packages not addressed to its virtual machine. If set to "yes", the adapter will drop such packages.

--enable | --disable

Enables or disable the network adapter. If omitted during the adapter creation, the adapter will be enabled.

--connect | --disconnect

Connects or disconnects the network adapter. When disconnected, the adapter is not removed from the virtual machine.

--adapter-type < e1000 | rtl | virtio >

Emulated network adapter:

  • e1000 — Intel 82545EM,
  • rtl — Realtek RTL8029,
  • virtio — VirtIO.

    Note: The adapter requires no additional configuration on supported Linux and FreeBSD guest operating systems. However, additional drivers need to be installed on Windows Server 2012 R2 guest OSes. For the drivers, visit https://alt.fedoraproject.org/pub/alt/virtio-win/latest/ . The VirtIO adapter is not supported on Windows Server 2003 and Windows Server 2008 guest operating systems.