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 many example applications. It may be a communication channel with only one
communication endpoint. Any message transmitted by such a
channel is immediately and only received by that same channel. In telecommunications, loopback devices perform
transmission tests of
access
Access may refer to:
Companies and organizations
* ACCESS (Australia), an Australian youth network
* Access (credit card), a former credit card in the United Kingdom
* Access Co., a Japanese software company
* Access Healthcare, an Indian BPO ...
lines from the serving
switching center, which usually does not require the assistance of personnel at the served
terminal.
Loop around is a method of testing between stations that are not necessarily adjacent, wherein two lines are used, with the test being done at one station and the two lines are interconnected at the distant station. A
patch cable may also function as loopback, when applied manually or automatically, remotely or locally, facilitating a loop-back test.
Where a system (such as a
modem
A modulator-demodulator or modem is a computer hardware device that converts data from a digital format into a format suitable for an analog transmission medium such as telephone or radio. A modem transmits data by modulating one or more c ...
) involves round-trip analog-to-digital processing, a distinction is made between analog loopback, where the analog signal is looped back directly, and digital loopback, where the signal is processed in the digital domain before being re-converted to an analog signal and returned to the source.
Telecommunications
In
telecommunications
Telecommunication is the transmission of information by various types of technologies over wire, radio, optical, or other electromagnetic systems. It has its origin in the desire of humans for communication over a distance greater than tha ...
, loopback, or a loop, is a hardware or software method which feeds a received signal or data back to the sender. It is used as an aid in debugging physical connection problems. As a test, many data communication devices can be configured to send specific patterns (such as ''all ones'') on an interface and can detect the reception of this signal on the same port. This is called a loopback test and can be performed within a
modem
A modulator-demodulator or modem is a computer hardware device that converts data from a digital format into a format suitable for an analog transmission medium such as telephone or radio. A modem transmits data by modulating one or more c ...
or
transceiver by connecting its output to its own input. A circuit between two points in different locations may be tested by applying a test signal on the
circuit
Circuit may refer to:
Science and technology
Electrical engineering
* Electrical circuit, a complete electrical network with a closed-loop giving a return path for current
** Analog circuit, uses continuous signal levels
** Balanced circu ...
in one location, and having the network device at the other location send a signal back through the circuit. If this device receives its own signal back, this proves that the circuit is functioning.
A hardware loop is a simple device that physically connects the receiver channel to the transmitter channel. In the case of a network termination connector such as
X.21
X.21 (sometimes referred to as X21) is an interface specification for differential communications introduced in the mid-1970s by the ITU-T. X.21 was first introduced as a means to provide a digital signaling interface for telecommunications bet ...
, this is typically done by simply connecting the pins together in the connector. Media such as
optical fiber
An optical fiber, or optical fibre in Commonwealth English, is a flexible, transparency and translucency, transparent fiber made by Drawing (manufacturing), drawing glass (silica) or plastic to a diameter slightly thicker than that of a Hair ...
or
coaxial cable
Coaxial cable, or coax (pronounced ) is a type of electrical cable consisting of an inner conductor surrounded by a concentric conducting shield, with the two separated by a dielectric ( insulating material); many coaxial cables also have a ...
, which have separate transmit and receive connectors, can simply be looped together with a single strand of the appropriate medium.
A
modem
A modulator-demodulator or modem is a computer hardware device that converts data from a digital format into a format suitable for an analog transmission medium such as telephone or radio. A modem transmits data by modulating one or more c ...
can be configured to loop incoming signals from either the remote modem or the local
terminal. This is referred to as loopback or software loop.
Serial interfaces
A serial communications
transceiver can use loopback for testing its functionality. For example, a device's ''transmit'' pin connected to its ''receive'' pin will result in the device receiving exactly what it transmits. Moving this looping connection to the remote end of a cable adds the cable to this test. Moving it to the far end of a modem link extends the test further. This is a common troubleshooting technique and is often combined with a specialized test device that sends specific patterns and counts any errors that come back (see ''
Bit Error Rate Test''). Some devices include built-in loopback capability.
A simple serial interface loopback test, called ''paperclip test'', is sometimes used to identify serial ports of a computer and verify operation. It utilizes a terminal emulator application to send characters, with flow control set to off, to the serial port and receive the same back. For this purpose, a paperclip is used to short pin 2 to pin 3 (the receive and transmit pins) on a standard
RS-232 interface using
D-subminiature DE-9 or DB-25 connectors.
Virtual loopback interface
Implementations of the
Internet protocol suite include a
virtual network interface through which network applications can communicate when executing on the same machine. It is implemented entirely within the operating system's networking software and passes no packets to any
network interface controller. Any traffic that a computer program sends to a loopback IP address is simply and immediately passed back up the network software stack as if it had been received from another device.
Unix-like
A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-li ...
systems usually name this loopback interface
lo
or
lo0
.
Various
Internet Engineering Task Force
The Internet Engineering Task Force (IETF) is a standards organization for the Internet and is responsible for the technical standards that make up the Internet protocol suite (TCP/IP). It has no formal membership roster or requirements and ...
(IETF) standards reserve the IPv4 address block 127.0.0.0/8, in
CIDR notation and the IPv6 address ''::1/128'' for this purpose. The most common IPv4 address used is 127.0.0.1. Commonly these loopback addresses are mapped to the hostnames ''
localhost'' or ''loopback''.
MPLS
One notable exception to the use of the 127.0.0.0/8 network addresses is their use in
Multiprotocol Label Switching (MPLS) traceroute error detection, in which their property of not being routable provides a convenient means to avoid delivery of faulty packets to end users.
Martian packets
Any IP
datagram with a source or destination address set to a loopback address must not appear outside of a computing system, or be routed by any routing device. Packets received on an interface with a loopback destination address must be dropped. Such packets are sometimes referred to as
Martian packets.
As with other bogus packets, they may be malicious and any problems they might cause can be avoided by applying
bogon filtering.
Management interface
Some computer network equipment use the term "loopback" for a virtual interface used for management purposes. Unlike a proper loopback interface, this type of loopback device is not used to talk with itself.
Such an interface is assigned an address that can be accessed from management equipment over a network but is not assigned to any of the physical interfaces on the device. Such a loopback device is also used for management datagrams, such as alarms, originating from the equipment. The property that makes this virtual interface special is that applications that use it will send or receive traffic using the address assigned to the virtual interface as opposed to the address on the physical interface through which the traffic passes.
Loopback interfaces of this sort are often used in the operation of
routing protocol
A routing protocol specifies how routers communicate with each other to distribute information that enables them to select routes between nodes on a computer network. Routers perform the traffic directing functions on the Internet; data packet ...
s, because they have the useful property that, unlike real physical interfaces, they will not go down when a physical port fails.
Other applications
The audio systems
Open Sound System (OSS),
Advanced Linux Sound Architecture (ALSA) and
PulseAudio have loopback modules for recording the audio output of applications for testing purposes. Unlike physical loopbacks, this does not involve double analog/digital conversion and no disruption is caused by hardware malfunctions.
See also
*
Feedback
*
Loop device In Unix-like operating systems, a loop device, vnd (vnode disk), or lofi (loop file interface) is a pseudo-device that makes a computer file accessible as a block device.
Before use, a loop device must be connected to an extant file in the file ...
*
Virtual network interface
References
{{FS1037C MS188
External links
National Instruments: Serial loopback testing
Communication circuits
Internet architecture