Why do we need a loopback IP address?
There are several kinds of IP address. We use public IP address to connect the Ethernet. Except public IP address. we still have private IP address, reserved IP address.
The reserved address 127.0.0.1, which is also called loopback address.
Why we need a loopback IP address?
Reason1: Device identification. Ping 127.0.0.1 to see whether the device is online.
Reason2: Routing information. Sometimes we need a IP address for router telnet. we assume the IP address always will not down. so the virtual address is the perfect choice.
Reason3: Packet filtering. Stateless firewall filters can be applied to the loopback address to filter packets originating from, or destined for, the Routing Engine.
Reason4: Testing network/IP based application. When testing network/IP based applications(such as we need to validate a web), which sends a data packet to a loopback address, the data packet will be sent back. so we can test an application with an instance of server and client on the same machine, even without access to a physical network.
Note: IPv6 represents its loopback address as simply ::1
Have fun and Thank you!
Reference:
- https://www.lifewire.com/what-is-a-private-ip-address-2625970
- https://www.juniper.net/documentation/en_US/junos/topics/concept/interface-security-loopback-understanding.html
- https://www.lifewire.com/network-computer-special-ip-address-818385