1
00:00:21,730 --> 00:00:23,870
Pedro sent you a question.

2
00:00:23,980 --> 00:00:25,920
Thanks Pedro for the question.

3
00:00:26,440 --> 00:00:30,700
Pedro asked What is the purpose of the loopback interfaces.

4
00:00:30,700 --> 00:00:38,110
Now if you do a search in google you'll find all kinds of answers including that the loopback interface

5
00:00:38,140 --> 00:00:44,680
allows you to test connectivity to the 127 0 0 1 IP address.

6
00:00:44,680 --> 00:00:51,890
Now that may be true on the PC but on a Cisco device a loopback interface has an entirely different

7
00:00:51,920 --> 00:00:54,040
meaning in the apology.

8
00:00:54,040 --> 00:01:01,760
I've got three routers Router one wrote two and wrote a three configured with these IP addresses on

9
00:01:01,780 --> 00:01:10,840
rodded to show IP interface brief shows us that the router has IP addresses configured on the gigabit

10
00:01:10,840 --> 00:01:18,790
interfaces so gigabit 0 0 0 0 1 and 0 2 have IP addresses.

11
00:01:18,790 --> 00:01:25,300
Now in this example these are virtual routers but if they were physical routers and a cable got disconnected

12
00:01:25,330 --> 00:01:30,650
or got cut or broken in some way the interface would go down.

13
00:01:30,910 --> 00:01:38,920
The difference between a physical interface and a loop back interface is a loopback interface is a logical

14
00:01:38,920 --> 00:01:42,620
interface on a router and you can create many of these.

15
00:01:42,670 --> 00:01:48,190
So I notice as soon as I Karaite to that logical interface the interfaces come up.

16
00:01:48,190 --> 00:01:53,430
I can then give that interface an IP address such as this.

17
00:01:53,530 --> 00:01:57,070
Notice it's a Slusher 32 IP address.

18
00:01:57,070 --> 00:02:01,900
In other words this is the only IP address on that interface.

19
00:02:01,900 --> 00:02:08,980
A loopback interface is a logical interface on a router that won't go down unless you manually shut

20
00:02:09,070 --> 00:02:10,680
the interface down.

21
00:02:10,750 --> 00:02:18,520
It typically only has one IP address but you could configure multiple IP addresses on that interface

22
00:02:18,520 --> 00:02:20,370
if you wanted to.

23
00:02:20,380 --> 00:02:26,620
The first advantage of the loopback interface is the interface doesn't go down unless you explicitly

24
00:02:26,620 --> 00:02:28,140
shut it down.

25
00:02:28,210 --> 00:02:33,290
So it's not like there's a cable that can be unplugged and then interface goes down.

26
00:02:33,340 --> 00:02:39,040
Now why is that important when you telnet to a router so let's say telnet from wrote a one to Rodda

27
00:02:39,070 --> 00:02:40,210
to.

28
00:02:40,240 --> 00:02:48,630
I could telnet to one of the gigabit interfaces on the router so telnet tended wondered wonder to notice

29
00:02:48,640 --> 00:02:49,720
I can log in.

30
00:02:49,870 --> 00:02:54,120
So I'm not connected to rodded to go back to route of one.

31
00:02:54,460 --> 00:03:01,020
And then all telnet to the second IP address 10 1 to 2.

32
00:03:01,060 --> 00:03:01,890
Now that's fine.

33
00:03:02,140 --> 00:03:06,870
But firstly you need to remember which IP address is configured on which router.

34
00:03:07,180 --> 00:03:16,510
And secondly if for some reason an interface went down so let's say the cable was disconnected rather

35
00:03:16,510 --> 00:03:23,380
than me shutting it down manually here you would have a problem telnetting back to that IP address 10

36
00:03:23,380 --> 00:03:27,210
1 1 2 because the interface has gone down.

37
00:03:27,220 --> 00:03:33,790
However if you have the loopback IP address configured on the router and you advertise that loop back

38
00:03:33,850 --> 00:03:41,210
through a writing protocol such as always P.F. you can telnet to that loopback using this network or

39
00:03:41,380 --> 00:03:42,850
this network.

40
00:03:42,850 --> 00:03:49,490
So if one of the interfaces goes down it's not a problem because she can still reach the loopback interface.

41
00:03:49,530 --> 00:03:55,410
So at the moment on route one we can't ping the loopback of wrote it to because it's not advertised

42
00:03:55,830 --> 00:03:57,070
in a writing protocol.

43
00:03:57,330 --> 00:04:00,900
So what I'll do here is enable your GOP

44
00:04:03,500 --> 00:04:04,820
and I'll do something similar.

45
00:04:04,890 --> 00:04:05,860
Yes.

46
00:04:07,850 --> 00:04:12,640
Enable you GOP and all interfaces and let's do the same thing.

47
00:04:12,950 --> 00:04:19,600
I wrote a three.

48
00:04:19,750 --> 00:04:25,130
Now once the neighbor relationships have been established which they have done in this example so show

49
00:04:25,130 --> 00:04:31,600
IP GOP neighbors neighbor relationship rodder one can ping the loop back over it too.

50
00:04:32,000 --> 00:04:43,490
So now I can telnet to the loopback of Rodda too even though the interfaces don't notice gigabit 00

51
00:04:43,670 --> 00:04:45,230
is currently down.

52
00:04:45,860 --> 00:04:57,020
So by the same token if we brought up that gigabit 00 interface but then shut gigabit 0 to

53
00:05:00,380 --> 00:05:02,690
my telnet session still continues.

54
00:05:02,690 --> 00:05:07,010
So I notice that telnet session stayed up that would always happen in the real world.

55
00:05:07,010 --> 00:05:13,250
It depends how long the connection takes to establish but not a show IP interface brief.

56
00:05:13,250 --> 00:05:20,720
I'm still able to telnet to the loopback of route a two from Router one because the telnet traffic is

57
00:05:20,720 --> 00:05:31,540
using the alternate route so it doesn't matter if interface's go down or come up as long as I've got

58
00:05:31,550 --> 00:05:34,080
one route between wrote a one and wrote it.

59
00:05:34,550 --> 00:05:40,160
I can connect to the loopback and manage the router through the loopback interface.

60
00:05:40,170 --> 00:05:46,360
It's also a lot easier if you use a separate subnet for your management network.

61
00:05:46,440 --> 00:05:52,780
In this example I'm just going to keep it simple and create loop packs with IP addresses.

62
00:05:52,920 --> 00:05:56,260
Quotable one credible two and quadruple three.

63
00:05:56,700 --> 00:06:07,950
So I'll simply create an IP address on one with the loopback address and I'll do the same on rotas 3

64
00:06:12,590 --> 00:06:15,530
on one show IP route.

65
00:06:15,800 --> 00:06:18,390
We have two routes to get to the loop of route.

66
00:06:18,410 --> 00:06:23,020
Two and two routes to get to the Luebeck of rotas street.

67
00:06:23,300 --> 00:06:30,560
So paying quotables three telnet quotables three telnet is not working.

68
00:06:30,560 --> 00:06:31,590
Let's have a look.

69
00:06:31,590 --> 00:06:36,220
So show run pipe begin Vicci why.

70
00:06:36,480 --> 00:06:46,860
Notice I've got transport input none line Vicci y 0 for transport input and I'll just say all tell it

71
00:06:46,860 --> 00:06:48,180
again.

72
00:06:48,330 --> 00:06:50,930
We can log in to write a three.

73
00:06:51,050 --> 00:06:55,580
So from a management point of view it's a lot easier to use LOOP banks.

74
00:06:55,910 --> 00:06:58,800
You might not want to do it the way I've done it in the real world.

75
00:06:58,970 --> 00:07:04,220
You might have a separate network that you use for management.

76
00:07:04,220 --> 00:07:09,670
So in this example I'll just use one on two network.

77
00:07:09,920 --> 00:07:13,970
And actually what I'll do is create a separate loopback.

78
00:07:14,060 --> 00:07:24,900
So put this back to quadruple T and create a additional loop back for 1 and 2 1 6 8 1 to 2.

79
00:07:25,370 --> 00:07:28,440
So I could do something like this to make it consistent.

80
00:07:28,550 --> 00:07:34,850
So use interface loop back to it's always good practice to keep it simple.

81
00:07:36,230 --> 00:07:38,970
So I use the same loopback number.

82
00:07:39,030 --> 00:07:40,740
Don't do what I've done here.

83
00:07:40,740 --> 00:07:42,340
Try to keep them consistent.

84
00:07:43,340 --> 00:07:44,510
So let's change that.

85
00:07:44,510 --> 00:07:46,000
No interface.

86
00:07:46,350 --> 00:07:53,120
Loopback one interface loop back one line to notice however it's very easy to create loopback interfaces

87
00:07:54,110 --> 00:07:55,370
just create as many as you like

88
00:08:00,930 --> 00:08:03,680
there are normally some kind of limitation on the router.

89
00:08:03,890 --> 00:08:05,920
But notice the numbers that we could use here.

90
00:08:05,960 --> 00:08:14,740
You could use really long numbers if you wanted to but in this example I'll just keep it simple and

91
00:08:14,740 --> 00:08:15,510
use one on two.

92
00:08:15,520 --> 00:08:17,540
So show IP ront.

93
00:08:18,160 --> 00:08:25,060
We've now learnt the roots of the loop backs and now all I need to remember is that when I telnet to

94
00:08:25,060 --> 00:08:32,830
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

95
00:08:32,830 --> 00:08:40,450
3 it's 1 9 2 1 6 8 1 dot Roda 3 so 10 1 and 2 1 6 8 1 2 3.

96
00:08:40,920 --> 00:08:42,050
And I can log in.

97
00:08:42,490 --> 00:08:50,660
So that's the first reason Pedros for using loopback interfaces cover a another reason in a separate

98
00:08:50,670 --> 00:08:50,990
blog.
