cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2887
Views
0
Helpful
3
Replies

Why are loopback interfaces used?

cosimodagostino
Level 1
Level 1

I have read that they are used for router id election or to check if the router is active. If the router has all its interfaces turned off what do I need to ping the router interfaces? the interfaces are all off ..... Besides these reasons, are there any others? The Cisco books are not very clear aside from the election of the ospf router id

1 Accepted Solution

Accepted Solutions

Joseph W. Doherty
Hall of Fame
Hall of Fame

Primary reason for using a loopback interface, it's always up (unless you configured it to be shutdown).

Reason it's often used for a router ID, it doesn't change the router's ID as does a physical interface that goes down.  I.e. improves stability for the routing protocol.

As to using as a ping target (or for management), assuming routing is configured correctly, the device can be reached if any physical interface provides connectivity, whereas if you used a physical interface, and that interface goes down, you would need to select another interface that's reachable and "up".  BTW, this also works using a loopback as the device's source interface for various protocols, e.g. telneting from the device.

View solution in original post

3 Replies 3

Joseph W. Doherty
Hall of Fame
Hall of Fame

Primary reason for using a loopback interface, it's always up (unless you configured it to be shutdown).

Reason it's often used for a router ID, it doesn't change the router's ID as does a physical interface that goes down.  I.e. improves stability for the routing protocol.

As to using as a ping target (or for management), assuming routing is configured correctly, the device can be reached if any physical interface provides connectivity, whereas if you used a physical interface, and that interface goes down, you would need to select another interface that's reachable and "up".  BTW, this also works using a loopback as the device's source interface for various protocols, e.g. telneting from the device.

If a physical interface goes down with the loopback interface can I access the device without selecting another physical interface?What if all the physical interfaces go down?That is, if I telnet to the router at a loopback interface, on which router interface does the traffic physically cross the router?

If all physical interfaces go down, you cannot access the device (except perhaps via a console or aux port).

If there's any physical interface working, yes (maybe) you can continue to access the device using a loopback interface.  Again, this requires a path to the device.  (BTW, in fact, while connecting to a loopback, if the current physical interface drops, which your traffic is transiting on, you might not even notice the interface drop.  [NB: this is just theory, I've first hand experience.])

Normally, using a loopback interface, the traffic goes via the "best" physical interface (currently active, and reachable).