xref: /freebsd/share/man/man4/lo.4 (revision 60117f9ee58e202be55a8af5bb6b6c768e7a940e)
1afe61c15SRodney W. Grimes.\" Copyright (c) 1983, 1991, 1993
23cb73e3dSRobert Watson.\"	The Regents of the University of California.
33cb73e3dSRobert Watson.\" Copyright (c) 2009 Robert N. M. Watson
43cb73e3dSRobert Watson.\" All rights reserved.
5afe61c15SRodney W. Grimes.\"
6afe61c15SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
7afe61c15SRodney W. Grimes.\" modification, are permitted provided that the following conditions
8afe61c15SRodney W. Grimes.\" are met:
9afe61c15SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
10afe61c15SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
11afe61c15SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
12afe61c15SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
13afe61c15SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
14fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors
15afe61c15SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
16afe61c15SRodney W. Grimes.\"    without specific prior written permission.
17afe61c15SRodney W. Grimes.\"
18afe61c15SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19afe61c15SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20afe61c15SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21afe61c15SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22afe61c15SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23afe61c15SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24afe61c15SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25afe61c15SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26afe61c15SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27afe61c15SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28afe61c15SRodney W. Grimes.\" SUCH DAMAGE.
29afe61c15SRodney W. Grimes.\"
30*60117f9eSMichael Tuexen.Dd June 23, 2024
31afe61c15SRodney W. Grimes.Dt LO 4
323d45e180SRuslan Ermilov.Os
33afe61c15SRodney W. Grimes.Sh NAME
34afe61c15SRodney W. Grimes.Nm lo
35afe61c15SRodney W. Grimes.Nd software loopback network interface
36afe61c15SRodney W. Grimes.Sh SYNOPSIS
37ec09ef4fSJens Schweikhardt.Cd "device loop"
38afe61c15SRodney W. Grimes.Sh DESCRIPTION
39afe61c15SRodney W. GrimesThe
40afe61c15SRodney W. Grimes.Nm loop
41afe61c15SRodney W. Grimesinterface is a software loopback mechanism which may be
42afe61c15SRodney W. Grimesused for performance analysis, software testing, and/or local
43afe61c15SRodney W. Grimescommunication.
44afe61c15SRodney W. GrimesAs with other network interfaces, the loopback interface must have
45afe61c15SRodney W. Grimesnetwork addresses assigned for each address family with which it is to be used.
46afe61c15SRodney W. GrimesThese addresses
47938f0fd5SGleb Smirnoffmay be set with the appropriate
48938f0fd5SGleb Smirnoff.Xr ioctl 2
49938f0fd5SGleb Smirnoffcommands for corresponding address families.
50afe61c15SRodney W. GrimesThe loopback interface should be the last interface configured,
51afe61c15SRodney W. Grimesas protocols may use the order of configuration as an indication of priority.
52afe61c15SRodney W. GrimesThe loopback should
53afe61c15SRodney W. Grimes.Em never
54afe61c15SRodney W. Grimesbe configured first unless no hardware
55afe61c15SRodney W. Grimesinterfaces exist.
563cb73e3dSRobert Watson.Pp
573cb73e3dSRobert WatsonIf the transmit checksum offload capability flag is enabled on a loopback
58*60117f9eSMichael Tuexeninterface, checksums will not be generated by IP, UDP, TCP, or SCTP for packets
593cb73e3dSRobert Watsonsent on the interface.
603cb73e3dSRobert Watson.Pp
613cb73e3dSRobert WatsonIf the receive checksum offload capability flag is enabled on a loopback
62*60117f9eSMichael Tuexeninterface, checksums will not be validated by IP, UDP, TCP, or SCTP for packets
633cb73e3dSRobert Watsonreceived on the interface.
643cb73e3dSRobert Watson.Pp
653cb73e3dSRobert WatsonBy default, both receive and transmit checksum flags will be enabled, in
663cb73e3dSRobert Watsonorder to avoid the overhead of checksumming for local communication where
673cb73e3dSRobert Watsondata corruption is unlikely.
683cb73e3dSRobert WatsonIf transmit checksum generation is disabled, then validation should also be
693cb73e3dSRobert Watsondisabled in order to avoid packets being dropped due to invalid checksums.
70afe61c15SRodney W. Grimes.Sh DIAGNOSTICS
71afe61c15SRodney W. Grimes.Bl -diag
72afe61c15SRodney W. Grimes.It lo%d: can't handle af%d.
73afe61c15SRodney W. GrimesThe interface was handed
74afe61c15SRodney W. Grimesa message with addresses formatted in an unsuitable address
75afe61c15SRodney W. Grimesfamily; the packet was dropped.
76afe61c15SRodney W. Grimes.El
77afe61c15SRodney W. Grimes.Sh SEE ALSO
780b992c1dSWolfram Schneider.Xr inet 4 ,
790b992c1dSWolfram Schneider.Xr intro 4
80e40f3f85SMike Pritchard.\" .Xr ns 4
81afe61c15SRodney W. Grimes.Sh HISTORY
82afe61c15SRodney W. GrimesThe
83afe61c15SRodney W. Grimes.Nm
84afe61c15SRodney W. Grimesdevice appeared in
85afe61c15SRodney W. Grimes.Bx 4.2 .
863cb73e3dSRobert WatsonThe current checksum generation and validation avoidance policy appeared in
873cb73e3dSRobert Watson.Fx 8.0 .
88