The commands in this section describe how to create, delete, and manage loopback interfaces. A loopback interface is always expected to be up. This interface can provide the source address for sent packets and can receive both local and remote packets. The loopback interface is typically used by routing protocols.
interface loopback
Use this command to enter the Interface Config mode for a loopback interface. The range of the loopback ID is 0 to 7.
Format: interface loopback <loopback-id>
Mode: Global Config
no interface loopback
This command removes the loopback interface and associated configuration parameters for the specified loopback interface.
Format: no interface loopback <loopback-id>
Mode: Global Config
show interface loopback
This command displays information about configured loopback interfaces.
Format: show interface loopback <loopback-id>
Mode: Privileged EXEC
If you do not specify a loopback ID, the following information appears for each loopback interface on the system:
Loopback ID: The loopback ID associated with the rest of the information in the row.
Interface: The interface name.
IP Address: The IPv4 address of the interface.
Received Packets: The number of packets received on this interface.
Sent Packets: The number of packets transmitted from this interface.
IPv6 Address: The IPv6 address of this interface.
If you specify a loopback ID, the following information appears:
Interface Link Status: Shows whether the link is up or down.
IP Address: The IPv4 address of the interface.
IPv6 is enabled (disabled): Shows whether IPv6 is enabled on the interface.
IPv6 Address/Length is: The IPv6 address of the interface.
MTU size: The maximum transmission size for packets on this interface, in bytes.