Search

What is loopback address in IPv4

IPv4 has special reserved addresses called as loopback addresses. An entire Class A network itself is reserved as loopback network. The loopback network in IPv4 is 127.0.0.0 with a subnet mask of 255.0.0.0.

So, the range of loopback addresses in IPv4 is from 127.0.0.1 to 127.255.255.254. As mentioned in previous lessons, 127.0.0.0 is the network address and 127.255.255.255 is the directed broadcast address for 127.0.0.0 255.0.0.0 network.

Loopback IP addresses are managed by the TCP/IP protocol suite within the operating system. Loopback addresses mock TCP/IP Client/Server on the same machine. The loopback IP addresses are always available. Hence you can use the loopback IP addresses for TCP/IP troubleshooting purposes.

When any program/protocol sends data from a computer with any IPv4 loopback address as the destination address, the TCP/IP protocol stack on that computer process the traffic within itself without sending it to the network. In other words, if you ping to a loopback address, you get the reply from the TCP/IP protocol stack running on the same computer. Any data traffic sent to IPv4 loopback addresses from 127.0.0.1 to 127.255.255.254 as the destination IPv4 address will never appear on network.

loopback-network-ipv4.jpg

The most widely used IPv4 loopback address is 127.0.0.1. Loopback address is 127.0.0.1 is mapped to hostname localhost internally. Other IPv4 addresses in 127.0.0.0 255.0.0.0 network (from 127.0.0.1 to 127.255.255.254) are also up and reachable. For example; below two screen shots show the output of ping command (from a Windows machine) from two IPv4 loopback addresses. Both screen shots show that ping command got reply from loopback addresses.

Below screenshot shows ping reply from localhost IPv4 loopback address, 127.0.0.1.

loopback-address-test-1.jpg

Below screenshot shows ping reply from a random IPv4 loopback address from 127.0.0.0 255.0.0.0 network. The random IPv4 loopback address selected is 127.10.100.50.

loopback-address-test-2.jpg

Network address and directed broadcast address of loopback address range are not reachable. Please check below ping results to 127.0.0.0 and 127.255.255.255, which shows "General failure" in Windows TCP/IP implementation.

ping-127.0.0.0.jpg

ping-127.255.255.255.jpg

Related Tutorials
Introduction to TCP/IP, Features of TCP/IP, TCP/IP History, What is RFC (Request for Comments)
Seven Layers of OSI Model and functions of seven layers of OSI model
Five layered TCP/IP model
Network Layer (Layer 3)
TCP/IP Data Encapsulation and Decapsulation
Datalink Layer (Layer 2)
Ethernet Frame Format
What is MAC address or Layer 2 address or physical address
IPv4 Protocol, IPv4 header and fields of IPv4 header
IPv4 addresses, IPv4 Address Classes, IPv4 Address Classifications
What is Subnet Mask
What is network address
Limited broadcast address
Directed broadcast address
What is limited broadcast in IPv4 and how limited broadcast works
What is directed broadcast in IPv4 and how directed broadcast works
What is default gateway
What are private IP addresses - RFC 1918 private addresses
APIPA Addresses (Automatic Private IP Addresses)
What is loopback address in IPv4
What is localhost
Class A networks and Class A IP addresses
Class B networks and Class B IP addresses
Class C networks and Class C IP addresses
Class D multicast IP addresses
Subnetting - Part 1
Subnetting - Part 2
Subnetting - Part 3
Subnetting - Part 4
Subnetting - Part 5
Subnetting - Part 6
Variable Length Subnet Masking, VLSM, IP V4 Subnetting, subnetting tutorials, IP study guides, IP documentation, IP tutorials
Supernetting, IP Supernetting, IP Supernetting tutorial, How to Supernet, Supernetting Guide, Supernetting Concepts
How to find out the Network Address and Broadcast Address of a subnetted IPv4 address
Address Resolution Protocol Tutorial, How ARP work, ARP Message Format
What is Gratuitous ARP