IPv4 Loopback Interfaces
A loopback interface is a logical interface that is internal to the router. Such interface is not assigned to a physical port and can never be connected to any other device.
It is considered to be a software-based interface that is automatically placed in an “up” state, as long as the Router is functional.
The loopback interface is usually used for testing and managing a Cisco IOS device since it always ensures that at least one interface will always be available and active.
Usually, Loopback interfaces are commonly used in lab environments to create additional interfaces.
Router Interface Configuration
Enter Global Configuration mode
R1> enable R1# configure terminal Enter configuration commands, one per line. End with CNTL/Z.
Enabling and assigning a loopback address
R1(config)# interface loopback [number] R1(config-if)# ip address [ip-address] [subnet-mask]
Interface Configuration Complete Example
R1> enable R1# configure terminal R1(config)# interface loopback 0 R1(config-if)# ip address 192.168.20.240 255.255.255.0 R1(config-if)# exit R1(config)# %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up
[NOTE] Multiple loopback interfaces are allowed to be enabled on a router, but the IPv4 address for each loopback interface must be unique and not already in use.