QEMU/Devices/Network: Difference between revisions

From Computernewb Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 24: Line 24:
| Realtek 8139C+ Fast Ethernet
| Realtek 8139C+ Fast Ethernet
| PCI
| PCI
| 10-100 MB/s
| 10-100 Mb/s
| This card is built into Windows XP+ and almost every modern Linux and BSD distribution. There are drivers available for Windows 95 and above from Realtek's website. There's also a packet driver available for MS-DOS and FreeDOS.
| This card has built-in drivers on Windows XP+ and almost every modern Linux and BSD distribution. There are drivers available for Windows 95 and above from Realtek's website. There's also a packet driver available for MS-DOS and FreeDOS.
| Windows: Windows 95
| Windows: Windows 95


Line 35: Line 35:
| Intel PRO/1000 MT Desktop Adapter
| Intel PRO/1000 MT Desktop Adapter
| PCI
| PCI
| 1 GB/s
| 1 Gb/s
| This is the default card in QEMU. It is recommended for use in modern Windows and Linux hosts.
| This is the default card in QEMU. It is recommended for use in modern Windows and Linux hosts.
| Windows: Windows XP
| Windows: Windows XP
|-
|-
| virtio
| virtio (virtio-net-pci)
| Red Hat Virtio Network Card
| Red Hat Virtio Network Card
| PCI
| PCI
| 10 Gb/s (as reported by link rate)
| 1 GB/s
| The fastest paravirtualized network adapter QEMU supports. Modern Linux (and the last Intel macOS releases) have a built in driver, but Windows requires installation of a special driver. Its throughput is limited only by network conditions (topping at about 60-70 Gb/s on a Windows guest). Additionally, with supported network types (TAP, Open vSwitch, etc...), virtio supports vhost for moving the data plane into the kernel, reducing context switches and increasing performance further. Vhost can also be used with a user-space dataplane.
| The Virtio network card is the fastest network card available for QEMU, performing better than 1Gb/s. Modern Linux has a built in driver but Windows requires installation of a special driver.
| Windows: Windows 2000
| Windows: Windows 2000
|-
|-
| vmxnet3
| vmxnet3
| VMWare Paravirtual NIC
| VMware Paravirtual NIC
| PCI
| PCI
| 1 GB/s
| 1 Gb/s
| Requires installation of a special driver.
| VMware's paravirtualized network adapter. Requires installation of a special driver.
| ?
| ?
|-
|-
Line 56: Line 56:
| AMD PCNet-Fast III Ethernet Adapter
| AMD PCNet-Fast III Ethernet Adapter
| PCI
| PCI
| 10 MB/s
| 10 Mb/s
| AMD PCnet card. Recommended for older Linux and Windows guests.
| AMD PCnet card. Recommended for older Linux and Windows guests.
| Windows: Windows 3.1
| Windows: Windows 3.1
Line 63: Line 63:
| Novell NE2000
| Novell NE2000
| PCI
| PCI
| 10 MB/s
| 10 Mb/s
| Novell NE2000 Ethernet card from the late 1980s. This card will work on older Windows hosts (Windows XP and below), Linux, QNX, BSD, and various UNIX hosts. It is recommended to use this with older hosts. While versions of Windows older than Windows XP do not include a driver for this card, there exists some third-party NE2000 compatible drivers available for Vista, 7, 8, 10.
| Novell NE2000 Ethernet card from the late 1980s. This card will work on older Windows hosts (Windows XP and below), Linux, QNX, BSD, and various UNIX hosts. It is recommended to use this with older hosts. While versions of Windows older than Windows XP do not include a driver for this card, there exists some third-party NE2000 compatible drivers available for Vista, 7, 8, 10.
| ?
| ?
Line 70: Line 70:
| Novell NE2000
| Novell NE2000
| ISA
| ISA
| 10 MB/s
| 10 Mb/s
| NE2000 Ethernet card from the late 1980s. This runs on the ISA bus instead of the PCI bus. If your VM is emulating an ISA-only machine, and you want networking, then use this card. While versions of Windows older than Windows XP do not include a driver for this card, there exists some third-party NE2000 compatible drivers available for Vista, 7, 8, 10.
| NE2000 Ethernet card from the late 1980s. This runs on the ISA bus instead of the PCI bus. If your VM is emulating an ISA-only machine, and you want networking, then use this card. While versions of Windows older than Windows XP do not include a driver for this card, there exists some third-party NE2000 compatible drivers available for Vista, 7, 8, 10.
| ?
| ?
Line 77: Line 77:
| Intel i82551 ethernet
| Intel i82551 ethernet
| PCI
| PCI
| 10-100 MB/s
| 10-100 Mb/s
| Intel i82551 ethernet card.
| Intel i82551 ethernet card.
| ?
| ?
Line 84: Line 84:
| Intel i82557b ethernet
| Intel i82557b ethernet
| PCI
| PCI
| 10-100 MB/s
| 10-100 Mb/s
| Intel i82557b ethernet card.
| Intel i82557b ethernet card.
| ?
| ?
Line 91: Line 91:
| Intel i82559er ethernet
| Intel i82559er ethernet
| PCI
| PCI
| 10-100 MB/s
| 10-100 Mb/s
| Intel i82559er ethernet card.
| Intel i82559er ethernet card.
| ?
| ?
Line 105: Line 105:
| Intel 82545em ethernet
| Intel 82545em ethernet
| PCI
| PCI
| 1 GB/s
| 1 Gb/s
| Intel Network Card, emulated by e1000.
| Intel Network Card, emulated by e1000.
| Windows: Windows Server 2003
| Windows: Windows Server 2003
Line 180: Line 180:
|-
|-
| i82801
| i82801
| ?
| PCI
| ?
| ?
| ?
|-
| virtio-net-pci
| ?
| ?
| PCI
| PCI

Latest revision as of 07:34, 28 August 2024

Network cards can be added to QEMU very easily. It's somewhat of a special command because while it can be added through the standard way, there's a much easier way to add them by using -net nic,model=<model>.

Note that QEMU will always add a network card (e1000), even if -net nic is not specified. To disable this, add -net none to your startup arguments.

How to add a virtual card

You can add a card with the following:

qemu-system-(arch) -net nic,model=(model)

You may also need to add -net user to be able to access the internet correctly. To see a full list of network devices, add -net nic,model=? to the arguments.

Devices

x86

Model Name Bus Speed Description Minimum OS
rtl8139 Realtek 8139C+ Fast Ethernet PCI 10-100 Mb/s This card has built-in drivers on Windows XP+ and almost every modern Linux and BSD distribution. There are drivers available for Windows 95 and above from Realtek's website. There's also a packet driver available for MS-DOS and FreeDOS. Windows: Windows 95

Linux: Kernel 2.5.5

MS-DOS: MS-DOS 3.x

e1000 Intel PRO/1000 MT Desktop Adapter PCI 1 Gb/s This is the default card in QEMU. It is recommended for use in modern Windows and Linux hosts. Windows: Windows XP
virtio (virtio-net-pci) Red Hat Virtio Network Card PCI 10 Gb/s (as reported by link rate) The fastest paravirtualized network adapter QEMU supports. Modern Linux (and the last Intel macOS releases) have a built in driver, but Windows requires installation of a special driver. Its throughput is limited only by network conditions (topping at about 60-70 Gb/s on a Windows guest). Additionally, with supported network types (TAP, Open vSwitch, etc...), virtio supports vhost for moving the data plane into the kernel, reducing context switches and increasing performance further. Vhost can also be used with a user-space dataplane. Windows: Windows 2000
vmxnet3 VMware Paravirtual NIC PCI 1 Gb/s VMware's paravirtualized network adapter. Requires installation of a special driver. ?
pcnet AMD PCNet-Fast III Ethernet Adapter PCI 10 Mb/s AMD PCnet card. Recommended for older Linux and Windows guests. Windows: Windows 3.1
ne2k_pci Novell NE2000 PCI 10 Mb/s Novell NE2000 Ethernet card from the late 1980s. This card will work on older Windows hosts (Windows XP and below), Linux, QNX, BSD, and various UNIX hosts. It is recommended to use this with older hosts. While versions of Windows older than Windows XP do not include a driver for this card, there exists some third-party NE2000 compatible drivers available for Vista, 7, 8, 10. ?
ne2k_isa Novell NE2000 ISA 10 Mb/s NE2000 Ethernet card from the late 1980s. This runs on the ISA bus instead of the PCI bus. If your VM is emulating an ISA-only machine, and you want networking, then use this card. While versions of Windows older than Windows XP do not include a driver for this card, there exists some third-party NE2000 compatible drivers available for Vista, 7, 8, 10. ?
i82551 Intel i82551 ethernet PCI 10-100 Mb/s Intel i82551 ethernet card. ?
i82557b Intel i82557b ethernet PCI 10-100 Mb/s Intel i82557b ethernet card. ?
i82559er Intel i82559er ethernet PCI 10-100 Mb/s Intel i82559er ethernet card. ?
e1000-82544gc ? PCI ? ? ?
e1000-82545em Intel 82545em ethernet PCI 1 Gb/s Intel Network Card, emulated by e1000. Windows: Windows Server 2003
e1000e ? PCI ? ? ?
i82550 ? PCI ? ? ?
i82557a ? PCI ? ? ?
i82557c ? PCI ? ? ?
i82558a ? PCI ? ? ?
i82558b ? PCI ? ? ?
i82559a ? PCI ? ? ?
i82559b ? PCI ? ? ?
i82559c ? PCI ? ? ?
i82562 ? PCI ? ? ?
i82801 ? PCI ? ? ?