A loopback address is a special IP address that always refers to the local device itself.
Packets sent to a loopback address never leave the computer. Instead, they are immediately returned by the operating system's network stack.
Loopback addresses are primarily used for:
The entire IPv4 block:
127.0.0.0/8
is reserved for loopback.
The most commonly used address is:
127.0.0.1
This address is often referred to as:
IPv6 defines a single loopback address:
::1
This serves the same purpose as 127.0.0.1 in IPv4.
Suppose an application sends data to:
127.0.0.1
The operating system immediately routes the packet back to itself.
The packet never reaches:
Example:
Application
│
▼
127.0.0.1
│
▼
Operating System
│
└──────────────┐
│
▼
Same Computer
The hostname:
localhost
normally resolves to:
IPv4
127.0.0.1
IPv6
::1
Most operating systems include this mapping by default.
Loopback addresses are commonly used for:
Example:
http://127.0.0.1 or http://localhost
Both normally access a web server running on the same computer.
One of the simplest networking tests is:
ping 127.0.0.1
If this succeeds, the operating system's TCP/IP stack is functioning correctly.
Example output:
Reply from 127.0.0.1 bytes=32 time<1ms
If this test fails, the problem is usually within the local operating system rather than the physical network.
No.
Every device has its own loopback interface.
For example:
Computer A
127.0.0.1
and
Computer B
127.0.0.1
refer to different computers.
A loopback address is never reachable across the network.
| Loopback | Private Address |
|---|---|
| Refers to the local computer | Refers to a device on a local network |
| Never leaves the operating system | Can communicate with other devices on the LAN |
| 127.0.0.1 | 192.168.1.25 |
Telenegar IP Check automatically identifies loopback addresses.
Example:
Input: 127.0.0.1 Classification: Loopback Address
This helps distinguish loopback addresses from public and private IP addresses.
loopback localhost 127.0.0.1 ipv4 ipv6 networking