A network interface controller (NIC, also known as a network interface card,
network adapter, LAN adapter or physical network interface, and by similar terms) is a
computer hardware
Computer hardware includes the physical parts of a computer, such as the computer case, case, central processing unit (CPU), Random-access memory, random access memory (RAM), Computer monitor, monitor, Computer mouse, mouse, Computer keyboard, ...
component that connects a
computer
A computer is a machine that can be programmed to Execution (computing), carry out sequences of arithmetic or logical operations (computation) automatically. Modern digital electronic computers can perform generic sets of operations known as C ...
to a
computer network.
Early network interface controllers were commonly implemented on
expansion cards that plugged into a
computer bus
In computer architecture, a bus (shortened form of the Latin '' omnibus'', and historically also called data highway or databus) is a communication system that transfers data between components inside a computer, or between computers. This ex ...
. The low cost and ubiquity of the
Ethernet standard means that most newer computers have a network interface built into the
motherboard
A motherboard (also called mainboard, main circuit board, mb, mboard, backplane board, base board, system board, logic board (only in Apple computers) or mobo) is the main printed circuit board (PCB) in general-purpose computers and other expand ...
, or is contained into a
USB-connected
dongle
A dongle is a small piece of computer hardware that connects to a port on another device to provide it with additional functionality, or enable a pass-through to such a device that adds functionality.
In computing, the term was initially synonym ...
.
Modern network interface controllers offer advanced features such as
interrupt and
DMA
DMA may refer to:
Arts
* ''DMA'' (magazine), a defunct dance music magazine
* Dallas Museum of Art, an art museum in Texas, US
* Danish Music Awards, an award show held in Denmark
* BT Digital Music Awards, an annual event in the UK
* Doctor of M ...
interfaces to the host processors, support for multiple receive and transmit queues, partitioning into multiple logical interfaces, and on-controller network traffic processing such as the
TCP offload engine.
Purpose
The network controller implements the electronic circuitry required to communicate using a specific
physical layer
In the seven-layer OSI model of computer networking, the physical layer or layer 1 is the first and lowest layer; The layer most closely associated with the physical connection between devices. This layer may be implemented by a PHY chip.
The ...
and
data link layer standard such as
Ethernet or
Wi-Fi. This provides a base for a full network
protocol stack, allowing communication among computers on the same
local area network (LAN) and large-scale network communications through routable protocols, such as
Internet Protocol (IP).
The NIC allows computers to communicate over a computer network, either by using cables or wirelessly. The NIC is both a physical layer and data link layer device, as it provides physical access to a networking medium and, for
IEEE 802 and similar networks, provides a low-level addressing system through the use of
MAC addresses that are uniquely assigned to network interfaces.
Implementation

Network controllers were originally implemented as expansion cards that plugged into a computer bus. The low cost and ubiquity of the Ethernet standard means that most new computers have a network interface controller built into the motherboard. Newer
server motherboards may have multiple network interfaces built-in. The Ethernet capabilities are either
integrated into the motherboard
chipset or implemented via a low-cost dedicated Ethernet chip. A separate network card is typically no longer required unless additional independent network connections are needed or some non-Ethernet type of network is used. A general trend in computer hardware is towards
integrating the various components of systems on a chip, and this is also applied to network interface cards.
An Ethernet network controller typically has an
8P8C
A modular connector is a type of electrical connector for cords and cables of electronic devices and appliances, such as in computer networking, telecommunication equipment, and audio headsets.
Modular connectors were originally developed for ...
socket where the network cable is connected. Older NICs also supplied
BNC, or
AUI connections. Ethernet network controllers typically support 10
Mbit/s Ethernet,
100 Mbit/s Ethernet, and
1000 Mbit/s Ethernet varieties. Such controllers are designated as ''
10/100/1000
Ethernet over twisted-pair technologies use twisted-pair cables for the physical layer of an Ethernet computer network. They are a subset of all Ethernet physical layers.
Early Ethernet used various grades of coaxial cable, but in 1984, StarL ...
'', meaning that they can support data rates of 10, 100 or 1000 Mbit/s.
10 Gigabit Ethernet
10 Gigabit Ethernet (10GE, 10GbE, or 10 GigE) is a group of computer networking technologies for transmitting Ethernet frames at a rate of 10 gigabits per second. It was first defined by the IEEE 802.3ae-2002 standard. Unlike previous Eth ...
NICs are also available, and, , are beginning to be available on
computer motherboard
A motherboard (also called mainboard, main circuit board, mb, mboard, backplane board, base board, system board, logic board (only in Apple computers) or mobo) is the main printed circuit board (PCB) in general-purpose computers and other expand ...
s.

Modular designs like
SFP and SFP+ are highly popular, especially for
fiber-optic communication
Fiber-optic communication is a method of transmitting information from one place to another by sending pulses of infrared light through an optical fiber. The light is a form of carrier wave that is modulated to carry information. Fiber is pref ...
. These define a standard receptacle for media-dependent transceivers, so users can easily adapt the network interface to their needs.
LEDs adjacent to or integrated into the network connector inform the user of whether the network is connected, and when data activity occurs.
The NIC may use one or more of the following techniques to indicate the availability of packets to transfer:
*
Polling is where the
CPU
A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuitry that executes instructions comprising a computer program. The CPU performs basic arithmetic, logic, controlling, and ...
examines the status of the
peripheral
A peripheral or peripheral device is an auxiliary device used to put information into and get information out of a computer. The term ''peripheral device'' refers to all hardware components that are attached to a computer and are controlled by the ...
under program control.
*
Interrupt-driven I/O is where the peripheral alerts the CPU that it is ready to transfer data.
NICs may use one or more of the following techniques to transfer packet data:
*
Programmed input/output, where the CPU moves the data to or from the NIC to memory.
*
Direct memory access (DMA), where a device other than the CPU assumes control of the
system bus
A system bus is a single computer bus that connects the major components of a computer system,
combining the functions of a data bus to carry information, an address bus to determine where it should be sent or read from, and a control bus to dete ...
to move data to or from the NIC to memory. This removes load from the CPU but requires more logic on the card. In addition, a packet buffer on the NIC may not be required and
latency can be reduced.
Performance and advanced functionality

''Multiqueue NICs'' provide multiple transmit and receive
queues, allowing packets received by the NIC to be assigned to one of its receive queues. The NIC may distribute incoming traffic between the receive queues using a
hash function. Each receive queue is assigned to a separate
interrupt; by routing each of those interrupts to different
CPU
A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuitry that executes instructions comprising a computer program. The CPU performs basic arithmetic, logic, controlling, and ...
s or
CPU cores, processing of the interrupt requests triggered by the network traffic received by a single NIC can be distributed improving performance.
The hardware-based distribution of the interrupts, described above, is referred to as ''receive-side scaling'' (RSS).
Purely software implementations also exist, such as the
receive packet steering (RPS) and
receive flow steering
In digital computers, an interrupt (sometimes referred to as a trap) is a request for the central processing unit, processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If ...
(RFS).
Further performance improvements can be achieved by routing the interrupt requests to the CPUs or cores executing the applications that are the ultimate destinations for
network packets that generated the interrupts. This technique improves
Locality of reference and results in higher overall performance, reduced latency and better hardware utilization because of the higher utilization of
CPU caches and fewer required
context switch
In computing, a context switch is the process of storing the state of a process or thread, so that it can be restored and resume execution at a later point, and then restoring a different, previously saved, state. This allows multiple processes ...
es. Examples of such implementations are the RFS
and
Intel ''Flow Director''.
With multi-queue NICs, additional performance improvements can be achieved by distributing outgoing traffic among different transmit queues. By assigning different transmit queues to different CPUs or CPU cores, internal operating system contentions can be avoided. This approach is usually referred to as ''transmit packet steering'' (XPS).
Some products feature ''NIC partitioning'' (NPAR, also known as ''port partitioning'') that uses
SR-IOV virtualization to divide a single 10 Gigabit Ethernet NIC into multiple discrete virtual NICs with dedicated bandwidth, which are presented to the firmware and operating system as separate
PCI device function
PCI configuration space is the underlying way that the Conventional PCI, PCI-X and PCI Express perform auto configuration of the cards inserted into their bus.
Overview
PCI devices have a set of registers referred to as ''configuration space ...
s.
TCP offload engine is a technology used in some NICs to offload processing of the entire
TCP/IP stack to the network controller. It is primarily used with high-speed network interfaces, such as Gigabit Ethernet and 10 Gigabit Ethernet, for which the processing overhead of the network stack becomes significant.
Some NICs offer integrated
field-programmable gate array
A field-programmable gate array (FPGA) is an integrated circuit designed to be configured by a customer or a designer after manufacturinghence the term '' field-programmable''. The FPGA configuration is generally specified using a hardware d ...
s (FPGAs) for user-programmable processing of network traffic before it reaches the host computer, allowing for significantly reduced
latencies in time-sensitive workloads. Moreover, some NICs offer complete low-latency
TCP/IP stacks running on integrated FPGAs in combination with
userspace libraries that intercept networking operations usually performed by the
operating system kernel
The kernel is a computer program at the core of a computer's operating system and generally has complete control over everything in the system. It is the portion of the operating system code that is always resident in memory and facilitates in ...
; Solarflare's open-source ''OpenOnload'' network stack that runs on
Linux is an example. This kind of functionality is usually referred to as ''user-level networking''.
See also
*
Converged network adapter (CNA)
*
Host adapter
*
Intel Data Direct I/O (DDIO)
*
Loopback interface
Loopback (also written loop-back) is the routing of electronic signals or digital data streams back to their source without intentional processing or modification. It is primarily a means of testing the communications infrastructure.
There are m ...
*
Network monitoring interface card A network monitoring interface card or NMIC is similar to a network card (NIC). However, unlike a standard network card, an NMIC is designed to passively (and silently) listen on a network. At a functional level, an NMIC may differ from a NIC, in th ...
(NMIC)
*
Virtual network interface (VIF)
*
Wireless network interface controller (WNIC)
Notes
References
External links
*
*
Multi-queue network interfaces with SMP on Linux
{{Basic computer components
Ethernet
Networking hardware