Ethernet over USB

Using USB to connect to Ethernet

This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Ethernet over USB" – news · newspapers · books · scholar · JSTOR (September 2016) (Learn how and when to remove this message)

|

Ethernet over USB is the use of a USB link as a part of an Ethernet network, resulting in an Ethernet connection over USB (instead of e.g. PCI or PCIe).

## Protocols

[edit]

There are numerous protocols for Ethernet-style networking over USB. The use of these protocols is to allow application-independent exchange of data with USB devices, instead of specialized protocols such as video or MTP (Media Transfer Protocol). Even though the USB is not a physical Ethernet, the networking stacks of all major operating systems are set up to transport IEEE 802.3 frames, without needing a particular underlying transport.

The main industry protocols are Remote NDIS (RNDIS, a Microsoft vendor protocol), Ethernet Control Model (ECM), Ethernet Emulation Model (EEM), and Network Control Model (NCM). The latter three are part of the larger Communications Device Class (CDC) group of protocols of the USB Implementers Forum (USB-IF). They are available for download from the USB-IF (see below). The RNDIS specification is available from Microsoft's website. Regarding de facto standards, some standards, such as ECM, specify the use of USB resources that early systems did not have. However, minor modifications of the standard subsets make practical implementations possible on such platforms. Remarkably, even some of the most modern platforms need minor accommodations and therefore support for these subsets is still needed.

Of these protocols, ECM could be classified as the simplest—frames are simply sent and received without modification one at a time. This was a satisfactory strategy for USB 1.1 full-speed systems (current when the protocol was issued) with 64-byte packets but not for USB 2.0 high-speed systems which use 512-byte packets. Ethernet frames may range from 64 to 1522 bytes. This maximum is just under 3 USB high-speed packets or 24 USB full-speed packets.

The USB system works by each packet being sent as a transfer, a series of maximum-length packets terminated by a short packet or a special ZLP (zero-length packet). After this, there is bus latency, where nothing is sent until another transfer can be initiated. This issue reduces bus occupancy, meaning that nothing is sent for considerable fractions of bus time. A gap every 24 frames is not noticeable, but a gap every three frames can be viewed as very costly to throughput.[citation needed]

As USB has become faster, devices utilize more data and hence there is now demand for sending large amounts of data—either to be stored on the device or be relayed over wireless links (see 3GPP Long Term Evolution).

These new devices are still much lower in power than desktop PCs, thus the issue of careful data handling arises, to maximize use of DMA resources on the device and minimize (or eliminate) copying of data (zero-copy). The NCM protocol has elaborate provisions for this. See the link below for protocol comparisons.

## Linux-specific driver

[edit]

The USB-eth module in Linux makes the computer running it a variation of an Ethernet device that uses USB as the physical medium. It creates a Linux network interface, which can be assigned an IP address and otherwise treated the same as a true Ethernet interface. Any applications that work over real Ethernet interfaces will work over a USB-Ethernet interface without modification, as there is no distinction between utilizing proper or improper Ethernet hardware.[1][2]

On Linux hosts, the corresponding Ethernet-over-USB kernel module is called usbnet. The Bahia Network Driver[3] is a usbnet-style driver available for Win32 hosts.

The approach allows devices with very limited communications hardware to operate over IP networks. The Linux kernel for the iPAQ uses this communications strategy exclusively since the iPAQ hardware has neither an accessible legacy (RS-232/RS-422) serial port nor a dedicated network interface.

## References

[edit]

1. ^ Embedded.com—Linux-based USB Devices
2. ^ "How to Use USB Device Networking | Linux USB Network". developer.ridgerun.com. 13 August 2018. Retrieved 2022-10-17.
3. ^ BND—Bahia Network Driver

## External links

[edit]

* CDC Subclass Specification for Ethernet Emulation Model Devices 1.0

* v
* t
* e

USB

* USB Implementers Forum
* Hardware
* connectors
* cabling
* power

Versions|

* 1.0
* 1.1
* 2.0
* 3.0
* USB-C
* USB4
* USB On-The-Go

Device classes|

* Mass storage
* Flash drive
* FlashCard
* UASP
* SSD
* Human interface
* Video
* Communications

Security|

* Juice jacking
* BadUSB
* USB flash drive security
* USB killer

Other|

* Enhanced mini-USB
* Ethernet over USB
* Decoration
* Hub
* Serial adapter
* PoweredUSB
* WebUSB

*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template