Loopbacks are essentially internal virtual interfaces. Loopback interfaces are not bound to a physical port and are used for device management and routing protocols.
(switch (config)#) Create a loopback interface:
interface loopback 2
(switch (config interface loopback 2)#) Configure an IP address on the loopback interface:
ip address 20.20.20.20 /32
(switch#)
show interfaces loopback 2
show commands.