Pedro sent you a question.
Thanks Pedro for the question.
Pedro asked What is the purpose of the loopback interfaces.
Now if you do a search in google you'll find all kinds of answers including that the loopback interface
allows you to test connectivity to the 127 0 0 1 IP address.
Now that may be true on the PC but on a Cisco device a loopback interface has an entirely different
meaning in the apology.
I've got three routers Router one wrote two and wrote a three configured with these IP addresses on
rodded to show IP interface brief shows us that the router has IP addresses configured on the gigabit
interfaces so gigabit 0 0 0 0 1 and 0 2 have IP addresses.
Now in this example these are virtual routers but if they were physical routers and a cable got disconnected
or got cut or broken in some way the interface would go down.
The difference between a physical interface and a loop back interface is a loopback interface is a logical
interface on a router and you can create many of these.
So I notice as soon as I Karaite to that logical interface the interfaces come up.
I can then give that interface an IP address such as this.
Notice it's a Slusher 32 IP address.
In other words this is the only IP address on that interface.
A loopback interface is a logical interface on a router that won't go down unless you manually shut
the interface down.
It typically only has one IP address but you could configure multiple IP addresses on that interface
if you wanted to.
The first advantage of the loopback interface is the interface doesn't go down unless you explicitly
shut it down.
So it's not like there's a cable that can be unplugged and then interface goes down.
Now why is that important when you telnet to a router so let's say telnet from wrote a one to Rodda
to.
I could telnet to one of the gigabit interfaces on the router so telnet tended wondered wonder to notice
I can log in.
So I'm not connected to rodded to go back to route of one.
And then all telnet to the second IP address 10 1 to 2.
Now that's fine.
But firstly you need to remember which IP address is configured on which router.
And secondly if for some reason an interface went down so let's say the cable was disconnected rather
than me shutting it down manually here you would have a problem telnetting back to that IP address 10
1 1 2 because the interface has gone down.
However if you have the loopback IP address configured on the router and you advertise that loop back
through a writing protocol such as always P.F. you can telnet to that loopback using this network or
this network.
So if one of the interfaces goes down it's not a problem because she can still reach the loopback interface.
So at the moment on route one we can't ping the loopback of wrote it to because it's not advertised
in a writing protocol.
So what I'll do here is enable your GOP
and I'll do something similar.
Yes.
Enable you GOP and all interfaces and let's do the same thing.
I wrote a three.
Now once the neighbor relationships have been established which they have done in this example so show
IP GOP neighbors neighbor relationship rodder one can ping the loop back over it too.
So now I can telnet to the loopback of Rodda too even though the interfaces don't notice gigabit 00
is currently down.
So by the same token if we brought up that gigabit 00 interface but then shut gigabit 0 to
my telnet session still continues.
So I notice that telnet session stayed up that would always happen in the real world.
It depends how long the connection takes to establish but not a show IP interface brief.
I'm still able to telnet to the loopback of route a two from Router one because the telnet traffic is
using the alternate route so it doesn't matter if interface's go down or come up as long as I've got
one route between wrote a one and wrote it.
I can connect to the loopback and manage the router through the loopback interface.
It's also a lot easier if you use a separate subnet for your management network.
In this example I'm just going to keep it simple and create loop packs with IP addresses.
Quotable one credible two and quadruple three.
So I'll simply create an IP address on one with the loopback address and I'll do the same on rotas 3
on one show IP route.
We have two routes to get to the loop of route.
Two and two routes to get to the Luebeck of rotas street.
So paying quotables three telnet quotables three telnet is not working.
Let's have a look.
So show run pipe begin Vicci why.
Notice I've got transport input none line Vicci y 0 for transport input and I'll just say all tell it
again.
We can log in to write a three.
So from a management point of view it's a lot easier to use LOOP banks.
You might not want to do it the way I've done it in the real world.
You might have a separate network that you use for management.
So in this example I'll just use one on two network.
And actually what I'll do is create a separate loopback.
So put this back to quadruple T and create a additional loop back for 1 and 2 1 6 8 1 to 2.
So I could do something like this to make it consistent.
So use interface loop back to it's always good practice to keep it simple.
So I use the same loopback number.
Don't do what I've done here.
Try to keep them consistent.
So let's change that.
No interface.
Loopback one interface loop back one line to notice however it's very easy to create loopback interfaces
just create as many as you like
there are normally some kind of limitation on the router.
But notice the numbers that we could use here.
You could use really long numbers if you wanted to but in this example I'll just keep it simple and
use one on two.
So show IP ront.
We've now learnt the roots of the loop backs and now all I need to remember is that when I telnet to
write it to it's 1 2 1 6 8 1 dot and the router which is door to when I want to tell me it derogate
3 it's 1 9 2 1 6 8 1 dot Roda 3 so 10 1 and 2 1 6 8 1 2 3.
And I can log in.
So that's the first reason Pedros for using loopback interfaces cover a another reason in a separate
blog.