Lab 2-8 – Configuring a Loopback Interface
Learn how to create and configure loopback interfaces on a Cisco Router.
Real World Application
Loopback interfaces are commonly used in a variety of scenarios including management interface, tunnel source/destination, network link simulation, dynamic routing process router id and others. As a CCNA you’ll need to be able to create and remove loopback interfaces from a Cisco device.
Lab Prerequisites
- If you’re using GNS3 than load the Stub Area Networking GNS3 topology than start R1.
- Establish a Console session with Router 1.
Lab Objectives
- Create interface loopback 1 and assign the IP address 10.233.21.251 255.255.255.0 to the interface.
- Remove interface Loopback 1.
Lab Instruction
Loopback interfaces are software based logical interfaces that are “always up”. They are not tied to any physical interface therefore they cannot go down unless they are administratively shut down.
To create a loopback interface you need to navigate to global configuration mode and execute the command interface loopback # The interface is created automagically. Configuration shown below;
Router con0 is now available Press RETURN to get started. Router>enable Password: Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#interface loopback ? <0-2147483647> Loopback interface number Router(config)#interface loopback 1 %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up Router(config-if)#
After the interface is created you’ll notice the interface changes to state up instantly. As per the objective you’re required to configure the IP address 10.233.21.251/24 on this interface as shown below;
Router(config-if)#ip address 10.233.21.251 255.255.255.0
Objective 2 request that we remove the Loopback 1 interface, you can remove loopback interfaces by negating the interface command using the no interface loopback # command as shown below;
Router(config-if)#no interface loopback 1
% Not all config may be removed and may reappear after reactivating the
logical-interface/sub-interfaces
Router(config)#
%LINK-5-CHANGED: Interface Loopback1, changed state to administratively down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to down
Once you’ve removed the interface you’ll notice a warning that not all config may have been removed and may reappear after reactivating the logical-interface/sub-interface.
This has been an issue with Cisco IOS for years and it has yet to be fixed. Basically this warning is letting you know that once you remove a logical or sub-interface using the no interface command there is the potential for some of the previous configuration to return when re-creating the same interface. If you experience this issue, a router reload will resolve this problem.
we sometimes use loopback interface for routing protocols configuration testing.
i guess that you cannot remove the Loopback interface that has been created if you are inside the interface global configuration mode. You need to exit the interface global configuration mode, and from the global configuration mode you can now remove the Loopback interface that you have created.
on this example: can you remove interface loopback 1 inside the interface global config mode? tnx
Router(config-if)#no interface loopback 1
% Not all config may be removed and may reappear after reactivating the
logical-interface/sub-interfaces
Router(config)#
%LINK-5-CHANGED: Interface Loopback1, changed state to administratively down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to down