Monday 16 May 2011

Configuring Loopback Interface


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 phsyical 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
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)#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.

1 comment:

  1. how do you create a default route that points from the router via the Loopback interface ?

    ReplyDelete